Skip to content

Conversation

@Wigny
Copy link
Contributor

@Wigny Wigny commented Oct 3, 2025

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Tested in a private umbrella app by running mix igniter.install usage_rules@github:wigny/usage_rules@support-umbrella and then mix usage_rules.sync AGENTS.md --all.

Closes #32.

@Wigny
Copy link
Contributor Author

Wigny commented Oct 3, 2025

Please let me know if there are any unit tests that we could add for this callback, in case that is not already covered by Igniter itself.

@zachdaniel zachdaniel merged commit a33eca5 into ash-project:main Oct 3, 2025
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

@nathanalderson
Copy link
Contributor

I'm trying to use this in an umbrella app and struggling a bit. I have installed from tip to get this change, but when I run from the root of the project, it only detects its own usage rules and doesn't pick up dependencies used by my subprojects (such as Phoenix used by apps/web).

» mix usage_rules.sync --list                                 

Notices: 

* usage_rules
    usage_rules:otp - has sub-rule
    usage_rules:elixir - has sub-rule
    usage_rules - has usage rules

Notices were printed above. Please read them all before continuing!

Is this expected?

@zachdaniel
Copy link
Contributor

🤔 Are you making multiple rules files?

@nathanalderson
Copy link
Contributor

No. Just followed the most basic setup instructions. Added it as a dependency to my root umbrella project, then ran mix usage_rules.sync AGENTS.md --all. I do have usage rule files in my deps folder:

» ls deps/phoenix/usage-rules  
ecto.md  elixir.md  html.md  liveview.md  phoenix.md

But just to be clear, phoenix isn't a direct dependency of the root project, only of one of the subprojects.

@zachdaniel
Copy link
Contributor

🤔 I think all of the deps should be available in the root though 🤔 So it should work? I'd have to investigate and unfortunately I'm a bit busy at the moment. The task itself isn't too complex, happy to guide someone through the process of working it out.

@nathanalderson
Copy link
Contributor

See #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run mix usage_rules.sync in the root of an umbrella app

3 participants