conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
467 stars 102 forks source link

Remove `optional` From Dependency Info in Internal Code #389

Closed srilman closed 1 year ago

srilman commented 1 year ago

This PR removes any references to an optional flag or option from the entire codebase. This builds on top of PR #388, so make sure to get that one merged first. At that point, there is an implicit invariant for all dependencies; the dependency is optional if category != "main". Therefore, storing the optional value just makes the code unnecessarily complex.

Note that this does not affect how source files are parsed or the produced lock file in any way. The step that writes the lockfile out will insert optional: true or optional: false flags depending on the category.

netlify[bot] commented 1 year ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit 9203c8db131c2b8846b0e692270c2dd7086862ab
Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/64692edc07fbd00008f6dda4
Deploy Preview https://deploy-preview-389--conda-lock.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

maresb commented 1 year ago

Or does it make more sense to merge #390 all at once, once I've completed that?

maresb commented 1 year ago

~Ah, there are serious merge conflicts with #290 now in main. :disappointed:~

~It looks like you're both doing similar things, so I wonder if this also fixed the same bugs.~

Sorry, I seem to have been confused.

srilman commented 1 year ago

@maresb Resolving conflicts now ...

srilman commented 1 year ago

Merged with main, everything should be good!

maresb commented 1 year ago

Looking great, thanks!!!

As we wait for the Windows test to finish, can we rebase #390 on this?

maresb commented 1 year ago

The tests are passing. Let's pick up on https://github.com/conda/conda-lock/pull/389#discussion_r1199661413 with #390. I have to stop for tonight.