Skip to content

feat: add Extras.Graph, ported from the Flix standard library - #2

Merged
magnus-madsen merged 1 commit into
masterfrom
feat/extras-graph
Sep 12, 2026
Merged

magnus-madsen merged 1 commit into
masterfrom
feat/extras-graph

Conversation

@magnus-madsen

Copy link
Copy Markdown
Member

Adds Extras.Graph, a port of the Graph module from the Flix standard library, together with its full test suite.

What is ported

  • src/Extras/Graph.flix is a copy of the compiler's main/src/library/Graph.flix, which is byte-identical to the v0.75.3 release. The only change is the module declaration, now pub mod Extras.Graph. The original copyright header is preserved.
  • test/TestGraph.flix is a copy of the compiler's TestGraph.flix with one added line, use Extras.Graph. All 165 tests are included unchanged.
  • src/Extras.flix and the README list the new module.

Name resolution

Flix 0.75.3 still ships its own Graph module, so use Extras.Graph in the tests has to shadow it. Verified with a separate probe in which the extras version deliberately differed from the standard library: the call resolved to Extras.Graph. The ported tests therefore exercise the code in this repository.

Testing

Ran check and test with the Flix 0.75.3 jar.

Suite Passed Failed
TestGraph 165 0
TestQueue 30 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA

Ports the Graph module and its tests from the Flix compiler repository
(main/src/library/Graph.flix, identical to the v0.75.3 release). The only
change to the source is the module name, which is now Extras.Graph; the
only change to the tests is an added `use Extras.Graph`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA
@magnus-madsen
magnus-madsen merged commit 638bb68 into master Sep 12, 2026
1 check passed
@magnus-madsen
magnus-madsen deleted the feat/extras-graph branch September 12, 2026 17:28
magnus-madsen added a commit to flix/flix that referenced this pull request Sep 12, 2026
The Graph module now lives in the flix/extras package as Extras.Graph
(flix/extras#2). Remove it, and its tests, from
the standard library. The flix/extras package is already part of the
community build, so the extracted module keeps being compiled on every PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUFSuSB8yJ9vdhvuBXzYht
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

Successfully merging this pull request may close these issues.

1 participant