-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve whitelist infrastructure. #1880
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
Improve whitelist infrastructure. #1880
Conversation
Now that that the blacklist is fully know and is small enough, it will be simpler to maintain only the blacklist.
This PR aims to make it easer to rebase the callgraph branch and to unify all the whitelist logic in one place (previously repeated in 3 different sub-projects). @DarkDimius, you should be aware of this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
|
||
def blacklistFile: String = "./test/dotc/scala-collections.blacklist" | ||
|
||
def whitelisted: List[String] = (all.toSet -- blacklisted).toList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shorter: all.diff(blackListed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one concern: For debugging, it would be good to have the old whitelist around. For many hard to find bugs I bisected whitelist to come up with a minimal failing set. With the new automatic way to get all files in scala's stdlib we can no longer do that. Can we have a config option like useExplicitWhiteList
which, if set to true would use the old whitelist file instead of the computed one? Then to debug one could set this option to true and then get to work on the whitelist file for triaging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added useExplicitWhiteList
in StdLibSources.scala
to allow the use of a whitelist. In the current scheme if useExplicitWhiteList == true
and the whitelist file does not exist, it will be generated from the blacklist. If it exists it will simply use it.
No description provided.