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

Upgrade to new spago #35

Merged
merged 6 commits into from
Jul 8, 2024
Merged

Conversation

CGenie
Copy link
Contributor

@CGenie CGenie commented Apr 15, 2024

This PR contains an upgrade of this package to the new spago with spago.yaml replacing spago.dhall, packages.dhall, bower.json.

yarn.lock Outdated Show resolved Hide resolved
shell.nix Outdated Show resolved Hide resolved

package:
name: spec-discovery
dependencies:
Copy link
Member

Choose a reason for hiding this comment

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

Do the dependencies have to be explicitly versioned? I see the weren't versioned in the old spago config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, they weren't, but I think it's a good practice to specify version numbers nevertheless.

In Haskell you have things like: https://hackage.haskell.org/package/cabal-constraints which pin the versions exactly.

If spec releases version 8.x.x, someone will soon discover that purescript-spec-discovery won't compile because of dependency errors and would try to fix it to work with newer version.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the whole point of package sets to avoid these things?

For example, if there is a new version of spec that makes discovery not build anymore, then discovery won't be included in the next package set. And anybody who needs it can just stay with the previous package set version, not upgrade to the new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, maybe you're right, I'll fix these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah no sorry, I forgot that spago publish requires these things to be added. When I didn't specify the versions, it complained that it can't publish such a package.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, good for now. I'll look into this some more later.

workspace:
packageSet:
registry: 50.7.0
extraPackages: {}
Copy link
Member

Choose a reason for hiding this comment

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

This can probably be omitted, right?

- spec: ">=7.6.0 <8.0.0"
test:
main: Test.Main
dependencies: []
Copy link
Member

Choose a reason for hiding this comment

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

And this I guess?

@fsoikin
Copy link
Member

fsoikin commented Jul 8, 2024

@CGenie I think you need to update the GHA config too. See how GHA is failing?

@CGenie
Copy link
Contributor Author

CGenie commented Jul 8, 2024

import fs15, { constants as fsConstants } from "node:fs/promises";
               ^^^^^^^^^
SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'constants'

I guess we need nodejs at least 16, it's 14 in tests still. https://en.wikipedia.org/wiki/Node.js#Releases I guess version 22 is a safe bet now?

@fsoikin
Copy link
Member

fsoikin commented Jul 8, 2024

Still failing

@CGenie
Copy link
Contributor Author

CGenie commented Jul 8, 2024

Yeah because I forgot about bower.

@CGenie
Copy link
Contributor Author

CGenie commented Jul 8, 2024

I don't understand github. I wanted to set up my own runner for this but I don't know how.

@fsoikin fsoikin merged commit 91e6403 into purescript-spec:master Jul 8, 2024
1 check passed
@CGenie
Copy link
Contributor Author

CGenie commented Jul 9, 2024

Thanks!

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.

2 participants