grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(compiler): Ignore compiler warnings

Open alex-snezhko opened this issue 1 year ago • 3 comments

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

alex-snezhko avatar Aug 14 '24 06:08 alex-snezhko

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.

ospencer avatar Aug 31 '24 20:08 ospencer

@ospencer do we want comments or attributes for this?

alex-snezhko avatar Sep 02 '24 23:09 alex-snezhko

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.

ospencer avatar Sep 03 '24 00:09 ospencer