-
Notifications
You must be signed in to change notification settings - Fork 259
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
Workspaces documentation is not very clear on how a project "discovers" its sibling projects #1297
Comments
All your assumptions are correct. A workspace is defined by the root |
@marvinhagemeister do you think the documentation could be made a bit clearer to reflect this? |
@marvinhagemeister I also have another question: is it best to keep all projects in a single Deno workspace in the same Docker container? I'm now thinking that might be best, given how interconnected things become and that the alternative requires copying the shared project(s) and the root |
I'd also like some clarification on how best to use workspaces if we want each member of the workspace to be it's own container without having to include the entire monorepo in the image? Currently Deno errors out with "Could not find config file for workspace member". |
I've updated both the workspace documentation and the docker documentation. Let me know if I can help any further |
@thisisjofrank this is great, thank you! |
I followed the documentation for Deno workspaces here, but found that it's not very clear on how a Deno project "sees" its sibling projects to be able to import them. From my understanding, if I run a project A in a workspace that also has project B, which A imports, Deno will first look in the parent directory of the project A directory, see if there is a root
deno.json
file there with aworkspace
property, then check the projects that workspace contains, and then, seeing that there is project B specified in theworkspace
array, will check if project B has adeno.json
file, and then will import it successfully. This means that if we are to create a Docker container for project A, we must also copy project B and the root deno.json file to it. However, these are all just my assumptions, and it would be good if all of this was clearer from the documentation.The text was updated successfully, but these errors were encountered: