-
Notifications
You must be signed in to change notification settings - Fork 202
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
Exract classpathOptions
in sbt-bloop
#110
Conversation
That's a genuine failure, but I can't reproduce it on my machine... |
23561dc
to
84ffca7
Compare
84ffca7
to
2a210dd
Compare
I couldn't reproduce the failure on my machine then, and I still can't. Hopefully it'll work now! |
@Duhemm Did you eventually print classpaths here to see how |
It's on today's list :) |
Has the mistery been solved? We may want to find a sorcerer to help us find out what's happening. |
2a210dd
to
e45babb
Compare
Debug info shows that this is extremely likely to be caused by our integration tests setup: several entries of the classpath and boot classpath do no exists when we do the compilation, because they're downloaded in scripted when we do the setup. Let's see if sharing the same ivy home for scripted and normal sbt solves the issue. |
c6968fe
to
6aee219
Compare
3883387
to
21a8dc9
Compare
6aee219
to
2042b53
Compare
fca0537
to
88bb1ef
Compare
I'm pretty sure it didn't run the community build @jvican Do you know why? |
Nevermind, I had forgotten about your PR that fixes it :) |
d5461ee
to
5c37551
Compare
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully. Benchmarks is based on merging with master |
Any news on this? 😄 |
Yes, it works. It crashed because it had the wrong configurations (hence the |
4c64091
to
402596d
Compare
402596d
to
c28c757
Compare
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.
Looks good, I'd like to run the benchmarks on this before merging. I've left three comments I think are important addressing before merging.
@@ -70,7 +73,11 @@ class IntegrationTestSuite(testDirectory: Path) { | |||
(state, rootProject) | |||
} | |||
|
|||
val reachable = Dag.dfs(state.build.getDagFor(projectToCompile)).filter(_ != projectToCompile) | |||
val reachable = |
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.
Why is this necessary?
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 renamed state
to initialState
, and state
is now the state after cleaning. We need to clean because the project may have already been compiled by a previous test.
@@ -35,6 +37,21 @@ | |||
@Parameter(property = "bloop.executionFork", defaultValue = "false") | |||
private boolean bloopExecutionFork; | |||
|
|||
@Parameter(property = "bloop.classpathOptions.bootLibrary", defaultValue = "true") |
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.
Have you looked if the maven integration already supports all these?
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've been through the plugin but I haven't found how this could be configured, so I assumed it didn't.
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.
Can you double-check?
@@ -96,6 +99,12 @@ object Project { | |||
ScalaInstance(scalaOrganization, scalaName, scalaVersion, allScalaJars, logger) | |||
val classpath = toPaths(properties.getProperty("classpath")) | |||
val classesDir = toPath(properties.getProperty("classesDir")) | |||
val classpathOptions = { | |||
val values = properties.getProperty("classpathOptions").split(",") | |||
val Array(bootLibrary, compiler, extra, autoBoot, filterLibrary) = |
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.
The error reporting if this fails is poor here.
bin/detect-community-build.sh
Outdated
exit 0 | ||
else | ||
echo "The community build will not run for this pull request." | ||
exit 1 |
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.
Doesn't this mean that Drone will fail altogether?
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.
Good catch, the problem was actually in .drone.yml
@@ -15,13 +15,14 @@ class CompilerCache(componentProvider: ComponentProvider, | |||
logger: Logger, | |||
userResolvers: List[Resolver]) { | |||
|
|||
private val cache = new ConcurrentHashMap[ScalaInstance, Compilers]() | |||
private type CompilerID = (ScalaInstance, ClasspathOptions) | |||
private val cache = new ConcurrentHashMap[CompilerID, Compilers]() |
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.
Why is this necessary? It's not clear to me why classpath options is part of the compiler key, this is not nice performance wise because every time the classpath options change we need to instantiate a new compiler. Can we avoid 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.
The classpathOptions
are part of the parameters that we give Zinc to get a Compilers
instance. I'll try to work around that...
.drone.yml
Outdated
*[DOCS]*) echo "Skipping tests for commit that only changes docs." ;; | ||
*) ${SBT_RUN}; ./bin/ci-clean-cache.sh ;; | ||
esac | ||
- if [[ "$DRONE_COMMIT_MESSAGE" == *[DOCS]* ]]; then |
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.
This fails in sh, that's why it's implemented via case
881009b
to
4fe1988
Compare
If you want to regenerate the configuration files, you need to update the version number of the configuratino file in our build, you can drop 4fe1988 |
4fe1988
to
3ece4db
Compare
35841c2
to
6ea16fa
Compare
6ea16fa
to
8b7e16d
Compare
8b7e16d
to
aa87faf
Compare
No description provided.