Repository navigation
Sync version of upstream repository - #49
power-grid-model-ci-bot[bot] wants to merge 4 commits into
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Santiago Figueroa Manrique <santiago.figueroa.manrique@alliander.com>
Signed-off-by: Santiago Figueroa Manrique <santiago.figueroa.manrique@alliander.com>
|
In this repo we were using the So I did two things: |
| on_linux do | ||
| depends_on "gcc@16" => :build | ||
| end | ||
|
|
||
| fails_with :gcc do | ||
| version "15" | ||
| cause "Use the same GCC version as in main PGM" | ||
| end |
There was a problem hiding this comment.
is this not a problem? will it remain working on older linux versions? can't we simply bump default gcc version to 16?
There was a problem hiding this comment.
This is what it does. depends_on "gcc@16" pins to gcc-16. The fails_with is basically saying, if gcc<=15, we fail because we want to use the same version as main pgm, is mostly a message for us in case "they" break something in the future again, we can pinpoint back to this.
There was a problem hiding this comment.
Now I've realized something, let me think.
There was a problem hiding this comment.
alright, i think it looks good then but let's double-check with @TonyXiang8787 because i remember having discussions about this while talking about #18
There was a problem hiding this comment.
on_linux do
depends_on "gcc@16" => :build
endThis block installs homebrew's bottle of gcc16. This is guaranteed to be compatible with older distros. Let's call it hgcc for argument sake.
fails_with :gcc do
version "15"
cause "Use the same GCC version as in main PGM"
endChecks the systems gcc and if its <=15 it makes it use the brewed hgcc.
This should guarantee it works correctly.
There was a problem hiding this comment.
reading the docs in https://docs.brew.sh/rubydoc/Formula.html#fails_with-class_method it looks like you only test for gcc == 15. it also does not seem to exclude any system compilers though?
There was a problem hiding this comment.
There is a slight difference in what it's used here and in the link you provide. The cookbook should clarify it https://docs.brew.sh/Formula-Cookbook#compiler-selection. In short
fails_with :gcc do
version "15"
cause "Use the same GCC version as in main PGM"
endFails for <=15, whereas something like
fails_with :gcc "15" do
version "15.1"
cause "Use the same GCC version as in main PGM"
endwould indeed fail for 15 and 15.1 only for example, not older versions.
|
|
||
| fails_with :gcc do | ||
| version "15" | ||
| cause "Use the same GCC version as in main PGM" |
There was a problem hiding this comment.
In #18 idea was to allow the option of compiling with any gcc >14 of the target using the formula if possible. And for targets with <=14 we mandate gcc=14. So with this PR we keep it same as PGM all the time?
There was a problem hiding this comment.
This PR aligns with PGM as of today, because gcc16 is what we use there. What happens here is that if the user's system provides gcc16 then that's used, if they have <16 then gcc16 bottled from homebrew is used to build from source, and it should be compatible even if they have older ubuntu versions, hence why they provide a bottle.
There was a problem hiding this comment.
This doesn't mean that if we change PGM to gcc17 in the future, we would automatically change here. Here it's manually pinned too.
This PR updates the formula to match the latest version of the upstream repository.