-
Notifications
You must be signed in to change notification settings - Fork 245
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
[Large] Add support for inheriting platforms (monorepos) #755
[Large] Add support for inheriting platforms (monorepos) #755
Conversation
ddd8acc
to
d783510
Compare
d783510
to
0657535
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 nice work!
0657535
to
17430f0
Compare
Co-authored-by: Chris Krycho <hello@chriskrycho.com>
Published the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ fabulous! Let's ship it!
ExtensionCycleError { | ||
paths: Vec<PathBuf>, | ||
duplicate: PathBuf, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
// Detected infinite loop in project workspace: | ||
// | ||
// --> /home/user/workspace/project/package.json | ||
// /home/user/workspace/package.json | ||
// --> /home/user/workspace/project/package.json | ||
// | ||
// Please ensure that project workspaces do not depend on each other. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More 😍!
@@ -155,6 +155,7 @@ impl<T> Default for InheritOption<T> { | |||
} | |||
|
|||
#[derive(Clone, PartialOrd, Ord, PartialEq, Eq)] | |||
#[cfg_attr(test, derive(Debug))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. TIL!
Closes #378
Implements volta-cli/rfcs#43
Info
extends
key inpackage.json
Volta settings (see the above-linked RFC for more information).Changes
chain-map
crate, an abstraction to allow searching a chain ofHashMap
s without having to collapse all of them into a single map.project
, instead of a separatemanifest
module.Project
type to support pulling data from multiple sources by following a chain ofextends
directives.ChainMap
, as we only need to search through them to determine if a dependency is there or not, we don't need to iterate / process the entire list.PlatformSpec
once all files are loaded. This will throw a more helpful error when there isn't a Node version (previously it would be an obaque parsing error because we requirednode
to be set ifvolta
was present).package.json
to avoid clobbering anyextends
settings.manifest/tests.rs
file.Tested
extends
chain.extends
works as expected.Notes
project.rs
was moved intoproject/mod.rs
with other submodules inproject/
. This has the unfortunate side effect of the diff looking likeproject.rs
was deleted andproject.mod.rs
was created. While there are substantial changes, the code isn't 100% unique.manifest/mod.rs
toproject/serial.rs
, with some modifications to support the new format. This again looks like mass removal / insertion.chain-map
Will likely be refactored and actually published on crates.io, so it won't have to remain a child crate permanently.