-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Using SCons tools #977
Using SCons tools #977
Conversation
From the SCons docs:
I'm not sure how this would best be remedied. Immediately returning from the generate functions isn't viable, as the build script sees that as a success and crashes SCons in it's entirety when it tries to build that language with an I think we should add some sentry value instead of the builder to avoid the AttributeError, and then have the SConscripts check against this value and fail immediately and print some message. I would prefer it fail when SCons tries to build the tool, but I can't find how we would achieve this. We could have the |
I'm also not a massive fan of having two directories just for SCons plumbing, but it's just a minor gripe. |
This could be remedied simply by putting both the
This is something that is remedied by the Kotlin tool in class ToolKotlinWarning(SCons.Warnings.SConsWarning):
pass
class KotlinNotFound(ToolKotlinWarning):
pass
SCons.Warnings.enableWarningClass(ToolKotlinWarning)
def _detect(env):
""" Try to detect the kotlinc binary """
try:
return env["kotlinc"]
except KeyError:
pass
kotlin = env.WhereIs("kotlinc")
if kotlin:
return kotlin
raise SCons.Errors.StopError(KotlinNotFound, "Could not detect kotlinc executable")
return None with |
Following discussion on Discord, @PeanutbutterWarrior and I converged to this version. |
This is a PR to remove the language builders from the main
SConstruct
file, and put them into their own tools.I confirm that everything compiles on my machine, but GH actions will prove me right or wrong on general Ubuntu, and I have no idea what's gonna happen on Windows.
This was inspired by my thought process on #976, and it gives us a structure for future compiled languages.
I did not touch the Copier builder, and there are probably things I could remove for uniformity in
rust_SConscript
.Apart from that, if you have any remark, feel free to leave them here.