Skip to content

Commit 6ce639a

Browse files
authored
Add docs about depending on a freshly published library (#1216)
1 parent 5299970 commit 6ce639a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Other improvements:
1111
- builds with Cabal successfully
1212
- update to latest `versions` dependency: https://hackage.haskell.org/package/versions-6.0.1/changelog
1313
- Fix output truncation with `--json-errors`, many warnings and build failure (#1199)
14+
- Update README with info about depending on a freshly added library
1415
- Fixed globbing issue where `/.spago` behaves differently than `.spago` in `.gitignore`
1516

1617
## [0.21.0] - 2023-05-04

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,28 @@ $ spago publish
10551055

10561056
...and follow the instructions 🙂
10571057

1058+
#### Publish many packages together
1059+
1060+
Library authors will often build "ecosystems" of small interdependent packages that build on each other - if that's your situation, and you'd like to publish them all together (following some big refactoring, as it goes!), then you might wonder how to include the new version in the build plan of the next package to publish.
1061+
1062+
If you're using the registry solver then this is not an issue, but if your project is based on a package set, then that will not contain your newly published package, since well, you just published it!
1063+
1064+
You should be able to add the newly released version to your build plan by adding it to the `extraPackages` section ([see here](https://github.com/purescript/spago/issues/1215)):
1065+
```yaml
1066+
package:
1067+
name: next-library-to-publish
1068+
dependencies:
1069+
- newly-published-library: ">=0.0.1 <0.2.0"
1070+
1071+
workspace:
1072+
packageSet:
1073+
registry: 41.2.0
1074+
extraPackages:
1075+
newly-published-library: 0.1.0
1076+
```
1077+
> [!NOTE]\
1078+
> This only works when the package you add to `extraPackages` has been published to the registry. Adding a git dependency will produce an error, as publishing to the Registry only admits build plans that only contain packages coming from the Registry.
1079+
10581080
### Know which `purs` commands are run under the hood
10591081

10601082
The `-v` flag will print out all the `purs` commands that `spago` invokes during its operations,

0 commit comments

Comments
 (0)