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

Set the :fn option when calling the edamame parser #11

Merged
merged 1 commit into from
May 2, 2023

Conversation

vedang
Copy link
Contributor

@vedang vedang commented May 2, 2023

This option is necessary to parse content which is of a function form -- something that opens with a ( character. Without passing this option, we will always hit the following error:

Type:     clojure.lang.ExceptionInfo
Message:  Function literal not allowed. Use the `:fn` option
Data:     {:type :edamame/error, nil 30}
Location:
.../lein2deps/4f6d4a0140ddea10c5ac28cc24b49643660f42f6/src/lein2deps/internal.clj:23:63

Closes: #10

This option is necessary to parse content which is of a `function`
form -- something that opens with a `(` character. Without passing
this option, we will always hit the following error:

    Type:     clojure.lang.ExceptionInfo
    Message:  Function literal not allowed. Use the `:fn` option
    Data:     {:type :edamame/error, nil 30}
    Location:
    .../lein2deps/4f6d4a0140ddea10c5ac28cc24b49643660f42f6/src/lein2deps/internal.clj:23:63

Closes: borkdude#10
@vedang
Copy link
Contributor Author

vedang commented May 2, 2023

With this code change, the project.clj file is now parsed correctly, and a deps.edn file is created.

@borkdude borkdude merged commit aaea9dc into borkdude:main May 2, 2023
@borkdude
Copy link
Owner

borkdude commented May 2, 2023

@vedang Thanks!

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.

Parsing project.clj file fails with the error: Use the :fn option
2 participants