Skip to content

Commit b322a8f

Browse files
Merge pull request #4575 from IanButterworth/ib/1.12_source_fix
2 parents 1dad5c5 + 358484a commit b322a8f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/API.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ function update_source_if_set(env, pkg)
207207
source["rev"] = pkg.repo.rev
208208
end
209209
if pkg.path !== nothing
210-
source["path"] = pkg.path
210+
# pkg.path is manifest-relative, but sources store project-relative paths
211+
source["path"] = Types.manifest_path_to_project_path(
212+
env.project_file, env.manifest_file, pkg.path
213+
)
211214
end
212215

213216
path, repo = get_path_repo(project, env.project_file, env.manifest_file, pkg.name)

test/workspaces.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ end
203203
manifest = TOML.parsefile("Manifest.toml")
204204
parent_entry = only(manifest["deps"]["WorkspaceSourcesParent"])
205205
@test parent_entry["path"] == "."
206+
# Verify the Project.toml sources path was NOT corrupted (issue #4575)
207+
# The path should remain ".." (project-relative), not "." (manifest-relative)
208+
project = TOML.parsefile("docs/Project.toml")
209+
@test project["sources"]["WorkspaceSourcesParent"]["path"] == ".."
206210
end
207211
end
208212
end

0 commit comments

Comments
 (0)