Giter Club home page Giter Club logo

Comments (11)

marten-seemann avatar marten-seemann commented on August 16, 2024 3

This could probably be solved exactly as we handle the optional go generate step in go-check (see https://github.com/protocol/.github#configuration for a description):

- name: Read config
if: hashFiles('./.github/workflows/go-check-config.json') != ''
run: |
if jq -re .gogenerate ./.github/workflows/go-check-config.json; then
echo "RUNGOGENERATE=true" >> $GITHUB_ENV
fi

from .github.

galargh avatar galargh commented on August 16, 2024 1

Thanks for sharing all this info! It's going to be super helpful. I think we have all we need to proceed with this. I cannot commit us to a specific date just yet - I'd aim at landing it ahead of the next major Go version release though.

from .github.

marten-seemann avatar marten-seemann commented on August 16, 2024

What's the motivation?

(In general, I think it would be good to copy the relevant parts of the Slack conversation here, since Slack is getting garbage collected after a while)

from .github.

galargh avatar galargh commented on August 16, 2024

In the Slack thread, I asked for the motivation and if using https://pkg.go.dev/cmd/go#hdr-Build_constraints might be enough to satisfy the use case. I'll update here again once we have more information.

from .github.

marten-seemann avatar marten-seemann commented on August 16, 2024

Pros:

  • it doesn't add a lot of code complexity: the most common 32-bit build error is an const int overflow, followed by field alignments, which is super easy to fix
  • if our stack is supposed to build on 32 bit machines, all of its libraries should be tested on 32 bit as well

Cons:

  • it's another build job, and if the number of builders is limited, this increases build time (will be solved by using PL-hosted runners)

from .github.

masih avatar masih commented on August 16, 2024

@galargh @marten-seemann many thanks for capturing an issue on this.

The rationale is that some of the libraries used in the projects we work on unfortunately have overflow issues. These are relatively easy to fix but landing the fix is out of our control in third-party code bases.

Re using build constraints it has to be applied per .go file correct? if so it makes it quite cumbersome to do. On a side node I have tried doing this here. For larger packages like this adding this per file is more of a hassle. So in that repo we ended up dropping the 32-bit build by directly modifying the workflow which of course results in periodic autogenerated PRs to revert it back.

from .github.

marten-seemann avatar marten-seemann commented on August 16, 2024

That makes sense to me. If the library is out of our control (and upstreaming a fix is not feasible), disabling the workflow makes sense. Adding a build constraints to all .go files seems suboptimal indeed.

from .github.

masih avatar masih commented on August 16, 2024

This might be out of the scope; but thinking out loud I wondered if it is possible to introduce a convention in the unified CI builds to signal things like "do not run 32-bit tests". Maybe this could be a comment of sorts in the go-test.yml workflow? or could come from a well known file in root of the repo or in .github folder?

In terms of urgency, this is a nice thing to have for us; it's not too much trouble to just close off autogenerated PRs in the meantime. I understand it might take a lot of effort to make this an opt-in feature so please don't let me keep you from more important work :) Many thanks

from .github.

masih avatar masih commented on August 16, 2024

ah excellent! that's exactly what I had in mind

from .github.

masih avatar masih commented on August 16, 2024

Much obliged thank you all

from .github.

galargh avatar galargh commented on August 16, 2024

Implemented in #412

from .github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.