Skip to content

Automate Eclipse settings and update project files:#5091

Merged
lrytz merged 1 commit intoscala:2.11.xfrom
dragos:eclipse/update-files
Apr 20, 2016
Merged

Automate Eclipse settings and update project files:#5091
lrytz merged 1 commit intoscala:2.11.xfrom
dragos:eclipse/update-files

Conversation

@dragos
Copy link
Contributor

@dragos dragos commented Apr 8, 2016

  • remove M2_REPO. All dependencies are picked up from build/deps
  • add script to update an existing workspace directory with the required path variables
  • add the default Scala library to several projects for better out-of-the-box experience. This means
    that changes in the scale-library project may not be visible in the other projects, but makes it
    way easier to get a working config. If you really need that, you probably know what you’re doing
    anyway.

@scala-jenkins scala-jenkins added this to the 2.11.9 milestone Apr 8, 2016
@lrytz
Copy link
Member

lrytz commented Apr 8, 2016

Unfortunately, the ant build and therefore build/deps is on its way out, so this will break soonish.

I recently added support for updating the IntelliJ module classpaths from our sbt build (#5054), I think this could be very easily extended to update the eclipse .classpath files. Would you mind taking a look?

@dragos
Copy link
Contributor Author

dragos commented Apr 11, 2016

I will look at the Sbt build, but in the mean time I think this might help some people. /cc @sschaef @mlangc

@lrytz
Copy link
Member

lrytz commented Apr 11, 2016

sure, i don't mind merging it. i only took a quick look, didn't try it out. maybe @sschaef or @mlangc want to try it out and post an LGTM here? or we can just merge now if you prefer, that's fine too.

@kiritsuku
Copy link
Contributor

I didn't test the new script. Scaladoc is also broken for some reason. I get errors like Couldn't create file for class scala/tools/ant/Scaladoc$lambda$$docSettings$1 null but I'm not interested right now to figure out where that is coming from. partest-extras also can't be compiled because of scala-partest_2.11-1.0.13.jar of partest-extras build path is cross-compiled with an incompatible version of Scala (2.11.0). In case this report is mistaken, this check can be disabled in the compiler preference page. I don't know how to get partest for 2.11.8. The other more important project work fine. So a LGTM from me, since most projects compile without any changes. Not sure if that was the case previously. sbt-eclipse working for the Scala repo would be optimal of course.

0. Run `ant build` to download some necessary jars and see a successful build.

0. You need to define a `path variable` and a `classpath variable` inside Eclipse, both pointing to the Scala checkout directory:
- (experimental): run `./update-workspace.sh scala_checkout_dir [workspace_dir]`. This should update your workspace settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this doesn't seem to work for me:

$ ./update-workspace.sh  /home/mlangc/Development/git/scala /home/mlangc/Development/eclipse-workspace/mars
Using metadata directory /home/mlangc/Development/eclipse-workspace/mars and Scala checkout /home/mlangc/Development/git/scala
Couldn't find /home/mlangc/Development/eclipse-workspace/mars/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs. Is /home/mlangc/Development/eclipse-workspace/mars an Eclipse workspace?

I was more successful with

$ ./update-workspace.sh  /home/mlangc/Development/git/scala /home/mlangc/Development/eclipse-workspace/mars/.metadata

though (notice .metadata at the end of the last argument). Note that the same applies to eclipse-luna.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dragos can you push that change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll double-check that thing.

@mlangc
Copy link

mlangc commented Apr 11, 2016

Except for the minor issue with the script above, everything seems to compile fine in the IDE. I also was able to start the repl from within Eclipse.

- remove `M2_REPO`. All dependencies are picked up from `build/deps`
- add script to update an existing workspace directory with the required path variables
- add the default Scala library to several projects for better out-of-the-box experience. This means
  that changes in the scale-library project may not be visible in the other projects, but makes it
  way easier to get a working config. If you really need that, you probably know what you’re doing
  anyway.
@dragos dragos force-pushed the eclipse/update-files branch from 2d83300 to f618242 Compare April 19, 2016 10:39
@dragos
Copy link
Contributor Author

dragos commented Apr 19, 2016

@sschaef scaladoc and partest-extra build fine for me.
@mlangc I fixed the path problem.

@lrytz lrytz merged commit 23159d2 into scala:2.11.x Apr 20, 2016
@SethTisue SethTisue modified the milestones: 2.11.11, 2.11.9 May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants