Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@torgabor
Copy link

No description provided.

@elringus
Copy link
Owner

Thank you. I'm not familiar with patch command. Will it work no matter the spacing/formatting of the target file? Actual output after building the runtime is not equal to what is currently stored in the repo, as I've formatted it for better readability during debug/discussions. Also, please move the .patch file to scripts directory, because the native dir is cleaned on runtime rebuild.

@torgabor
Copy link
Author

torgabor commented Jul 28, 2022

Afaik the patch command should be resilient to small changes (like whitespace). It works together with the diff command, and diff-ing 2 files and applying the resulting patch to the first should produce identical output to the first.

The command I used to generate the patch is diff -uwd dotnet.js dotnet2.js > strict.patch where dotnet2.js is my originally manually modified file.
Edit: I tried applying the patch by running the command (patch -u native/dotnet.js -i scripts/strict.patch) and looked at the results in the git diff.
It looks good to me.

@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #82 (133a97f) into main (8dee89d) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #82   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines         1039      1039           
  Branches       123       123           
=========================================
  Hits          1039      1039           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8dee89d...133a97f. Read the comment docs.

@elringus
Copy link
Owner

Just to be sure we have to check if it actually works. If you have time, please run the entire compile-runtime.sh and commit the resulting dotnet.js. Otherwise, we can leave the PR open and I'll test this when I have time.

@elringus elringus added the enhancement New feature or enhancement label Jul 28, 2022
@torgabor
Copy link
Author

torgabor commented Jul 28, 2022

Well, I did make an earnest attempt at running compile-runtime.sh, but had no luck.
Running it on Ubuntu WSL1, I discovered it ships with a busted gzip that crashes instantly.
I tried upgrading it to WSL2, but the process has been going for 4 hours, and crashed after, taking the contents of my second SSD with it :(
I have an Ubuntu machine, where running the script produces the following error:

/home/torginus/DotNetJS/JavaScript/native/runtime/src/mono/mono.proj(105,5): error : The EMSDK_PATH environment variable should be set pointing to the emscripten SDK root dir.

I tried setting the EMSDK_PATH variable by hand, and calling the emsdk_env.sh, but nothing changed.

What environment should I build it in?

@torgabor
Copy link
Author

I pushed the updated dotnet.js file.

@elringus
Copy link
Owner

Here is the instructions on building the runtime: https://github.com/Elringus/DotNetJS#compiling-runtime Make sure to run install-emsdk.sh prior to compiling, it will take care of setting the env vars.

@torgabor
Copy link
Author

Still, no luck..
It's complaining about the EMSDK_PATH path, same as before. This is on Ubuntu 22.04 I tried installing the emscripten from apt, that didn't fix it either.

@elringus
Copy link
Owner

Ok, so I've tested and it doesn't seem to work. Here is the result of running the patch command:

patching file native/dotnet.js
Hunk #1 FAILED at 4398.
Hunk #2 FAILED at 4739.
Hunk #3 FAILED at 4778.
3 out of 3 hunks FAILED -- saving rejects to file native/dotnet.js.rej

In the attachement are the files generated by the command.
dotnet.js.rej.txt
dotnet.js.orig.txt

@elringus
Copy link
Owner

I've also noticed that the auto-generated file has some random contents (hashes), so this kind of patching may not work.

@torgabor
Copy link
Author

torgabor commented Aug 1, 2022

Hmm, for some reason, the dotnet.js.orig.txt seems to be lacking newlines, while the one that's checked into main has them.
I'm trying to figure out why.

@elringus
Copy link
Owner

elringus commented Aug 1, 2022

Actual output after building the runtime is not equal to what is currently stored in the repo, as I've formatted it for better readability during debug/discussions.

@elringus
Copy link
Owner

elringus commented Sep 4, 2023

Solved in #123.

@elringus elringus closed this Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.