Skip to content

bad option: -P:xgettext:xitrum.I18n #153

Closed
ngocdaothanh opened this Issue Mar 14, 2013 · 8 comments

4 participants

@ngocdaothanh

I have this project:
https://github.com/ngocdaothanh/xitrum-new

sbteclipse-plugin 2.1.2 is used:
https://github.com/ngocdaothanh/xitrum-new/blob/master/project/plugins.sbt

This project has this scalac option:
https://github.com/ngocdaothanh/xitrum-new/blob/master/build.sbt#L38

The option is for this Scala compiler plugin:
https://github.com/ngocdaothanh/scala-xgettext

If you checkout this project and run:
sbt/sbt eclipse

Eclipse files will be created. The content of file .settings/org.scala-ide.sdt.core.prefs:

deprecation=true
unchecked=true
P=xgettext\:xitrum.I18n,continuations\:enable
scala.compiler.useProjectSettings=true

The problem is that after importing the created project to Eclipse, Eclipse will display this:
bad option: -P:xgettext:xitrum.I18n

bad_option

What is the reason?
Is there a solution?

@myruby
myruby commented Apr 2, 2013

I've got this problem too. When I removed this line "P=xgettext:xitrum.I18n,continuations:enable" in file .settings/org.scala-ide.sdt.core.prefs, It seems to be okay. I hope to know the solution to this problem.
Thanks.

@jsuereth

This issue where eclipse presentation compiler is unaware of local project scalac plugins. Let me ping the guys on eclipse IDE aand see how we feed scalac plugins to eclipse.

@dotta
Lightbend Inc. member
dotta commented Apr 15, 2013

@jsuereth The issue is that both the build compiler and the prensentation compiler don't know where to look for the additional compiler plugins. You need to set the Xplugin key and provide the path to the compiler plugin. For instance, adding the following in my .settings/org.scala-ide.sdt.core.prefs fixes the issue:

Xplugin=/Users/mirco/.ivy2/cache/tv.cntt/xgettext_2.10/jars/xgettext_2.10-1.0.jar

@jsuereth

@dotta Thanks! I'll have to add special "autoCompilerPlugin" support to sbteclipse for this, but I don't think it'll be a huge issue.

@myruby or @ngocdaothanh - DO you have an OSS example project I can use for testing this out?

Thanks!

  • Josh
@ngocdaothanh

Sure, use this project:
https://github.com/ngocdaothanh/xitrum-demos

git clone git://github.com/ngocdaothanh/xitrum-demos.git
cd xitrum-demos
sbt/sbt eclipse
(sbt/sbt run if you're curious)

Then open the project in Eclipse.

@jsuereth jsuereth added a commit that referenced this issue Apr 15, 2013
@jsuereth jsuereth Fixes #153 - Scalac plugins not fed to eclipse.
This fixes the issues as described.  A follow on commit adds the necessary fixes
to handle the continuations plugin specially, since he's an odd duck.
9be5670
@jsuereth

Ok, fix is made. I'll look into rolling it into 2.2.0-RC1, since this was an existing feature that was borked.

@jsuereth

err read "RC2"

@jsuereth

Ok, check out: #158

@jsuereth jsuereth added a commit that closed this issue Apr 16, 2013
@jsuereth jsuereth Fixes #153 - Scalac plugins not fed to eclipse.
This fixes the issues as described:

* Xplugin/P settings can be specified multiple times
* Pull scalacOptions from "compile" configuration, most likely the ones we want for eclipse
* Eclipse cannot support specifying the continuations plugin currently, because it
automagically includes its own.
be5a76b
@jsuereth jsuereth closed this in be5a76b Apr 16, 2013
@ngocdaothanh ngocdaothanh referenced this issue in xitrum-framework/xitrum Apr 16, 2013
Closed

Update sbteclipse #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.