Skip to content

Update local compile server setup instructions so that code compiles #221

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

Merged
merged 2 commits into from
May 27, 2021
Merged

Update local compile server setup instructions so that code compiles #221

merged 2 commits into from
May 27, 2021

Conversation

JordanMartinez
Copy link
Contributor

Fixes #220

@thomashoneyman
Copy link
Member

Hm -- even running (set -o noglob && stack exec trypurescript 8081 $(spago sources)) still produces this when running a fresh clone of the repository and the dev server.

Note that the development instructions say to use npm run build, but this should probably say npm run build:dev.

Screen Shot 2021-05-26 at 9 43 55 PM

To clarify, I don't see the issue when compiling the trypurescript executable; it's only when making the POST request to the running dev server. Loading up localhost:8080 is successfully making one POST request, but the compilation results in:

{
  "error": {
    "tag": "CompilerErrors",
    "contents": [
      {
        "suggestion": null,
        "moduleName": "Main",
        "errorLink": "https://github.com/purescript/documentation/blob/master/errors/UnknownName.md",
        "errorCode": "UnknownName",
        "message": "  Unknown module Data.Foldable\n",
        ...
      }
    ]
  }
}

I see the same result whether I'm using zsh (the default for MacOS these days) or bash, so I don't think that's the issue. If these dev instructions work fine for everyone else then perhaps this is just me and we should merge.

@JordanMartinez
Copy link
Contributor Author

I feel like that's a separate issue we can investigate after this PR gets merged. Beforehand, we had 'ModuleNotFound' errors, so that the server wouldn't even start. Now the server starts, but isn't working correctly. Perhaps the issue is now caused by a bug in the server function or that the project's dependencies just need to be updated to match v0.14.1's dependency version?

@thomashoneyman
Copy link
Member

Ah, I see.

I was referring to the server starting, but compilation of the code provided via the client would fail with Module Not Found errors like the one I showed above. In my shell, at least, the dev backend comes up regardless of the noglob option being set.

But I’ve seen these errors stop the server from being compiled in the first place, so we could still merge this.

It shouldn’t be a 0.14.1 issue, because the package set in the staging directory has been updated to 0.14.1.

@JordanMartinez JordanMartinez merged commit e6cbf0d into purescript:master May 27, 2021
@JordanMartinez JordanMartinez deleted the updateLCCSInstructions branch May 27, 2021 18:58
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.

Get local development server to work again
4 participants