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

Compile buffer and preview buffer create local elm artifacts #38

Closed
thunklife opened this issue Sep 30, 2015 · 8 comments
Closed

Compile buffer and preview buffer create local elm artifacts #38

thunklife opened this issue Sep 30, 2015 · 8 comments

Comments

@thunklife
Copy link

I have the following project structure:

|_ elm-package.json
|_ elm-stuff
    |
    |_ (various depedencies)
|_ src
    |_ MyFile.elm

When I compile the MyFile.elm buffer, the process generates a new elm-package.json and elm-stuff directory; this also happens for previewing. When I run elm-make src/MyFile.elm, these artifacts are not created.

I'm fairly sure that I'm missing something, I'm just not sure what it is. Thanks.

@Bogdanp
Copy link
Collaborator

Bogdanp commented Oct 3, 2015

Can you post the contents of your elm-package.json?

@Bogdanp
Copy link
Collaborator

Bogdanp commented Oct 31, 2015

Closing due to inactivity, feel free to re-open if this is still an issue.

@Bogdanp Bogdanp closed this as completed Oct 31, 2015
@fredcy
Copy link

fredcy commented Jan 6, 2016

I'm having the same problem as stated above. @Bogdanp, can we re-open this issue, please? My elm source files are in the "src/elm" subdirectory. Here is my elm-package.json contents:

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "src/elm"
    ],
    "exposed-modules": [],
    "dependencies": {
        "circuithub/elm-number-format": "1.0.2 <= v < 2.0.0",
        "elm-lang/core": "3.0.0 <= v < 4.0.0",
        "evancz/elm-effects": "2.0.1 <= v < 3.0.0",
        "evancz/elm-html": "4.0.2 <= v < 5.0.0",
        "evancz/start-app": "2.0.2 <= v < 3.0.0"
    },
    "elm-version": "0.16.0 <= v < 0.17.0"
}

@Bogdanp Bogdanp reopened this Jan 6, 2016
@Bogdanp
Copy link
Collaborator

Bogdanp commented Jan 6, 2016

I've re-opened the issue. Can you post the result of evaluating (elm--find-dependency-file-path) in one of your source files (or confirm whether or not it evaluates to your project root)?

@fredcy
Copy link

fredcy commented Jan 6, 2016

I did this in the shell:

cd ~/documents/elm/password
emacs src/elm/TextField.elm

In emacs I ran the command you gave and it resulted in this: "~/documents/elm/password/src/elm//".

I'm running emacs 24.5.1 on OSX 10.10.5.

I'm fairly sure that I'm using elm-mode-20160104.233 from elpa.

While writing this it occurred to me to try commenting out stuff in my emacs init file. It turns out that the problem only occurs when I have this code enabled:

(eval-after-load 'flycheck
  '(add-hook 'flycheck-mode-hook #'flycheck-elm-setup))

(add-hook 'elm-mode-hook
          (lambda () (flycheck-mode)))

@Bogdanp
Copy link
Collaborator

Bogdanp commented Jan 6, 2016

My next question would've been "do you have flycheck-elm on by any chance?" :). See this issue bsermons/flycheck-elm#3

@fredcy
Copy link

fredcy commented Jan 7, 2016

That was it. I applied the fix given in bsermons/flycheck-elm#3 and now default-directory is set correctly and it all works. Thanks. Feel free to close this issue again.

[BTW, elm-mode is great. Thank you for providing and supporting it.]

@Bogdanp
Copy link
Collaborator

Bogdanp commented Jan 7, 2016

Glad to hear it and thanks for the kind words :).

@Bogdanp Bogdanp closed this as completed Jan 7, 2016
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

No branches or pull requests

3 participants