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

Parse, don't analyze #515

Closed
3 of 4 tasks
casey opened this issue Nov 8, 2019 · 1 comment
Closed
3 of 4 tasks

Parse, don't analyze #515

casey opened this issue Nov 8, 2019 · 1 comment
Labels

Comments

@casey
Copy link
Owner

casey commented Nov 8, 2019

This is apropros of this post.

Analysis performs a number of consistency checks that reject malformed justfiles. For example, one check makes sure that all recipe dependencies refer to actual recipes. However, before and after this consistency check, the dependencies field of Recipe is still just a Vec<Name>, so we have no type-level guarantee that the dependency exists, or that the check was performed correctly.

It would be better if the analysis pass transformed the field from a Vec<Name> into a Vec<Rc<Recipe>>, giving us a type-level guarantee that the dependency does in fact refer to a valid recipe.

Todo:

  • dependencies
  • aliases
  • functions
  • variables
@casey casey added the reform label Nov 8, 2019
@casey casey added this to the eventually milestone Nov 10, 2019
@casey
Copy link
Owner Author

casey commented Nov 21, 2019

Resolving variables is a larger project with an implementation that I'm not sure about, so what I've done will do for now.

@casey casey closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant