Skip to content

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