-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Detect when resolve
needs ModuleRef
when likely cyclic references
#3878
base: main
Are you sure you want to change the base?
Changes from all commits
c9efc75
1f0675b
9fce280
8099efe
7688b39
a4ae8d6
22dd5ce
01e0a86
78ab6ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1110,5 +1110,54 @@ object ResolveTests extends TestSuite { | |
Right(Set(_.concrete.tests.inner.foo, _.concrete.tests.inner.innerer.bar)) | ||
) | ||
} | ||
test("cyclicModuleRefInitError") { | ||
val check = new Checker(TestGraphs.CyclicModuleRefInitError) | ||
test - check.checkSeq0( | ||
Seq("__"), | ||
isShortError(_, "Cyclic module reference detected") | ||
) | ||
} | ||
test("cyclicModuleRefInitError2") { | ||
val check = new Checker(TestGraphs.CyclicModuleRefInitError2) | ||
test - check.checkSeq0( | ||
Seq("__"), | ||
isShortError(_, "Cyclic module reference detected") | ||
) | ||
} | ||
test("cyclicModuleRefInitError3") { | ||
val check = new Checker(TestGraphs.CyclicModuleRefInitError3) | ||
test - check.checkSeq0( | ||
Seq("__"), | ||
isShortError(_, "Cyclic module reference detected") | ||
) | ||
} | ||
test("crossedCyclicModuleRefInitError") { | ||
val check = new Checker(TestGraphs.CrossedCyclicModuleRefInitError) | ||
test - check.checkSeq0( | ||
Seq("__"), | ||
isShortError(_, "Cyclic module reference detected") | ||
) | ||
} | ||
test("nonCyclicModules") { | ||
val check = new Checker(TestGraphs.NonCyclicModules) | ||
test - check( | ||
"__", | ||
Right(Set(_.foo)) | ||
) | ||
} | ||
test("moduleRefWithNonModuleRefChild") { | ||
val check = new Checker(TestGraphs.ModuleRefWithNonModuleRefChild) | ||
test - check( | ||
"__", | ||
Right(Set(_.foo)) | ||
) | ||
} | ||
test("moduleRefCycle") { | ||
val check = new Checker(TestGraphs.ModuleRefCycle) | ||
test - check( | ||
"__", | ||
Right(Set(_.foo)) | ||
) | ||
} | ||
Comment on lines
+1155
to
+1161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also add a few test cases for non-transitive resolves, both by normal wildcard |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if this link used the
MILL_VERSION
or I could not give the link. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, the full link should be injected and generated in
build.sc
, since page refactoring happens now and then, and we could feed it to our link-checker when generating the docs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say let's just leave out the documentation link for now; we don't really have this convention in other error messages, and I feel like it would need a bit more thought to do properly (ensuring it's the right version, ensuring we don't have broken links, etc.)