Skip to content

no_entrypoint_imports #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

sourcegraph-wk
Copy link

Problem

An entrypoint import can be defined as an import within lib/src that imports a file within lib/*.dart (the entrypoints of a dart package). These imports are always unnecessary, and can contribute to slower dart build performance.

Solution

This PR naively removes every entrypoint import within the repo, and updates the gha-dart/.../checks.yaml to the latest version. In order to merge this PR a few manual changes must be performed:

  • Navigate to every file which has analysis errors caused from the missing import. Rely on intellisense to import the necessary symbol from the specific file, not the entrypoint import
  • Implement the no_entrypoint_imports additional-checks option in [email protected] that was added in this PR. This will prevent new entrypoint imports from getting added once this PR merges

Our request to teams is to perform the above tasks, so we can default enable the no_entrypoint_imports check for all gha-dart consumers. Please reach out to #support-frontend-dx for any questions or issues

QA

  • This pr is heavily dependant on the analysis server, and as such CI passes should be sufficient

Created by Sourcegraph batch change Workiva/no_entrypoint_imports.

@sydneyjodon-wk
Copy link
Contributor

Closing this for now since it's only comment changes

@sydneyjodon-wk sydneyjodon-wk deleted the batch/no_entrypoint_imports/react_testing_library branch August 6, 2025 22:42
@sydneyjodon-wk sydneyjodon-wk restored the batch/no_entrypoint_imports/react_testing_library branch August 7, 2025 21:17
@sydneyjodon-wk sydneyjodon-wk reopened this Aug 7, 2025
@sydneyjodon-wk sydneyjodon-wk marked this pull request as ready for review August 7, 2025 21:41
Copy link
Contributor

@annawatson-wk annawatson-wk left a comment

Choose a reason for hiding this comment

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

+10

@sydneyjodon-wk
Copy link
Contributor

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@btr-rmconsole-2 btr-rmconsole-2 bot merged commit 524f41b into master Aug 8, 2025
14 checks passed
@btr-rmconsole-2 btr-rmconsole-2 bot deleted the batch/no_entrypoint_imports/react_testing_library branch August 8, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants