nnichols / clojure-dependency-update-action

[MAINTENANCE ONLY]: A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
MIT License
40 stars 7 forks source link

Support monorepo #7

Closed ericdallo closed 2 years ago

ericdallo commented 2 years ago

Bug Report

Describe the Bug

Not sure it's a bug, let me know if I'm wrong. I love this project and use it all the time on clojure-lsp, the issue is that we moved from a single deps.edn to a modular codebase so now we have this structure:

- deps.edn at the root of the project 
|-- cli/deps.edn
|-- lib/deps.edn

how could I change this action to check for updates on the 3 deps.edn files? I tried the directories but it didn't work. Thank you!

nnichols commented 2 years ago

Hey Eric, I'll spend some time on this within the week, probably splitting this into two work items:

  1. Investigate whatever isn't working with the directory search (Is this issue manifesting on a branch of clojure-lsp I can test out? If so, I'll probably fork the project to test 1:1)
  2. Add/improve modular support. As it stands, the action would generate duplicate branches in the event a dependency was shared across multiple dependency sources. I'll probably either allow for multiple sources, or, worst case, an embedded prefix in the branch names to prevent collisions

Thanks!

ericdallo commented 2 years ago

Thank you for the quick reply!

  1. yes, on master 😔
  2. sounds great! maybe something simpler like specify the deps.edn files manually would already solve the issue for me
nnichols commented 2 years ago

@ericdallo - I have a PR open now to simplify the action's internals (antq now has built-in functionality to do the upgrades, so I'm removing as much of my kludgey use of sed). If you're curious about the changes, here's a link to the PR: https://github.com/nnichols/clojure-dependency-update-action/pull/9

Would you mind testing this to see if addresses your problem? I've ran a few experiments against a testbed repo and have been able to selectively update child directories- in an admittedly trivial scenario.

You can use this SHA in place of the existing version: 679163d5c8b407342c79a9176d2d559bd1a83e83

ericdallo commented 2 years ago

Sure @michols, I'll change to use it and let you know the next lib version!

ericdallo commented 2 years ago

Made the change here

ericdallo commented 2 years ago

@nnichols not sure ,but I think it's in a infinite loop https://github.com/clojure-lsp/clojure-lsp/runs/4992760821?check_suite_focus=true, maybe because my cli submodule depends on the lib one?

ericdallo commented 2 years ago

Oh, not really, it seems that worked :) will keep an eye during this week

nnichols commented 2 years ago

Cool! It looks like there's a little overhead inspecting/processing multiple dep files, but it appears to be working as expected

nnichols commented 2 years ago

Closed by: https://github.com/nnichols/clojure-dependency-update-action/pull/9