8000 fix: Use root qualifier in Discover macro by ghostbuster91 · Pull Request #5055 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Use root qualifier in Discover macro #5055

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

Merged
merged 1 commit into from
May 4, 2025

Conversation

ghostbuster91
Copy link
@ghostbuster91 ghostbuster91 commented May 3, 2025

without this in case there is another mill package (which is often the case for plugins) following error occurs during macro expansion:

[error] [millCodegenPlugin0_12] /home/kghost/workspace/smithy4s/modules/mill-codegen-plugin/src/smithy4s/codegen/LSP.scala:30:32: object define is not a member of package smithy4s.codegen.mill
[error] [millCodegenPlugin0_12]   lazy val millDiscover = mill.define.Discover[this.type]
[error] [millCodegenPlugin0_12]                                ^
[error] [millCodegenPlugin0_12] one error found
[error] [millCodegenPlugin0_12] (millCodegenPlugin0_12 / Compile / compileIncremental) Compilation failed
[error] Total time: 1 s, completed May 4, 2025, 12:34:05 AM

@ghostbuster91
Copy link
Author

There is one test that keeps failing but I don't think that it is connected with my change:

   java.lang.NoSuchMethodError: 'void com.example.screenshottest.ExamplePreviewsScreenshots.messageCard(java.lang.String)'
  	at com.example.screenshottest.ExampleMessageCardScreenshotsKt.previewMessageCard(ExampleMessageCardScreenshots.kt:19)
  	at com.example.screenshottest.ExampleMessageCardScreenshots.oMessageCardScreenshot(ExampleMessageCardScreenshots.kt:12)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
  	at androidx.compose.ui.tooling.ComposableInvoker.invokeComposableMethod(ComposableInvoker.jvm.kt:181)
  	at androidx.compose.ui.tooling.ComposableInvoker.invokeComposable(ComposableInvoker.jvm.kt:226)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1$1.invoke(ComposeViewAdapter.android.kt:504)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1$1.invoke(ComposeViewAdapter.android.kt:502)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.android.kt:539)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.android.kt:497)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
  	at androidx.compose.ui.tooling.InspectableKt.Inspectable(Inspectable.android.kt:61)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.android.kt:444)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.android.kt:443)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
  	at androidx.compose.ui.tooling.ComposeViewAdapter.WrapPreview(ComposeViewAdapter.android.kt:438)
  	at androidx.compose.ui.tooling.ComposeViewAdapter.access$WrapPreview(ComposeViewAdapter.android.kt:124)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.android.kt:497)
  	at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.android.kt:494)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:441)
  	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:259)
  	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:258)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
  	at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:216)
  	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:132)
  	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:131)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
  	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:121)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:155)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:154)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:401)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:154)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:133)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
  	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
  	at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:97)
  	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3595)
  	at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3522)
  	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:743)
  	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1122)
  	at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:649)
  	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:635)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
  	at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1626)
  	at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:124)
  	at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:180)
  	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
  	at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:198)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
  	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
  	at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1707)
  	at android.view.View.dispatchAttachedToWindow(View.java:21980)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
  	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
  	at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:51)
  	at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:372)
  	at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:454)
  	at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:120)
  	at com.android.tools.rendering.RenderTask.createRenderSession(RenderTask.java:770)
  	at com.android.tools.rendering.RenderTask.lambda$inflate$6(RenderTask.java:918)
  	at com.android.tools.rendering.RenderExecutor.runAsyncActionWithTimeout$lambda$9(RenderExecutor.kt:210)
  	at com.android.tools.rendering.RenderExecutor$PriorityRunnable.run(RenderExecutor.kt:327)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  	at java.base/java.lang.Thread.run(Thread.java:840)
  []
  ==== Missing expectedLine: 
  [
    scala.Predef$.assert(Predef.scala:279)
    mill.testkit.ExampleTester.$anonfun$validateEval$7(ExampleTester.scala:179)
    mill.testkit.ExampleTester.$anonfun$validateEval$7$adapted(ExampleTester.scala:176)
    scala.collection.IterableOnceOps.foreach(IterableOnce.scala:619)
    scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:617)
    scala.collection.AbstractIterator.foreach(Iterator.scala:1303)
    mill.testkit.ExampleTester.validateEval(ExampleTester.scala:176)
    mill.testkit.ExampleTester.processCommand(ExampleTester.scala:140)
    mill.testkit.ExampleTester.processCommandBlock(ExampleTester.scala:94)
    mill.testkit.ExampleTester.$anonfun$run$2(ExampleTester.scala:203)
    mill.testkit.ExampleTester.$anonfun$run$2$adapted(ExampleTester.scala:203)
    scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
    mill.testkit.ExampleTester.run(ExampleTester.scala:203)
    mill.testkit.ExampleTester$.run(ExampleTester.scala:60)
    mill.testkit.UtestExampleTestSuite$.$anonfun$tests$3(UtestExampleTestSuite.scala:19)
    scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
    mill.api.Retry.$anonfun$apply$1(Retry.scala:32)
    mill.api.Retry.$anonfun$apply$1$adapted(Retry.scala:32)
    mill.api.Retry.$anonfun$indexed$2(Retry.scala:42)
    scala.util.Try$.apply(Try.scala:217)
    mill.api.Retry.$anonfun$indexed$1(Retry.scala:42)
    java.lang.Thread.run(Thread.java:840)
Tests: 1, Passed: 0, Failed: 1
[3465] example.android.kotlinlib[3-compose-screenshot-tests].local.server.test failed

[1] selective.run failed
[3465/3465] =============== selective.run example.a...d.__.local.server.test =============== 2285s
1 tasks failed
selective.run 3 tasks failed
example.android.javalib[1-hello-world].local.server.test 1 tests failed: 
  mill.testkit.UtestExampleTestSuite mill.testkit.UtestExampleTestSuite.exampleTest
example.android.javalib[2-app-bundle].local.server.test 1 tests failed: 
  mill.testkit.UtestExampleTestSuite mill.testkit.UtestExampleTestSuite.exampleTest
example.android.kotlinlib[3-compose-screenshot-tests].local.server.test 1 tests failed: 
  mill.testkit.UtestExampleTestSuite mill.testkit.UtestExampleTestSuite.exampleTest
Error: Process completed with exit code 1.

@ghostbuster91 ghostbuster91 marked this pull request as ready for review May 4, 2025 10:12
@lihaoyi
Copy link
Member
lihaoyi commented May 4, 2025

The android tests are flaky on 0.12.x, happy to merge regardless of the failure if you are done with this PR

Copy link
Member
@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you!

@lefou lefou merged commit 1be73fd into com-lihaoyi:0.12.x May 4, 2025
41 of 42 checks passed
@lefou lefou modified the milestones: 1.0.0-RC1, 0.12.11 May 4, 2025
@ghostbuster91 ghostbuster91 deleted the 0.12.x branch May 4, 2025 13: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.

3 participants
0