Skip to content

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

Merged
merged 4 commits into from
Jan 12, 2017

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

Now that that the blacklist is fully know
and is small enough, it will be simpler to
maintain only the blacklist.
@nicolasstucki
Copy link
Contributor Author

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.

Copy link
Contributor

@odersky odersky left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorter: all.diff(blackListed)

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@odersky odersky merged commit 36237cb into scala:master Jan 12, 2017
@allanrenucci allanrenucci deleted the improve-whitelist-infrastructure branch December 14, 2017 19:23
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