Enforcing ALAN SDK Versions #39
Unanswered
tajmone
asked this question in
Tech Stuff
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Now that ALAN 3.0beta8 is finally out, we should ensure that Rake uses the correct ALAN version to build and test the repository, since some users might have older Beta versions or newer Alpha SDKs on their system path (e.g. I have always the latest Alpha).
Rake should check the required SDK versions (e.g. by reading it from a
sdk_ver
text file in the root, so we can use it as a dependency) and then query the ALAN compiler and ARun for their version number (on the SYS PATH first) and if they match the required version just use those.If they don't match the required version, then Rake should be able to download the correct SDK version and unpack it in a (ignore) folder (e.g.
_assets/skd/
) and use that instead.The download and unpack part might be tricky, for we'll have to account for all supported OSs, so we'll need to subfolder them:
_assets/skd/win/
_assets/skd/mac/
_assets/skd/lnx/
Once Rake knows the required version, programmatically generating the download URL shouldn't be problem seem the ALAN website uses a consistent packages naming convention.
Unpacking might be trickier though. Rake does support some natively included packaging features, so probably it should also be able to unpack files; but we need to test whether it actually supports all the compression algorithms used in the various OS release packages of ALAN.
We might also wish to distinguish between Beta and Alpha SDKs in the repository, because before a new Beta is about to be released we might start using the latest Alpha SDK in the dev branches, so Rake should also be able to switch between Beta and Alpha SDKs via branch settings. This might require further subfoldering:
_assets/skd/win/beta/
_assets/skd/win/alpha/
If the info about the required SDK version(s) is stored in a settings file, e.g.
sdk_ver
orsdk_ver.json
, Rake could treat that as File Task, so that when it changes it triggers the SDK checker and downloader, but also force run all ALAN tasks again (because all compilying and transcript needs to be executed again).I'm not sure which is the best way to use the SDK version as a dependency, or if that's even possible (it should, since Rake can meta-program itself via Ruby). The problem is that without an SDK version-file, how is Rake going to know that the required ALAN version has changed? (OK; this is not a top priority, we can just force build via
-B
when we update our SDKs)If we can come up with a good solution for this problem, and create a reusable Ruby/Rake module, we could share it with all the other ALAN repositories, which would be really useful.
Beta Was this translation helpful? Give feedback.
All reactions