Skip to content

[repo-assist] Ignore assembly self-references in DLL ordering; keep unorderable items - #4459

Merged
fpellet merged 3 commits into
masterfrom
repo-assist/fix-issue-4458-dll-self-reference-dd7af362bddbb7c4
Oct 26, 2026
Merged

fpellet merged 3 commits into
masterfrom
repo-assist/fix-issue-4458-dll-self-reference-dd7af362bddbb7c4

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist, reworked after review.

Closes #4458

Root cause

System.Reactive 7.0 references itself. getDllOrder kept that reference, so the assembly never became a leaf for getPackageOrderGeneric, which then stopped and silently dropped every item left: System.Reactive, and every assembly ordered after it, disappeared from <group>.group.fsx. The per-package script was not affected, because a package with a single DLL skips the ordering.

Changes

  1. refactor: the ordering functions move, unchanged, into a module internal DependencyOrder of DependencyCache.fs, so that they can be unit tested (Paket.Tests already sees the internals of Paket.Core).
  2. fix: getDllOrder ignores the reference of an assembly to itself. This alone fixes the repro of the issue.
  3. fix: getPackageOrderGeneric no longer drops what it cannot order. When no item is left to order, it forces the items of one name lying on a cycle, or whose dependencies are missing from the group, warns about it, and goes on ordering: the items that depend on the cycle still come after it. The warnings name the assembly, by its short name, or the package and its group.

The release note covers both fixes.

Tests

  • tests/Paket.Tests/ScriptGeneration/DependencyOrderTests.fs: a self-referencing assembly next to FSharp.Core (kept, no warning), the usual dependency order, a cycle of two assemblies (one warning, with the short name), a cycle of items, items depending on a cycle (ordered after it), and duplicated names forced out of a cycle (all kept).
  • Each test fails without the fix it covers.
  • The FullName of the self-reference of the real System.Reactive 7.0.0 DLLs (lib/*) is checked to be equal to the FullName of the assembly.
  • Local runs: dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~DependencyOrderTests|FullyQualifiedName~LoadingScript" passes 16/16, and the scriptgen integration tests pass 12, with 1 skipped.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@b4e175bab6674279e0fe158f7dc877b77bc9d92f

github-actions Bot and others added 3 commits October 26, 2026 16:11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
System.Reactive 7.0 references itself, so it never became a leaf and was dropped from the group load scripts, with every assembly ordered after it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… ordered

The order stopped at the first cycle and dropped every item left. It now forces the items of one name lying on a cycle, or whose dependencies are missing, warns about it, and orders the rest after it.
@fpellet
fpellet force-pushed the repo-assist/fix-issue-4458-dll-self-reference-dd7af362bddbb7c4 branch from 9828586 to 3a5f882 Compare October 26, 2026 15:13
@fpellet
fpellet marked this pull request as ready for review October 26, 2026 15:13
@fpellet
fpellet merged commit 6e39512 into master Oct 26, 2026
11 checks passed
@fpellet
fpellet deleted the repo-assist/fix-issue-4458-dll-self-reference-dd7af362bddbb7c4 branch October 26, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generate-load-scripts drops self-referencing assemblies (System.Reactive 7.0) from group load script

2 participants