godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

godot .scons_env.json equivalent for godot-cpp

Open Repiteo opened this issue 2 years ago • 2 comments

Brings over the environment variable dump functionality from the main godot repository.

Because we're already enforcing version ≥4.0 for SCons, we can utilize its native dumping method for a cleaner implementaion with the same effect. The only thing lost in doing so is a <<non-serializable: %s>> wrapper, which should be fine as json already truncates non-serialized data.

Repiteo avatar Jun 16 '23 17:06 Repiteo

I tested this locally, and it seems to work!

Comparing with Godot's .scons_env.json, where it's outputting "<<non-serializable: xxx>>", I see:

{
    "SCANNERS": [
        "<<non-serializable: Base>>"
    ]
}

... versus:

    "SCANNERS": [
        "Base"
    ]

So, we're just getting the type name as a plain string. I don't know if this matters, though? What are people actually doing with this file? Are there existing tools that will treat "<<non-serializable: xxx>>" in a special way?

This should be reviewed by someone who is more knowledgeable about Godot's build system stuff :-)

dsnopek avatar Jun 28 '23 20:06 dsnopek

Ah! That's what I was refering to when I mentioned the <<non-serializable: %s>> wrapper. Godot's repo has a built-in converter in its SConstruct, but it also mentioned wanting to upgrade to an alternative version once the SCons version was high enough. This repo's is already meeting that version requirement, so I just used that instead.

Repiteo avatar Jun 28 '23 20:06 Repiteo