Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/sbtPublic
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

[1.x] RefactordependencyTree into an input task#7848

Open
Friendseeker wants to merge1 commit intosbt:1.10.x
base:1.10.x
Choose a base branch
Loading
fromFriendseeker:dependency-report

Conversation

Friendseeker
Copy link
Member

@FriendseekerFriendseeker commentedOct 31, 2024
edited
Loading

Following Eugene'scomment, this PR refactorsdependencyTree into an input task, with the aim of

  • Featuring minimal additional settings key (to avoid settings key explosion)
  • Supporting all capabilities ofMiniDependencyTreePlugin
  • Supporting most capabilities of the fullDependencyTreePlugin
  • Supportingjson output to both terminal & file
  • Featuring a simple API

The refactored input task is calleddependencyReport. OldMiniDependencyTreePlugin settings are still kept for compatibility purpose.

Syntax

dependencyReport [format] [subformat]

Parameters

  • format: text|json|html|graphml: specifies the format of the output, defaults totext
  • subformat: if applicable further specifies format of output
    • text format:subformat takeslist|stat|info, corresponding todependencyList,dependencyStats,dependencyLicenseInfo. Emptysubformat corresponds todependencyTree
    • html format:subformat takestree|graph, corresponding tobrowseTreeHTMLTask, browseGraphHTMLTask
    • json/graphml format: does not takesubformat

Example

sbt:contraband> dependencyReport[info] org.scala-sbt:contraband_2.12:0.5.3-SNAPSHOT [S][info]   +-com.eed3si9n:sjson-new-scalajson_2.12:0.10.0 [S][info]   | +-com.eed3si9n:shaded-jawn-parser_2.12:1.3.2 [S][info]   | +-com.eed3si9n:shaded-scalajson_2.12:1.0.0-M4 [S][info]   | +-com.eed3si9n:sjson-new-core_2.12:0.10.0 [S][info]   |[info]   +-org.parboiled:parboiled_2.12:2.5.1 [S][info][info] Dependency report written to D:\Repos\contraband\library\target\compile\dependencies.txtsbt:contraband> dependencyReport json[info] [{"text":"org.scala-sbt:contraband_2.12:0.5.3-SNAPSHOT","children":[{"text":"com.eed3si9n:sjson-new-scalajson_2.12:0.10.0","children":[{"text":"com.eed3si9n:shaded-jawn-parser_2.12:1.3.2","children":[]},{"text":"com.eed3si9n:shaded-scalajson_2.12:1.0.0-M4","children":[]},{"text":"com.eed3si9n:sjson-new-core_2.12:0.10.0","children":[]}]},{"text":"org.parboiled:parboiled_2.12:2.5.1","children":[]}]}][info] Dependency report written to D:\Repos\contraband\library\target\compile\dependencies.json[success] Total time: 0 s, completed Oct 30, 2024, 6:11:06 p.m.sbt:contraband> Test / dependencyReport html graph[info] Dependency report written to D:\Repos\contraband\library\target\test\graph\graph.html

Closes#7770

@eed3si9n
Copy link
Member

Thanks for the contribution! Given that this is a breaking change, I'd suggest targeting this first against sbt 2.x, whose next milestones would ship somewhat regularly. For sbt 1.x, we'd have to target next minor version sbt 1.11.x, which I don't know when it would be.

@Friendseeker
Copy link
MemberAuthor

Friendseeker commentedOct 31, 2024
edited
Loading

Thanks for the contribution! Given that this is a breaking change, I'd suggest targeting this first against sbt 2.x, whose next milestones would ship somewhat regularly. For sbt 1.x, we'd have to target next minor version sbt 1.11.x, which I don't know when it would be.

Thanks for the info. Shall make another PR & target the change to 2.x branch.

This should (hopefully) not be a breaking change though, as this PR kept all existing settings key ofMiniDependencyTreePlugin for compatibility purpose.

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

@eed3si9need3si9nAwaiting requested review from eed3si9n

@adpi2adpi2Awaiting requested review from adpi2

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

dependencyTree should also display/write json, not just text
2 participants
@Friendseeker@eed3si9n

[8]ページ先頭

©2009-2025 Movatter.jp