I have a file (encoded in UTF8) that seems to fail with Eclipse Compiler:
IO error while decoding
/Users/jeppe/Documents/workspaces/fleetzone/fleetweb/src/main/scala/fleetzone/model/Vehicle.scala
with UTF-8
Please try specifying another one using the -encoding option
If I compile using the command line, everything works fine. Known bug?
Workarounds?
This is with
Scala IDE for Eclipse 1.0.0.201101030103 org.scala-ide.sdt.feature.feature.group
/Jeppe
Presentation compiler use the encoding of the project (regardless of
file encoding). what is your project's properties : encoding ?
/davidB
I had the same error when upgrading to wip_exp_backport. I just now
fixed the error by switching to a new workspace. Actually I just
deleted the .metadata directory in the workspace, where Eclipse stores
all its settings.
Be warned though, that you will lose all preferences and you will have
to reimport all your projects into Eclipse.
Regards,
Ruediger
2011/1/3 Jeppe Nejsum Madsen <je...@ingolfs.dk>:
Regards,
Ruediger
2011/1/3 Ruediger Keller <ruedige...@rk42.de>:
Yes, I see the same. Project & file encoding is UTF8.
/Jeppe
I just tried this and the problem is still there.....
/Jeppe
Cheers,
/davidB
I've attached a project that shows the error (at least for me :-).
This is on OS X
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
Compiling without any file open works. With the file open, compilation
fails with the encoding error.
Thanks for looking into this.
I must say (and I know I don't have any right to complain :-) that the
last few days of IDE usage have been painful. I don't really need the
completion, highlighting etc. but I need the basic incremental
compilation, running of test cases etc. to work reasonably fast. But
this hasn't been the case. For all the quirks that was in the 2.7
plugin, it was still more productive for me...
/Jeppe
I'm sorry to hear that it didn't work for you. For me it helped, as I
not getting the error anymore. I'm on Windows 7, perhaps that makes a
difference?
Also, I didn't notice that the file must be open for the error to
occur. But if I recall correctly, I always had the file opened in
Eclipse when trying this.
I hope you find a solution soon.
Regards,
Ruediger
2011/1/5 Jeppe Nejsum Madsen <je...@ingolfs.dk>:
Thanks for using the plugin and provide feedback.
/davidB
/davidB
It's UTF8.
I'm using Eclipse 3.5-EE, as I had problems with Helios (but maybe
that was unrelated :-)
I'm not actually sure which Scala-IDE branch is running. How can I
tell? I know I installed wip_exp_backport at some point,, but also
think I reverted to stock version, but I'm not sure.
Maybe it's time to do a clean Eclipse install and start from scratch.
What is the preferred combo these days (for web development)? Is it
Helios with wip_exp_backport?
/Jeppe
And what is your local encoding fs:
Help > About > installation Details > Configuration
search `file.encoding`
>
> I'm using Eclipse 3.5-EE, as I had problems with Helios (but maybe
> that was unrelated :-)
wip_exp_backport work for Galileo and Helios (since recently)
>
> I'm not actually sure which Scala-IDE branch is running. How can I
> tell? I know I installed wip_exp_backport at some point,, but also
> think I reverted to stock version, but I'm not sure.
What is the ScalaIDE update-site you used (only one should be enabled
to avoid trouble when you "update plugins")
> Maybe it's time to do a clean Eclipse install and start from scratch.
>
> What is the preferred combo these days (for web development)? Is it
> Helios with wip_exp_backport?
support of Helios for wip_exp_backport is recent (one week)
wip_exp_backport is experimental, so don't update frequently and be
ready to reinstall previous deployed version (available in archive)
I try to only push changes (before nightly build) that doesn't break
editing, but sometimes, I failed.
this branch is "As Is". I only use it to detect ASAP issue/break.
If you want to try it, wait for tomorrow, the today build has got an
issue mark occurence that generate lot popup (see other thread). I
push a Defensive patch to avoid/reduce noise make by popup.
/davidB
>
> /Jeppe
>
file.encoding=MacRoman
>
>>
>> I'm using Eclipse 3.5-EE, as I had problems with Helios (but maybe
>> that was unrelated :-)
>
> wip_exp_backport work for Galileo and Helios (since recently)
>
>>
>> I'm not actually sure which Scala-IDE branch is running. How can I
>> tell? I know I installed wip_exp_backport at some point,, but also
>> think I reverted to stock version, but I'm not sure.
>
> What is the ScalaIDE update-site you used (only one should be enabled
> to avoid trouble when you "update plugins")
Ahh yes, seems I have several. And probably also some left overs from
the 2.7 days as well as 2.8 beta.
Eclipse 2.8 http://download.scala-ide.org/nightly-update-wip-exp-backport-2.8.1.final/ Enabled
Scala http://www.scala-lang.org/scala-eclipse-plugin Enabled
http://download.scala-ide.org/update-current-35 Disabled
So it seems it's wip_exp_backport.
>> Maybe it's time to do a clean Eclipse install and start from scratch.
>>
>> What is the preferred combo these days (for web development)? Is it
>> Helios with wip_exp_backport?
>
> support of Helios for wip_exp_backport is recent (one week)
> wip_exp_backport is experimental, so don't update frequently and be
> ready to reinstall previous deployed version (available in archive)
> I try to only push changes (before nightly build) that doesn't break
> editing, but sometimes, I failed.
> this branch is "As Is". I only use it to detect ASAP issue/break.
> If you want to try it, wait for tomorrow, the today build has got an
> issue mark occurence that generate lot popup (see other thread). I
> push a Defensive patch to avoid/reduce noise make by popup.
Ok. I'll do a clean Helios install tomorrow. Is it still advised to
use classic as opposed to the Java EE edition?
/Jeppe
Also, the error seems to disappear when cleaning the project. But it
reappears when saving the file.
Quite mysterious...
Regards,
Ruediger
2011/1/6 Ruediger Keller <ruedige...@rk42.de>:
> Ok, I'm out of luck.
>
> The error just came up again. Note that the error happens for me
> without having the editor for the "erroneous" file open. The error
> didn't happen at first after using a fresh workspace and then
> importing the project. But now it happens again.
>
> Some information on my platform:
> Windows 7 x64 with Eclipse 3.5.2 Classic 32-bit, fresh workspace with
> imported projects
> Scala IDE for Eclipse version 1.0.0.201101030103
> file.encoding=Cp1252
> workspace encoding=UTF-8
> java.version=1.6.0_23
> java.vm.info=mixed mode
> java.vm.name=Java HotSpot(TM) Client VM
> java.vm.version=19.0-b09
>
> Besides the Scala Plugin I have only the MercurialEclipse Plugin
> installed. Maybe Jeppe has this installed, too?
>
> What can I do to help identify the problem?
>
> I will try updating to the latest nightly, I think I saw a commit from
> David about tracing the file encodings.
>
> Regards,
> Ruediger
>
>
> 2011/1/5 David Bernard <david.be...@gmail.com>:
I started Eclipse with the -consolelog option and git the following
error in the console when saving a file with umlauts:
[org.eclipse.contribution.weaving.jdt] error at
org\eclipse\contribution\jdt\itdawareness\ITDAwarenessAspect.aj::0
class 'org.eclipse.contribution.jdt
.itdawareness.ITDAwarenessAspect' is already woven and has not been
built in reweavable mode
selectedIdentifier: toChar
selectedIdentifier: toChar
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at scala.tools.eclipse.scalac_28.TopLevelMapTyper$class.newTyperRun(TopLevelMapTyper.scala:106)
at scala.tools.eclipse.ScalaProject$$anon$2$$anon$1.newTyperRun(ScalaProject.scala:51)
at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:415)
at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply$mcV$sp(Global.scala:424)
at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:424)
at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:424)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:378)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:378)
at scala.tools.nsc.interactive.Global.respondGradually(Global.scala:385)
at scala.tools.nsc.interactive.Global.respond(Global.scala:378)
at scala.tools.nsc.interactive.Global.reload(Global.scala:424)
at scala.tools.nsc.interactive.CompilerControl$ReloadItem.apply$mcV$sp(CompilerControl.scala:19)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:208)
at scala.tools.nsc.interactive.Global$$anon$3.run(Global.scala:267)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at scala.tools.eclipse.scalac_28.TopLevelMapTyper$class.newTyperRun(TopLevelMapTyper.scala:106)
at scala.tools.eclipse.ScalaProject$$anon$2$$anon$1.newTyperRun(ScalaProject.scala:51)
at scala.tools.nsc.interactive.Global.typedTree(Global.scala:460)
at scala.tools.nsc.interactive.Global$$anonfun$getTypedTree$1.apply(Global.scala:475)
at scala.tools.nsc.interactive.Global$$anonfun$getTypedTree$1.apply(Global.scala:475)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:378)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:378)
at scala.tools.nsc.interactive.Global.respondGradually(Global.scala:385)
at scala.tools.nsc.interactive.Global.respond(Global.scala:378)
at scala.tools.nsc.interactive.Global.getTypedTree(Global.scala:475)
at scala.tools.nsc.interactive.CompilerControl$$anon$2.apply$mcV$sp(CompilerControl.scala:122)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:208)
at scala.tools.nsc.interactive.Global.signalDone(Global.scala:111)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4212)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.collection.immutable.List.loop$1(List.scala:115)
at scala.collection.immutable.List.mapConserve(List.scala:132)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1948)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3894)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4252)
at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1787)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3862)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.collection.immutable.List.loop$1(List.scala:115)
at scala.collection.immutable.List.mapConserve(List.scala:132)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1549)
at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1348)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3856)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
at scala.collection.immutable.List.loop$1(List.scala:115)
at scala.collection.immutable.List.mapConserve(List.scala:132)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3849)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4252)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:85)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:282)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:282)
at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:48)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:282)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Global.scala:679)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1$$anonfun$apply$mcV$sp$1.apply(Global.scala:679)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1$$anonfun$apply$mcV$sp$1.apply(Global.scala:679)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:103)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:679)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:679)
at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:679)
at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:48)
at scala.tools.nsc.interactive.Global$TyperRun.applyPhase(Global.scala:678)
at scala.tools.nsc.interactive.Global$TyperRun.typeCheck(Global.scala:670)
at scala.tools.nsc.interactive.Global.typeCheck(Global.scala:346)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$backgroundCompile$6.apply(Global.scala:312)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$backgroundCompile$6.apply(Global.scala:310)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$backgroundCompile(Global.scala:310)
at scala.tools.nsc.interactive.Global$$anon$3.run(Global.scala:270)
java.io.IOException: MALFORMED[1]
at scala.tools.nsc.io.SourceReader$.decode(SourceReader.scala:137)
at scala.tools.nsc.io.SourceReader.read(SourceReader.scala:100)
at scala.tools.nsc.io.SourceReader.read(SourceReader.scala:72)
at scala.tools.nsc.Global.getSourceFile(Global.scala:232)
at scala.tools.nsc.Global$Run$$anonfun$compileFiles$1.apply(Global.scala:811)
at scala.tools.nsc.Global$Run$$anonfun$compileFiles$1.apply(Global.scala:811)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
at scala.collection.immutable.List.map(List.scala:45)
at scala.tools.nsc.Global$Run.compileFiles(Global.scala:811)
at scala.tools.nsc.interactive.RefinedBuildManager.update0$1(RefinedBuildManager.scala:127)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:186)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:93)
at scala.tools.eclipse.EclipseBuildManager.build(EclipseBuildManager.scala:133)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:403)
at scala.tools.eclipse.ScalaBuilder$$anonfun$build$1.apply(ScalaBuilder.scala:79)
at scala.tools.eclipse.ScalaBuilder$$anonfun$build$1.apply(ScalaBuilder.scala:38)
at scala.tools.eclipse.internal.logging.Tracer$.timeOf(Tracer.scala:28)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:38)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Is this some help?
Regards,
Ruediger
I also noticed that I get some errors in the console at Eclipse
startup. Maybe the are related?
For better readability I attached the logs as text files.
Also, is there a way for me to see the Scala Plugin's trace messages?
Should they be printed to the console?
Regards,
Ruediger
Just did a clean install on Helios (with wip_backport) and the problem
is still there. I don't have the mercural plugin installed, just
scala, subversie and Emacs+
/Jeppe
It is from a test project called FileEncodingErrorTesting with a
single file "EncodingError.scala" in the src directory.
The files contents are:
object EncodingError {
println("Some german umlauts: üöäßÜÖÄ")
}
Opening this file produced the attached log. I hope it helps.
Regards,
Ruediger
2011/1/6 David Bernard <david.be...@gmail.com>:
I just tried the new nightly and it indeed solves the error. Thank you
very much for your quick help! Your work on the plugin is very much
appreciated!
Regards,
Ruediger
So did I. Problem solved. I'll repeat what Ruediger said: Thanks, much
appreciated.
/Jeppe