- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
scalac -Xresident fails silently following errors?
Tue, 2009-12-22, 10:58
I've been trying to reproduce a simplified variant of #2689 using
-Xresident. I doing so I noticed that if the resident compiler
instance ever records an error it will refuse to compile any further
files because the reporter's error status is preserved across
interactions: this then causes the compiler to bail silently (see
Global#compileSources, "if (reporter.hasErrors) return") rather than
making any further progress.
Is this intentional? A recent regression? Shouldn't there at least be
a report that resident mode has gotten itself wedged?
Cheers,
Miles
Tue, 2009-12-22, 17:27
#2
Re: scalac -Xresident fails silently following errors?
On Tue, Dec 22, 2009 at 5:12 PM, martin odersky <martin.odersky@epfl.ch> wrote:
On Tue, Dec 22, 2009 at 10:58 AM, Miles Sabin <miles@milessabin.com> wrote:
> I've been trying to reproduce a simplified variant of #2689 using
> -Xresident. I doing so I noticed that if the resident compiler
> instance ever records an error it will refuse to compile any further
> files because the reporter's error status is preserved across
> interactions: this then causes the compiler to bail silently (see
> Global#compileSources, "if (reporter.hasErrors) return") rather than
> making any further progress.
>
> Is this intentional? A recent regression? Shouldn't there at least be
> a report that resident mode has gotten itself wedged?
>
I don't think that resident mode is used much. People use fsc instead.
I believe the only valid usage of resident mode is debugging the IDEs.
So, no this is not intentional. One should reset reporters on each
run.
Is there a difference between running in resident mode, and keeping an instance of global around and creating insances of Run to compile sources? If they are the same, then the resident mode is used by the build manager.
iulian
Cheers
Wed, 2009-12-23, 12:27
#3
Re: scalac -Xresident fails silently following errors?
On Tue, Dec 22, 2009 at 4:19 PM, Iulian Dragos wrote:
> On Tue, Dec 22, 2009 at 5:12 PM, martin odersky
> wrote:
>>
>> On Tue, Dec 22, 2009 at 10:58 AM, Miles Sabin
>> wrote:
>> > I've been trying to reproduce a simplified variant of #2689 using
>> > -Xresident. I doing so I noticed that if the resident compiler
>> > instance ever records an error it will refuse to compile any further
>> > files because the reporter's error status is preserved across
>> > interactions: this then causes the compiler to bail silently (see
>> > Global#compileSources, "if (reporter.hasErrors) return") rather than
>> > making any further progress.
>> >
>> > Is this intentional? A recent regression? Shouldn't there at least be
>> > a report that resident mode has gotten itself wedged?
>> >
>> I don't think that resident mode is used much. People use fsc instead.
>> I believe the only valid usage of resident mode is debugging the IDEs.
>> So, no this is not intentional. One should reset reporters on each
>> run.
>
> Is there a difference between running in resident mode, and keeping an
> instance of global around and creating insances of Run to compile sources?
> If they are the same, then the resident mode is used by the build manager.
> iulian
The difference is that the the build manager resets the reporter internally.
I'll commit the fix for this.
Cheers,
Miles
On Tue, Dec 22, 2009 at 10:58 AM, Miles Sabin wrote:
> I've been trying to reproduce a simplified variant of #2689 using
> -Xresident. I doing so I noticed that if the resident compiler
> instance ever records an error it will refuse to compile any further
> files because the reporter's error status is preserved across
> interactions: this then causes the compiler to bail silently (see
> Global#compileSources, "if (reporter.hasErrors) return") rather than
> making any further progress.
>
> Is this intentional? A recent regression? Shouldn't there at least be
> a report that resident mode has gotten itself wedged?
>
I don't think that resident mode is used much. People use fsc instead.
I believe the only valid usage of resident mode is debugging the IDEs.
So, no this is not intentional. One should reset reporters on each
run.
Cheers