Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

m2eclipse seems to sort the classpath without a need #33

Closed
huitseeker opened this issue Sep 17, 2014 · 5 comments
Closed

m2eclipse seems to sort the classpath without a need #33

huitseeker opened this issue Sep 17, 2014 · 5 comments

Comments

@huitseeker
Copy link
Contributor

m2eclipse sorts the classpath so that the scala library is before the JRE elements on the bootclasspath:
https://github.com/sonatype/m2eclipse-scala/blob/master/org.maven.ide.eclipse.scala/src/org/maven/ide/eclipse/scala/ScalaProjectConfigurator.java#L192

But when an Eclipse project has the Scala Nature, this is done automatically. I've also added a test to check the builder works fine with a misordered classpath. I've played with a copy of prj-scala-only in which the classpath was misordered and found no ill effects either on build or Run as a Scala Application.

Would you mind checking the reordering of elements on classpath is really necessary ? If it isn't, I'd be happy to submit a PR which removes it.

@davidB
Copy link
Contributor

davidB commented Sep 17, 2014

The ordering was necessary because :

  • Scala-IDE didn't do it, seems no longer valid
  • scala-compiler generate (long time ago) different error if classpath order changes (IIRC, i openned some bugs) => sort classpath to have reproductible build.
  • I want to always have the same order in the package panel

Note : m2e-scala should continue to work with older version of scala-ide (at least with version compatible with scala 2.9). When I did scala on professionnal project we stay with the same scala version longer than 1 year. And we didn't upgrade live/production application.

@huitseeker
Copy link
Contributor Author

Scala-IDE has last been compatible with Scala 2.9 in version 3.0.0, in march 2013:

http://scala-ide.org/blog/3.0-final-announcement.html

That was using Eclipse Indigo, 1 year 5 months 28 days ago. That was the last release to support Scala 2.9, the latest IDE stable is now 3.0.4 (for Scala 2.10/2.11). And if the classpath ordering is wrong, this is something clients can sort by editing their configuration, they don't necessarily need an IDE plugin to do it for them. So, it seems to me this particular modification is a good candidate for removal, especially since it interferes with the IDE's classpath management (doing classpath raw changes very early).

@davidB
Copy link
Contributor

davidB commented Sep 17, 2014

For the same raison (reproductible build across env, team,...)
scala-maven-plugin sorts classpath (maven / m2e provide an unordered
classpath by default). If each user can sort as he wants, some bugs can
become hard to reproduce.
So -1 for removal.

On Wed, Sep 17, 2014 at 2:05 PM, François Garillot <[email protected]

wrote:

Scala-IDE has last been compatible with Scala 2.9 in version 3.0.0, in
march 2013:

http://scala-ide.org/blog/3.0-final-announcement.html

That was using Eclipse Indigo, 1 year 5 months 28 days ago. The latest IDE
stable is 3.0.4. And if the classpath ordering is wrong, this is something
clients can sort by editing their configuration, they don't necessarily
need an IDE plugin to do it for them. So, it seems to me this particular
modification is a good candidate for removal, especially since it
interferes with the IDE's classpath management (doing classpath raw changes
very early).


Reply to this email directly or view it on GitHub
#33 (comment)
.

@huitseeker
Copy link
Contributor Author

When do you plan to do a release ? Ours is nearing and users would probably like the greater compatibility from #32 #34 ...

@davidB
Copy link
Contributor

davidB commented Oct 10, 2014

I published version 0.5.0 with your changes.

On Thu, Oct 9, 2014 at 8:00 PM, François Garillot [email protected]
wrote:

When do you plan to do a release ? Ours is nearing and users would
probably like the greater compatibility from #32
#32 #34
#34 ...


Reply to this email directly or view it on GitHub
#33 (comment)
.

@davidB davidB closed this as completed Oct 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants