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

watch all sprotty packages with a single command from root #394

Merged

Conversation

jonah-iden
Copy link
Contributor

added a new watch task to the root package json to watch all packages concurrently

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

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

I would prefer to switch to compiling with a TypeScript workspace like it's done in Langium:
https://github.com/eclipse-langium/langium/blob/main/tsconfig.build.json

Then building or watching the whole workspace can be done with a single tsc -b tsconfig.build.json call (add -w or --watch for watching). The only part where we'd still need concurrently is to bundle the examples with Webpack.

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

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

Thanks! We also need to add references to reflect the dependencies between packages. See how it's done in Langium:
https://github.com/eclipse-langium/langium/blob/9b177376c01b0e2c69cdbd82f5fc07b2e1d4577c/packages/langium-cli/tsconfig.src.json#L7-L9

sprotty has a dependency to sprotty-protocol and sprotty-elk has a dependency to both sprotty and sprotty-protocol.

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

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

Great! A few more things to top this off:

  • Remove packages/generator-sprotty/tsconfig.tsbuildinfo
  • Remove the "prepare" script from all packages and examples
  • Change the root "prepare" script to yarn run clean && yarn run build

@kaisalmen
Copy link
Contributor

kaisalmen commented Nov 9, 2023

  • Change the root "prepare" script to yarn run clean && yarn run build

@spoenemann why do we do that? install and build are different steps. Putting that in prepare always couples it. This gets in the way, because a full build is not always desirable after install.

@spoenemann
Copy link
Contributor

For convenience, I guess. So far, it has never got in my way (It's been like this since 2017). But I'm ok with changing that for consistency with other project. But then we also need to adapt .gitpod.yml and the GitHub action workflows.

@spoenemann spoenemann merged commit dcbc853 into eclipse-sprotty:master Nov 10, 2023
2 checks passed
@spoenemann
Copy link
Contributor

@kaisalmen feel free to do that change in another PR.

jbicker pushed a commit to jbicker/sprotty that referenced this pull request Dec 13, 2023
@spoenemann spoenemann added this to the v1.1.0 milestone Jan 3, 2024
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