Skip to content

Build from source & do releases from CI #1201

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

Closed
faddat opened this issue May 26, 2021 · 5 comments
Closed

Build from source & do releases from CI #1201

faddat opened this issue May 26, 2021 · 5 comments
Labels
type:request Feature request.

Comments

@faddat
Copy link
Contributor

faddat commented May 26, 2021

Is your feature request related to a problem? Please describe.
I always feel frustrated when using a portable language like go or node only to learn it doesn't work on my toy computers.

Describe the solution you'd like

  • protoc should be downloaded during the build process
  • node.js should be downloaded during the build process
  • Binaries shouldn't be comitted to git.

Describe alternatives you've considered
I have been trying to get the latest so to run on arm64. I think I missed some binaries.

@faddat faddat added the type:request Feature request. label May 26, 2021
@faddat
Copy link
Contributor Author

faddat commented May 30, 2021

I'm no longer sure that I've missed binaries.

I think that the official build process might not be properly documented, or may be done on a machine that includes additional dependencies.

When I use gen-nodetime, I end up with something different than what is bundled in official releases.

#1187

@faddat faddat changed the title Build from source Build from source & do releases from CI May 31, 2021
@ilgooz
Copy link
Member

ilgooz commented May 31, 2021

I don't understand why binaries shouldn't be commited to the source code and how this is relavent with arm builds.

We commit the dependency binaries to the source code because this way Starport can be distributed as one package and this is the fastest solution for users.

I think that the official build process might not be properly documented, or may be done on a machine that includes additional dependencies. When I use gen-nodetime, I end up with something different than what is bundled in official releases.

Can you elaborate what do you mean by this? We don't use a special machine to build the dependency binaries, all you need to do is to run the gen-nodetime script. And this is not for end users, maintainers run it each time there is an update on nodetime.

@ilgooz
Copy link
Member

ilgooz commented May 31, 2021

@faddat for your notice, gen-nodetime script is not for creating regular nodejs binaries. It actually packs our own nodejs app and the nodejs runtime as a single binary. This is why you're getting a different binary when you run it afer the release. Also please keep in mind that, zeit/pkg does not produce determenistic binaries because it actually packs the V8's bytecode, but this can be disabled.

@faddat
Copy link
Contributor Author

faddat commented Jun 5, 2021

@ilgooz sorry I just saw this

Okay so building from source and not comitting binaries has everything to do with arm support.

Also to do with open source.

Re: gen-nodetime

I mean I guess all I can really say about that is that my build environment must be different from whatever the building environment is where gen-nodetime is being built.

I say that because I'm not getting the same result, and I do think that I am running the same code. You can eliminate that problem by doing releases and running gen-nodetime in CI.

If everything were compiled from source in the repository, then everything would be fully multi-platform portable. But since this is a complex application there are absolutely alternatives to compiling somewhat finicky stuff right in it. For example for the protoc bins We could wget them in a script.

Because this is cryptocurrency, people have very good reason to try and avoid mystery meat at all times, And that's why making releases in CI is a very good idea:

It leaves a log behind, And it runs in an environment that is completely known and understood.

@ilgooz
Copy link
Member

ilgooz commented Apr 13, 2022

solved by #2247

@ilgooz ilgooz closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:request Feature request.
Projects
None yet
Development

No branches or pull requests

2 participants