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

Running other sbt commands suspends the process #46

Closed
steinybot opened this issue Aug 3, 2022 · 5 comments
Closed

Running other sbt commands suspends the process #46

steinybot opened this issue Aug 3, 2022 · 5 comments

Comments

@steinybot
Copy link

steinybot commented Aug 3, 2022

Run sbt clean:

[info] welcome to sbt 1.7.0 (Azul Systems, Inc. Java 17.0.1)
[info] loading global plugins from /Users/jason/.sbt/1.0/plugins
[info] loading settings for project slinkydemos-build from plugins.sbt,scalafmt.sbt ...
[info] loading project definition from /Users/jason/src/ScalablyTyped/SlinkyDemos/project
[info] loading settings for project slinkydemos from build.sbt ...
[info] resolving key references (21587 settings) ...
*
* Welcome to ScalablyTyped demos!
*
* These demos demonstrate how to use third party react components with Slinky.
*
* For documentation see https://scalablytyped.org .
*
* Note that when you change any conversion options or add/remove libraries a new conversion will be triggered.
* This is somewhat slow (could be minutes, depending) but it'll only happen once for a given conversion.
* If the conversion runs in a memory-constrained context like an IDE import, it might take MUCH longer.
*
[info] set current project to slinkydemos (in build file:/Users/jason/src/ScalablyTyped/SlinkyDemos/)
[1]  + 16566 suspended (tty input)  sbt clean

Any idea what is doing that?

Running sbt antd/start works fine.

@steinybot
Copy link
Author

Oh is this just because there is not root project? I guess I have never tried that before.

@oyvindberg
Copy link
Collaborator

It's a complete and utter mystery to me. If you find any hints I'd be happy :)

@steinybot
Copy link
Author

I minimised it to:

import scala.sys.process.Process

lazy val `storybook-react` = project
  .enablePlugins(ScalablyTypedConverterExternalNpmPlugin)
  .settings(
    externalNpm := {
      Process("bash -ci 'yarn'", baseDirectory.value).run()
      baseDirectory.value
    }
  )

This is weird:

scala> :paste
// Entering paste mode (ctrl-D to finish)

import scala.sys.process.Process
import java.io.File

Process("bash -ci 'yarn'", new File(System.getProperty("user.dir"))).run()


// Exiting paste mode, now interpreting.

import scala.sys.process.Process
import java.io.File
val res6: scala.sys.process.Process = scala.sys.process.ProcessImpl$SimpleProcess@6958d5d0
[1]  + 58457 suspended (tty output)  scala

Never seen that before.


Something else I was also going to investigate, which this proves, is that ST seems to be running a bit too eagerly. Running clean should not run stImport (or externalNpm). I'm guessing adding it to allDependencies is what is causing it.

@steinybot
Copy link
Author

There is something weird going on with node. A related problem was reported here yarnpkg/yarn#4282

@steinybot
Copy link
Author

Oh it must be this nodejs/node#28612

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