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

Add support for vscode extensions #1208

Merged
merged 1 commit into from
May 29, 2023
Merged

Add support for vscode extensions #1208

merged 1 commit into from
May 29, 2023

Conversation

MikeMcQuaid
Copy link
Member

Allow them to be installed, dumped, checked and cleaned up.

While we're here:

  • pass --formula for a few other installations
  • brew services can now run on Linux

Allow them to be installed, dumped, checked and cleaned up.

While we're here:
- pass `--formula` for a few other installations
- `brew services` can now run on Linux
Copy link
Member

@colindean colindean left a comment

Choose a reason for hiding this comment

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

My only suggestion is around including VSCodium. I use it as much as I use VSCode, which is mostly just on my comp survey project (VSC's Jupyter + Python support is rad). The machine on which I actively use VSCodium is many miles away right now so I can't test to see if it installs a code executable. All I could confirm is that it does install a codium executable. Someone aliasing with alias code=codium would fix that problem in the meantime.

I'm not 100% sold on this but I could see the utility. I don't use Atom any more but at one point tracked packages and installed them using something I'd certainly preferred be built into something else.

Adding VSCode support kinda makes me want to add in Jetbrains IDEs extension installation. It'd reduce the amount of "oh, you need plugins X, Y, Z" for my team…

lib/bundle/bundle.rb Show resolved Hide resolved
lib/bundle/commands/cleanup.rb Show resolved Hide resolved
lib/bundle/vscode_extension_dumper.rb Show resolved Hide resolved
lib/bundle/vscode_extension_installer.rb Show resolved Hide resolved
lib/bundle/vscode_extension_installer.rb Show resolved Hide resolved
@MikeMcQuaid
Copy link
Member Author

Reasoning for this: 3+ people I've spoken to in person said they would use this and the impact on people without VSCode in their PATH is essentially nil.

I would support JetBrains plugins and other similar things. The more things we support: the more useful Homebrew Bundle is for people.

The future PR I may add is 1Password support to be able to dump secrets into specified locations on disk.

@jacobbednarz
Copy link
Member

I'm happy with the explicit approach here but do wonder if we should make the interface more configurable given the desire above to extend it eventually for more tools. something like extension "<extension name>" provider: vscode would also address the comments about vscode variants and future editors.

examples

extension "GitHub.codespaces" provider: vscode
extension "GitHub.codespaces" provider: vscodium
extension "GitHub.codespaces" provider: vscode-insiders
extension "GitHub.codespaces" provider: jetbrains

not sold on the nomenclature of provider but 🤷‍♂️

@colindean
Copy link
Member

That almost kinda begs for

extensions provider: :vscode do
  ext "GitHub.codespaces"
end
extensions provider: :jetbrains do
  app :pycharm do
    ext "pylint"
  end
  app :intellij do
    ext "scala"
  end
end

but this is probably too verbose.

@MikeMcQuaid
Copy link
Member Author

Cool ideas but let's not blow up the scope here. VSCode, VSCodium and even JetBrains can get support added later by either of you who want it personally. Keeping this non-generic makes the DSL and the code simpler and more readable.

@colindean
Copy link
Member

Yeah, I'm very 👍 on this now that I understand the trajectory of what you're aiming to enable.

@jacobbednarz
Copy link
Member

after looking at this some more, i am a little concerned if we introduce vscode "..." and later expand the interface to more editors, this is going to be a difficult backwards compatibity change we would have to make in order to support it in a uniform way. do we want to generalise the interface now but only add vscode support?

@MikeMcQuaid
Copy link
Member Author

we would have to make in order to support it in a uniform way

I do not want to support this in a more uniform way e.g. extensions.

do we want to generalise the interface now but only add vscode support?

No. I do not want to generalise this ever, sorry 😄.

I am game to have jetbrains added or support for codium or code-insiders if someone who uses this wants them but I don't want to increase the scope on this PR for things I'm not yet convinced people want or to make the interface far less readable in the interests of making it generalisable.

Thanks for review/comments anyway folks ❤️

@MikeMcQuaid MikeMcQuaid merged commit 6c95fb2 into master May 29, 2023
4 checks passed
@MikeMcQuaid MikeMcQuaid deleted the vscode branch May 29, 2023 07:48
@philoserf
Copy link

This change adds vscode extension removal to brew bundle cleanup. That it will remove extensions not installed by Homebrew is not okay.

@MikeMcQuaid
Copy link
Member Author

This change adds vscode extension removal to brew bundle cleanup

No, it doesn't. It adds it to brew bundle cleanup --force. If you choose to run that regularly without running brew bundle cleanup first: that's your bad.

@philoserf
Copy link

I see the fix is in already. #1210

@PatrickF1
Copy link

YES thank you for adding this @MikeMcQuaid ! Dunno if you were planning on it, but I'd recommend making some sort of announcement about this because I only found out when I ran brew bundle and was pleasantly surprised by the vscode lines at the bottom.

PatrickF1 added a commit to PatrickF1/dotfiles that referenced this pull request Jun 7, 2023
@MikeMcQuaid
Copy link
Member Author

Thanks @PatrickF1! We'll likely announce this in the next public major or minor release.

5ouma added a commit to 5ouma/dotfiles that referenced this pull request Jun 10, 2023
From this PR Homebrew/homebrew-bundle#1208, it
supports the same as Formulae, Casks, mas, and more.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants