Skip to content

Trigger CI and fix failing tests due to changes in es-modules branches#4254

Closed
JordanMartinez wants to merge 7 commits intopurescript:masterfrom
JordanMartinez:test-ci
Closed

Trigger CI and fix failing tests due to changes in es-modules branches#4254
JordanMartinez wants to merge 7 commits intopurescript:masterfrom
JordanMartinez:test-ci

Conversation

@JordanMartinez
Copy link
Copy Markdown
Contributor

Description of the change

I'm using this PR to explore the CI failures in #4207, which are likely caused by the issue summarized in working-group-purescript-es#16


Checklist:

  • Added a file to CHANGELOG.d for this PR (see CHANGELOG.d/README.md)
  • Added myself to CONTRIBUTORS.md (if this is my first contribution)
  • 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 changed the title Trigger CI Trigger CI and fix failing tests due to changes in es-modules branches Mar 3, 2022
@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Looks like one of the libraries (not sure which one) updated its bower.json file to use the master version for one of its dependencies, which then brought in a non-es-modules transitive dependency.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

The last commit printed the contents of Data.HeytingAlgebra.js to see whether it's using CommonJS modules or not (just as a sanity check). It's using ES6, so at least caching isn't the issue.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Looks like 82467e7 is building fine again. In that commit, I updated prelude to point to the state of es-modules branch before I added the commits in purescript/purescript-prelude#284. That branch is the fix-es-modules branch.

The latest commit updates prelude to point to fix-es-modules--change-unit, which is the same as fix-es-modules but with another commit that changes unit's FFI from {} to undefined. If that doesn't cause CI to fail, then I'm wondering if these do:

- exports.var functionName = function() { ... };
+ export const functionName = function() { ... };

Perhaps we need to use this version to fix things?

export function functionName() { ... };

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

The Ubuntu build builds fine even though unit is changed from {} to undefined. So that leaves the export const functionName question.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Looks like using export const functionName = function() { .. } is causing the CI errors. @sigma-andex Thoughts on this?

@natefaubion
Copy link
Copy Markdown
Contributor

There's nothing wrong with that unless it's just a style lint thing, which can be disabled.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

There's nothing wrong with that unless it's just a style lint thing, which can be disabled.

Could you clarify this? I'm not sure what you mean. If you mean disabling an eslint thing, I don't think that's the issue, but I'm guessing that's not what you mean. AFAICT, the CI errors are caused by purs thinking that the exports of Data.HeytingAlgebra's FFI file, which uses export const rather than export var, are invalid.

@natefaubion
Copy link
Copy Markdown
Contributor

natefaubion commented Mar 3, 2022

the exports of Data.HeytingAlgebra's FFI file, which uses export const rather than export var, are invalid.

Ignore my comment then. The issue is that this branch changed exports to const, but the interim ESM bundler which hasn't been removed yet doesn't understand it. My suggestion would to revert any such changes on those branches, and remove the bundler before doing any other work on those branches.

Edit: I think you came to that conclusion elsewhere 😆

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

JordanMartinez commented Mar 3, 2022

I think you came to that conclusion elsewhere 😆

😁

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Succeeded by #4255

@JordanMartinez JordanMartinez deleted the test-ci branch March 4, 2022 00:16
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