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

IDE issues with project structure #230

Open
milesfrain opened this issue Aug 26, 2020 · 1 comment
Open

IDE issues with project structure #230

milesfrain opened this issue Aug 26, 2020 · 1 comment
Labels
cookbook Issues related to this repo as a whole and not a recipe in particular

Comments

@milesfrain
Copy link
Collaborator

PureScript IDEs do not play nice with the cookbook directory structure.

The IDEs usually expect to find these in the root directory:

root
  output/
  packages.dhall
  spago.dhall

We still have a common output/ and packages.dhall in root, but use a separate spago.dhall for each recipe.

root
  output/
  packages.dhall
  recipes
    RecipeFoo
      spago.dhall
    RecipeBar
      spago.dhall

So if you open your editor at the root, you'll see errors about a missing spago.dhall.

One workaround is to change your development root (where you open your IDE from) to the directory of the recipe you are editing:

cd recipes/RecipeFoo
spago build
code .

This workaround has a few issues:

  • output/ is duplicated in the recipe directory.
  • Automatic page refresh (from make RecipeFoo-web) will not pick-up this local output/, since it relies on output/ at root.
    • You can get page refresh to work by running make RecipeFoo-build-watch in another terminal, which will also build changes into output/ at root. This is not ideal, because now we're duplicating effort by building into two output/ locations.
@milesfrain milesfrain added the cookbook Issues related to this repo as a whole and not a recipe in particular label Aug 26, 2020
@milesfrain
Copy link
Collaborator Author

A follow-up task is to document our recommended workaround in Contributing.md. Will do that after #228.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cookbook Issues related to this repo as a whole and not a recipe in particular
Projects
None yet
Development

No branches or pull requests

1 participant