-
Notifications
You must be signed in to change notification settings - Fork 2
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
Get started with lal easier #52
base: master
Are you sure you want to change the base?
Conversation
17c264d
to
aa7ae35
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.
comments and a question
src/main.rs
Outdated
@@ -270,13 +268,13 @@ fn handle_docker_cmds( | |||
let xs = if a.is_present("parameters") { | |||
a.values_of("parameters").unwrap().collect::<Vec<_>>() | |||
} else { | |||
vec![] | |||
Vec::new() |
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.
these are equivalent, right?
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.
Vec::new
can be given in places that expect a FnOnce() -> Vec
, and is a little bit easier on the compiler as it doesn't need to evaluate the macro.
I think what I actually want to do is this:
let xs: Vec<&str> = a.values_of("parameters")
.map_or_else(Vec::new, |params| params.collect());
Yeah, I want to decouple the repository's definition of the environment from the user's definition of the environment. My intention is to not require the build environment be configured locally at all, and can be upgraded with the repository. This also helps keep the build environment needed for the code in sync through the code itself. That said, I think that having locally defined the version of the environments is still useful as an override (because users could always maintain a local patch to the manifest's environment); the question then becomes one about precedence - should On having the manifests across multiple repositories; I think I'm okay with this sprawl. There are tools like https://github.com/Clever/microplane which have solve this problem for me in recent years.
This is a really compelling argument for having the local config override the repo manifest's definition of the environment. I'll swap them around so that
|
55780c0
to
8efe6b2
Compare
Remove the `configs/` and remove the need to provide a defaults file on first startup. From a fresh checkout $ cargo build $ cargo run -- configure $ cargo run -- build The README has been updated with more examples. This is now because the manifest file can contain the environment definitions, and lal will fallback to the user-wide environment definitions only if not found (to preserve behaviour). As a consequence, the environment to build code can now be configured with the code in `.lal/manifest.json`.
8efe6b2
to
ab3e50c
Compare
Remove the
configs/
and remove the need to providea defaults file on first startup.
From a fresh checkout, can
This is now because the manifest file can contain
the environment definitions, and lal will fallback
to the user-wide environment definitions only if
not found (to preserve behaviour).