Skip to content
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

No standalone-packaged parents found for {slyce-core} #116

Open
Kalin-Rudnicki opened this issue Jun 17, 2022 · 3 comments
Open

No standalone-packaged parents found for {slyce-core} #116

Kalin-Rudnicki opened this issue Jun 17, 2022 · 3 comments

Comments

@Kalin-Rudnicki
Copy link

This is my first time trying to do anything with making an intellij plugin, so Im sorry if this is a stupid question.

Here is what happens when I run slyce-idea-plugin/printProjectGraph:

[info]  ┌───────────────────┐
[info]  │{slyce-idea-plugin}│
[info]  └─────────┬─────────┘
[info]            │          
[info]            v          
[info]   ┌────────────────┐  
[info]   │{slyce-generate}│  
[info]   └───────┬────────┘  
[info]           │           
[info]           v           
[info]    ┌─────────────┐    
[info]    │{slyce-parse}│    
[info]    └───────┬─────┘    
[info]            │          
[info]            v          
[info]     ┌────────────┐    
[info]     │{slyce-core}│    
[info]     └────────────┘ 

Here is what happens when I run slyce-idea-plugin/runIDE

[info] building mappings for 4 nodes
[error] org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder$MappingBuildException: No standalone-packaged parents found for {slyce-core}
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.collectCandidate$1(LinearMappingsBuilder.scala:67)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.findParentToMerge(LinearMappingsBuilder.scala:78)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.processTarget(LinearMappingsBuilder.scala:44)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.processNode(LinearMappingsBuilder.scala:22)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.$anonfun$buildMappings$2(LinearMappingsBuilder.scala:134)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.$anonfun$buildMappings$2$adapted(LinearMappingsBuilder.scala:134)
[error] 	at scala.collection.immutable.List.foreach(List.scala:431)
[error] 	at org.jetbrains.sbtidea.packaging.mappings.LinearMappingsBuilder.buildMappings(LinearMappingsBuilder.scala:134)
[error] 	at org.jetbrains.sbtidea.packaging.PackagingKeysInit.$anonfun$projectSettings$17(PackagingKeysInit.scala:53)
[error] 	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:46)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)

Im not sure what to do, my guess is that it cant find the fact that slyce-core has dependencies that arent in the project itself?

lazy val `slyce-core` =
  project
    .in(file("slyce-core"))
    .settings(
      name := "slyce-core",
      libraryDependencies ++= Seq(
        MyOrg %% "klib" % "3.0.0" % "test->test;compile->compile",
        "com.lihaoyi" %% "scalatags" % "0.11.1",
      ),
      sonatypeCredentialHost := "s01.oss.sonatype.org",
    )

Any information would be greatly appreciated, thank you 😄

@mutcianm
Copy link
Collaborator

mutcianm commented Jun 21, 2022 via email

@Kalin-Rudnicki
Copy link
Author

build.sbt:

//

// =====|  |=====

val Scala_3 = "3.1.3-RC5"

val MyOrg = "io.github.kalin-rudnicki"
val githubUsername = "Kalin-Rudnicki"
val githubProject = "slyce-zio"

ThisBuild / dynverVTagPrefix := false
ThisBuild / dynverSonatypeSnapshots := true
ThisBuild / watchBeforeCommand := Watch.clearScreen

ThisBuild / version ~= (_.replace('+', '-'))
ThisBuild / dynver ~= (_.replace('+', '-'))

// =====|  |=====

inThisBuild(
  Seq(
    organization := MyOrg,
    resolvers ++= Seq(
      Resolver.mavenLocal,
      Resolver.sonatypeRepo("public"),
    ),
    //
    description := "A (flex/bison)-esque parser generator for scala.",
    licenses := List("MIT" -> new URL("https://opensource.org/licenses/MIT")),
    homepage := Some(url(s"https://github.com/$githubUsername/$githubProject")),
    developers := List(
      Developer(
        id = "Kalin-Rudnicki",
        name = "Kalin Rudnicki",
        email = "[email protected]",
        url = url(s"https://github.com/$githubUsername"),
      ),
    ),
    sonatypeCredentialHost := "s01.oss.sonatype.org",
    scalaVersion := Scala_3,
    scalacOptions += "-source:future",
    testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")),
  ),
)

// =====|  |=====

lazy val `slyce-core` =
  project
    .in(file("slyce-core"))
    .settings(
      name := "slyce-core",
      libraryDependencies ++= Seq(
        MyOrg %% "klib" % "3.0.0" % "test->test;compile->compile",
        "com.lihaoyi" %% "scalatags" % "0.11.1",
      ),
      sonatypeCredentialHost := "s01.oss.sonatype.org",
    )

lazy val `slyce-parse` =
  project
    .in(file("slyce-parse"))
    .settings(
      name := "slyce-parse",
      sonatypeCredentialHost := "s01.oss.sonatype.org",
    )
    .dependsOn(`slyce-core` % "test->test;compile->compile")

lazy val `slyce-generate` =
  project
    .in(file("slyce-generate"))
    .settings(
      name := "slyce-generate",
      sonatypeCredentialHost := "s01.oss.sonatype.org",
      // version := "1.2.0",
      assemblyJarName := s"${name.value}-${version.value}.jar",
    )
    .dependsOn(`slyce-parse` % "test->test;compile->compile")

// TODO (KR) : IDEA-PLUGIN
lazy val `slyce-idea-plugin` =
  project
    .in(file("slyce-idea-plugin"))
    .enablePlugins(SbtIdeaPlugin)
    .settings(
      name := "slyce-idea-plugin",
      sonatypeCredentialHost := "s01.oss.sonatype.org",
      intellijPluginName := "Slyce",
      intellijBuild := "221.5591.41",
    )
    .dependsOn(`slyce-generate` % "test->test;compile->compile")

lazy val `slyce-root` =
  project
    .in(file("."))
    .settings(
      publish / skip := true,
      sonatypeCredentialHost := "s01.oss.sonatype.org",
    )
    .aggregate(
      `slyce-core`,
      `slyce-generate`,
      `slyce-parse`,
      // TODO (KR) : IDEA-PLUGIN
      `slyce-idea-plugin`,
    )

@ghost
Copy link

ghost commented Sep 6, 2022

Hi @Kalin-Rudnicki, sorry for this very late response. I think you can solve your problem by adding packageMethod := PackagingMethod.Standalone() to slyce-idea-plugin.

I'm currently exploring how to make the plugin packaging process more intuitive.

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

No branches or pull requests

2 participants