gauge-sh / tach

A Python tool to enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip πŸ”§ Able to be adopted incrementally - ⚑ Implemented with no runtime impact ♾️ Interoperable with your existing systems πŸ¦€ Written in rust
https://gauge.sh
MIT License
953 stars 33 forks source link

Add deprecated modifier to file #184

Closed 13hannes11 closed 1 month ago

13hannes11 commented 1 month ago

I have the following use case:

I want to slowly introduce tach and thus slowly remove depends_on from some modules. If I add a comment in the tach.yml it gets overwritten by sync so desirable behaviour for me would be:

Either:

emdoyle commented 1 month ago

Hi @13hannes11 thanks for raising this!

Preserving comments definitely makes sense. I would imagine we could store information about comment locations on the ProjectConfig up-front during parsing, and then use them while dumping the ProjectConfig to yml. I'm not sure how complex it might be to cover edge cases but it seems doable, at least for comments that live on their own line (trailing comments on lines that change seem complicated). I'll add this as a ticket to our internal tracking system and ping back here when it's shipped.

For the deprecation annotation, could you tell me more about your use case? Is your workflow similar to #187 in the sense that you are trying to gradually phase out a specific dependency?

13hannes11 commented 1 month ago

For the deprecation annotation, could you tell me more about your use case? Is your workflow similar to #187 in the sense that you are trying to gradually phase out a specific dependency?

That's exactly the use case I was thinking of.

caelean commented 1 month ago

Hi @13hannes11! Sorry for the delay, I'm working on this now. #187 is resolved so hopefully that can help with your usecase in the interim!

caelean commented 1 month ago

@13hannes11 this is shipped! Upgrade to 0.9.0 and check out https://docs.gauge.sh/usage/deprecate

Let me know if you have any feedback, feel free to chime in on Discord too! https://discord.gg/Kz2TnszerR