I'm soliciting ideas from people who know the Scala compiler better than I do! How might I get nsc to invoke some custom code at some point (not too important when) after typer has run, but before compilation finishes? Are there any hooks available to me?
That's not far off my plan, though we can just keep the state in some global singleton object, and it doesn't need to be init'd... we can assume it gets cleaned up by the post-typer code that runs once for every compilation. (My use-case can assume compiles are successful).
-
-
But I'd like to do with without compiler plugins, i.e. "just a library". The ability to do hacky things in the JVM like return instances of anonymous subclasses with overridden methods suggests tantalizing opportunities for getting a fragment of code to run after typer...
-
It doesn't even matter if it gets run more than once in the same compilation. We could just synchronize it and flag some mutable state when the report has run. This is horrible horrible hacky stuff, though... ;)
End of conversation
New conversation -
-
-
I wonder if there’s room for distributed systems tracing-like “baggage” like from the “Universal Context Propagation for Distributed Systems Instrumentation” paper inside the Scala compiler toolchain?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.