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

[Feature Request]: Integrate Dagger into scripts #5314

Open
BenHenning opened this issue Jan 20, 2024 · 0 comments
Open

[Feature Request]: Integrate Dagger into scripts #5314

BenHenning opened this issue Jan 20, 2024 · 0 comments
Labels
enhancement End user-perceivable enhancements. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@BenHenning
Copy link
Sponsor Member

Is your feature request related to a problem? Please describe.

This has been something I've been thinking about for a while. Testing scripts can be awkward since replacing dependencies usually requires wrapping the script logic in a class and then directly constructing that class (vs. using the script's main function). This creates potential disparity with production uses of the script, and is inconsistent with how dependencies are swapped out elsewhere in the codebase.

Describe the solution you'd like

We should be able to set up a script component in Dagger that operates much the same way as the app's application component (though without binding to an Android application since scripts run on JVM). Similarly, we can also then create test components with test-only modules for overriding low-level utilities, as needed.

This will also help with ensuring test hermeticity since currently tests will try to access network resources (though some still will, to an extent, due to script tests relying on Bazel in the local environment).

Describe alternatives you've considered

No response

Additional context

No response

@BenHenning BenHenning added enhancement End user-perceivable enhancements. triage needed labels Jan 20, 2024
@adhiamboperes adhiamboperes added Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Jan 26, 2024
@BenHenning BenHenning added this to the 1.0 Global availability milestone Jan 30, 2024
@BenHenning BenHenning assigned BenHenning and unassigned BenHenning Jan 30, 2024
@BenHenning BenHenning removed this from the 1.0 Global availability milestone Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Development

No branches or pull requests

3 participants