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

Publish extensions to open-vsx #1802

Open
jjchico opened this issue Jun 18, 2020 · 43 comments
Open

Publish extensions to open-vsx #1802

jjchico opened this issue Jun 18, 2020 · 43 comments
Labels
Milestone

Comments

@jjchico
Copy link

jjchico commented Jun 18, 2020

Reason

Microsoft does not allow to use C/C++ extension with other editors. See microsoft/vscode-cpptools#6388 (comment)

We are working on an alternative solution for C/C++ code completion and navigation.


Temporary solution 1

You will need to install manually these extensions:

  1. Open extension in the Microsoft Marketplace following the link above
  2. Download extension's VSIX file by clicking on "Download Extension" in "Resources" section (right sidebar)
  3. Navigate to VSCodium Extensions view and click "...", select "Install from ".VSIX".
  4. Repeat for each VSIX/Extension.

Restart VSCodium.

Temporary solution 2

See #1802 (comment)


Hi!

I'm a VS Codium user, a FLOSS version of VS Code, it's the same code but without the Microsoft's telemetry and branding.

I want to request if possible to add the PlatformIO IDE extension on the open-vsx.org market so that we doesn't need to works with the Microsoft marketplace as it is unclear if it's legal to use it on VS Code forks, see here.

This is how to publish a new extension.

Thanks.

@alfredocdmiranda
Copy link

I am with the same "problem". It would be really nice to have it published to work with VSCodium.

@rafacouto
Copy link

It is technically possible:

@ivankravets Do you think platformio extension for codium is also legal?

@ivankravets ivankravets added this to the 2.0.0 milestone Jul 9, 2020
@ivankravets
Copy link
Member

PlatformIO extension for VSCode depends on C/C++ extension by Microsoft. We use it for code completion/navigation. How to resolve this issue?

@rafacouto
Copy link

This one? It is MIT licensed.

@ivankravets
Copy link
Member

@rafacouto Yes, is it possible to have it in the open-vcs registry as well?

@54696d21
Copy link

54696d21 commented Jul 18, 2020

it was already merged here EclipseFdn/publish-extensions#54 but it doesn't appear on open-vsx.org Probably because it isn't build correctly? Could you help me with fixing that #1884 please?

@ivankravets
Copy link
Member

I updated this issue and added temporary solution #1802

@yunuscukran
Copy link

yunuscukran commented Oct 16, 2020

I believe the Microsoft vscode-cpp extension you guys are using for code completion is incompatible with open-vsx. The linked discussions seem to imply that it's not legal to use the Microsoft C/C++ extension in any other product than VSCode.

I was able to use the clang language server instead and getting it working (in Eclipse Theia), by

  1. Deleting the ms cpp extension
  2. Removing it from platformio-vscode-ide 's package.json as a dependency
  3. Installing the clang extension
  4. Creating a compile_commands.json from the PIO terminal, and putting it in the root of the project.

PlatformIO is still complaining about the incompatibility but all code completion functionality seems to work. Note that I'm using clang only as a language server, and the builds are still being handled by PIO.

This suggests to me that it is possible to separate the build and language server tools, and with small configurations, PlatformIO can actually play well with the clangd language server and therefore be open-vsx compatible.

@ivankravets
Copy link
Member

@yunuscukran Thank you so much for your solution! I added it to the top of post.

We already have started research around C/C++ extension and replacement for it. Indeed, we use noly 5% functionality of that extension - just code completion and navigation. So, we would be happy to switch to something open source with better peformance and clang should be a great candidate here.

@ivankravets
Copy link
Member

@yunuscukran what is your feedback about clangd server? Do you like how does it work?

@BackMountainDevil
Copy link

This one? It is MIT licensed.

That one called vscode-cpptools is under Microsoft License, not MIT, which made this issue-There is no a c/c++ extension on VSCodium marketplace #6518

@yunuscukran
Copy link

@yunuscukran what is your feedback about clangd server? Do you like how does it work?

Hi,

The functionality regarding language features is good!

One aspect which I think is hacky is that the default place for compile_commands.json must be redefined in the project settings, and the actual act of creating the file with a PIO command must be called somewhere, via a post-build script for example. So right now clangs works with a modified PIO project.

@yunuscukran
Copy link

Any updates on switching to clangd for the language server? It seems to me what is needed is simply the generation of a compile_commands.json file on project creation and occasional re-creations after builds.

@ivankravets
Copy link
Member

We depend on:

@marcdumais-work
Copy link

Hi @ivankravets

I hope you can switch to vscode-clangd ASAP - it's rapidly improving and gaining features, as is clangd. I have asked one of our contributors an update about one of your two blocking issues - I hope he can help.

I think coming together and collaborating, us non-Visual-Studio product/framework makers, open registry provider and extension consumers, to offer a better solution, vs the superficiallty-FOSS (really proprietary) extension, that we can't use anyway, is the best thing we can do.

@cab404
Copy link

cab404 commented Apr 2, 2021

Since C++ is present by default on VSCode anyway, maybe just drop it from deps and add popup with download link to vsix?

This would be a quick fix, allowing both adding PlatformIO to open-vsx and moving on with previous completion engine.

@HKalbasi
Copy link

@cab404 can you do it yourself and publish a fork in open-vsx?

@jjchico
Copy link
Author

jjchico commented Jun 14, 2021

Since C++ is present by default on VSCode anyway, maybe just drop it from deps and add popup with download link to vsix?

This would be a quick fix, allowing both adding PlatformIO to open-vsx and moving on with previous completion engine.

The problem, already stated above, is that license of vscode-cpptools prevents using it out of non-free MS VS Code. Suggesting the user to just circumvent the legal restriction is not appropriate.

@jerabaul29
Copy link

But the idea regarding the vscode-cpptools was to instead to move to the clang tool that is fully open and permissive license, right? :) .

@jankeromnes
Copy link

Hello! I'd love to help get the PlatformIO published to OpenVSX. Is there anything I can do to help? 🙂

@ivankravets
Copy link
Member

@jankeromnes Does PlatformIO IDE extension work with Theia if you install it manually? The last time when I tested it, it didn't work. Theia does not support VSCode's API on which PlatformIO IDE extension depends.

@jankeromnes
Copy link

jankeromnes commented Sep 29, 2021

@ivankravets I'm not sure about Theia, but Gitpod, openvscode-server and VSCodium all use stock VS Code today (and Theia support in Gitpod has been deprecated).

@ivankravets
Copy link
Member

Wow! Founders of Theia switched to VSCode for Gitpod. Great decision!

I don't see C/C++ extension on Gitpod. PlatformIO IDE depends on it.

@jankeromnes
Copy link

jankeromnes commented Sep 29, 2021

@ivankravets Yes, unfortunately ms-vscode.cpptools is not open-source, so it cannot be published to OpenVSX. (Gitpod still sources extensions from OpenVSX, just like VSCodium et al.)

So, as long as platformio.platformio-ide has a strict dependency on a closed-source extension, it cannot be published to OpenVSX either.

A promising solution discussed above would be to drop the dependency to the closed-source ms-vscode.cpptools extension, and replace it with a dependency to the open-source extension vscode-clangd instead. Could something like this be technically possible?

@ivankravets
Copy link
Member

@jankeromnes We would like to resolve this issue as soon as possible, but there are technical issues. Please read this topic from the beginning. For example, #1802 (comment)

@JonasHelming
Copy link

FYI, vscode-clangd is available on open VSX in the meantime: clangd/vscode-clangd#243

@sethvoltz
Copy link

@ivankravets has there been any progress on this? I am running in GitPod and the temporary workaround seemed to work, until I tried to open the Home page and it failed, as well as pio and platformio commands missing on CLI.

@Zipdox2
Copy link

Zipdox2 commented Feb 14, 2023

I second using clangd. I use clangd for all my C work in VSCodium.

@qwertychouskie
Copy link

With #1802 (comment) showing that the clang language server does work, is there any other holdup for publishing PlatformIO on https://open-vsx.org?

@noahbliss
Copy link

Bump.

@marek22k
Copy link

Hi, how can I install the plugin in VSCodium? I can not find it.
pic

@gilex-dev
Copy link

gilex-dev commented Oct 7, 2023

@alex-blueguardianco
Copy link

Any updates on this?

@jerabaul29
Copy link

If it is difficult / impossible to get the "standard platformio" to open-vsx, would it be possible to have a "tuned platformio" version (just changing the relevant extensions?) that would be open-vsx compatible? It would be very useful to be able to run some form of platformio in, for example, https://github.com/coder/code-server .

@InfImpDrive
Copy link

InfImpDrive commented Dec 4, 2024

Alert: AI IDE forks of VSCode, like Windsurf and Cursor

(Massively better than crappy github copilot)

Some amazing AI IDEs (VSCode forks) have come out including Windsurf, which is better than Cursor.

My favourite IDE, Windsurf, currently uses open-vsx

This IDE just came out in November 2024, and is revolutionizing AI-assisted coding -- it's MUCH better than Github Copilot.

The pressure to be able to use PlatformIO in VSCode forks has increased because I would like AI to help speed up my Arduino-compatible projects.

Not because I want it to help me write code my project, but because it understands queries like "I need help figuring out the Arduino GPIO bug in IncludeFile.h that is affecting FrameworkThree.cpp utilizing the CustomIOLibrary module. Could you help me advise on approaches to debug this?".

And things like "I'm refactoring old 8 bit OldAtmel.c to an ARM32 architecture using Cortex M0 on the ACMEMicrocontroller device for USB HID. I got SkeletonProject.cpp and SkeletonProject.h ready, view them please, please advise me on compatible libraries I can use to make this easy."

It already answers these types of questions with zero copy and paste, it just understands my whole project. It also even does a bit of FPGA help, if you needed something a bit more esoteric. So the new whole-project-context-sensitive AI IDE's don't have to write code to really speed up your productivity. The Windsurf Cascade assistant is already a fantastic Arduino tutor already!

The only problem is that I have to keep switching between VSCode+PlatformIO and Windsurf on the same project, depending on whether I needed AI help or whether I needed to debug. One or the other, not both.

So can you pretty-please open-vsx?

Pressure is suddenly 10x higher due to new AI IDE VSCode forks

(the ones 100x better than crappy copilot)

Workaround Confirmation

Yes, the published workaround works in Windsurf. It's the first time I had to deal with manual installs of .vsix but it works.

@InfImpDrive
Copy link

InfImpDrive commented Dec 7, 2024

No action required on C/C++ for Windsurf IDE if VSCode installed first.
Simple install-vsix activates PlatformIO flawlessly in Windsurf

PlatformIO extension for VSCode depends on C/C++ extension by Microsoft. We use it for code completion/navigation. How to resolve this issue?

Installing Windsurf IDE automatically copied the C/C++ Microsoft extension over it seems. I don't know what they do to keep in compliance, but probably a licensing deal with Microsoft, or perhaps they only copy over the open source (MIT) components over but point to the VSCodes' installation of the C/C++ binaries that are not MIT licensed.

The VSIX install workaround works fine with PlatformIO automagically and as easily as PlatformIO in VSCode.

You have to have VSCode and the extension already installed with the extensions before you install Windsurf. You can still use VSCode after installing Windsurf, to open the same PlatformIO project.

Screenshot of Windsurf corner, MacBook:

image

(Also works on my Windows box too)
As you can see, PlatformIO is now installed, my project compiles fine.

For more information:


_Commentary: I now have an "agentic" AI with PlatformIO that is way less dumb than copilot, helping me figure out my projects for debugging and deciding what frameworks to install for my microcontroller. I'm resisting letting it write code though, but it's a great tutor to teach me new things with Arduino-type microcontroller projects!

The difference with Windsurf is that you've got the whole-project-context-aware Cascades AI assistant, that also doubles as a good tutor for people less experienced with choosing Arduino frameworks

"How do I add USB keyboard|hid|mouse|etc support to my Arduino project? What are the best 3 frameworks for my specific project?" type questions, and it recognizes from the files of my project what microcontroller I'm programming for, and gives me advice that's better than places like stackoverflow -- no more copy and pasting.

It appears to automatically recognize Arduino projects much better than any VSCode extension does. You can simply use it just for the project-aware Cascades chatbot, and simply turn off autocompletes if you don't like Copilot enhanced Intellisense autocomplete behaviors (even if they appear better than copilot)_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests