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

gno transpile should ignore hidden file/folder #1381

Open
tbruyelle opened this issue Nov 17, 2023 · 3 comments
Open

gno transpile should ignore hidden file/folder #1381

tbruyelle opened this issue Nov 17, 2023 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@tbruyelle
Copy link
Contributor

tbruyelle commented Nov 17, 2023

Under the hood, the gno transpile command uses the gnoFilesFromArgs() function, to collect all the gno files found in the path argument that should be processed. The problem is that this function is too greedy, it also returns gno files from the .git directory and these files are not true gno files (they don't contain gno code).

For example, when run inside this repository, the command returns errors like :

$ gno transpile .
.git/logs/refs/remotes/harry/hariom/get-rid-of-filetest.gno: precompile: parse: tmp.gno:1:1: expected 'package', found 0000000000000000000000000000000000000000 (and 1 more errors)

I think gnoFilesFromArgs() should filter out any hidden folders or files

@thehowl
Copy link
Member

thehowl commented Nov 17, 2023

In #1299 I added package gnoutil in an effort to try to centralise the ways we do pkg and file matching.

I'd like to add this as part of that effort -- I'll need to change some things in the PR next week anyway.

@tbruyelle
Copy link
Contributor Author

@thehowl Sounds like a good plan!

@tbruyelle tbruyelle changed the title gno precompile should ignore hidden file/folder gno transpile should ignore hidden file/folder Jun 14, 2024
@tbruyelle
Copy link
Contributor Author

@thehowl Since #1299 was closed without merging, what is the status of this issue ? Is there any pending work to make gnoFilesFromArgs() less greedy ?

@Kouteki Kouteki added the 🐞 bug Something isn't working label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants