Commit Graph

245 Commits

Author SHA1 Message Date
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