fab icon indicating copy to clipboard operation
fab copied to clipboard

Remove support for environment variables

Open hiker opened this issue 1 year ago • 2 comments

While supporting environment variables is a valid suggestion (for backwards compatibility with UKMO builds), imho Fab itself should NOT use environment variables to define compiler, linker, or flags.

First of all, this can cause test failures (if environment variables add flags to compiler calls). Second of all, it can be very counterintuitive and hard to debug if Fab is used for other software.

Instead, the scripting layer on top of Fab can (If required) support this. We already do this in our LFRic builds, our command-line tool (where you can define compiler etc) will default to the corresponding environment variable, and define the corresponding compiler.

Similarly, if required, the zero-config command line interface to Fab could query the variables and trigger the corresponding settings (if we really desire that).

hiker avatar Jul 31 '24 23:07 hiker

We agreed to remove the support for this, and move the support for this into the command line interface (for zero config usages)

hiker avatar Oct 14 '24 03:10 hiker

We can just remove environment variables entirely from Fab, the Baf base class will bring their support (if required) back in.

hiker avatar Feb 04 '25 23:02 hiker

Priority, required for #422, which is required for Jules non-netcdf builds.

hiker avatar Jun 13 '25 13:06 hiker

BAF now automatically adds these environment variables, so they can now be removed from Fab.

hiker avatar Jun 14 '25 11:06 hiker

PR is basically ready, but blocked atm by #423 and #428 (due to all changes affecting a significant number of tests, so this PR is based on #428 to reduce conflicts)

hiker avatar Jun 30 '25 02:06 hiker

This is addressed by PR #425 . So I have linked in this PR.

jasonjunweilyu avatar Jul 18 '25 00:07 jasonjunweilyu