potiuk commented on issue #41641:
URL: https://github.com/apache/airflow/issues/41641#issuecomment-2440158878
> Bowler looks interesting.
Don't be deceived by it. It was helpful for Provider's migration at some
point in time, but I had many rough edges - like debugging a problem was a
nightmare until we learned how to do it properly, also it had some annoying
limitations - you had to learn a completely new non-standard abstractions (an
SQLAlchemy-like DSL to perform modifications) - which did not cover all the
refactorings we wanted to do. We had to really dig-deep into the code an find
some workarounds for things we wanted to do, when authors of Bowler have not
thoght about them. And sometimes those were nasty workarounds.
```python
query = (
Query(<paths to modify>)
.select_function("old_name")
.rename("new_name")
.diff(interactive=True)
)
```
Example that I remember above is that we could not rename some of the object
types easily because it was not "foreseen" (can't remember exactly) - we had a
few surprises there.
Also Bowler seems to be not maintained for > 3 years and it means that it's
unlikely to handle some constructs even in 3.9+ Airflow.
What I like about libcst is that it is really "low-level" interface that you
have to program in Python rather than in abstract DSL - similar to "ast" -
and you write actual python code to perform what you want to perform rather
than rely on incomplete abstractions, even if you have to copy&paste rename
code between different "rules" (for example)
--
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]