Skip to content
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

How do we balance reducing boilerplate in scripts while allowing reproducibility across systems #46

Closed
epage opened this issue Apr 25, 2022 · 3 comments
Labels
question Uncertainty is involved
Milestone

Comments

@epage
Copy link
Owner

epage commented Apr 25, 2022

  • Examples:
    • Add "always there" dependencies (e.g. clap)
    • Keep major versions up to date (* means new scripts use latest but won't be able to run old scripts)
    • Avoid boilerplate of having to specify the current edition
  • Ideas:
    • Default to loose, low-boilerplate approach (always latest edition, global prelude, global dependency-list) with warning telling people to run a command to turn it into a non-loose version (sets edition, embeds prelude and dependency list with a marker to say this is running in isolated mode)
@epage epage added the question Uncertainty is involved label Apr 25, 2022
@epage
Copy link
Owner Author

epage commented Apr 25, 2022

Other ideas

Main risk for some of these is slowing down start up time

@bjorn3
Copy link

bjorn3 commented May 1, 2022

Another option would be to automatically copy the lockfile next to the script. For example for a foo.rs script it would generate a foo.rs.lock file. If one exists this file would be copied to Cargo.lock in the generated source dir and if cargo changed it, it would be copied back. You wouldn't strictly have everything in a single file anymore, but everything the user cares about would still be in a single file.

@epage
Copy link
Owner Author

epage commented May 2, 2022

Interesting idea

  • We could possibly extend the format for edition so new scripts are locked in at the edition at the time of writing
  • People might hate the clutter which might kill it
  • I was also wondering about Share a lock file across scripts #48 to improve reuse of intermediate build results

@epage epage added this to the Pre-RFC milestone Jun 19, 2022
@epage epage closed this as completed in c86ee47 Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Uncertainty is involved
Projects
None yet
Development

No branches or pull requests

2 participants