Skip to content

fix #1750: check problematic owner first to avoid cyclic reference #1852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

liufengyun
Copy link
Contributor

Fix #1750: check problematic owner first to avoid cyclic reference.

I'm not sure if this is the right fix, could you please advise @odersky ?

@liufengyun
Copy link
Contributor Author

/rebuild

@odersky
Copy link
Contributor

odersky commented Dec 26, 2016

I don't think /rebuild works. You have to restart from the web interface, clicking on Details first.

@odersky
Copy link
Contributor

odersky commented Dec 26, 2016

@felixmulder I tried restarting from the web interface but that did not do anything either. I think it would be good to resurrect /rebuild. Sometimes it is really essential.

@felixmulder
Copy link
Contributor

felixmulder commented Dec 26, 2016

We have an alternative way to restart tasks currently.

$ drone build start lampepfl/dotty <buildNbr>

The build number can be found in two ways, either by:

$ drone build list lampepfl/dotty

or by clicking through the web interface. I restarted this job by running the first command for build number 392.

I'll look into the possibility of resurrecting /rebuild

@felixmulder
Copy link
Contributor

@liufengyun:

!!  86 - neg/i1750.scala                           [expected compilation failure]

@liufengyun
Copy link
Contributor Author

Thanks @felixmulder . I was wondering why it failed on drone, while pass locally -- the fix is exactly for #1750.

@smarter
Copy link
Member

smarter commented Dec 26, 2016

I would advise against moving ExtractAPI without thinking deeply about the consequences. For example ElimRepeated is going to replace T* by Seq[T], which means that if the user replaces def foo(x: Foo*) by def foo(x: Seq[Foo]) in some source file, this will not be considered to be an API change, but this is wrong since it will break everything that tries to call foo assuming it takes a Foo*.

We need to make sure RefChecks run before ExtractAPI, as there
might be cyclic reference exceptions, which is handled in
RefChecks. See neg/i1750.scala.
@liufengyun
Copy link
Contributor Author

@smarter the comment makes sense, a true concern. Let's try the other way around.

@@ -44,13 +44,13 @@ class Compiler {
List(new FrontEnd), // Compiler frontend: scanner, parser, namer, typer
List(new sbt.ExtractDependencies), // Sends information on classes' dependencies to sbt via callbacks
List(new PostTyper), // Additional checks and cleanups after type checking
List(new RefChecks, // Various checks mostly related to abstract members and overriding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment here for why it was moved up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixmulder Thanks for looking at it. I tend to agree moving RefChecks before Pickler is a huge change we should try our best to avoid. Let's wait for some better fix that deprecate this one.

@odersky
Copy link
Contributor

odersky commented Jan 29, 2017

@liufengyun What was the reason of moving RefChecks before ExtractDependencies? Did you see a crash in ExtractDependencies?

@liufengyun
Copy link
Contributor Author

@odersky : exactly as you noticed, there is CyclicReference exception in ExtractApi.

@liufengyun
Copy link
Contributor Author

superseded by #1913 , close this now.

@liufengyun liufengyun closed this Jan 29, 2017
@liufengyun liufengyun deleted the fix-i1750 branch January 29, 2017 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash on compilable code: cyclic reference involving class Visitor
4 participants