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

build filters files outside the root #103

Merged
merged 12 commits into from
Nov 9, 2023
Merged

build filters files outside the root #103

merged 12 commits into from
Nov 9, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Nov 6, 2023

reverts part of #89

fixes #99

todo:

  • add a test

test/input/bar.js Outdated Show resolved Hide resolved
@Fil Fil marked this pull request as ready for review November 9, 2023 16:34
@Fil
Copy link
Contributor Author

Fil commented Nov 9, 2023

The new build tests helped me see that in the case of data loaders, isLocalFile is not enough.

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you removed the canReadSync test out of isLocalFile? And instead, we handle that case specially in build. Then you wouldn’t need the Loader.find, and we could add some error logging for missing files.

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it so that FileAttachment with a non-local path is now a syntax error, so that we get a better error when a bad path is used.

@mbostock mbostock enabled auto-merge (squash) November 9, 2023 23:57
@mbostock mbostock merged commit 9c399c7 into main Nov 9, 2023
1 check passed
@mbostock mbostock deleted the fil/fix-99 branch November 9, 2023 23:57
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.

observable build allows files outside of the source root to be copied
2 participants