Skip to content

Restructure setup error handling #319

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

Merged
merged 5 commits into from
May 21, 2025

Conversation

gkreitz
Copy link
Contributor

@gkreitz gkreitz commented May 20, 2025

Restructures error handling, getting rid of the weird structure where we used class variables in ProblemAspect to keep track of the number of errors encountered. This also fixed bugs with error counts, where errors occuring in setup() were not included in error counts after check() had been called, and where --werror and --bail_on_error didn't work on errors in setup(). I feel like further refactoring of setup and component interaction is needed, but I didn't want to blow up this PR.

Adds fatal errors, where the error is severe enough that it makes more sense to stop validation than to proceed. This happens when we fail to parse config, or when graders/output validators are missing or fail to compile (when it feels better to just stop instead of burning CPU for submissions just to get judge error).

Also adds a check of all file and directory names in the package, per https://www.kattis.com/problem-package-format/spec/2023-07-draft.html#general-requirements . There are no requirements on directory names in legacy, but I made it a warning if directory names in a legacy package do not comply with 2023-07.

@pehrsoderman pehrsoderman merged commit 1103a28 into Kattis:develop May 21, 2025
4 checks passed
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