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

Give users more leeway to reject edge cases in different stages #90

Open
nlsandler opened this issue Oct 21, 2024 · 0 comments
Open

Give users more leeway to reject edge cases in different stages #90

nlsandler opened this issue Oct 21, 2024 · 0 comments
Assignees
Labels

Comments

@nlsandler
Copy link
Owner

There are some error cases that it would be reasonable to catch in either the parser or the type checker. As @ysono points out, some tests of intermediate stages will fail if you decide to handle these error cases in a different stage than the test suite expects. It should be possible to make reasonable choices that diverge slightly from what's in the book without getting test failures.

Possible fixes:

  1. Add a --skip-temporarily-valid option, which tells the compiler to skip any test cases that are invalid but should be accepted by the current stage. (E.g. if you're running --stage parse, just don't run the tests in invalid_types. Would need to think on this more to make sure it won't break anything/undermine test coverage. Downside: doesn't help if the user decides to handle a case later than the test suite expects, only if they decide to handle it earlier.
  2. Provide a configuration file where users can specify the expected failure stage for individual tests. More flexible but also more complicated.
@nlsandler nlsandler added the enhancement New feature or request label Oct 21, 2024
@nlsandler nlsandler self-assigned this Oct 21, 2024
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