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

Watch & Workspace: path error #197

Open
VincentBerthier opened this issue Jul 2, 2024 · 3 comments
Open

Watch & Workspace: path error #197

VincentBerthier opened this issue Jul 2, 2024 · 3 comments

Comments

@VincentBerthier
Copy link

Hey there,
I’m trying out Bacon on a rather complex project organized in a Workspace.
I’ve configured a number of jobs, which are all launched correctly, no problem.

However, the watch directories are borked.
From what I see in the logs, the directories in the watch use the first crate as the root.
For example let’s say ̇I have:
Folder1
Folder2
If I put watch = ["Folder1", "Folder2"] then beacon will complain that it can’t find "/root/path/Folder1/Folder1" and "/root/path/Folder1/Folder2".

If I put watch = ["../Folder1", "../Folder2"] however it seems to be working just fine.

@Canop
Copy link
Owner

Canop commented Jul 2, 2024

Can you please build a project exhibiting this problem (it doesn't have to have many files) ?

@VincentBerthier
Copy link
Author

Uh, there are a lot of things, and it’s a work project, so not something I can share like that.
I can give you the logs and the configuration though, and it’s…well, even weirder that I thought in fact.

With crates A, B and C, if I put watch = [A, B, C], it seems that it will

  • first look for A/A, A/B, A/C,
  • then look for B/A, B/B, B/C
    Might be for the different jobs though? It’s weird.

bacon.log
bacon.txt

@dalance
Copy link

dalance commented Oct 4, 2024

I found the same issue.
My repository is https://github.com/veryl-lang/veryl .

In this repo, I want to add testcases/veryl directory to watch list.
So I wrote like below at first, but it didn't work fine.

watch = ["testcases/veryl"]

Instead of it, I wrote like below, it worked fine.

watch = ["../../testcases/veryl"]

This is because the root path of the watch list is the path of each crate in the workspace.
In my workspace, there are the following crates:

crates/analyzer
crates/emitter
crates/formatter
crates/languageserver
crates/mdbook
crates/metadata
crates/parser
crates/path
crates/sourcemap
crates/std
crates/tests
crates/veryl

So the watch entry is expanded like below:

crates/analyzer/../../testcases/veryl
crates/emitter/../../testcases/veryl
crates/formatter/../../testcases/veryl
crates/languageserver/../../testcases/veryl
crates/mdbook/../../testcases/veryl
crates/metadata/../../testcases/veryl
crates/parser/../../testcases/veryl
crates/path/../../testcases/veryl
crates/sourcemap/../../testcases/veryl
crates/std/../../testcases/veryl
crates/tests/../../testcases/veryl
crates/veryl/../../testcases/veryl

It works fine, but I think bit confusable because the root path of watch entry is not documented.
And I worry whether the same directory is added repeatedly is problem.
In workspace, it may be better that the root path of watch entry is the workspace root.

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

No branches or pull requests

3 participants