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

Add -w #10612

Merged
merged 6 commits into from
Mar 7, 2022
Merged

Add -w #10612

merged 6 commits into from
Mar 7, 2022

Conversation

Simn
Copy link
Member

@Simn Simn commented Mar 3, 2022

I also want to add @:haxe.warning, but this isn't so easy because we probably have to persist this information in the types and fields so that all post-processing can check it. Some architectural challenges here.

Syntax follows OCaml's somewhat:

-w +123 # enable
-w -123 # disable
-w +123+124-125 # multiple
-w +123...127 # range

We'll have to sort out the codes before the next release because we shouldn't really change these.

@Aurel300
Copy link
Member

Aurel300 commented Mar 3, 2022

Might be good to "reserve" more than 100 per category. Also since you are doing this: error codes are useful too, they make it really easy to uniquely identify an error and document it in a manual.

@skial skial mentioned this pull request Mar 3, 2022
1 task
@Simn
Copy link
Member Author

Simn commented Mar 3, 2022

Also since you are doing this: error codes are useful too, they make it really easy to uniquely identify an error and document it in a manual.

I agree. I actually wouldn't mind doing the dumb labor required for that, but somehow I'm always very reluctant to assign unique numbers to things... I suppose I'll have to get over that at some point!

@Simn
Copy link
Member Author

Simn commented Mar 3, 2022

Also, I don't know why I'm talking about persisting anything. The information is already in the metadata and can just be extracted from there. So the only challenge is making sure that all warning functions become somewhat contextual so that they can check their current class/field. That should be doable.

@Simn Simn added this to the Release 4.3 milestone Mar 3, 2022
@Simn Simn marked this pull request as ready for review March 3, 2022 15:16
@Simn
Copy link
Member Author

Simn commented Mar 3, 2022

Alright, if anyone wants to design these codes, you're very welcome to do so! Otherwise I'll merge this next week and we'll deal with that a bit later (but before the next release).

@Simn Simn merged commit b687030 into development Mar 7, 2022
@Simn Simn deleted the enumerate_warnings branch March 7, 2022 06:41
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