Skip to content

Add github actions workflow for unused deps#7681

Merged
jh-block merged 1 commit intoblock:mainfrom
r0x0d:add-workflow-for-removing-unused-dependencies
Mar 12, 2026
Merged

Add github actions workflow for unused deps#7681
jh-block merged 1 commit intoblock:mainfrom
r0x0d:add-workflow-for-removing-unused-dependencies

Conversation

@r0x0d
Copy link
Copy Markdown
Contributor

@r0x0d r0x0d commented Mar 5, 2026

Goose moves super fast, and sometimes, dependencies can get unused in Cargo.toml after removing code, crates and etc.

This workflow helps to keep the technical dept low by enforcing to remove such dependencies.

Summary

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Technical debt

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Related Issues

Relates to #ISSUE_ID
Discussion: LINK (if any)

Screenshots/Demos (for UX changes)

Before:

After:

@r0x0d r0x0d force-pushed the add-workflow-for-removing-unused-dependencies branch from 34f7038 to a17fc0f Compare March 5, 2026 19:29
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a17fc0f9c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@jamadeo jamadeo left a comment

Choose a reason for hiding this comment

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

Good idea. What does the output look like? does the action produce a pass/fail result?

Can you pin the referenced actions with npx pin-github-action ?

@r0x0d r0x0d force-pushed the add-workflow-for-removing-unused-dependencies branch 2 times, most recently from 8e24b27 to b9e239e Compare March 6, 2026 11:28
@r0x0d
Copy link
Copy Markdown
Contributor Author

r0x0d commented Mar 6, 2026

Hey, @jamadeo! Here's the output of this workflow: https://github.com/r0x0d/goose/actions/runs/22761215451/job/66017992824.

Based on the output above, I will remove such dependencies in this commit so it won't break future PRs.

@r0x0d
Copy link
Copy Markdown
Contributor Author

r0x0d commented Mar 6, 2026

@jamadeo, running cargo machete locally, I get an error with regards to vendor/v8. I don't know if that should be treated as a workspace member, or if this was just a leftover

⬢ [r0x0d@toolbx goose]$ cargo machete --with-metadata
Analyzing dependencies of crates in this directory...
error when handling ./vendor/v8/Cargo.toml: `cargo metadata` exited with an error: error: current package believes it's in a workspace when it's not:
current:   /var/home/r0x0d/Workspace/goose/vendor/v8/Cargo.toml
workspace: /var/home/r0x0d/Workspace/goose/Cargo.toml

this may be fixable by adding `vendor/v8` to the `workspace.members` array of the manifest located at: /var/home/r0x0d/Workspace/goose/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

I have ran cargo test locally and it passed all tests withou the vendor/v8 folder, but don't know if it is used anywhere else.

@DOsinga DOsinga assigned DOsinga and jamadeo and unassigned DOsinga Mar 9, 2026
@jamadeo
Copy link
Copy Markdown
Collaborator

jamadeo commented Mar 11, 2026

Very nice! @jh-block do you know whether the vendor/v8 crate should be explicitly included or excluded from the workspace?

@jh-block
Copy link
Copy Markdown
Collaborator

It can be added to the workspace. I am hopeful it can go away soon

@jh-block
Copy link
Copy Markdown
Collaborator

@r0x0d did you possibly test with --no-default-features so code mode was disabled? The v8 dependency is transitive and only enabled when the code-mode Cargo feature is enabled, but it's enabled by default.

@r0x0d
Copy link
Copy Markdown
Contributor Author

r0x0d commented Mar 11, 2026

@r0x0d did you possibly test with --no-default-features so code mode was disabled? The v8 dependency is transitive and only enabled when the code-mode Cargo feature is enabled, but it's enabled by default.

Uh, I haven't. That's a good point, I will try it out when I get home today/tomorrow.

@DOsinga DOsinga assigned jh-block and unassigned jamadeo Mar 11, 2026
@r0x0d r0x0d force-pushed the add-workflow-for-removing-unused-dependencies branch from 7ca8655 to 33e0399 Compare March 12, 2026 01:37
@r0x0d
Copy link
Copy Markdown
Contributor Author

r0x0d commented Mar 12, 2026

Oof, I think I messed up the rebase. I will check this out tomorrow and push the correct commit again.

@r0x0d r0x0d force-pushed the add-workflow-for-removing-unused-dependencies branch 2 times, most recently from 3246856 to 32cc235 Compare March 12, 2026 12:10
@r0x0d
Copy link
Copy Markdown
Contributor Author

r0x0d commented Mar 12, 2026

okay, @jh-block, it should be good for another review now.

Goose moves super fast, and sometimes, dependencies can get unused in
Cargo.toml after removing code, crates and etc.

This workflow helps to keep the technical dept low by enforcing to
remove such dependencies.

Signed-off-by: Rodolfo Olivieri <[email protected]>
@r0x0d r0x0d force-pushed the add-workflow-for-removing-unused-dependencies branch from 32cc235 to ead47cd Compare March 12, 2026 12:33
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ead47cd0ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

members = [
"crates/*",
# Mainly for cargo-machete to not error out during inspection.
"vendor/v8"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep vendored v8 out of default workspace builds

Adding vendor/v8 to [workspace].members makes it a default workspace member, so unscoped workspace commands now include that crate even though the comment says it was added only to satisfy cargo-machete; in this repo, CI runs cargo test and cargo clippy --all-targets without -p (.github/workflows/ci.yml:72 and :98), so this change forces those jobs to compile the vendored v8 package and its v8-goose dependency, which increases build surface and can introduce unrelated CI failures.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can be ignored; it was already being built by cargo test and cargo clippy since it's a transitive dep (when default features are enabled) of other crates

@jh-block jh-block added this pull request to the merge queue Mar 12, 2026
Merged via the queue into block:main with commit f16fe88 Mar 12, 2026
21 checks passed
@r0x0d r0x0d deleted the add-workflow-for-removing-unused-dependencies branch March 12, 2026 13:30
michaelneale added a commit that referenced this pull request Mar 15, 2026
* origin/main:
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set (#7284)
  fix: disable some computercontroller functionality when no $DISPLAY detected (#7824)
  test(acp): align provider and server test parity (#7822)
  fix(acp): register MCP extensions when resuming a session (#7806)

# Conflicts:
#	ui/desktop/src/hooks/useChatStream.ts
lifeizhou-ap added a commit that referenced this pull request Mar 16, 2026
* main: (191 commits)
  fix: add tool_choice and parallel_tool_calls to chatgpt_codex provider (#7867)
  fix: tool confirmation handling for multiple requests (#7856)
  Remove dead OllamaSetup onboarding flow (#7861)
  fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832)
  Upgrade Electron 40.6.0 → 41.0.0 (#7851)
  Only show up to 50 lines of source code (#7578)
  fix: stop writing without error when hitting broken pipe for goose session list (#7858)
  feat(acp): add session/set_mode handler (#7801)
  Keep messages in sync (#7850)
  More acp tools (#7843)
  fix: skip upgrade-insecure-requests CSP for external HTTP backends (#7714)
  fix(shell): prevent hang when command backgrounds a child process (#7689)
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  ...
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.

4 participants