Commit Graph

11353 Commits

Author SHA1 Message Date
eugene yokota 9956a676ab
Merge pull request #268 from eed3si9n/wip/opts
Update Java options
2019-05-23 13:35:10 -04:00
Eugene Yokota f94dc1a9ed no more warnings 2019-05-23 12:42:19 -04:00
Eugene Yokota 8015e9f1a9 Remove reference to get_mem_opts 2019-05-22 23:40:10 -04:00
Eugene Yokota bd32204c21 Bump stack size
Ref https://github.com/scala/bug/issues/10870
2019-05-22 23:38:50 -04:00
Eugene Yokota 8a3a7c2b7d Remove MaxMetaspaceSize
Ref https://github.com/sbt/sbt/issues/4686
2019-05-22 23:36:52 -04:00
Eugene Yokota e39a139042 Remove -XX:MaxPermSize out of Windows default
Fixes #223
2019-05-22 17:32:13 -04:00
Eugene Yokota 05ea7eedc5 whitespace fix 2019-05-22 17:22:03 -04:00
Guillaume Martres 186693368d Make coursier-related tasks public
This follows the discussion in
https://github.com/coursier/coursier/issues/1181.
2019-05-21 19:10:38 +02:00
eugene yokota a021528af4
Merge pull request #4641 from smarter/reenable-dotty
Reenable dotty-compiler-plugin test
2019-05-20 14:49:43 -04:00
eugene yokota ecce47e5b7
Merge pull request #4703 from eed3si9n/wip/scalatest
Fixes layer 4 missing scala-reflect
2019-05-20 14:26:42 -04:00
eugene yokota b7363ea4fc
Merge pull request #4702 from eed3si9n/wip/bumpsbt
sbt 1.3.0-RC1
2019-05-17 16:58:53 -04:00
Johannes Rudolph 6e8ab67219
Adapt README again because reason given was probably wrong
It seems the problem might already be fixed in master.
2019-05-17 22:10:37 +02:00
Johannes Rudolph 39609b0d3e
Add note that sbt 1.3.x is currently unsupported 2019-05-17 22:04:03 +02:00
Johannes Rudolph a093b91433
Revert to old README until new version has been released 2019-05-17 21:51:09 +02:00
Eugene Yokota 08c49358c7 Reduce concurrency of scalafmtCheck
Ref scalameta/scalafmt#1399
2019-05-17 14:51:07 -04:00
Eugene Yokota 9d3b626567 Fix ScalaTest issue with ScalaLibrary classloader
Ref #4689
Ref #4671
2019-05-17 14:24:55 -04:00
Eugene Yokota 2376de63d1 sbt 1.3.0-RC1 2019-05-17 11:23:02 -04:00
Guillaume Martres 18bba7366b Upgrade the other dotty test for consistency 2019-05-17 12:04:07 +02:00
Guillaume Martres 19658c2ee0 Reenable dotty-compiler-plugin test
https://github.com/lampepfl/dotty/issues/5671 is fixed now.

Also synchronize the test with
8ffed083c7/sbt-dotty/sbt-test/sbt-dotty/compiler-plugin
2019-05-17 12:04:04 +02:00
eugene yokota 5f127c6339
Merge pull request #4684 from eatkins/fix-warnings
Fix warnings
2019-05-16 16:17:45 -04:00
Ethan Atkins 5a9f5a69d5 Fix warnings
These lines added new warnings that slipped through the cracks.
2019-05-15 17:27:07 -07:00
eugene yokota a85b486b4c
export repo using Coursier (#267)
export repo using Coursier

Ref https://github.com/sbt/sbt/issues/4661
2019-05-15 10:52:39 -04:00
eugene yokota 15b4befa9c
Merge pull request #4679 from eatkins/rt-jar
Don't ever invalidate rt.jar
2019-05-14 22:13:45 -04:00
eugene yokota c61a1fa656
Merge pull request #4678 from eatkins/supershell
Supershell
2019-05-14 21:27:39 -04:00
Ethan Atkins a820bb5623 Sort the supershell tasks by task name
This should make the output less jumpy.
2019-05-14 17:27:17 -07:00
Ethan Atkins 564aa7262b Fix TaskProgress
Supershell was not reliably working and I tracked it down to
TaskProgress not actually publishing updates during task execution. This
seemed to happen because the background task was only run once when the
task started up. Once that task exited, no further task reports would be
published. The fix is to start a new thread every time we enter
EvaluateTask. I verified manually that it did not seem to leak threads
because EvaluateTask always calls shutdown, which calls
afterAllCompleted, which stops the progress thread.

I also decreased the default report period to 100ms. I can't imagine
that this will have a big effect on performance. It can be tuned with
the sbt.supershell.sleep parameter.
2019-05-14 17:27:16 -07:00
Ethan Atkins 0d9be6dd4a Don't ever invalidate rt.jar
There are issues when using jdk > 8 where the rt.jar file can be
invalidated by ExternalHooks. This causes spurious rebuilds. I think
it's fair to assume that rt.jar never changes. If a dependency is named
rt.jar, then invalidation may not work correctly but I think that this
is the more important case to handle.

I verified that before this change, it was impossible to run
akka-actor/compile twice in a row using adopt jdk 11 and, after this
change, re-compilation worked as expected.
2019-05-14 16:53:09 -07:00
eugene yokota 91a0b8ebfe
Merge pull request #4676 from eed3si9n/wip/bump
Zinc 1.3.0-M5
2019-05-14 06:50:43 -04:00
Eugene Yokota 39d9748303 Zinc 1.3.0-M5 2019-05-13 22:40:03 -04:00
eugene yokota 5261acdd0e
Merge pull request #4674 from eatkins/shutdown-hooks
Manage shutdown hooks
2019-05-13 22:36:27 -04:00
Ethan Atkins e5b54a59ea Manage shutdown hooks
I discovered that some registered shutdown hooks would crash due to
67df72ab01 because they would try to load
classes from the closed classloader. To fix this, I add a internal
shutdown hooks mechanism that can be managed by sbt. Any unevaluated
shutdown hooks will be run when the sbt main method exits. This means
that they will be run when the user calls reboot. I think that is
reasonable.
2019-05-13 17:38:56 -07:00
eugene yokota 7e5b9c521e
Merge pull request #4675 from eatkins/startup
Startup
2019-05-13 20:10:05 -04:00
eugene yokota 84bee1e440
Merge pull request #4671 from eed3si9n/wip/scalalibrary
change ClassLoaderLayeringStrategy.ScalaInstance to ScalaLibrary
2019-05-13 17:49:47 -04:00
Ethan Atkins 54412d8c59 Improve ScalaMetaBuildClassLoader construction
I realized that all of the data structures that I needed to isolate the
classpath are contained in the AppProvider interface so there was no
need to use structural reflection on the top class loader.
2019-05-13 14:40:22 -07:00
Ethan Atkins 418e7e09fd Shave O(500ms) off of sbt startup
It turns out that it can take roughly one second to instantiate a
scala.nsc.tools.Global instance for the first time. When sbt is starting
up, it also takes nearly 2 seconds to initialize logging. We can speed
up the boot time by doing these two things concurrently. On my machine,
I saw on average a 500ms decrease in startup time after this change.
2019-05-13 14:39:39 -07:00
eugene yokota 529ba8a3f2
Merge pull request #4672 from xuwei-k/Reload-stack-trace
disable "Reload" exception stack trace
2019-05-13 16:25:34 -04:00
eugene yokota d4740d8a61
Merge pull request #4673 from eed3si9n/wip/coursier
lm-coursier 1.1.0-M14-2
2019-05-13 15:05:08 -04:00
Eugene Yokota 3f5a872001 lm-coursier 1.1.0-M14-2 2019-05-13 13:59:58 -04:00
eugene yokota 41197a9c14
Merge pull request #4670 from eed3si9n/wip/bridgebug
exclude inter-project resolvers when resolving the compiler bridge
2019-05-13 02:54:44 -04:00
Eugene Yokota 5c85c04e0d don't include si.allJars into the test classpath
allJars contains unwanted Scala modules.
Having this in prevents the flat classloader from working correctly.

Ref #4609
2019-05-12 23:51:17 -04:00
Eugene Yokota b00c675a19 change ClassLoaderLayeringStrategy.ScalaInstance to ScalaLibrary
Fixes #4609

ScalaInstance contains unwanted Scala modules such as scala-xml and scala-parser-combinators.
2019-05-12 23:36:12 -04:00
xuwei-k 9b1f3e542a disable "Reload" exception stack trace 2019-05-13 12:15:19 +09:00
Eugene Yokota d8c9eb90c6 exclude inter-project resolvers when resolving the compiler bridge
Fixes #4669
2019-05-12 23:03:07 -04:00
eugene yokota c1d2e703b6
Merge pull request #4664 from eatkins/m3-io-fixes
M3 io fixes
2019-05-12 18:24:00 -04:00
Ethan Atkins b96be5343b Support char buffered stdin on windows in continuous
I finally realized that the trick is that for non cygwin windows, the
available method on the jline wrapped input stream always returns zero.
Unlike on posix, however, the read method is interruptible which means
that we can just spin up a background thread that polls from the input
stream and writes it into a buffer.

I verified that it was no longer necessary to hit <enter> after 'r' to
rerun the continuous command on my windows vm after this change.
2019-05-11 22:01:49 -07:00
Ethan Atkins 4b915ff69e Run more scripted tests on windows
Given that there are io differences between windows and posix systems,
we should aim to run the tests that do a lot of io on windows. There are
a few tests that don't work because of some platform specific issues so
I added a filter that excludes these tests on windows in ScriptedTests.
2019-05-11 22:01:49 -07:00
Ethan Atkins 8f54ecd536 Check meta build sources before task evaluation
This commit finally fixes #241 by adding support for sbt to either
print a warning or automatically reload the project if the metabuild
sources have changed. To facilitate this, I introduce a new key,
metaBuildSourceOption which has three options:
1) IgnoreSourceChanges
2) WarnOnSourceChanges
3) ReloadOnSourceChanges

When the former is set, sbt will not check if the meta build sources
have changed. Otherwise, sbt will use the buildStructure / fileInputs to
get the ChangedFiles for the metabuild. If there are any changes, it
will either warn or reload the build depending on the value of
metaBuildSourceOption.

The mechanism for diffing the files is that I add a step to EvaluateTask
where, if the project has been loaded and
metaBuildSourceOption != IgnoreSourceChanges, we evaluate the needReload
task. If we need a reload, we return an error that indicates that a
Reload is necessary. When that error is detected, the MainLoop will
prepend "reload" to the pending commands for the state. Otherwise we
just print a warning and continue.

I benchmarked the overhead of this and it wasn't too bad. I generally
saw it taking 5-20ms to perform the check. Since this is only done once
per task evaluation run, I don't think it's a big deal. When
IgnoreSourceChanges is set, there is O(10us) overhead. If performance
does become a problem, we could add a global watch service and skip the
needReload evaluation if no files have been modified.

I removed the watchTrackMetaBuild key and made it so that the continuous
builds only track the meta build when
metaBuildSourceOption == ReloadOnSourceChanges
2019-05-11 22:01:49 -07:00
Ethan Atkins 4007810adb Add watchPersistFileStamps key
The persistentFileStampCache does seem to work pretty well but in case
users encounter issues, I add a boolean flag that allows the user to
turn this behavior off and always re-stamp every source file in every
task evaluation run.
2019-05-11 22:01:48 -07:00
Ethan Atkins ec09e73437 Improve cache invalidation strategy
Previously the persistent attribute map was only reset when the file
event monitor detected a change. This made it possible for the cache to
be inconsistent with the state of the file system*. To fix this, I add an
observer on the file tree repository used by the continuous build that
invalidates the cache entry for any path for which it detects a change.
Invalidating the cache does not stamp the file. That only happens either
when a task asks for the stamp for that file or when the file event
monitor reports an event and we must check if the file was updated or
not.

After this change, touching a source file will not trigger a build
unless the contents of the file actually changes.

I added a test that touches one source file in a project and updates the
content of the other. If the source file that is only ever touched ever
triggers a build, then the test fails.

* This could lead to under-compilation because ExternalHooks would not
detect that the file had been updated.
2019-05-11 22:01:48 -07:00
Ethan Atkins 3d965799f3 Fix trigger bug
I got the if condition wrong which was setting the fileInputs to have a
LastModified stamp.
2019-05-11 21:34:02 -07:00