celestia-node
celestia-node copied to clipboard
feat: Improve Windows compatibility.
closes #2189
We could run build.ps1 to build executables for Windows now.
However the lint and test have some problems, I don't think it's my fault. Let me simply create the PR because merging the new commits again and again is boring work.
Codecov Report
Attention: Patch coverage is 34.21053% with 25 lines in your changes are missing coverage. Please review.
Project coverage is 44.78%. Comparing base (
c1ab9c5) to head (7ba89a4). Report is 24 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2403 +/- ##
==========================================
- Coverage 52.08% 44.78% -7.31%
==========================================
Files 183 264 +81
Lines 11594 14603 +3009
==========================================
+ Hits 6039 6540 +501
- Misses 5043 7313 +2270
- Partials 512 750 +238
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
hi @HoytRen - thanks for this PR! I think that the failing tests may be because the linting logic on main doesn't have potential changes needed to support linting for the windows build feature.
i plan to use this build pipeline to add windows support for a desktop application, so thanks again for the PR!
would you be able to rebase this PR?
thanks @HoytRen - i'd like to test this out. can you please give me instructions on how to build this on windows?
Hi @jcstein, I put a .ps1 file in the root folder, you could simply execute it in powershell without any parameters, it will buid celestia and cel-key binary into build/ folder. But you may need to enable ps scripts first by execute 'set-executionpolicy remotesigned' in powershell. If you don't like to enable script, simply copy paste the commands in the script to powershell.
Sure, you must install Go for Win first, and maybe other prerequests that I'm not sure. Just let me know if you can't get through.
I rebased the commits, but I don't like it because it destoried all my local history, and the process is a little triky that I almost resolved all comflicts again however I already did it long ago.
Had you tried squash-merge feature for PR on github? It create a new commit that rollup all contributer's commit into one so that don't mess up your main branch. I believe it's much friendly to contributers since they even don't need to know your convention of commit. This is the recommended approch of github official team.
Hi @jcstein, I updated this PR again with the latest main. Tested on both Win and Linux on arabica-10.
cc @celestiaorg/celestia-node for visibility to review this! thank you @HoytRen
We will need to look into the new fslock dependency introduced. How maintained is it and what features provide. In general, it's ok to remove our custom code to maintain less
fslock got updated a few days ago, it's still in maintenance. but the update isn't relative to us, so I don't import it.
I just checkout on your branch, and it works well
I bump fslock component to the latest version so that compiles with new go version.
Hey @HoytRen. After careful investigation, we migrated over to a different fslock library, which supports windows as well. We should stick to it in this PR as well.
Hey @Wondertan, happy to hear that. As I tried, the main branch works on Windows currently. Then, let me close this PR.