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

feat(compiler): Ignore compiler warnings #2142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alex-snezhko
Copy link
Member

match (true) {
  true => void
}
let a = [> 1, 2]
a[1.5]
# will warn
grain compile main.gr
# will not warn
grain compile main.gr --ignore-warnings=all
grain compile main.gr --ignore-warnings=partialMatch,arrayIndexNonInteger

Closes #163

@ospencer
Copy link
Member

We discussed this on Discord and decided that for now, we don't want the command line flag. For what's needed for Silo, it just needs to be programmatically configurable, but ideally we'd allow disabling a warning using a comment.

@alex-snezhko
Copy link
Member Author

@ospencer do we want comments or attributes for this?

@ospencer
Copy link
Member

ospencer commented Sep 3, 2024

Attributes would be a little nicer, but we don't currently support attributes on arbitrary nodes, and that's actually kind of a hard problem. If you want to pair on trying to make that happen we can do that in another PR.

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

Successfully merging this pull request may close these issues.

Allow setting compiler warnings from flags
3 participants