potiuk commented on PR #53149:
URL: https://github.com/apache/airflow/pull/53149#issuecomment-3064962658

   Also ...  I thought a bit about it. Those are cool technologies and tools, 
but arent'we falling into a trap of wanting to use them just to use them and 
not because we need to use them ?
   
   Are we really, really sure we want to do it this way? Seems we are adding a 
lot of complexity, dependencies, the need to regenerate typestubs, we are using 
vendoring tool from `pip` that was not really intended for such use...... That 
sounds awfully like we are (polish proverb) `trying to shoot a fly with a 
cannon`.
   
   The symbolic link solution with forcing relative imports in the shared code 
via pre-commit will be about 50 lines of code and will work even better:
   
   * no streange _vendor or _shared in the imports, we can simply use `from 
airflow.sdk.logging` import if we symbolically link the logging shared code
   * no typestub generation 
   * no meta path finder
   * no hatchling runtime building hooks needed
   * almost no documentation and explanation to the contributors - they work as 
usual, they modify the code in place where they expect it 
   * no potential issues with any kind of tooling you might imagine will have 
problems with all those tooling and meta-path-finder
   
   The only **real** and very small drawback of way simpler symbolic link 
soiution are the relative imports. There is no other drawback, really and if we 
split shared code into functionalities, the symbolic links will be to the 
"functionality" folders - not to the files, so there is no risk of accidentally 
commiting copies of the files. Also for the "functionality" split - there 
shoudl be very, very little of those relative imports - they should essentially 
be to other modules in the same "functionality" package - that's it.
   
   Yes., symbolic links are not "cool" and seem "crude" - but I think they are 
going to do the job even better than stitching together few things and adding a 
lot of custom code that people will have to learn about.  Sounds like this is 
quite an overkill
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to