Skip to content

Conversation

@JordanMartinez
Copy link
Contributor

Description of the change

Backlinking to purescript/purescript#4244

Migrates FFI to ES modules


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@JordanMartinez JordanMartinez added purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump. labels Mar 22, 2022
@JordanMartinez
Copy link
Contributor Author

🏓 @thomashoneyman CI will fail due to using spago to bundle things. Since this isn't exactly a commonly-used lib, how do you want to proceed?

@thomashoneyman thomashoneyman self-requested a review March 22, 2022 21:11
@thomashoneyman
Copy link
Collaborator

My initial thought is to use esbuild directly to bundle, as will be done under the hood with Spago in the future. Does that seem like an appropriate plan? Perhaps @sigma-andex knows the correct way to do this?

Otherwise, we could comment out the tests, create an issue to come back to it, and move on.

Either way we need to add aff-promise to the prepare-0.15 package set.

@JordanMartinez
Copy link
Contributor Author

Either way we need to add aff-promise to the prepare-0.15 package set.

Ah, good point.

@JordanMartinez
Copy link
Contributor Author

My initial thought is to use esbuild directly to bundle, as will be done under the hood with Spago in the future. Does that seem like an appropriate plan? Perhaps @sigma-andex knows the correct way to do this?

That can work. Maybe do that for now and then use spago bundle, which will use esbuild under the hood, later?

@sigma-andex
Copy link

This is running on node, right? If so we don't even need to bundle

@sigma-andex
Copy link

If you want to bundle, this can be used:

[debug] Running command: `echo "import { main } from './output/Main/index.js'
main()" | /usr/local/bin/esbuild --platform=node --format=esm --bundle  --outfile=index.js`

@JordanMartinez
Copy link
Contributor Author

This is running on node, right? If so we don't even need to bundle

Thanks for the tip!

@thomashoneyman thomashoneyman merged commit a76d2e3 into purescript-contrib:main Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump.

Development

Successfully merging this pull request may close these issues.

3 participants