This page is no longer maintained — Please continue to the home page at www.scala-lang.org

scalac -Xresident fails silently following errors?

3 replies
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.

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

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: scalac -Xresident fails silently following errors?

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

Iulian Dragos 2
Joined: 2009-02-10,
User offline. Last seen 42 years 45 weeks ago.
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

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
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

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland