Skip to content

Reference the XRechnung addon key as a constant - #125

Open
pedrorfdez wants to merge 1 commit into
mainfrom
de-addon-key-literal
Open

Reference the XRechnung addon key as a constant#125
pedrorfdez wants to merge 1 commit into
mainfrom
de-addon-key-literal

Conversation

@pedrorfdez

@pedrorfdez pedrorfdez commented Aug 12, 2026

Copy link
Copy Markdown

ContextXRechnung imported gobl/addons/de/xrechnung only to name the addon key. Those addon packages are moving to gobl.de.xinvoice, and importing that module here would be a cycle, so the key is written as a constant instead.

No behaviour change, and it is compatible with both the current GOBL core and the one that no longer ships the German addons — so it can be released ahead of that change.

@pedrorfdez
pedrorfdez marked this pull request as ready for review August 12, 2026 10:17
@pedrorfdez
pedrorfdez requested a lite review from Copilot August 12, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the UBL XRechnung context to avoid importing the German XRechnung addon package purely to reference its addon key, preventing future import cycles as the German addons move modules.

Changes:

  • Remove the gobl/addons/de/xrechnung import from context.go.
  • Inline the XRechnung V3 addon key as a literal cbc.Key and document why.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread context.go Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pedrorfdez
pedrorfdez force-pushed the de-addon-key-literal branch from 53cee81 to 4f71881 Compare August 12, 2026 10:43
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.42%. Comparing base (39e5b63) to head (4f71881).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #125   +/-   ##
=======================================
  Coverage   81.42%   81.42%           
=======================================
  Files          28       28           
  Lines        2170     2170           
=======================================
  Hits         1767     1767           
  Misses        265      265           
  Partials      138      138           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pedrorfdez pedrorfdez changed the title Reference the XRechnung addon key as a literal Reference the XRechnung addon key as a constant Aug 12, 2026
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.

3 participants