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

vscode-oss: init at 1.44.2 #86122

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

offlinehacker
Copy link
Contributor

Motivation for this change

I want to build vscode from source.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@offlinehacker
Copy link
Contributor Author

It would be nice if this package would replace vscode package and vscode package to be renamed to vscode-bin.

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

Would be vscode-src different from a vscodium built from source?

@Mic92 Mic92 changed the title vscode-src: init at 1.44.2 vscode-oss: init at 1.44.2 Apr 27, 2020
@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

Is this build compatible with Microsofts propritary addons?

@offlinehacker
Copy link
Contributor Author

offlinehacker commented Apr 27, 2020

I have no reason to believe it behaves any differently regarding proprietary plugins, but you have to install them yourself. I will check tomorrow.

@offlinehacker
Copy link
Contributor Author

vscodium is same thing with different logo and modified product.json (https://github.com/VSCodium/vscodium/blob/cb04b93044fb74f4e0f74ac0951d34f4de1f2e5d/prepare_vscode.sh#L19) and separate builds. For what I am aware since code in official repo is opensource, we can put any product.json and I do not see any reason to modify it by default.

I do not want to call it vscodium, as that's the name of their "open source" binaries, but for me these are as closed source as vscode binaries minus property plugins. Why not leave it as vscode-oss?

@offlinehacker
Copy link
Contributor Author

Vscode-oss name comes from here: https://github.com/microsoft/vscode/blob/master/product.json#L4 So they already have naming convention that suggest vscodium is not same thing. But at the end of the day however we call it I don't care too much.

@offlinehacker
Copy link
Contributor Author

I'll check why hashes fail, I think I changed something and did not recheck hashes.

@offlinehacker
Copy link
Contributor Author

Ok download hashes do not match only for aarch64, looks like downloaded dependencies are different there.

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

Ok. We just need to make sure, they don't hold any trademark right on the name.

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

vscodium is same thing with different logo and modified product.json (VSCodium/vscodium:prepare_vscode.sh@cb04b93#L19) and separate builds. For what I am aware since code in official repo is opensource, we can put any product.json and I do not see any reason to modify it by default.

I do not want to call it vscodium, as that's the name of their "open source" binaries, but for me these are as closed source as vscode binaries minus property plugins. Why not leave it as vscode-oss?

I think they disabled telemetry. Not sure if your build does the same.

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

I have no reason to believe it behaves any differently regarding proprietary plugins, but you have to install them yourself. I will check tomorrow.

They did not work with vscodium, hence the question. If they don't work we might need to keep the binary vscode.

@offlinehacker
Copy link
Contributor Author

I have to check regarding telemetry and disable if not disabled, thanks!

@offlinehacker
Copy link
Contributor Author

Will also do a bit of cleanup, on comments and I see I need to remove downloadPage from meta and other minor things.

@prusnak
Copy link
Member

prusnak commented Apr 27, 2020

I feel there is still a need for a proper explanation of why anyone would use this instead of vscodium or vscode(-bin)? Who's the target audience?

I can see an added value for aarch64 where there are no official binary builds from MS (yet). Is that it?

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2020

I see some advantages of building vscode from source:

  • the ability to apply NixOS-specific patches
  • shared electron binaries between this and other packages
  • One vendor less to trust
  • Better portability

pkgs/applications/editors/vscode-oss/default.nix Outdated Show resolved Hide resolved
pkgs/applications/editors/vscode-oss/default.nix Outdated Show resolved Hide resolved
pkgs/applications/editors/vscode-oss/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/applications/editors/vscode-oss/default.nix Outdated Show resolved Hide resolved
@offlinehacker
Copy link
Contributor Author

I want to test vscode with Wayland support and for that I need to build electron from source and vscode from source. That's why I decided to make a package to make process reproducible.

At the same time I feel much better if distro provides package, instead of third party vendor (even if that vendor is Microsoft). I feel like too many projects these days only provide binary releases and only support some mainstream distros. And then they call these binary releases open source, where you have source, but it's really hard to build actual source, as they do not provide clear instructions how to do the build.

@offlinehacker
Copy link
Contributor Author

@prusnak thanks for review

@offlinehacker
Copy link
Contributor Author

Oh yeah one more thing, aarch64 builds should work now.

@Mic92
Copy link
Member

Mic92 commented May 7, 2020

I have generalized this a bit and made vscode-oss part of vscode folder as we have for vscodium. I have also generalized vscode-with-extensions so you can now call vscode.withExtensions or vscode-oss.withExtensions you get the idea.

@Mic92 Good news is also vscode-remote now works as soon as i set extensionAllowedProposedApi option in product.json. I do not see that being a problem, since it only whitelists which additional api-s are allowed (you can still not use them) and extensions are not installed by default anyway.

Telemetry is also disabled by default now.

Ok. Than we could actually drop the proprietary build. What do you think?

@offlinehacker
Copy link
Contributor Author

Well yes, or can rename to vscode-bin, but i would like to do in another pull request, since i would like for more people test this build.

@offlinehacker
Copy link
Contributor Author

The issue now is it also uses different configuration folder in home, so that means users need to copy their configs under code-oss folder, i don't want to replace something and break user configurations. I can make vscode compatible product.json configuration and build, but i maybe would like to leave this (original one) as is.

@offlinehacker
Copy link
Contributor Author

I am still unsure why aarch64 yarn cache sha256 is different on @GrahamcOfBorg, since i run many times on packet host aarch64 instance and got same hash. yarn install is non deterministic between different platforms, and i don't know how to force it to be more deterministic, or just to force it to download everything.

@Mic92
Copy link
Member

Mic92 commented Jun 20, 2020

I am still unsure why aarch64 yarn cache sha256 is different on @GrahamcOfBorg, since i run many times on packet host aarch64 instance and got same hash. yarn install is non deterministic between different platforms, and i don't know how to force it to be more deterministic, or just to force it to download everything.

You can check with diffoscope between archives from different architectures.

@turion
Copy link
Contributor

turion commented Sep 12, 2020

How is the progress on this?

@Mic92
Copy link
Member

Mic92 commented Sep 16, 2020

@turion maybe just open a different pr with x86 only for now.

@prusnak
Copy link
Member

prusnak commented Nov 28, 2020

@offlinehacker I cherry picked your changes to the Electron package in #105241 - so the headers are now included. Thanks! You might want to rebase this branch on top of the current master. (There were other conflicts as well).

@SuperSandro2000 SuperSandro2000 marked this pull request as draft November 28, 2020 17:44
@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@oxalica
Copy link
Contributor

oxalica commented Jun 3, 2021

Is this PR still active?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 9, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 20, 2022
@ribosomerocker
Copy link
Contributor

@offlinehacker @Mic92 Maybe we should just merge this with just x86 support, then a new PR for other architectures. This would be nice to have.

@turion
Copy link
Contributor

turion commented Sep 30, 2022

Yes, I would merge such a PR.

@ribosomerocker
Copy link
Contributor

Is there anything else that needs to be done other than rebasing with master then, for the x86 support to be merged in @offlinehacker? if not, it might be good to unset this as a draft and request review.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants