-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix #525: Spuriously duplicate options #536
Fix #525: Spuriously duplicate options #536
Conversation
2dc6225
to
7e5e8bd
Compare
Just tried something slightly different in the commits I just pushed, as the CI errors looked legit… Feel free to revert them, if ever my approach doesn't pan out well. |
The idea of my approach is that |
Thank you for the fixes, I must have messed something up with the scopes before. I'll be more careful next time |
No problem, that's a super hairy area of the code base. As the commit history shows, I definitely didn't address that in the first try 😅 |
This PR fixes the issue and adds a unit test based on the original issue snippet. It is worth noting that I decided to fix only the spuriously duplicate options - users still can duplicate them on will f.e. by providing multiple of the same using directives in different files or by adding an already defined option via cli. On that occasion they will most likely still receive the same warning.
I did not want to limit users in defining duplicate options as that would require a more strict control of a scalac api, f.e. perhaps one day scalac will have an option that will be able to be defined multiple times (like our verbose) and then our hypothetical assumption would become incorrect.