-
Notifications
You must be signed in to change notification settings - Fork 7
Remaining issues with merged test projects #38
Copy link
Copy link
Open
Description
#37 added support for [sources] entries by
- creating a new temporary environment containing both the main project and test project dependencies,
- jointly resolving this new environment,
- copying the resulting manifest back to the main directory, and
- manually adding the main project entry to the manifest.
I've found a few remaining problems with this implementation
- If the test project has a dependency that itself depends on the main package, then the main package is already in the manifest at Step 2 but pointing to a released version instead of the local version. After Step 4 the main package is then listed twice, which results in an ambiguity that makes the resolved environment unusable.
- If the main project has a weakdep that is also a test dep, then the merged project file includes that entry both as a dep and a weakdep. Pkg ignores deps that are also weakdeps (see below), so the testdep is then missing from the manifest, and tests will fail:
Newer Julia versions will ignore dependencies in [deps] that are also in [weakdeps].
- Step 4 fails to copy the
depsentry for the main project, so it looks like the package has no dependencies, and an error may be raised when running tests (see e.g. https://github.com/TuringLang/MCMCDiagnosticTools.jl/actions/runs/21393672665/job/61586548602?pr=150#step:7:396), and note that in the following lines nodepsentry is added:julia-downgrade-compat/downgrade.jl
Lines 244 to 253 in 066064d
entry_lines = String[] push!(entry_lines, "[[deps.$pkg_name]]") push!(entry_lines, "path = \".\"") push!(entry_lines, "uuid = \"$pkg_uuid\"") if pkg_version !== nothing push!(entry_lines, "version = \"$pkg_version\"") end push!(entry_lines, "") main_pkg_entry = join(entry_lines, "\n") - Step 4 also fails to add entries for the extensions and weakdeps of the main project.
There may be additional issues, but these are blocking further testing of the workflow in my packages that use [sources].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels