Skip to content

Conversation

@eneufeld
Copy link
Contributor

What it does

With CommandComamnds being part of the packages/core/src/browser/common-frontend-contribution.ts file we get circular dependencies. This leads to issues especially when running tests.

The Commands are now moved to an own file. This is a breaking change for whoever does a deep import of the CommonCommands namespace.

How to test

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@eneufeld eneufeld requested review from sdirix and tsmaeder October 31, 2025 11:56
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Oct 31, 2025
@eneufeld eneufeld force-pushed the fix/circular-dependency-common-commands branch 2 times, most recently from 58ec27d to 8b293f9 Compare October 31, 2025 12:26
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Oct 31, 2025
@sdirix
Copy link
Member

sdirix commented Oct 31, 2025

@ndoschek I think it would be good to add circular dependency analysis to the (CI) builds in some way so we can avoid issues like this in the future. They always hit at inconvenient times as they often "work" but are brittle to changes and can be triggered with slightly different usage patterns

@ndoschek
Copy link
Member

Thank you @sdirix for raising this, that sounds good. I'll create a ticket and plan it in for this month to have this check implemented soon.

With CommandComamnds being part of the packages/core/src/browser/common-frontend-contribution.ts file we get circular dependencies. This leads to issues especially when running tests.

The Commands are now moved to an own file. This is a breaking change for whoever does a deep import of the CommonCommands namespace.
@eneufeld eneufeld force-pushed the fix/circular-dependency-common-commands branch from 8b293f9 to d89ce28 Compare October 31, 2025 14:10
import { FrontendApplicationContribution, OnWillStopAction } from './frontend-application-contribution';
import { CommandContribution, CommandRegistry, Command } from '../common/command';
import { CommonCommands } from './common-commands';
export { CommonCommands };
Copy link
Contributor

Choose a reason for hiding this comment

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

With this change, the breaking change notice can probably be removed from the changelog: external consumers shouldn't be affected.


}

export namespace CommonCommands {
Copy link
Contributor

@colin-grant-work colin-grant-work Nov 3, 2025

Choose a reason for hiding this comment

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

The CommonMenus namespace immediately above this is similar to CommonCommands in that it consists entirely of dependency-free constants and is imported in a few other places, raising the risk of circular imports. We could move it out to its own file, as well.

(It's also involved in at least one circular dependency)

@eneufeld eneufeld mentioned this pull request Nov 6, 2025
2 tasks
@eneufeld eneufeld merged commit fa8b9ca into master Nov 6, 2025
8 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Nov 6, 2025
@github-actions github-actions bot added this to the 1.67.0 milestone Nov 6, 2025
@ndoschek ndoschek deleted the fix/circular-dependency-common-commands branch November 10, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants