Shopify / Shopify/packwerk

[Bug Report] Improve strict mode

Open
#320 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
1.9k
Forks
121
Avg merge
2m
Merged PRs (30d)
1

Description

Description
Strict mode is a great feature for zero violation packages, but I think it could be better.

To Reproduce
Enable strict mode for a package and run packwerk check.

Expected Behaviour
There are two problems:

  • It should raise when you run check / update without having the violation already recorded in your package_todo.yml.
  • It should clearly indicates that the text is an error (add emojis or text colour or something to make it look like an error).

Screenshots

% bin/packwerk check
Running via Spring preloader in process 629777
running spring after_fork
📦 Packwerk is inspecting 58252 files
....[etc.]
📦 Finished in 13.49 seconds

No offenses detected
No stale violations detected
strict_package cannot have dependency violations on other_package because strict mode is enabled for dependency violations in the enforcing package's package.yml

Version Information

  • Packwerk: 3.0.0 / edge
  • Ruby 3.2.1

Additional Context
Add better error formatting and make the error happen sooner (without having to record it).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with strict mode enabled, then trace the packwerk check and update entry points and how package_todo.yml and package.yml are read. Done means strict violations fail before being recorded and the output is visibly formatted as an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.