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

Fix FilesAndFolders in Glob #461

Closed
wants to merge 1 commit into from

Conversation

miniBill
Copy link
Contributor

No description provided.

Copy link

netlify bot commented Mar 30, 2024

👷 Deploy request for elm-pages-todos pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b0c54cf

@dillonkearns
Copy link
Owner

I just caught this as well! I think I beat you to the fix on master:

, ( "onlyFiles"
, (if options.include == FilesAndFolders then
False
else
options.include == OnlyFiles
)
|> Encode.bool
)
|> Just
, ( "onlyDirectories"
, (if options.include == FilesAndFolders then
False
else
options.include == OnlyFolders
)
|> Encode.bool
)
|> Just

So I think we can close this one. Thanks for the PR!

@miniBill
Copy link
Contributor Author

miniBill commented Mar 30, 2024

With some more testing I actually think neither my version nor yours are correct? If I try to run it and target a socket file it just... hangs
Nevermind, I had updated the Elm side but not the JS side

@miniBill
Copy link
Contributor Author

[This, by the way, is a failure mode I've observed in the past: if something happens such that Elm doesn't get an answer it expects the whole script just... hangs in there]

@miniBill miniBill closed this Mar 30, 2024
@miniBill miniBill deleted the files-and-folders branch March 30, 2024 16:02
@dillonkearns
Copy link
Owner

Yeah, the DX for working on the internal implementations for BackendTask runners is not so great, I am annoyed by it regularly as well. Would be nice to improve the error handling for faster iteration in development on those implementations.

@miniBill
Copy link
Contributor Author

miniBill commented Mar 30, 2024

My DX is yarn add -D ../elm-pages; yarn elm-pages run script/path.
It's pretty decent

@dillonkearns
Copy link
Owner

Oh yeah, I just work on example scripts in examples/end-to-end/script/src/ and run npx elm-pages run script/src/MyExample.elm. That part works great.

I meant the DX of things hanging instead of just having a clear error message and exiting when something goes wrong in the implementations in render.js. That would be nice to improve for iteration in dev.

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.

2 participants