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

jj: include default features #171181

Merged
merged 2 commits into from May 9, 2024

Conversation

chriskrycho
Copy link
Contributor

@chriskrycho chriskrycho commented May 8, 2024

At the moment, this only includes specifically the watchman feature, which can dramatically improve performance on large repositories; and the project is pretty careful about adding new features to the list of defaults.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added the rust Rust use is a significant feature of the PR or issue label May 8, 2024
Copy link
Contributor

github-actions bot commented May 8, 2024

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label May 8, 2024
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Don't you need

depends_on "watchman"

to use the watchman feature?

@chriskrycho
Copy link
Contributor Author

Ah, good call! I'll update that. I have had watchman installed on my system for so long I half forgot it isn't built in. 😂

@chriskrycho
Copy link
Contributor Author

Updated—thanks again for the feedback there, @carlocab!

Copy link

@ckoehler ckoehler left a comment

Choose a reason for hiding this comment

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

LGTM!

Formula/j/jj.rb Outdated Show resolved Hide resolved
@chenrui333
Copy link
Member

@chriskrycho can you also squash the commits and forced update your branch? Thanks!

At the moment, this only includes specifically the `watchman` feature,
which can dramatically improve performance on large repositories; and
the project is pretty careful about adding new features to the list of
defaults.

Additionally:

- Explicitly depend on watchman for default features.
- Skip now-unnecessary `--bin` arg.

Co-authored-by: Rui Chen <rui@chenrui.dev>
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label May 9, 2024
@chriskrycho
Copy link
Contributor Author

@chenrui333 done, and thanks!

@chenrui333
Copy link
Member

Thanks @chriskrycho!

Copy link
Contributor

github-actions bot commented May 9, 2024

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label May 9, 2024
@BrewTestBot BrewTestBot enabled auto-merge May 9, 2024 22:34
@BrewTestBot BrewTestBot added this pull request to the merge queue May 9, 2024
Merged via the queue into Homebrew:master with commit 585e4e8 May 9, 2024
14 checks passed
@chriskrycho chriskrycho deleted the chriskrycho/jj-features branch May 10, 2024 18:45
@Aeron
Copy link

Aeron commented May 11, 2024

@chriskrycho, can this change be optional, like with-watchman? It was a small and self-contained binary two days ago, and now it brings the watchman and all its dependencies, which might not be a desirable behavior for some folks. It’s surprising, at least. And not everybody works with large repos.

Or vice-versa: if it’s crucial for a dominant part of the user base, maybe an option to have it raw and featureless is more suitable. Yes, more options are not always better for UX, but (kind of) breaking packaging (or delivery) changes aren’t as well.

I’m unsure if it deserves a separate issue, so I thought it’s better to address it here.

@carlocab
Copy link
Member

We don't allow options in Homebrew/core (because they are infeasible to test properly in CI). If you want a version of this formula with options (e.g. --with-watchman), then that will have to be hosted in a third-party tap.

So the options here are:

  1. Undo this change
  2. Keep it as-is for all users
  3. Depending on how jj behaves when it is built with the watchman feature but is unable to find a watchman server or binary, we could maybe keep the feature but drop the watchman dependency. But most Homebrew maintainers tend to frown upon shipping features in formulae without the required dependencies.

@Aeron
Copy link

Aeron commented May 12, 2024

Oh, I see. I overlooked the explicit note about it in the formula cookbook—that’s my bad.

I’m not sure what is the best course of action here. I’m not a maintainer or anything, just a “concerned citizen” who didn’t expect to get an extra 700 MB of dependencies.

Maybe it would be a viable solution for the Jujutsu repo to have a separate tap with options and leave the core variant in the most suitable form for most users. But I have no idea what form it is—maybe everyone wants the watchman.

@chriskrycho
Copy link
Contributor Author

Thanks for flagging this up, @Aeron! It’s a fair point. (As I noted up-thread, I have had watchman installed on every machine I have had for a very long time now, so I didn’t even realize how large it is!) I’ll discuss it with the jj team and see what the best path forward is. Thanks @carlocab for the clear set of options!

@gpanders
Copy link
Contributor

Depending on how jj behaves when it is built with the watchman feature but is unable to find a watchman server or binary, we could maybe keep the feature but drop the watchman dependency. But most Homebrew maintainers tend to frown upon shipping features in formulae without the required dependencies.

Speaking also as a “concerned citizen” (to use @Aeron’s words), this seems like the most reasonable approach to me. jj is built with watchman support but does not (to my knowledge) actually depend on watchman to function properly unless the behavior is explicitly opted into. Just as git optionally can use watchman, but does not require it, and git does not have a dependency on watchman in Homebrew either.

@chriskrycho
Copy link
Contributor Author

jj is built with watchman support but does not (to my knowledge) actually depend on watchman to function properly unless the behavior is explicitly opted into.

That's correct! And I probably should have clarified as much in response to @carlocab’s original question about it that jj works fine with the feature enabled as part of its build but without watchman installed. I’ll open a PR to drop that part of it. Thanks again for bringing it up, @Aeron!

@chriskrycho
Copy link
Contributor Author

I just opened #171735 in line with this discussion! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants