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

Automate tasks like generation of derived sources i.e. in examples and run example related tests scripts #33

Closed
jsinger67 opened this issue Nov 27, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@jsinger67
Copy link
Owner

Was first mentioned in (#31 (comment))

@jsinger67 jsinger67 added the enhancement New feature or request label Nov 27, 2022
@jsinger67 jsinger67 self-assigned this Nov 27, 2022
@jsinger67
Copy link
Owner Author

All common tasks that are used could be defined using this approach.

  • Format and build
  • Build and test
  • Build and run examples as special test scenario
  • Applying version labels
  • etc.

@ryo33
Copy link
Contributor

ryo33 commented Dec 3, 2022

cargo make is a very useful tool, but I think there are only a few projects that need it.
Cargo is already a powerful tool for most projects.

I used it for a personal project and had the following problems.

  • cargo install cargo-make is slow (it makes CI slow)
  • things are getting more and more complex

Then, I switch to cargo and a few portable shell scripts for CI. If we develop on Windows, we need a bash-compatible shell or WSL.

@jsinger67
Copy link
Owner Author

I wasn't aware of the performance problems of cargo make. Fortunately I spent no effort for this issue yet.
I will rethink the problem and find another solution.
Some things (mostly Powershell scripts that run examples) can be solved by using the built-in test infrastructure. Others (mostly generation of parser code) can be achieved by portable scripts or some kind of build steps using build.rs.

@jsinger67 jsinger67 changed the title Use cargo make for easy generation of derived sources i.e. in examples Automate tasks like generation of derived sources i.e. in examples and run example related tests scripts Dec 3, 2022
@jsinger67
Copy link
Owner Author

Fixed with 82fb6f4
Automation with cargo-make is an add-on. You don't need to use it in regular development.
It is rather a way to automate special tasks like building example sources to check if parol generates different output.

If you want to use it you need to install cargo make:

  ```shell
  cargo install cargo-make
  ```

Then you can invoke the example source generation with this command

  ```shell
  cargo make generate_examples
  ```

The other use case "Running the generated parsers against special input files" was integrated into a a new integration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants