Grzegorz Kossakowski
4c1c31e190
Fix for dependency on class file corresponding to a package. ( #620 )
...
While trying to determine binary dependencies sbt lookups class files
corresponding to symbols. It tried to do that for packages and most of the
time would fail because packages don't have corresponding class file
generated. However, in case of case insensitive file system, combined
with special nesting structure you could get spurious dependency.
See added test case for an example of such structure.
The remedy is to never even try to locate class files corresponding to
packages.
Fixes #620 .
2012-12-10 13:53:52 -05:00
Grzegorz Kossakowski
78b0f485fa
Add `compilations` field to `Analysis`.
...
We store `Seq[xsbt.api.Compilation]` in `Analysis`. Compilation are
being appended to sequence for every iteration of the incremental
compiler.
Note that `Compilation`s are never removed from the sequence unless
you start from scratch with empty `Analysis`. You can do that by using
sbt's `clean` command.
The main use-case for using `compilations` field is to determine how
many iterations it took to compilen give code. The `Compilation` object
are also stored in `Source` objects so there's an indirect way to recover
information about files being recompiled in every iteration.
Since `Analysis` is persisted you can use this mechanism to track entire
sessions spanning multiple `compile` commands.
2012-12-10 09:15:52 -05:00
Mark Harrah
e3745540c9
More cleanup of Scala version handling, including managedScalaInstance to control automatic 'scala-tool' configuration and dependencies.
2012-12-09 20:40:41 -05:00
Mark Harrah
d4fd136192
support defining Projects in .sbt files
...
vals of type Project are added to the Build
2012-12-09 20:40:41 -05:00
Grzegorz Kossakowski
ef39aeb9c1
Follow source layout convention supported by Eclipse.
...
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Adriaan Moors
f7be122eb4
Run apiExtractor after pickler (configurable)
...
Extract the api after picklers, since that way we see the same symbol
information/structure irrespective of whether we were typechecking
from source / unpickling previously compiled classes.
Previously, the apiExtractor phase ran after typer.
Since this fix is hard to verify with a test (it's based on the
conceptual argument above, and anecdotal evidence of incremental
compilation of a big codebase), we're providing a way to restore the
old behaviour: run sbt with -Dsbt.api.phase=typer.
This fixes #609 .
2012-12-06 19:35:51 -05:00
Adriaan Moors
cb0e723923
Fix #610 : represent refinement typerefs stably
...
goal:
a representation of a type reference to a refinement class that's stable
across compilation runs (and thus insensitive to typing from source or
unpickling from bytecode)
problem:
the current representation, which corresponds to the owner chain of the
refinement:
1. is affected by pickling, so typing from source or using unpickled
symbols give different results (because the unpickler "localizes"
owners -- this could be fixed in the compiler in the long term)
2. can't distinguish multiple refinements in the same owner (this is
a limitation of SBT's internal representation and cannot be fixed in
the compiler)
solution:
expand the reference to the corresponding refinement type: doing that
recursively may not terminate, but we can deal with that by
approximating recursive references (all we care about is being sound for
recompilation: recompile iff a dependency changes, and this will happen
as long as we have one unrolling of the reference to the refinement)
2012-12-06 19:11:12 -05:00
Lex Spoon
b7250bb528
Fix -Yrangepos. Unlike other settings, it requires that a mixin be added to Global.
2012-12-03 20:34:11 -05:00
Mark Harrah
1c22478edc
task setting macros for :=, +=, ++=
...
also, bump to 2.10.0-M6
2012-11-17 20:19:24 -05:00
Mark Harrah
87e406fcbd
support vals/defs in build.sbt
...
* must start with val, lazy val, or def (no modifiers currently)
* visible only within the same .sbt file
* multiple definitions allowed without being separated by blank lines
* no blank lines allowed within a definition
2012-11-17 16:27:25 -05:00
Benjy
657d842238
Analysis.groupBy implementation.
2012-11-10 19:01:41 -05:00
Mark Harrah
52b7dccff4
Handle removed files when skipping to recompiling all files.
2012-11-10 18:18:15 -05:00
Mark Harrah
4946115521
Recompile everything when invalidated sources exceed a certain fraction of all sources
2012-11-05 10:02:33 -05:00
nau
bdfb570a42
Update compile/inc/Incremental.scala
...
Fix for http://stackoverflow.com/questions/12972183/sbt-always-does-full-rebuild-because-of-modified-binary-dependency-rt-jar
def externalBinaryModified uses java.io.File.equals() to check if files are the same. It's better to use File.getCanonicalPath in this case.
2012-10-22 08:23:23 -04:00
Mark Harrah
d6072275aa
replace Symbol.nameString calls with simpleName(Symbol). Fixes #577 .
...
nameString is only for printing and has different behavior when scalac is
given -uniqid.
2012-10-15 12:42:27 -04:00
Mark Harrah
18a03f0e25
API extraction: handle any type that is annotated, not just the spec'd simple type. Fixes #559 .
2012-10-05 09:06:35 -04:00
James Roper
702ee44e0e
Source position mapper support
2012-08-31 06:24:16 -04:00
James Roper
5e2fc5f005
Reported file name when an error occurs while opening a corrupt zip file in Locate
2012-08-31 06:15:33 -04:00
Mark Harrah
eca9ab9bb1
2.10 compatibility
2012-08-27 10:49:13 -04:00
Mark Harrah
b53104f8ff
note about Scala build and compiler interface
2012-08-27 08:41:08 -04:00
Mark Harrah
42042a9d85
2.8.1 compatibility for compiler interface
2012-08-27 08:33:33 -04:00
Mark Harrah
8c0a2fbe1c
require a smaller set of sources in the third (transitive) step of inc. compilation
2012-08-26 13:44:32 -04:00
Mark Harrah
089b4e284c
three-stage incremental compilation
2012-08-25 07:15:23 -04:00
Eugene Vigdorchik
61dee253dd
Convert println() to log.debug()
2012-08-19 22:19:39 -04:00
Eugene Vigdorchik
1b814ae8b1
Extend reporter to be used by the IDE.
2012-07-24 15:35:06 -04:00
Eugene Vigdorchik
76943e82ed
Add xsbti.Reporter to required inputs instead of maxErrors.
2012-07-13 14:33:26 -04:00
Eugene Vigdorchik
b5a29987e6
Changes required to use sbt as-is from Scala-IDE.
2012-07-13 14:33:26 -04:00
Eugene Vigdorchik
e23df839b7
Make compiler projects compilable with 2.10
2012-07-13 14:33:26 -04:00
Eugene Vigdorchik
a6c2054292
Break compiler dependency from 'collection' project.
2012-07-13 14:33:26 -04:00
Mark Harrah
d8f5c39465
remove most occurrences of ScalaObject
2012-07-01 15:16:41 -04:00
Mark Harrah
3f12f2eb9f
drop compilation tests
...
1. overlapped with integration tests
2. slower than integration tests
3. more fragile than integration tests
2012-07-01 15:16:41 -04:00
Mark Harrah
b405110e7b
compilation timings
2012-06-23 13:52:09 -04:00
Mark Harrah
0de4444665
sync resident compiler code
2012-06-18 08:18:39 -04:00
Mark Harrah
f53d20a7a3
disable resident-compiler related code paths when it isn't being used. fixes #486 .
...
The underlying issue with the resident compiler needs fixing, however.
2012-06-16 23:40:52 -04:00
Mark Harrah
919ac33c1a
compiler interface compatibility hardening
2012-06-10 23:06:35 -04:00
Mark Harrah
b7df87e2d8
compiler interface source compatibility with Scala 2.8.1/0
2012-06-02 19:03:57 -04:00
Mark Harrah
4bc993e0ba
Revert "remove unneeded unlinking in compiler interface"
...
Unlinking is actually needed.
This reverts commit 1581d1b7e1 .
2012-06-02 19:03:57 -04:00
Mark Harrah
1581d1b7e1
remove unneeded unlinking in compiler interface
2012-05-30 07:41:02 -04:00
Mark Harrah
2db0101eb8
resident compiler that passes all tests
...
core logic from odersky/scala/topic/inkling
2012-05-30 07:13:15 -04:00
Peter Vlugter
737b1b09bd
Add scala library when compiling compiler interface sources
2012-05-25 07:21:05 -04:00
Mark Harrah
9ee30636b3
don't put scala-library.jar on the boot classpath unless it is on the classpath
2012-05-21 22:23:44 -04:00
Mark Harrah
63895a3d77
source compatibility with 2.8.1, where resident mode can't be supported
2012-05-19 18:20:20 -04:00
Mark Harrah
5ff33fad3e
Second try at printing message when stack trace suppressed.
...
Problems:
1. Without a message, users don't find 'last'
2. Showing a message for every error clutters output.
This tries to address these issues by:
1. Only showing the message when other feedback has not been provided and
'last' would not usually be helpful. This will require ongoing tweaking.
For now, all commands except 'compile' display the message. 'update' could
omit the message as well, but perhaps knowing about 'last' might be
useful there.
2. Including the exact command to show the output:
last test:compile
and not just
last <task>
3. Highlighting the command in blue for visibility as an experiment.
Review by @ijuma and @retronym, please.
2012-05-19 18:20:19 -04:00
Mark Harrah
50ddd485af
add a missing 'lazy'
2012-05-13 22:38:00 -04:00
Mark Harrah
208b46fd10
resident mode: package objects
2012-05-13 21:31:40 -04:00
Mark Harrah
7bed381bec
cleanup compilation tests
2012-05-12 23:12:29 -04:00
Mark Harrah
864580aae1
approximate type parameters and references by name
...
not as accurate, but simpler.
2012-05-12 23:12:29 -04:00
Mark Harrah
00d0918714
workaround separate compilation and raw types
2012-05-12 23:12:29 -04:00
Peter Vlugter
1ed64e4d5f
Use Maybe rather than Option in IC
2012-05-07 19:09:25 -04:00
Peter Vlugter
fdf9be166f
Add helper methods to IC for reading analysis cache files
2012-05-06 21:41:38 -04:00
Mark Harrah
99a04466f1
move to revised warning interface in the compiler
2012-05-06 14:15:03 -04:00
Mark Harrah
e537cbc474
second part of fix for excessive recompilations
2012-04-30 20:34:48 -04:00
Mark Harrah
5c8f212cf3
convert stray println to debug logging statement
2012-04-28 20:17:43 -04:00
Mark Harrah
ddcf885fb9
fresh scope for each inherited definition when tagging type variables
2012-04-28 18:58:52 -04:00
Mark Harrah
408d11557d
handle Java sources not compiled in Mixed configuration
2012-04-28 18:58:52 -04:00
Mark Harrah
6769c94208
basis for a resident compiler
...
unstable, but can be tested with -Dsbt.resident.limit=n
n is the maximum Globals kept around
2012-04-28 18:58:52 -04:00
Mark Harrah
2bd103f1fa
implement embedded interface
2012-04-18 16:01:45 -04:00
Mark Harrah
d837f869bd
using some of the embedding interfaces
2012-04-18 11:02:52 -04:00
Mark Harrah
8594e4443d
reorganize compilation modules
2012-04-18 08:08:25 -04:00
Mark Harrah
db7ec09591
move compiler integration classes to subproject compile/integration
2012-04-18 03:33:49 -04:00
Mark Harrah
882ab1e4e8
Revert "Fix cavalier approach to reflection." (ClassNotFoundException)
...
This reverts commit 1537a9d6b1 .
2012-04-18 03:15:14 -04:00
Paul Phillips
1537a9d6b1
Fix cavalier approach to reflection.
...
No need to recreate the Method instance thousands of times.
2012-04-16 19:42:56 +01:00
Indrajit Raychaudhuri
89678735e1
Improved implementation for `parents` accumulation for java classes
...
It now considers `ParameterizedType` and includes all interfaces recursively
2012-03-27 01:40:10 +05:30
Indrajit Raychaudhuri
2525eeb7e6
Ensure that `parents` for java classes have all the ancestors
...
Currently, only immediate parents classes are picked up for java classes.
This could be problematic, for example, in detecting Fingerprint for test frameworks.
So far, Scala types are not affected –– all the ancestors are available for them.
2012-03-25 15:44:16 +05:30
Mark Harrah
1cbb7ce93c
print-warnings task for Scala 2.10+ to avoid needing to rerun 'compile' to see deprecation/unchecked warnings
2012-03-17 19:31:55 -04:00
Mark Harrah
868196e652
delete empty parent directories of deleted class files. fixes #387
2012-03-05 13:40:17 -05:00
Jason Zaugg
17eeec6876
Move condition out of SameAPI.
...
It was tenuously relying on the caller short-circuiting with `shortcutSameSource`.
2012-03-04 21:28:01 +01:00
Jason Zaugg
a1cc62a598
Avoid copy-paste of Flags.MACRO with source-compatibility trickery.
2012-03-04 19:07:33 +01:00
Jason Zaugg
72e41c3329
whitespace
2012-03-04 17:41:39 +01:00
Jason Zaugg
067917a0fb
Macro def aware recompilation.
...
- Read macro modifier from method definition.
- Always recompile downstream files after a file containing macro defs is recompiled.
- Source is extended with a hasMacro attribute. Mark suggests that this might be better
tracked in Relations, but I'm not sure how to make that change.
2012-03-04 17:35:51 +01:00
Mark Harrah
d61ae7899f
drop 2.7 compatibility in compiler reporter
2012-02-07 21:56:37 -05:00
Mark Harrah
c17bf071d7
simpler compatibility fix works ok
2012-02-04 21:10:30 -05:00
Mark Harrah
b5c4e5290e
fix compiler interface to work with 2.10.0-SNAPSHOT
2012-01-19 11:00:24 -05:00
soc
8ec1b9a841
Fix messages like “class class ...”.
2012-01-04 16:20:22 +01:00
Thomas Koch
9e8c441159
missing(?) imports, fix emacs syntax highlighting
...
While trying to build sbt without sbt, I got compile errors claiming that
util.Random would not be a member of util. The added import statements fixed
this.
The inserted spaces in the comments in project/Sbt.scala are a work around in a
bug in emacs scala syntax highlighting.
2011-12-14 14:35:17 +01:00
Mark Harrah
51f88855c2
fix maxErrors to filter errors, not warnings
2011-12-13 17:29:08 -05:00
Mark Harrah
cf450a963f
drop more 2.7 compatibility code
2011-11-27 17:48:01 -05:00
Indrajit Raychaudhuri
c039925748
Append dummy argument to `-classpath` when it is actually empty.
...
Scala compiler's way of handling empty classpath argument is problematic.
This workaround appends a dummy classpath argument when the classpath is
actually empty. Fixes #269 (also see #82 , #85 ).
2011-11-19 16:51:53 +05:30
Mark Harrah
a49c907146
invalidate sources that claim to generate the same class. fixes #260
2011-11-10 21:30:30 -05:00
Indrajit Raychaudhuri
ad7aede533
Enable Javadoc generation in `doc` task.
...
`docSetting` has been updated to do both Scaladoc and Javadoc. In
Scala/Java hybrid projects, the output docs are rebased to `scala`
or `java` sub-directory accordingly. But for pure scala or pure java
projects the subdirectories aren't added to becompliant with user
expectation as much as possible. We do hybrid mode iff both *.scala
and *.java files exist; other doc resources (package.html, *.jpg etc.)
don't influence the decision.
2011-11-09 17:49:54 +05:30
Mark Harrah
6405f2a6cb
cleanup 2.7 warn fatal setting compatibility
2011-11-04 18:39:25 -04:00
Indrajit Raychaudhuri
66500ea776
Use full form of `-classpath` option
...
short form `-cp` isn't always honored (e.g., javadoc)
2011-11-04 13:40:59 -04:00
Mark Harrah
82ad44a701
preserve API information needed for detecting annotations on defs. fixes #232
2011-10-19 22:23:47 -04:00
Mark Harrah
1578341a10
add cleanupCommands setting to specify commands to run before interpreter exits. fixes #219
2011-10-16 17:27:36 -04:00
Mark Harrah
7632c0910a
fixes #220 . properly record source dependencies from separate compilation runs in the same step.
2011-10-10 20:53:57 -04:00
Mark Harrah
f70b68d3b4
fix symmetric hashing
2011-10-09 21:48:15 -04:00
Mark Harrah
c74ecb55e9
finalize hash
2011-10-05 21:04:34 -04:00
Mark Harrah
e4848efcc8
store hashes of API instead of full API. fixes #21
2011-10-05 18:09:27 -04:00
Mark Harrah
0436b721be
Merge pull request #174 from paulp/master
...
reduce, reuse, recycle
2011-09-29 06:40:04 -07:00
Mark Harrah
dcea4f2293
make ComponentManager honor value of Ivy home provided by the launcher
2011-09-16 23:08:01 -04:00
Mark Harrah
9d0cb47e0a
force REPL startup to be synchronous. fixes #175 .
2011-09-12 19:48:10 -04:00
Paul Phillips
528b4ed342
Limit unnecessary Array allocations from ClassToAPI.
...
+----------------------------------------------------------------------------+----------------+
| Name | Shallow Size |
+----------------------------------------------------------------------------+----------------+
| +---1571683 zero length arrays xsbti.api.Annotation[] | 25,146,928 |
| | | |
| +---1373273 zero length arrays xsbti.api.TypeParameter[] | 21,972,368 |
| | | |
| +---305126 zero length arrays xsbti.api.ParameterList[] | 4,882,016 |
| | | |
| +---295294 zero length arrays xsbti.api.MethodParameter[] | 4,724,704 |
| | | |
2011-09-07 13:09:53 -07:00
Paul Phillips
fae7c3b429
Make large Relations more readable.
...
For those poor suckers attempting to use -Dxsbt.inc.debug.
2011-09-06 11:55:18 -07:00
Mark Harrah
02f666ec0e
miscellaneous fixes
2011-08-31 20:59:40 -04:00
Mark Harrah
ff95799af7
drop 2.7 support, fix fatal warnings support. fixes #153
2011-08-17 21:50:46 -04:00
Mark Harrah
b36e40a8f7
move to 2.9.1 (RC3), bump to 0.11.0-SNAPSHOT
2011-08-16 17:32:26 -04:00
Mark Harrah
3b86fc628e
fix Locate to only try to open archives
2011-08-05 21:56:32 -04:00
Mark Harrah
980e906ca1
handle custom -bootclasspath in incremental recompilation
2011-08-04 07:20:25 -04:00
Mark Harrah
0b3ec05a81
support incremental recompilation when using exportJars. fixes #108
2011-07-18 17:14:22 -04:00
Mark Harrah
094f094d2e
eval test fixes
2011-07-09 20:18:42 -04:00
Mark Harrah
b096d1b175
global settings preparation: separate compilation/loading stages of Eval
2011-07-09 16:54:41 -04:00
Mark Harrah
60dcd4404f
pass empty classpath instead of no classpath. fixes #85 . ref #82
2011-07-06 07:30:47 -04:00
Mark Harrah
0831552dc5
apply javac log level approach to directJavac
2011-06-26 12:27:06 -04:00
Mark Harrah
1dc3f0ed56
add missing file
2011-06-22 19:50:41 -04:00
Mark Harrah
c919a9c3fd
cache calls to definesClass within a run. closes #67
2011-06-22 19:17:10 -04:00
Mark Harrah
52cd688de6
Try out some better error messages for build.sbt in a few common situations. fixes #58
2011-06-16 22:15:29 -04:00
Mark Harrah
997a501771
fix compiler interface
2011-06-11 20:09:15 -04:00
Mark Harrah
bc5253e386
include retronym's compatibility patch, closes #5
2011-06-11 20:09:15 -04:00
Mark Harrah
13adcfb28c
fix some tests
2011-06-10 08:08:51 -04:00
Mark Harrah
520f74d114
properly handle arguments to compiler when classpath is empty
2011-06-10 07:48:53 -04:00
Mark Harrah
c0a21c1524
implement shortcut for API equality checking, fixes #18
2011-06-01 02:19:46 -04:00
Mark Harrah
f786060883
Revert to using 2.8.1
2011-05-30 17:49:39 -04:00
Mark Harrah
437a3f7f50
clean up incremental debugging messages
2011-05-29 19:17:31 -04:00
Mark Harrah
a94247d1b6
more release-worthy compile message and analysis toString
2011-05-29 19:17:31 -04:00
Mark Harrah
9002720933
move to 2.9.0-1, bump to 0.9.9
2011-05-29 00:22:08 -04:00
Mark Harrah
58d9f3b0a0
fix structural type comparison
2011-05-25 22:44:22 -04:00
Mark Harrah
85a55c25bf
settle scala-library situation
2011-05-25 22:44:22 -04:00
Mark Harrah
e840d66622
Turn some errors in API into warnings+emptyType
2011-05-25 08:09:24 -04:00
Mark Harrah
eef1fd8a10
fix #26
2011-05-25 07:57:14 -04:00
Mark Harrah
24dfb69400
an annotation can reference a non-simple type, fixes #24
2011-05-23 18:40:03 -04:00
Mark Harrah
1d36be9b00
properly handle nested class cycles in Java sources, fixes #22
2011-05-21 21:16:18 -04:00
Mark Harrah
4509428af9
locking of boot directory can be disabled by with [boot].lock: true in boot.properties
2011-05-19 22:04:05 -04:00
Mark Harrah
06ec88af3d
build sxr, api docs and use sbinary 0.4.0
2011-05-17 20:09:20 -04:00
Mark Harrah
40c6ca3b3d
Pluggable build resolvers
2011-05-07 22:02:06 -04:00
Mark Harrah
9dec02ee51
fix analysis of Java sources being overwritten
2011-04-26 21:19:56 -04:00
Mark Harrah
bf013d2b3f
trap all exceptions when restoring cache
2011-04-19 17:54:03 -04:00
Mark Harrah
dc6584ff68
scripts: change base directory
2011-04-18 18:26:57 -04:00
Mark Harrah
6e3a7083e2
only look at .class file modified times in Eval
...
previously, for a directory on the classpath,
all files and directories under it would be checked
this caused unnecessary setting recompilation when
non-classfiles changed in the directory
One example was the sbt.plugins file, which doesn't affect
compilation, and caused projects with plugins to take longer
than necessary to start up
2011-04-12 20:24:42 -04:00
Mark Harrah
14c6ee4b2a
updating tests to use newer Scala versions
2011-04-08 19:34:23 -04:00
Mark Harrah
3e63a082bd
fill the stack trace for CompileFailed again
2011-04-08 19:32:01 -04:00
Mark Harrah
e965785646
drop clashing, obsolete CompileOptions object
2011-04-04 19:09:45 -04:00
Mark Harrah
a750c1563f
Java/Scala compilation order support
2011-04-03 22:12:51 -04:00
Mark Harrah
a5f3e1b839
clean up build definition exceptions and messages
2011-04-03 22:12:51 -04:00
Mark Harrah
801c0567fd
handle information only options that disable a full compilation
2011-04-01 21:04:08 -04:00
Mark Harrah
a79d06ab1f
temporary fix for #4426
2011-04-01 21:03:44 -04:00
Mark Harrah
07dbba65d1
memoize aggregation, cleanup
2011-03-23 07:06:51 -04:00
Mark Harrah
d53d5fb7cf
api extraction fixes for self types and expanded names
2011-03-11 16:57:15 -05:00
Mark Harrah
d719c7d6a9
add missing debug case for SameAPI
2011-03-11 16:55:23 -05:00
Mark Harrah
700b67c322
clean up boot classpath handling
2011-03-11 16:54:45 -05:00
Mark Harrah
0935fba0b5
better cycle handling in SameAPI
2011-03-08 17:51:14 -05:00
Mark Harrah
37f793be6e
make ClasspathOptions configurable
2011-03-08 17:50:19 -05:00
Mark Harrah
a680dc2336
fix tests
2011-03-06 15:32:06 -05:00
Mark Harrah
b7f92ae07f
2.9 compatibility fixes
2011-03-04 06:16:35 -05:00
Mark Harrah
70972c6499
normalize key names
2011-03-02 06:46:28 -05:00
Mark Harrah
507dff6b0f
less deceptive name for debug
2011-02-26 20:51:21 -05:00
Mark Harrah
83866ffb42
incremental tests, misc fixes
2011-02-26 20:34:18 -05:00
Mark Harrah
a68e4c74f9
updating more integration tests
2011-02-25 18:35:52 -05:00
Mark Harrah
4f4ae170d3
work on plugins, added console-project, re-integrated more tests
2011-02-24 23:30:06 -05:00
Mark Harrah
9db4afd222
bring more integration tests back online with associated fixes
2011-02-23 19:19:44 -05:00
Mark Harrah
ba8f43a23e
starting to convert integration tests
2011-02-22 22:36:48 -05:00
Mark Harrah
cc06667f3e
handle constant types
2011-02-14 18:59:54 -05:00
Mark Harrah
a3a81dc26e
fix issue in API comparison where ordering was required but not done
2011-02-14 18:58:20 -05:00
Mark Harrah
2a4f7ac564
compiler interface: 2.9 compatibility
...
nme.LOCALCHILD -> tpename.LOCAL_CHILD
handle NullaryMethodType
2011-02-08 20:30:15 -05:00
Mark Harrah
14990b5127
cache Eval results
...
still need to clean up stale class files
2011-02-02 19:38:41 -05:00
Mark Harrah
6b91ad59fd
Eval-related improvements
...
- support import clauses
- error display: source name, line numbers for each expression
- for 'eval', 'get', 'set', and .sbt files, use default imports and import from Plugins, Builds
2011-01-26 19:49:54 -05:00
Mark Harrah
837bb80d40
cleanup and fixes
2011-01-24 18:08:43 -05:00
Mark Harrah
20a5e3b3c7
add option to show inferred type of an expression
2011-01-18 18:48:32 -05:00
Mark Harrah
0b3c2dada5
expression evaluator
2011-01-18 18:48:32 -05:00
Mark Harrah
ccf0508ce6
cleanup, small fixes
2010-11-24 14:08:20 -05:00
Mark Harrah
4fd7611074
add jline jar to classpath for :power mode
2010-11-24 14:05:26 -05:00
Mark Harrah
04e16ee86c
api extraction fixes
...
get members of nested modules by pulling from moduleClass
ignore classes ending with LOCALCHILD, which only appear with separate compilation
2010-11-09 20:49:23 -05:00
Mark Harrah
89c557d0b5
temporary workaround for dangling type parameter references
2010-11-09 20:45:26 -05:00
Mark Harrah
f788437164
fill out Visit some more
2010-10-30 17:52:18 -04:00
Mark Harrah
403fa42fa2
Type cache in API extraction for smaller cache size and faster I/O
...
manually implement Modifiers, use byte-size bit field
2010-10-30 17:46:56 -04:00
Mark Harrah
1795ddadb3
Format wrapper for timing read/writes
2010-10-30 15:53:32 -04:00
Mark Harrah
aa90051338
go back to using basic Java serialization for API persistence
...
Java serialization is a bit slower (by 0.15 s for reading scalaz core),
but it is simpler and more lightweight than using sbinary
still use sbinary Formats for other Analysis data structures
2010-10-30 15:49:18 -04:00
Mark Harrah
9135a26fb3
buffer before gzip when writing analysis data
...
there were already buffered streams between the gzip streams
and the file streams; however, the performance improved after
putting a buffer on top of the gzip streams
2010-10-30 15:46:44 -04:00
Mark Harrah
b601804046
only write resulting Analysis back if compilation was performed
2010-10-30 15:44:36 -04:00
Mark Harrah
730b613007
make serializable abstract Lazy template
2010-10-30 11:56:40 -04:00
Mark Harrah
a76d75bca6
more flexible scalac logging
...
the custom scalac Reporter now delegates to an instance of
an sbt interface called xsbti.Reporter
handling compilation logging is now mainly done on the sbt-side of the
compiler interface
the xsbti.Reporter interface provides access to richer information
about errors and warnings, including source file, line, and offset
xsbti.Reporter can be implemented by users to get access to
detailed information without needing to parse the logging output
the CompileFailed exception that is thrown when compilation fails now
includes an array of the problems, providing detailed
error and warning information that can, for example, be consumed
by doing a mapFailure on 'compile' and using 'Compile.allProblems'
2010-10-23 16:34:22 -04:00
Mark Harrah
5ed8f3c042
improving incremental compilation
...
support lazy arguments in data type generator
SafeLazy implementation that explicitly clears the reference to the thunk
in API representation, drop synthetic modifier and merge deferred into abstract
handle cyclic structures in API generation, display, comparison, persistence
gzip compile cache file
bump to 2.8.1.RC3, project definition cleanup
fix main method detection to check for the right name
properly view inherited definitions
exclude constructors of ancestors
2010-10-22 21:55:16 -04:00
Artyom Olshevskiy
3c5d8ab29b
support -J options when forking ( #124 )
2010-10-21 09:12:00 -04:00
Mark Harrah
a3f1b9c22f
fix tests, discovery
...
updated compile tests for new minimal AnalysisCallback
moved discovery to discovery/ subproject and updated for new approach
fixed discovery to only find public methods when searching for annotated definitions
extracting inherited definitions unimplemented in api/, so some discovery tests fail
moved discovery classes from sbt.inc package to sbt.compile
2010-10-06 08:24:13 -04:00
Mark Harrah
ce068d7fbc
Java source support
...
generate API for Java sources from class files (currently, uses reflection)
hook into partial recompilation process
2010-09-27 18:57:00 -04:00
Mark Harrah
4164ad3529
fix detecting existence of default arguments
2010-09-27 18:48:12 -04:00
Mark Harrah
3c4e5c4f54
fix product tracking and handling of removed sources
2010-09-27 18:47:11 -04:00
Mark Harrah
540ab7e470
show detected API when debugging incremental
2010-09-27 18:41:34 -04:00
Mark Harrah
484c2ca3a5
discovery convenience method
2010-09-27 18:40:57 -04:00
Mark Harrah
f3de1d728c
fix printing sources
2010-09-23 10:29:25 -04:00
Mark Harrah
28f1eecbef
changes to make latest preview easier
2010-09-23 09:21:39 -04:00
Mark Harrah
ce9db82771
fixes to API extraction phase
...
reverse the mapping of vals/vars to
private[this] fields and accessors
merge annotations from related members
don't handle bean getters/setters specially
because they are indistinguishable from
user-defined members as far as I can tell
2010-09-17 22:14:48 -04:00
Mark Harrah
0d5814e2b3
Rework external dependency tracking and multi-projects
...
Reduce AnalysisCallback interface:
remove discovery
simplify dependency notification methods
Use map of classpath entry to Analysis for locating
source API for external dependencies
Handle classpath changes by locating class
on classpath and either locating Analysis/Source
as above or comparing Stamp. This requires storing
the class name of a binary dependency now.
Make this process aware of full classpath, including
boot classpath
2010-09-17 21:59:43 -04:00
Mark Harrah
820a2b6851
remove discovery from Scala Analyzer phase
2010-09-17 21:38:03 -04:00
Mark Harrah
ccf9714b4d
fixes for API extraction phase
...
correct order of value parameters of a method
preserve source order of members
more information for unknown type error message
2010-09-17 21:30:47 -04:00
Mark Harrah
4db2c1df6a
merge Pkg into Private
...
this better represents the original source
2010-09-17 21:29:29 -04:00
Mark Harrah
9bcd68d28c
rework REPL support
...
allow bindings, which requires specifying the parent class loader
same code can be used for both 'console' and 'console-project' now
provide interface through main/Console
2010-09-04 08:18:06 -04:00
Mark Harrah
37594904f9
remove unused parameter and fix comment
2010-09-04 08:13:36 -04:00
Mark Harrah
d3f02f7c80
control incremental compiler debugging with xsbt.inc.debug system property
2010-08-10 08:35:26 -04:00
Mark Harrah
767a1e47c1
adding more commands
2010-07-27 23:01:45 -04:00
Mark Harrah
d7b66458f2
first shot at general command/definition model
2010-07-17 12:07:41 -04:00
Mark Harrah
d0fa1eb461
* move Environment classes to util/env module
...
* move TrapExit, SelectMainClass to run module
* rearrange some compilation-related code
* Jetty-related code moved to web module
2010-07-14 19:24:50 -04:00
Mark Harrah
6f3c699435
- Stuart's improvements to triggered execution
...
- continue splitting original sbt module
* separated process, testing modules
* various IO, logging, classpath migration
* split out javac interface
2010-07-05 12:53:37 -04:00
Mark Harrah
37185c0fb6
discovery, persistence, frontend, and various fixes to incremental
2010-07-02 06:57:03 -04:00
Mark Harrah
9ad9df42b6
first part of semantic, multi-stage incremental compilation
2010-06-27 09:18:35 -04:00
Mark Harrah
f9a7a0a28e
Set -> Seq for sources, classpaths
2010-06-27 09:16:53 -04:00
Mark Harrah
b8c4c2b6da
minor rearrangements of SameAPI
2010-06-21 21:23:42 -04:00
Mark Harrah
603d2be2e9
basic type parsing for testing/prototyping
2010-06-21 21:23:10 -04:00
Mark Harrah
b2077ce60c
more 2.8 updates, launcher compiles and runs with 2.8
2010-06-15 20:38:18 -04:00
Mark Harrah
5e4fe71560
fix typo
2010-06-07 10:51:02 -04:00
Mark Harrah
7be7cc34d5
fix a compile test
2010-05-13 18:32:49 -04:00
Mark Harrah
33e957a47c
support warn fatal options in 2.8.0.RC2
2010-05-13 18:31:37 -04:00
Mark Harrah
cc604b57a2
Sort input source files for consistency, addressing scalac's issues with source file ordering.
2010-05-10 18:50:59 -04:00
Mark Harrah
99edb01d8c
improve error message when Scala instance is invalid
2010-05-05 08:34:34 -04:00
Mark Harrah
61fefc0f66
* move autoBootClasspath, compilerOnClasspath options into ClasspathOptions data structure and add 'extra' option
...
* put ScalaInstance.extraJars on classpath for ComponentCompiler
2010-05-05 08:30:03 -04:00
Mark Harrah
a2f96255eb
consoleOptions
2010-04-25 13:18:36 -04:00
Mark Harrah
5b833a6b72
* Seth's patch for running javac in the same jvm
...
* Fixed LoggerWriter, added test
* Added it test
2010-04-05 18:47:06 -04:00
Mark Harrah
589904a6d0
support precompiled components
2010-04-01 20:19:29 -04:00
Mark Harrah
27922a3256
In component compiler, only consider files from jars with sources. This avoids including dependencies in generated jars.
2010-03-31 22:33:42 -04:00
Mark Harrah
c05bf93830
fix annotations detection test
2010-03-28 21:29:03 -04:00
Mark Harrah
b26ca870b1
annotation detection test
2010-03-28 20:20:17 -04:00
Mark Harrah
77567b6ad3
Support for tests written in Java and annotation-based test frameworks
2010-03-28 00:05:40 -04:00
Mark Harrah
948aeb3f97
eliminate import warning
2010-03-26 16:15:52 -04:00
Mark Harrah
27816f32f6
Jason's patch to work with latest changes to CompilerCommand
2010-03-26 07:55:02 -04:00
Mark Harrah
a438d389e2
compatibility with 2.8 trunk
2010-03-23 08:30:53 -04:00
Mark Harrah
7edcc68a92
support cross-compiling/bootstrapping
2010-03-22 20:42:59 -04:00
Mark Harrah
54bc694081
* cleaned up build
...
* made Launcher usable outside of official jar
2010-03-19 19:29:57 -04:00
Mark Harrah
e1e60fe859
preserve compiler interface classes across invocations
2010-03-13 13:25:08 -05:00
Mark Harrah
794d137051
Remove code no longer needed for running Scala code
2010-03-07 19:06:54 -05:00
Mark Harrah
9f524cbf83
convenience method on ScalaInstance to get both library and compiler jars
2010-02-14 20:23:56 -05:00
Mark Harrah
e18f8101d7
Fix compiler interface tests for 2.8
2010-02-08 18:34:43 -05:00
Mark Harrah
a33223a02c
legal cleanup
2010-02-07 23:45:19 -05:00
Mark Harrah
743d4556ae
Fix compiler interface to compile against 2.8 trunk
2010-02-05 18:58:52 -05:00
Mark Harrah
125e0adad8
Decrease compilation time of compiler interface by ~20%
2010-02-04 22:08:17 -05:00
Mark Harrah
b6f017c508
Work with latest compiler changes. API is commented for stability in 0.7.
2010-02-04 21:04:22 -05:00
Mark Harrah
a2758afd43
Fix main method detection involving Application
2010-01-30 21:40:25 -05:00
Mark Harrah
4a566eb581
fix project creation prompt and launcher cache
2010-01-27 18:22:42 -05:00
Mark Harrah
e8eae7d7bb
Look at names during flattenPhase.next to get proper class names
2010-01-26 09:10:42 -05:00
Mark Harrah
80780d9bec
comments and reorganization in SameAPI/ShowAPI
2010-01-24 00:12:47 -05:00
Mark Harrah
af4f41e052
API: fix annotation handling
2010-01-24 00:11:43 -05:00
Mark Harrah
af288bb199
API: base types with applied type parameters
...
Compile task: fix detection of classpath changes
Aggressive compiler seems to work on scalaz now
2010-01-23 11:52:39 -05:00
Mark Harrah
5f9f3729d1
work on source api parts
2010-01-22 20:17:49 -05:00
Mark Harrah
fa93a64cf9
Replace Ivy interface with the component from xsbt
2010-01-15 19:05:23 -05:00
Mark Harrah
d97d693cc1
Fix issue with jline not being on compiler-interface compile-time classpath
2010-01-13 22:19:48 -05:00
Mark Harrah
1673a2a3e2
Remove use of reflection for compatibility in Analyzer
2010-01-09 18:22:58 -05:00
Mark Harrah
8f0371d21a
Compare polymorphic types
2010-01-07 21:48:56 -05:00
Mark Harrah
fb3cfd3b39
* Polymorphic type extraction
...
* Use simple names instead of full names where appropriate
* Handle local classes, which have NoPrefix
2010-01-07 21:41:20 -05:00
Mark Harrah
bf5dbadc53
Handle changes to Source serialization format by returning empty Source
2010-01-07 21:39:16 -05:00
Mark Harrah
6f6b795b39
* Basic API serialization
...
* Fixes to API extraction and equality checking
* Reworked tracking
* New compile infrastructure based on API changes
* Example application for testing
2010-01-05 19:50:43 -05:00
Mark Harrah
833688cdd9
API equality testing. Still includes debugging statements.
2009-12-31 18:56:37 -05:00
Mark Harrah
8ebbb7b420
fix issue processing qualifiers in API phase
2009-12-31 18:55:35 -05:00
Mark Harrah
b63b955dca
Add Java class file version to compiler interface ID so that it is recompiled when moving between Java versions.
2009-12-29 22:14:56 -05:00
Mark Harrah
bb0a3b3d2f
Fix Scaladoc interface for 2.8.0.Beta1-RC4 and later.
2009-12-20 12:02:49 -05:00
Mark Harrah
cbb0f1a0a8
Fix 2.8 external dependency tracking
2009-12-14 18:37:17 -05:00
Mark Harrah
c951156d9f
print API phase time only if it is enabled
2009-11-29 18:25:09 -05:00
Mark Harrah
cd1cdf3c24
Scaladoc interface should be compatible with latest 2.8 updates
2009-11-29 18:13:47 -05:00
Mark Harrah
a872ebc5e5
Annotations on definintions and implicit parameters in 2.7
2009-11-24 23:01:05 -05:00
Mark Harrah
7affb3526f
Cache reflective lookups in the compiler interface
2009-11-24 08:56:23 -05:00
Mark Harrah
bf7affd344
Starting documentation on API of sources files, updating notes a bit
2009-11-23 20:01:13 -05:00
Mark Harrah
38dbb1d23c
Type member support, linearization instead of parents and add inherited members for structure
2009-11-22 22:54:17 -05:00
Mark Harrah
2977fd4131
Source API extractor
2009-11-21 15:53:04 -05:00