Skip to content

Add basePackage to BoundedContext (#375) - #385

Draft
stefan-ka wants to merge 1 commit into
feature/374-aggregate-invariantsfrom
feature/375-base-package
Draft

stefan-ka wants to merge 1 commit into
feature/374-aggregate-invariantsfrom
feature/375-base-package

Conversation

@stefan-ka

@stefan-ka stefan-ka commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Part of #375 (the issue stays open: this PR only covers basePackage).

Stacked on #384; the base branch is feature/374-aggregate-invariants, so the diff only shows this feature.

Changes

  • Grammar: new optional basePackage attribute on BoundedContext, using the same JavaIdentifier rule as basePackage on Modules; the = is optional like for the other Bounded Context attributes:
    BoundedContext TicketSales implements FareSales {
      basePackage = com.transit.ticketsales
    }
    
  • Formatter: basePackage starts on a new line.
  • Tests: with and without =, next to a Module with its own basePackage, and an invalid package (parse error).

Not included (still open in #375)

basePackage was already a keyword (Modules), so no highlighting change in the VS Code extension is needed.

Docs: ContextMapper/contextmapper.github.io#106

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.8%. Comparing base (ab35ff8) to head (c1b9e4f).

Additional details and impacted files
@@                        Coverage Diff                         @@
##             feature/374-aggregate-invariants    #385   +/-   ##
==================================================================
  Coverage                                91.8%   91.8%           
  Complexity                               2234    2234           
==================================================================
  Files                                     211     211           
  Lines                                    5950    5950           
  Branches                                  808     808           
==================================================================
  Hits                                     5467    5467           
  Misses                                    230     230           
  Partials                                  253     253           

☔ 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.

Declares where a Bounded Context lives in the code, e.g.

  basePackage = com.transit.ticketsales

Same syntax as on Modules (dot-separated identifiers), the equal sign is
optional like for the other Bounded Context attributes.
@stefan-ka
stefan-ka force-pushed the feature/375-base-package branch from 0389a6f to c1b9e4f Compare October 20, 2026 21:55
@stefan-ka
stefan-ka force-pushed the feature/374-aggregate-invariants branch from 1bf8a4f to ab35ff8 Compare October 20, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant