Another question: Assuming a mono-repo with multip...
# general
Another question: Assuming a mono-repo with multiple first-party packages that have dependencies between them, is there a way to forbid some dependencies and have pants error out if they are detected? E.g. prohibit library
from depending on application
or so? Since pants resolves the dependencies on the file level, it's not bothered by that (or even by circular dependencies), but the library will pull the app when a user installs it, which is what one wanted to avoid in the first place by splitting the code this way.
I think what you're looking for is which I think is in PR (alebit a bit slow on moving 🙂 )
👍 1
Thanks, that seems really close to what I had in mind and will probably cover most cases in our codebase. Reading the issue and a couple of linked ones, I also stumbled upon import linter, which would also help a lot. I was about to start parsing the output of
./pants peek ::
and search for forbidden dependencies programmatically, but I think I'll wait for the PR to get merged.
Yeah, Ideally the visibility support is cross-language, monorepo-wide, which is why i'm excited it's getting some airtime 😛
The author, @curved-television-6568 recently moved to Canada, so contributions are slower than his usual "scary fast" pace 😛 Feel free to chime in, or chip in if you want ❤️
💨 1
🏃 1
so contributions are slower
Because of Canada's awesomeness
🙌 2
🇨🇦 2
🍁 2
Feel free to chime in, or chip in if you want ❤️
I'm still not familiar enough with the codebase to chip in my own code, but I looked over the PR and it covers all that I can think of. I'll try to set up a dev environment for pants and try it out on our codebase, just to confirm that it would catch the error that triggered my question.
🙌 1
Actually Pants has this already built-in for you: (to some degree)
Yet another nice feature, thanks! :)
🙌 1
When you inevitably get addicted to writing interesting plugin code and mucking with the internals, reach out. We're always happy to answer questions, big or small ❤️
💯 1
🙌 1