Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate dependency graph file inside the build directory #186

Closed
radoslaw-panuszewski opened this issue Apr 18, 2024 · 8 comments
Closed

Comments

@radoslaw-panuszewski
Copy link

Currently, the dependency graph file is generated into the <project-root>/dependency-graphs directory. It's problematic for us because our release workflow verifies that there are no uncommitted files in the project and breaks the build otherwise. I think it could make sense to generate the file into <project-root/build/dependency-graphs directory because build is typically excluded in the .gitignore file.

Alternatively, it would be very helpful for us to make this path configurable :)

@bigdaz
Copy link
Member

bigdaz commented Apr 18, 2024

Thanks for the report.
It is currently possible to configure the report dir by setting the DEPENDENCY_GRAPH_REPORT_DIR environment variable.

BUT (and it's a bit but) this won't currently work with the dependency-submission action since the implementation currently assumes the default location.
I've raised #188 to fix this, and will likely add a dependency-graph-reports-dir input parameter to make this more discoverable.

@bigdaz
Copy link
Member

bigdaz commented Apr 18, 2024

I'm going to close this issue in favour of #188.

@bigdaz bigdaz closed this as completed Apr 18, 2024
@bigdaz bigdaz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@bigdaz
Copy link
Member

bigdaz commented Apr 18, 2024

This is now fixed in v3.3.1.

You should be able to specify a custom report directory:

    - name: Generate dependency graph
      uses: ./dependency-submission
      env: 
        DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/build/dependency-graph-reports'

Note that the directory must have an absolute path, hence the github.workspace reference.

@bgalek
Copy link

bgalek commented Apr 19, 2024

@bigdaz Perfect, thank you!
That was quick!

@bigdaz
Copy link
Member

bigdaz commented Apr 19, 2024

You're welcome! Please let me know how it works for you.

@radoslaw-panuszewski
Copy link
Author

@bigdaz thanks for the fix!

And how about adding the dependency-graph-reports-dir input parameter to the action?

@bigdaz
Copy link
Member

bigdaz commented Apr 19, 2024

how about adding the dependency-graph-reports-dir input parameter to the action?

Yes this is a possibility, and it would be more convenient. The only downside is further bloat to the set of input parameters (particularly because it has to be also supported for setup-gradle).

First I wanted to put out a quick patch release to fix the existing behaviour. Please file a separate issue to add an action input. A PR would be welcome :).

@bigdaz
Copy link
Member

bigdaz commented Apr 20, 2024

I've raised #193 to add input parameters for dependency-submission. We don't need to add the same inputs for setup-gradle IMO.

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

No branches or pull requests

3 participants