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

Expand service paths. #15435

Merged
merged 3 commits into from May 19, 2023
Merged

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented May 15, 2023

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Allows us to replace e.g. working_dir Dir.home with working_dir "~" so we eventually don't need to stub ENV["HOME"] when generating the API anymore.

@reitermarkus reitermarkus force-pushed the working-dir-expand branch 3 times, most recently from 0687b44 to 6059215 Compare May 15, 2023 13:34
@apainintheneck
Copy link
Contributor

If we're going to do this, I think we should remove it all at once.

There only seem to be a handful of instances of Dir.home in the service blocks anyway so I agree that shouldn't be necessary. We should outlaw it with Rubocop inside service blocks and stop substituting it in Service.replace_placeholders as well.

Dir.home is also used a few places in formula caveats as well as in cask artifacts neither of which need to be handled here.

I assume this is just a cleanup sort of thing or has this been causing actual bugs for users?

@reitermarkus
Copy link
Member Author

All instances in casks were removed in Homebrew/homebrew-cask#147169.

I assume this is just a cleanup sort of thing or has this been causing actual bugs for users?

Just some cleanup so we eventually don't need to replace ENV["HOME"] anymore during API generation.

@MikeMcQuaid
Copy link
Member

There only seem to be a handful of instances of Dir.home in the service blocks anyway so I agree that shouldn't be necessary. We should outlaw it with Rubocop inside service blocks and stop substituting it in Service.replace_placeholders as well.

Dir.home is also used a few places in formula caveats as well as in cask artifacts neither of which need to be handled here.

Agreed 👍🏻

@apainintheneck
Copy link
Contributor

It makes sense as cleanup. I didn't see the previous PR so thanks for adding the context.

@reitermarkus reitermarkus merged commit 8371dde into Homebrew:master May 19, 2023
24 checks passed
@reitermarkus reitermarkus deleted the working-dir-expand branch May 19, 2023 13:15
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants