-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for new dependencies #3278
Conversation
3342882
to
68bb3f7
Compare
I'm not sure how I feel about 68bb3f7. Is this really something that we want to have a test for? |
It is much easier to keep dependencies out than to remove them once they are in. So, I would like people to be more mindful of what they are adding and check if the new dependency is really needed. Several people work on ClimaAtmos and currently there is no barrier to adding new dependencies. Two examples of things that I removed over the past few months that should have never gotten in: |
f73a70e
to
50a8d31
Compare
That's a fair point. I'm willing to try this if other people are okay with trying it. I'll request additional review |
Ah, there are more reviewers listed. @dennisYatunin, @sriharshakandala, can you please chime in? |
(I do agree that this should not be a test: it should be reviews that capture this sorts of problem, but we are not there yet) |
I discussed this with Gabriele offline a few days ago. My thoughts are that it is ok to add something like this if unnecessary packages keep making it past review, though I think we could also get away with something a little more automated (e.g., compare the list of currently loaded packages to what's on main or in the latest release, and print a warning if the currently loaded list has anything extra). One feature of this version that the automated version wouldn't capture, however, is that it provides a central place for people to jot down why specific packages need to be added and where they are used. Ideally, we could do this directly in If we want to include this as part of the design, I think the version of the test added in this PR is fine. If not, we can fix |
50a8d31
to
04bb1d0
Compare
Ok, I am merging this. We can revert it or change our approach if it causes troubles or other unintended consequences. |
Adding new dependencies to a Julia project has downsides. First, every dependency increases the precompilation and import time of a package. For complex packages, such as CUDA, this translates in several minutes of precompilation time that every single user of ClimaAtmos (including our CI runners) always pays. Second, dependencies can increase the cost of maintaining ClimaAtmos and the surface area of things that can go wrong (a buggy update in a dependency can break ClimaAtmos). Third, dependencies increase the complexity of the project's environment, potentially causing compatibility issues and restricting the versions we can use. This new test follows the spirit of the regression tests and tries to capture the cost of adding a new dependency by having developers explicitly come here and
04bb1d0
to
023e355
Compare
Adding new dependencies to a Julia project has downsides. First, every dependency increases the precompilation and import time of a package. For complex packages, such as CUDA, this translates in several minutes of precompilation time that every single user of ClimaAtmos (including our CI runners) always pays. Second, dependencies can increase the cost of maintaining ClimaAtmos and the surface area of things that can go wrong (a buggy update in a dependency can break ClimaAtmos). Third, dependencies increase the complexity of the project's environment, potentially causing compatibility issues and restricting the versions we can use.
This new test follows the spirit of the allocation tests and tries to capture the cost of adding a new dependency by having developers explicitly edit the file.
The only relevant commit in this PR is 68bb3f7
Everything else is #3276, where I remove some unused dependencies