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

Add support for files containing tagged literals (custom reader tags) #1

Open
samebchase opened this issue Jan 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@samebchase
Copy link

When files contain reader tags, we see a parse error.

❯ bb-components <commit-SHA> master
----- Error --------------------------------------------------------------------
Type:     java.lang.Exception
Message:  No reader function for tag <TAG-NAME>
Location: 621:11

----- Stack trace --------------------------------------------------------------
edamame.impl.parser/parse-sharp                        - <built-in>
edamame.impl.parser/dispatch                           - <built-in>
edamame.impl.parser/parse-next                         - <built-in>
edamame.impl.parser/parse-to-delimiter                 - <built-in>
edamame.impl.parser/parse-map                          - <built-in>
... (run with --debug to see elided elements)
me.vedang.scripts.components/print-components          - /Users/samuel/bin/bb-components:947:25
me.vedang.scripts.components/print-components          - /Users/samuel/bin/bb-components:938:1
me.vedang.scripts.components                           - /Users/samuel/bin/bb-components:960:7
clojure.core/apply                                     - <built-in>
user                                                   - /Users/samuel/bin/bb-components:961:53
@vedang vedang added bug Something isn't working enhancement New feature or request labels Jan 13, 2022
@vedang vedang self-assigned this Jan 13, 2022
@vedang
Copy link
Owner

vedang commented Jan 13, 2022

Hey @samebchase ,

Thank you for raising this. The problem is that tagged literals are not supported right now by the script. It does not have any understanding of "project" or "context" under which it is running, so it does not know that it should look for / read data-reader files.

For the moment, a weak workaround is to exclude any files with tagged literals in them from the components script. For example:

git diff <SHA>..master --name-only | rg -v file-name | bb-components --stdin

@vedang vedang changed the title Parse error for files containing reader tags Add support for files containing tagged literals (custom reader tags) Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants