-
Notifications
You must be signed in to change notification settings - Fork 331
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
DiskDirectory services don't resolve absolute path
s against import paths
#2817
Comments
Maybe I'm misinterpreting the comment, and the current behavior is intentional, but it'd be strange that absolute paths in disk |
This is working as intended. The The DiskDirectory, meanwhile, dynamically serves a directory on disk. Changes to the content of that directory will immediately be reflected in an already-running workerd instance. DiskDirectory can even be writable. The directory is only accessed at runtime, not config time. I'll leave this open though with the action being that we should improve the documentation. |
Thanks for the reply. What you said all makes sense. I did not consider the case of |
Reproduction steps:
app.capnp
:mkdir assets; workerd -I $(pwd) serve app.capnp
The expectation is that startup succeeds and serves from the empty directory on 8080.
Instead:
The comment here indicates absolute paths should work:
workerd/src/workerd/server/workerd.capnp
Lines 763 to 768 in f0b6c86
Because this doesn't work, I think workerd configurations containing DiskDirectory services can only ever be served from the single directory where the relative path in the configuration is correct, or by duplicatively passing the directory on the CLI with
-d
, likeworkerd serve -ddir=/tmp/disk-test/assets /tmp/disk-test/app.capnp
.The text was updated successfully, but these errors were encountered: