-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add FromTastyDecompilation decompilation blacklist #4645
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 FromTastyDecompilation decompilation blacklist #4645
Conversation
9646b8b to
06ef486
Compare
|
With the current blacklist, it tests 1847 decompilations and 633 recompilations |
fa23ed6 to
f633e98
Compare
c124b95 to
71439ab
Compare
|
We need some way to automatically update the blacklist, otherwise this will be impossible to maintain. I also suggest maintaining the list in a separate file, and still running the tests on the blacklisted files so we know when something starts to pass. |
2096a5b to
f6f8d04
Compare
d948875 to
f745227
Compare
|
This PR adds a blacklist for decompilation tests; this implies that we decompile all tests instead of only the ones that have an explicit |
f745227 to
74df640
Compare
|
@allanrenucci could you review this now. Now it is not a wip anymore and it should be merged to have more regression tests. |
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.
Instead of having these blacklist/whitelist being passed as functions/Set, I would introduce a unique abstraction. Something like:
sealed trait FileFilter {
def accept(file: String): Boolean
}
object FileFilter {
def excludeAll(files: List[String]): FileFilter = new FileFilter {
private[this] val blackList = files.toSet
def accept(file: String) = !blackList.contains(file)
}
def includeAll(files: List[String]): FileFilter = new FileFilter {
private[this] val whiteList = files.toSet
def accept(file: String) = whiteList.contains(file)
}
object NoFilter extends FileFilter {
def accept(file: String) = true
}
}| @@ -0,0 +1,80 @@ | |||
| // Constant(Symbol) | |||
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.
Is that supposed to be a comment?
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.
Yes. These tests fail because they have a Constant(_) (as in Literal(Constant(_))) with a scala.Symbol inside.
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.
Shouldn't a comment start with #?
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.
Oh, yes
e51e7ce to
a951dd8
Compare
Aslo add a recompilation whitelist
a951dd8 to
8d87b56
Compare
|
@allanrenucci, I added the |
allanrenucci
left a comment
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 think I would merge ListOfSources.scala, FromTastySources.scala, StdLibSources.scala into a single file TestRessources or TestSources.
Otherwise LGTM
|
|
||
| class TastyCompilationTest(step1: CompilationTest, step2: CompilationTest, step3: CompilationTest, | ||
| recompilationBlacklist: Set[String], decompilationDir: String, shouldDelete: Boolean)(implicit testGroup: TestGroup) { | ||
| recompilationBlacklisted: FileFilter, decompilationDir: String, shouldDelete: Boolean)(implicit testGroup: TestGroup) { |
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.
recompilationBlacklisted?
b622fd9 to
3c5d4ea
Compare
No description provided.