Skip to content

Fix formatter failing on specs that EXTENDS CommunityModules#496

Merged
FedericoPonzi merged 1 commit intotlaplus:masterfrom
FedericoPonzi:fponzi/formatter-cm
Feb 15, 2026
Merged

Fix formatter failing on specs that EXTENDS CommunityModules#496
FedericoPonzi merged 1 commit intotlaplus:masterfrom
FedericoPonzi:fponzi/formatter-cm

Conversation

@FedericoPonzi
Copy link
Collaborator

@FedericoPonzi FedericoPonzi commented Feb 15, 2026

Switch from -jar to -cp so CommunityModules-deps.jar is on the classpath. Tested with reformatting of specifications/ewd998/EWD998.tla. I have a folder with tlapm and community modules in a libs folder and the path configured in the settings.

Ref comment: #327 (comment)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the TLA+ formatter fails when processing specifications that EXTEND CommunityModules. The fix switches from using -jar to -cp (classpath) when invoking the formatter, allowing both tlaplus-formatter.jar and CommunityModules-deps.jar to be on the classpath simultaneously.

Changes:

  • Modified Java invocation to use -cp with explicit main class instead of -jar
  • Added CommunityModules-deps.jar to the formatter's classpath
  • Updated documentation comments to reflect the new classpath-based approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Switch from -jar to -cp so CommunityModules-deps.jar is on the
classpath.

Signed-off-by: Federico Ponzi <me@fponzi.me>
@FedericoPonzi FedericoPonzi merged commit 75a6466 into tlaplus:master Feb 15, 2026
4 checks passed
@FedericoPonzi FedericoPonzi deleted the fponzi/formatter-cm branch February 15, 2026 16:40
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.

3 participants