|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
[scala-tools] [netbeans] Unknown unchecked flag 'true'Caoyuan, hi!
With your last commits I have got on building a project: Created dir: <...>/build/classes <...>/nbproject/build-impl.xml:405: The following error occurred while executing this line: <...>/nbproject/build-impl.xml:229: Unknown unchecked flag 'true' BUILD FAILED (total time: 1 second) Must I correct something inside /nbproject to resolve the issue? |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'The new created project should be OK.
For old project, please add or change as: scalac.compilerargs= scalac.deprecation=no scalac.unchecked=no to nbproject/project.properties On Sun, Oct 18, 2009 at 2:38 PM, Andrew Gaydenko <a@...> wrote: > Caoyuan, hi! > > With your last commits I have got on building a project: > > Created dir: <...>/build/classes > <...>/nbproject/build-impl.xml:405: The following error occurred while > executing this line: > <...>/nbproject/build-impl.xml:229: Unknown unchecked flag 'true' > BUILD FAILED (total time: 1 second) > > Must I correct something inside /nbproject to resolve the issue? > |
|
|
|
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'It's again, Scala's ant task does not support "true/false" as the
boolean properties value, only "off/on, yes/no" works. So, just change "false", "true" to "no" or "yes" On Sun, Oct 18, 2009 at 2:46 PM, Andrew Gaydenko <a@...> wrote: > On Sunday 18 October 2009 10:40:23 you wrote: >> On Sun, Oct 18, 2009 at 2:38 PM, Andrew Gaydenko <a@...> wrote: >> > Caoyuan, hi! >> > >> > With your last commits I have got on building a project: >> > >> > Created dir: <...>/build/classes >> > <...>/nbproject/build-impl.xml:405: The following error occurred while >> > executing this line: >> > <...>/nbproject/build-impl.xml:229: Unknown unchecked flag 'true' >> > BUILD FAILED (total time: 1 second) >> > >> > Must I correct something inside /nbproject to resolve the issue? >> >> What's the content of nbproject/build-impl.xml:229 and >> /nbproject/build-impl.xml:405 ? > > 229: > <fsc addparams="@{addparams}" > deprecation="${scalac.deprecation}" destdir="@{destdir}" > encoding="${source.encoding}" excludes="@{excludes}" includes="@{includes}" > sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="jvm-${javac.target}" > unchecked="${scalac.unchecked}"> > > 405-406: > > <scalaProject1:scalac/> > <scalaProject1:javac/> > > >> Try to re-create new project, move source code to there? > > Ugh!!.. 8-) > > I have 6 projects with plenty of configs (runs, deps, and so on) - it is > simpler correct something, if possible, please :-) > |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'On Sunday 18 October 2009 10:45:28 you wrote:
> The new created project should be OK. > > For old project, please add or change as: > > scalac.compilerargs= > scalac.deprecation=no > scalac.unchecked=no > > to nbproject/project.properties It helped (at least for one project - will fix all of them), thanks! > > On Sun, Oct 18, 2009 at 2:38 PM, Andrew Gaydenko <a@...> wrote: > > Caoyuan, hi! > > > > With your last commits I have got on building a project: > > > > Created dir: <...>/build/classes > > <...>/nbproject/build-impl.xml:405: The following error occurred while > > executing this line: > > <...>/nbproject/build-impl.xml:229: Unknown unchecked flag 'true' > > BUILD FAILED (total time: 1 second) > > > > Must I correct something inside /nbproject to resolve the issue? > |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'On Sunday 18 October 2009 10:49:16 Caoyuan wrote:
> It's again, Scala's ant task does not support "true/false" as the > boolean properties value, only "off/on, yes/no" works. > > So, just change "false", "true" to "no" or "yes" Aha, I see. BTW, Paul Phillips has added in r19111 and r19115 new compiler flag '-Xstrict-warnings' which seems rather interesting for me (I have asked Paul to explain scopes in which the flag works, but Paul probably don't like [scala-user] too mutch - hacking and [scala-internals] eats all his time :-)). Caoyuan, is it worth to add the flag to compiler flags plugin configuration? |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'On Sun, Oct 18, 2009 at 3:05 PM, Andrew Gaydenko <a@...> wrote:
> On Sunday 18 October 2009 10:49:16 Caoyuan wrote: >> It's again, Scala's ant task does not support "true/false" as the >> boolean properties value, only "off/on, yes/no" works. >> >> So, just change "false", "true" to "no" or "yes" > > Aha, I see. BTW, Paul Phillips has added in r19111 and r19115 new compiler > flag '-Xstrict-warnings' which seems rather interesting for me (I have asked > Paul to explain scopes in which the flag works, but Paul probably don't like > [scala-user] too mutch - hacking and [scala-internals] eats all his time :-)). > > Caoyuan, is it worth to add the flag to compiler flags plugin configuration? You can enable it via project properties menu now, by adding '-Xstrict-warnings' at "Additional scala options" of "BuildCategory/Compiling" But, as I mentioned before, there is another known issue of scalac' ant task: only the first one of options will be used |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'On Sun, Oct 18, 2009 at 11:05:05AM +0400, Andrew Gaydenko wrote:
> Aha, I see. BTW, Paul Phillips has added in r19111 and r19115 new > compiler flag '-Xstrict-warnings' which seems rather interesting for > me (I have asked Paul to explain scopes in which the flag works, but > Paul probably don't like [scala-user] too mutch - hacking and > [scala-internals] eats all his time :-)). No, I had figured on answering that, the problem is that I'm not at all sure yet what cases it does catch and I didn't want to mislead anyone. On top of that it's a very tricky warning to issue usefully, because people intentionally shadow constantly, and as soon as I start filtering out based on some heuristic I will also start filtering out some true positives. The only way I can see to safely eliminate noise without overfiltering is to have a code policy which disallows such shadowing, so in essence you'd first fix every spurious warning. But that means you can't write code like: def something(x: Any) = x match { case x: String => ... I could ignore pattern match bindings, which usually have a more limited scope and so are less likely to be accidental, but there are a lot of other examples (just compile scalac with -Xstrict-warnings to see many examples of "natural" shadowing.) Hmmm, what might be more useful to me is seeing when NEW shadowing turns up, which I might best achieve by compiling with warnings after each commit and diffing. > Caoyuan, is it worth to add the flag to compiler flags plugin > configuration? You guys move so fast. I should have made that a -Y flag, please don't count on it retaining that name (or surviving at all for that matter.) -- Paul Phillips | It's not enough to bash in heads - you've got to In Theory | bash in minds. Empiricist | -- Capt Hammer i pull his palp! |----------* http://www.improving.org/paulp/ *---------- |
|
|
Re: [scala-tools] [netbeans] Unknown unchecked flag 'true'On Sunday 18 October 2009 17:21:50 Paul Phillips wrote:
... > On top of that it's a very tricky warning to issue usefully, because > people intentionally shadow constantly, and as soon as I start filtering > out based on some heuristic I will also start filtering out some true > positives. Do you apply "positives" to an intentionally shadowing (saying another words, programming style)? If it is so - it is possible to turn the flag off. Probably, from the language user "all or nothing" is more clear approach. > The only way I can see to safely eliminate noise without overfiltering > is to have a code policy which disallows such shadowing, so in essence > you'd first fix every spurious warning. But that means you can't write > code like: > > def something(x: Any) = x match { case x: String => ... To my taste, it would be fine. As well as to avoid class C { val v = 1; def f(v : Int) = v } and such like. > I could ignore pattern match bindings, which usually have a more limited > scope and so are less likely to be accidental, but there are a lot of > other examples (just compile scalac with -Xstrict-warnings to see many > examples of "natural" shadowing.) Hmmm, what might be more useful to me > is seeing when NEW shadowing turns up, which I might best achieve by > compiling with warnings after each commit and diffing. > > > Caoyuan, is it worth to add the flag to compiler flags plugin > > configuration? > > You guys move so fast. No-no, it's my personal fault only! :-) > I should have made that a -Y flag, please don't > count on it retaining that name (or surviving at all for that matter.) Paul, thanks! Andrew |
| Free embeddable forum powered by Nabble | Forum Help |