-
Notifications
You must be signed in to change notification settings - Fork 115
Add a script which constructs a fake single package for speeding up dev cycles #6523
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
moritzkiefer-da
merged 6 commits into
canton-network:main
from
obsidiansystems:fake-mono-package-for-ide
Jul 27, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
569f818
Add a script which constructs a fake single package for speeding up d…
cgibbard e6101e7
Move daml-ide-mono under daml/
cgibbard 5b1ba64
Merge branch 'main' into fake-mono-package-for-ide
cgibbard 6a58260
Exclude daml-ide-mono in docs generation script
cgibbard 0073a4a
Prevent no_illegal_daml_references from checking daml-ide-mono/README.md
cgibbard e9bb456
Add script header
cgibbard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # What is this? | ||
|
|
||
| This directory, along with its fake `daml.yaml` can be populated with symlinks by | ||
| `./scripts/setup-mono-package.sh` to serve as a fake single-dar package containing all the daml in | ||
| Splice such that cross-package changes can be worked on with a tighter feedback loop using the | ||
| Daml Language Server (LSP) in VS Code or other editors, e.g. by running `dpm studio` in this directory | ||
| after having run the script. | ||
|
|
||
| You'll also have to remember to re-run the script if you add new `.daml` files to any package. | ||
|
|
||
| You should still verify that everything builds/tests for real once you're done of course, but this mode | ||
| of interaction can be very useful to eliminate 12-20 second build cycles and instead get immediate | ||
| feedback from the VS Code extension when working on tests and making changes that would otherwise be in | ||
| their upstream DAR dependencies, for example. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| sdk-version: 3.5.2 | ||
| name: splice-mono-ide | ||
| source: daml | ||
| version: 0.0.1 | ||
| dependencies: | ||
| - daml-prim | ||
| - daml-stdlib | ||
| - daml-script | ||
| build-options: | ||
| - --ghc-option=-Wunused-binds | ||
| - --ghc-option=-Wunused-matches | ||
| - --target=2.1 | ||
| - -Wno-upgrade-exceptions | ||
| - -Wno-deprecated-exceptions | ||
| - -Wno-template-interface-depends-on-daml-script | ||
| - -Wno-upgrade-interfaces | ||
| - --force-utility-package=no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Populate daml/daml-ide-mono/daml/ with per-file symlinks into every | ||
| # workspace Daml package's source tree. daml/daml-ide-mono/daml.yaml is | ||
| # checked in and static - this script only regenerates the source tree | ||
| # so that VS Code can work on the union as a single package. | ||
| # | ||
| # Re-run this any time a .daml file is added or removed anywhere in the | ||
| # workspace. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| repo=$(cd "$(dirname "$0")/.." && pwd) | ||
| dest="$repo/daml/daml-ide-mono/daml" | ||
|
|
||
| rm -rf "$dest" | ||
| mkdir -p "$dest" | ||
|
|
||
| for pkg in "$repo"/daml/*/daml.yaml \ | ||
| "$repo"/token-standard/*/daml.yaml \ | ||
| "$repo"/token-standard/examples/*/daml.yaml; do | ||
| src=$(dirname "$pkg")/daml | ||
| [ -d "$src" ] || continue | ||
| ( cd "$src" && find . -name '*.daml' -printf '%P\n' ) | | ||
| while IFS= read -r rel; do | ||
| link="$dest/$rel" | ||
| mkdir -p "$(dirname "$link")" | ||
| target=$(realpath --relative-to="$(dirname "$link")" "$src/$rel") | ||
| ln -sfn "$target" "$link" | ||
| done | ||
| done |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we move this under daml/daml-ide-mono? feels a bit too niche for a top-level directory
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.
Done.