browse icon indicating copy to clipboard operation
browse copied to clipboard

Publish for 2.11

Open joprice opened this issue 9 years ago • 12 comments

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

joprice avatar Jan 07 '16 18:01 joprice

  • https://github.com/paulp/sxr/releases/tag/v1.0.2
  • https://bintray.com/paulp/maven/sxr

xuwei-k avatar Mar 02 '17 23:03 xuwei-k

Another location with 2.11 compatible source code https://github.com/cvogt/browse/tree/topic/2.11-compat (done by @sethtisue )

cvogt avatar Apr 08 '17 21:04 cvogt

looks like https://github.com/paulp/sxr/ disappeared (cc @paulp), but https://bintray.com/paulp/maven/sxr/1.0.2 isstill up.

cvogt avatar Apr 08 '17 21:04 cvogt

cc @dwijnand @retronym @eed3si9n

cvogt avatar Apr 08 '17 21:04 cvogt

cc @OlegYch @lrytz (just cc-ing some people who worked on this or sbt, so we don't replicate each others work)

cvogt avatar Apr 08 '17 21:04 cvogt

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.

paulp avatar Apr 08 '17 21:04 paulp

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.

eed3si9n avatar Apr 08 '17 22:04 eed3si9n

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

OlegYch avatar Apr 08 '17 23:04 OlegYch

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)

cvogt avatar Apr 09 '17 02:04 cvogt

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

olafurpg avatar Apr 09 '17 08:04 olafurpg

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.

xeno-by avatar Apr 13 '17 13:04 xeno-by

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/

olafurpg avatar Jun 27 '17 21:06 olafurpg