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

Basic crux doctor #127

Merged
merged 20 commits into from
Aug 15, 2023
Merged

Basic crux doctor #127

merged 20 commits into from
Aug 15, 2023

Conversation

StuartHarris
Copy link
Member

@StuartHarris StuartHarris commented Aug 9, 2023

Basic crux doctorcommand.

  • Crux.toml — Parse, validate, rewrite
  • List missing files (for which there is a template)
  • Show diffs between existing files and their rendered templates
  • Add embryonic templates for cores and shells

contributes to #126

Usage: crux [OPTIONS] --template-dir <TEMPLATE_DIR> [COMMAND]

Commands:
  doctor  [aliases: doc]
  help    Print this message or the help of the given subcommand(s)

Options:
  -t, --template-dir <TEMPLATE_DIR>  temporary
  -v, --verbose...
  -i, --include-source-code
  -h, --help                         Print help
  -V, --version                      Print version

e.g, this gives the all clear...

cd examples/simple_counter
crux -t ../../templates/simple_counter doctor

... but this would show up some diffs

cd examples/hello_world
crux -t ../../templates/simple_counter doctor

We need to work out what the templates should be and how they are distributed, but this is very much a super-minimal start

@StuartHarris StuartHarris changed the title Crux.toml Basic crux doctor Aug 10, 2023
@StuartHarris StuartHarris marked this pull request as draft August 10, 2023 16:19
@StuartHarris StuartHarris marked this pull request as ready for review August 14, 2023 15:50
Copy link
Collaborator

@obmarg obmarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't gone over the examples/templates much (so much code) but the CLI code looks great.

clap = { version = "4.3.21", features = ["derive"] }
console = "0.15.7"
ignore = "0.4.20"
ramhorns = "0.14.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a quality name

@StuartHarris StuartHarris merged commit ab6ae5c into master Aug 15, 2023
@StuartHarris StuartHarris deleted the cli-init branch August 15, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants