browse
browse copied to clipboard
Publish for 2.11
OlegYch was able to publish sxr for 2.11. Any plans to publish for 2.11?
https://github.com/OlegYch/scastie/blob/master/renderer-template/project/DefaultSettings.scala#L49
- https://github.com/paulp/sxr/releases/tag/v1.0.2
- https://bintray.com/paulp/maven/sxr
Another location with 2.11 compatible source code https://github.com/cvogt/browse/tree/topic/2.11-compat (done by @sethtisue )
looks like https://github.com/paulp/sxr/ disappeared (cc @paulp), but https://bintray.com/paulp/maven/sxr/1.0.2 isstill up.
cc @dwijnand @retronym @eed3si9n
cc @OlegYch @lrytz (just cc-ing some people who worked on this or sbt, so we don't replicate each others work)
I unhelpfully took it down trying to reduce my footprint. I put it back for now, but if you want anything which is in there you should probably establish it somewhere outside of mine.
I'd be happy to give pushing rights to https://github.com/sbt/sxr if @cvogt or anyone else wants to maintain/consolidate various branches.
after spending considerable effort to make it work (somewhat) on 2.11 i'm not sure if this is worth maintaining even for trivial code you'd hit bugs like this https://issues.scala-lang.org/browse/SI-8713 non-trivial code exposes undefined behavior like here https://github.com/OlegYch/browse/commit/3f9b37bd99ae028f36f85ffbf42f9379737bbf5d perhaps an approach taken here https://github.com/MasseGuillaume/scastie/blob/master/instrumentation/src/main/scala/instumentation/Instument.scala might work better otoh if someone manages to sxr scala-library 2.11 with one of the forks i'd stand corrected
I am personally not in sxr enough to take over maintenance of anything. Only played around with it to see if I can get it to work for CBT itself and as a plugin and it did. Just wanted to share the minimalistic changes I have done.
@OlegYch depending on how much scala-compiler code sxr uses, it might be worth a try porting it to scala meta's semantic api. (cc @olafurpg)
I think it is already possible to implement with scala.meta a web-based code browser with jump-to-definition functionality. It has always been a dream of mine to do this, but haven't gotten around to it yet. If someone is interested in taking a swing at it then I'm happy to give pointers.
It would not require knowledge of compiler internals, only scala.meta Tree and Symbol. Note, only jump-to-definition could be supported. "Show type" is not in the scala.meta semantic api yet.
cc/ @xeno-by
This definitely should be possible with scala.meta's semantic db (https://github.com/scalameta/scalameta/issues/605). We can add more stuff to it, not just hyperlinking information that's there right now.
For anyone interested, we are experimenting with the Scalameta Semantic API + Monaco Editor to build a code browser with jump to definition here https://github.com/scalameta/metadoc A live demo for a single file is available here http://scalameta.org/metadoc/