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

Add local build script #269

Closed
hannobraun opened this issue Mar 1, 2022 · 2 comments · Fixed by #569
Closed

Add local build script #269

hannobraun opened this issue Mar 1, 2022 · 2 comments · Fixed by #569
Labels
good first issue Good for newcomers topic: build Anything relating to the build system. type: development Work to ease development or maintenance, without direct effect on features or bugs

Comments

@hannobraun
Copy link
Owner

We have a comprehensive CI build now that checks quite a few things. This is good and necessary, but I know from experience, that it can also be a pain for new contributors. You don't know what the CI build checks for yet, so you don't know what to pay attention to. Since CI builds are not instant, it can be a pain to fix your broken build.

Experienced contributors also benefit from an easy way to check the most relevant things locally, before pushing a pull request.

Ideally, this local build would not duplicate what the CI build already does, but due to the way the CI build is structured, this is not practical. And it doesn't matter much, as there are only a few things that are checked. Duplicating those in a local build script is totally fine.

Here's what this build script should do:

  • cargo clippy
  • cargo test
  • cargo fmt --check

This is rather straight-forward. The question is, what should this build script be, as it needs to work on many platforms. @Bandsberg suggested Nushell in #64 (comment), but there are many possibilities.

Labeling https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, as this is rather self-contained and doesn't require knowledge of Fornjot.

@hannobraun hannobraun added good first issue Good for newcomers type: development Work to ease development or maintenance, without direct effect on features or bugs topic: build Anything relating to the build system. labels Mar 1, 2022
@chrisprice
Copy link
Contributor

Would an implementation using just be appropriate?

I quickly threw this branch together as a proof of concept but I'm more than happy to use something else if there's a preference.

@hannobraun
Copy link
Owner Author

Would an implementation using just be appropriate?

Yes, I think it would. I've used in on another project in the past and never had complaints. Plus, it's still actively maintained.

I quickly threw this branch together as a proof of concept

Looks great! The only thing I could think to add is a note, that the justfile is maintained in parallel to the CI configuration, that it's possible they can deviate, and that most CI failures that aren't caught by just build should be considered bugs in the justfile.

but I'm more than happy to use something else if there's a preference.

Personally, I was excited to try out Nushell, but I don't think it's a better solution to this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers topic: build Anything relating to the build system. type: development Work to ease development or maintenance, without direct effect on features or bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants