- About Scala
- In the Enterprise
- Scala Community
- Language Research
- In the Press
- The Scala Team
- Scala's Prehistory
- Contact Us
- Learning Scala
- Tour of Scala
- Scala API
- Setup & Getting Started
- Programming Guides
- Other Guides
- Code Examples
- Scala Developers
Browsing the Scala compiler sources... what's the best tool?
Thu, 2011-03-10, 17:09
I'm studying the Scala compiler itself. I have a copy of its source code
from Subversion and I can build it successfully. I can use a simple text
editor to browse around in the code but navigation from file to file is
awkward. I'm looking for something better but I'm having trouble getting set
I've tried adding the sources to a NetBeans project using a "free form"
project based on the master Ant build file. This works as far as it goes,
but NetBeans doesn't provide any useful syntax highlighting or navigation
support. I assume this is because either
a) I haven't configured my free form project right (although I've tried a
couple of permutations).
b) The NetBeans Scala plugin isn't up to the task.
I do understand that in this case I need to manually tell NetBeans about the
various class paths it should use. Perhaps I'm using the wrong paths.
I then tried ENSIME. The ENSIME project generator detected the project type
as "custom", which is fine. It then asked me about various paths, which I
might be confused about. In the end it doesn't work for me either. In
particular when I load the project I get a message about the "Analyzer"
initializing. This step never appears to end. If I try to look up a
definition with M-. I am told, "Synchronous RPC Aborted: Analyzer not
ready!" I notice that the Analyzer consumes a lot of CPU time for a few
seconds when I first load the project but then the CPU usage drops to zero
and nothing seems to be happening (that I can tell). Yet the analyzer
appears to never be ready.
It occurs to me that browsing the compiler sources might present a special
problem for tools like this. The compiler jar file used to build the sources
contains classes like scala.tool.nsc.XYZZY and yet the generated code
contains classes with the same names that might not be identical. I'm
wondering if this is confusing the tools. Maybe it's just confusing me.
I'm hoping I can get a few hints about how to make this work.