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

feat: use Variant, 5 more parsers + spago.yaml #52

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

srghma
Copy link
Member

@srghma srghma commented Oct 5, 2024

Description of the change

parse Either variants


Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

@srghma srghma changed the title feat: parse Either + spago.yaml feat: use Variant, 5 more parsers + spago.yaml Oct 6, 2024
@garyb
Copy link
Member

garyb commented Oct 6, 2024

Why switch to Variant? It's not obvious to me that it'd have better ergonomics in this case. Do you have an example where you think it's better?

@srghma
Copy link
Member Author

srghma commented Oct 7, 2024

@garyb

So, I wanted to parse Path any any
I see there is type AnyPath a = Either (Path a Dir) (Path a File)

... well, I need type AnyAnyPath = Path Rel Dir /\ Path Abs Dir /\ Path Rel File /\ Path Abs File

so, I thought, better to use variant

PLUS, custom parsers, e.g. Path Rel Dir /\ Path Abs Dir /\ Path Rel File

@garyb
Copy link
Member

garyb commented Oct 7, 2024

Ah I see, yeah I guess that does make sense!

@garyb
Copy link
Member

garyb commented Oct 7, 2024

Not sure what the deal is with the npm issue now 🤨, I'm still mostly not using spago so I don't know if that's a known thing/there's a workaround.

…js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 115. Please try re-compiling or re-installing
@srghma
Copy link
Member Author

srghma commented Oct 8, 2024

https://stackoverflow.com/a/46384631/3574379

https://github.com/purescript-contrib/setup-purescript/blob/0bbf7c38ed9c1125e801509e3219b4e146a6c187/action.yml#L18


https://github.com/actions/setup-node?tab=readme-ov-file

The action defaults to search for the dependency file (package-lock.json, npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its hash as a part of the cache key

maybe they dont say it, but they cache global node_modules too

and I need to remove to reinstall

@srghma
Copy link
Member Author

srghma commented Oct 8, 2024

can I become a member of contrib? do I need to do sm special activities?

Everyone is welcome! People of all experience levels can join, begin contributing

lenient) awesome) I want)

@garyb
Copy link
Member

garyb commented Oct 8, 2024

I sent an invite 🙂

@jamesdbrock
Copy link
Member

If you are going to make pathy depend on https://github.com/natefaubion/purescript-variant , @srghma , then you should consider talking to Nate Faubion about moving variant to purescript-contrib. The packages in purescript-contrib should depend only on core libs and other purescript-contrib packages, and not on stuff in people’s personal accounts ( as @garyb once explained to me.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants