github1s
github1s copied to clipboard
Unable to build locally on mac
Following steps for local development here - https://github.com/conwnet/github1s#local-development
yarn
went fine
yarn watch
is failing
yarn run v1.22.10
$ rm -rf dist && run-p watch:*
$ ./scripts/watch.sh
$ cd lib/vscode && yarn watch
$ cd extensions/github1s && yarn dev
$ cd scripts/watch && node watch-src.js
$ cd scripts/watch && node watch-dist.js
copy resources done!
rsync: link_stat "/Users/jai/gitlab1s/github1s/lib/vscode/node_modules/vscode-textmate" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]
error Command failed with exit code 23.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "watch:setup" exited with 23.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
OS: macOS 11.2 Big Sur
Any ideas what i might be missing ?
EDIT#1:
Tried using dev containers getting this errror for yarn watch
yarn run v1.22.5
$ rm -rf dist && run-p watch:*
$ cd lib/vscode && yarn watch
$ cd scripts/watch && node watch-src.js
$ cd extensions/github1s && yarn dev
$ ./scripts/watch.sh
$ cd scripts/watch && node watch-dist.js
copy resources done!
warning [email protected]: The engine "vscode" appears to be invalid.
$ webpack --config extension.webpack.config.js --watch
copy necessary node_modules done!
compile vscode builtin extensions...
(node:4953) UnhandledPromiseRejectionWarning: Error: Command failed: rsync -a /workspaces/github1s/lib/vscode/out/ /workspaces/github1s/dist/static/vscode
rsync: change_dir "/workspaces/github1s/lib/vscode/out" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
(node:4953) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4953) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hello there!👋 Welcome to the project!💖 Thank you and congrats🎉for opening your very first issue in this project.Be patient while we get back to you.😄
Could you please run yarn clean
, yarn
, yarn build
to see whether it could build on your machine?
If it could build successfully, you can try yarn watch
again to see whether it works.
@xcv58 I did run
yarn clean
, yarn
, yarn build
Still getting the same error
@jainendra Is the yarn
command working fine?
after yarn
command, there should be a lib/vscode
and the lib/vscode/node_modules
directory in the project.
@conwnet I can see lib/vscode
but not the lib/vscode/node_modules
. I also don't see any error in yarn apart from a lot of warnings - warning [email protected]: The engine "vscode" appears to be invalid.
@jainendra
I can see lib/vscode but not the lib/vscode/node_modules
So I think there should some errors during installing dependencies, you can try to install the vscode dependencies manually, and check what's wrong here
cd lib/vscode
yarn
I think the prerequisites maybe not ready, Or there is a Rate Limited error during install the vscode dependencies
@conwnet Let me try this. Can you also point me to a file where i can run each command manually and see what's breaking ?
Also any chance you are thinking of pushing a pre built image to docker hub ? So that it's easy for someone who just want to try it out locally and then start development right away ?
Can you also point me to a file where i can run each command manually and see what's breaking ?
@jainendra The full build/dev scripts you can find in the /scripts
directory. I think the you can try to build the vscode manually to see if it works.
If it still not work, you can run yarn cache clean
first before that .
Also any chance you are thinking of pushing a pre built image to docker hub ? So that it's easy for someone who just want to try it out locally and then start development right away ?
Thanks you for the good idea, we will do it next❤️
@conwnet Would love to help you out with creating a dev docker image. Let me know how i can contribute.
I got the problem. I think this is creating issue.
git clone --depth 1 -b 1.52.1 https://github.com/microsoft/vscode.git vscode
Cloning into 'vscode'...
remote: Enumerating objects: 6163, done.
remote: Counting objects: 100% (6163/6163), done.
remote: Compressing objects: 100% (5218/5218), done.
remote: Total 6163 (delta 832), reused 3946 (delta 393), pack-reused 0
Receiving objects: 100% (6163/6163), 11.84 MiB | 2.88 MiB/s, done.
Resolving deltas: 100% (832/832), done.
Note: switching to 'ea3859d4ba2f3e577a159bc91e3074c5d85c0523'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
error: unable to create file extensions/vscode-notebook-tests/src/typings/ref.d.ts: Interrupted system call
Updating files: 100% (4699/4699), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Any reason why we are not cloning it as it is ?
There is way to develop with docker. Could you please try this https://github.com/conwnet/github1s#-or--vs-code--docker-development ?
@xcv58 I did try that out - things that are broken on mac worked in dev container but then vscode/out
folder is not being generated hence I am getting error in autoSyncVscodeOut
inside watch-dist.js
when i m running yarn watch
Any further guidance would be really helpful
Did yarn build
work?
@xcv58 I tried yarn build
in github1s dev container but it's failing due to - Error: compilation requires 4GB of RAM
? How do we increase memory limit for a dev container. I am going through the docs didn't find it yet
As for mac I was stuck at cloning the proper repo for vscode. I am trying it now yarn build
I think the whole problem is with building vscode from source
@xcv58 @conwnet Don't know what i did and in what order but atleast vscode is now loading locally - I can fiddle around with it now phew.
Essentially what i faced issue was with - git clone --depth 1 -b 1.52.1 https://github.com/microsoft/vscode.git vscode
in postinstall.sh
.
I had to manually clone it and do yarn
inside it. Not sure why but clone is somehow failing.
Then yarn watch
is not working so i tried yarn build
+ I don't remember what i did in between.
So if anyone else is facing issue on mac BigSur. Above steps might help. Let me see if it actually is working as expected.
Essentially what i faced issue was with -
git clone --depth 1 -b 1.52.1 https://github.com/microsoft/vscode.git vscode
inpostinstall.sh
.
you can clone the full vscode repo and run git checkout 1.52.1
then.
Can you build the original vscode successfully?
It seems we should provide an prebuilt vscode quickily.
@conwnet I did the same. I cloned the vscode repo, switched to 1.52.1
and built it. I am not sure if it was successful since there was no out
folder which is required to build github1s
. I did this in dev container but i wasn't able to run it.
Yes, if you can provide a prebuild vscode that would be great.
In summary building vscode is an issue
which is causing problem with yarn watch
After doing the same for mac, I tried running yarn build
and it worked. I am not sure how can i test my changes frequently i m assuming i'll have to run yarn build
again.
@xcv58 @conwnet Also running yarn build
in dev container raises this
node ➜ /workspaces/github1s (master ✗) $ yarn build
yarn run v1.22.5
$ ./scripts/build.sh
$ gulp --max_old_space_size=8192 compile-build
[16:25:19] Node flags detected: --max_old_space_size=8192
[16:25:19] Respawned to PID: 411
[16:25:23] Using gulpfile /workspaces/github1s/lib/vscode/gulpfile.js
[16:25:23] Starting 'compile-build'...
[16:25:23] Starting clean-out-build ...
[16:25:23] Finished clean-out-build after 4 ms
[16:25:23] Starting compile-build ...
[16:25:23] 'compile-build' errored after 10 ms
[16:25:23] Error: compilation requires 4GB of RAM
at /workspaces/github1s/lib/vscode/build/lib/compilation.js:74:19
at /workspaces/github1s/lib/vscode/build/lib/task.js:45:28
at new Promise (<anonymous>)
at _doExecute (/workspaces/github1s/lib/vscode/build/lib/task.js:34:12)
at _execute (/workspaces/github1s/lib/vscode/build/lib/task.js:25:11)
at compile-build (/workspaces/github1s/lib/vscode/build/lib/task.js:64:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@jainendra we published a prebuilt VS Code in https://github.com/conwnet/github1s/pull/265. You should not have the same issue if you follow the new instruction in the README https://github.com/conwnet/github1s#local-development
I have the very same problem, i followed instructions on local development with full vscode build, still getting
node:child_process:333
ex = new Error('Command failed: ' + cmd + '\n' + stderr);
^
Error: Command failed: rsync -a /Users/martinmecir/Desktop/tryout/github1s/vscode-web-github1s/lib/vscode/out/ /Users/martinmecir/Desktop/tryout/github1s/dist/static/vscode
rsync: link_stat "/Users/martinmecir/Desktop/tryout/github1s/vscode-web-github1s/lib/vscode/out/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/2288acc43c/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]
when running yarn watch-with-vscode
I have the very same problem, i followed instructions on local development with full vscode build, still getting
node:child_process:333 ex = new Error('Command failed: ' + cmd + '\n' + stderr); ^ Error: Command failed: rsync -a /Users/martinmecir/Desktop/tryout/github1s/vscode-web-github1s/lib/vscode/out/ /Users/martinmecir/Desktop/tryout/github1s/dist/static/vscode rsync: link_stat "/Users/martinmecir/Desktop/tryout/github1s/vscode-web-github1s/lib/vscode/out/." failed: No such file or directory (2) rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/2288acc43c/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]
when running
yarn watch-with-vscode
Does normal yarn watch
work for you?
@jainendra @xcv58
Yes, normal yarn watch works fine
Upon further investigation i found out how to successfully run yarn watch-with-vscode
It errors out because it can't find vscode-web-github1s/lib/vscode/out
However if i run
cd vscode-web-github1s/lib/vscode
yarn gulp compile-web
yarn watch
The folder vscode-web-github1s/lib/vscode/out
will be created. Then just run these commands (as stated in docs)
yarn build:vscode
yarn watch-with-vscode
No idea what is causing this, if there is solution, let me know, i could submit PR
建议把前置依赖环境打包成 docker 镜像,前置条件太难解决了
Please use english in public, open source repositories