Skip to content

Remove purs bundle and browser backend for purs repl#4255

Merged
JordanMartinez merged 19 commits intopurescript:masterfrom
JordanMartinez:remove-purs-bundle
Mar 12, 2022
Merged

Remove purs bundle and browser backend for purs repl#4255
JordanMartinez merged 19 commits intopurescript:masterfrom
JordanMartinez:remove-purs-bundle

Conversation

@JordanMartinez
Copy link
Copy Markdown
Contributor

@JordanMartinez JordanMartinez commented Mar 3, 2022

Description of the change

Fixes #4226. Also fixes #4252 because the browser backend for the repl depends on purs bundle working. This is a WIP.

I wasn't sure whether we want to keep purs bundle and just throw an error (current PR) or to remove the command completely.


Checklist:

  • Added a file to CHANGELOG.d for this PR (see CHANGELOG.d/README.md)
  • 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)

@natefaubion
Copy link
Copy Markdown
Contributor

Purs bundle should fail with a link to some sort of documentation with alternatives.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Purs bundle should fail with a link to some sort of documentation with alternatives.

Ideally, that would be the migration guide's corresponding section: https://github.com/purescript/documentation/blob/master/migration-guides/0.15-Migration-Guide.md#how-can-i-bundle-my-library-or-application

Not sure if that header will change between now and the release.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Lint error is caused by src/System/IO/UTF8.hs:35: writeUTF8File: writeUTF8File

Should we drop that? Comment it out? I'm not sure how often we'll be using that instead of writeUTF8FileT

@rhendric
Copy link
Copy Markdown
Member

rhendric commented Mar 3, 2022

Should we drop that? Comment it out? I'm not sure how often we'll be using that instead of writeUTF8FileT

I vote drop it. Commenting it out is worse than adding it as a Weeder root; it would just be a breeding ground for bitrot. And we should encourage new code to use Text over String anyway.

@JordanMartinez JordanMartinez changed the title Remove purs bundle Remove purs bundle and browser backend for purs repl Mar 3, 2022
@rhendric
Copy link
Copy Markdown
Member

rhendric commented Mar 4, 2022

FYI, there's some machinery in TestUtils.hs for handling the RerunCompilerTests.txt file that I think you can rip out along with said file; I believe it was only ever used for bundler tests.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Yeah, looks like it was only used with bundle. There are no other "RerunCompilerTests.txt" files anywhere.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

One comment raised when I talked about this in the recent ES modules Discord call is whether this PR also removes any "dead dependencies." For example, do we still need dependencies for web server-related functionality that enabled the REPL browser backend? I'd guess not, but I'm not sure which dependencies these would be.

@sigma-andex
Copy link
Copy Markdown
Contributor

One comment raised when I talked about this in the recent ES modules Discord call is whether this PR also removes any "dead dependencies." For example, do we still need dependencies for web server-related functionality that enabled the REPL browser backend? I'd guess not, but I'm not sure which dependencies these would be.

My guess is that it would be these: https://github.com/JordanMartinez/purescript/blob/remove-purs-bundle/purescript.cabal#L339-L342

Also I think index.html and index.js in https://github.com/JordanMartinez/purescript/tree/remove-purs-bundle/app/static can be removed.

JordanMartinez and others added 2 commits March 11, 2022 13:05
Co-authored-by: Thomas Honeyman <hello@thomashoneyman.com>
@JordanMartinez
Copy link
Copy Markdown
Contributor Author

One comment raised when I talked about this in the recent ES modules Discord call is whether this PR also removes any "dead dependencies." For example, do we still need dependencies for web server-related functionality that enabled the REPL browser backend? I'd guess not, but I'm not sure which dependencies these would be.

My guess is that it would be these: https://github.com/JordanMartinez/purescript/blob/remove-purs-bundle/purescript.cabal#L339-L342

Also I think index.html and index.js in https://github.com/JordanMartinez/purescript/tree/remove-purs-bundle/app/static can be removed.

Yup, spot on!

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.

Proposal: Remove the Browser REPL backend Proposal: Remove the PureScript bundler

5 participants