pxtarget.json: githubCorePackage bumped from v0.2.13 to v0.3.0#6925
pxtarget.json: githubCorePackage bumped from v0.2.13 to v0.3.0#6925KierPalin wants to merge 1 commit into
Conversation
…s cmake_minimum_required of utils/cmake/JSONParser.cmake from 3.1 to 3.6; this is important because CMake 4.0.0 deprecates <3.5. This meant that pxt-microbit couldn't be compiled with CMake versions newer than 4.0.0
|
I think using the lastest microbit-v2-samples tag had issues because the docker image is very old and was still using Python 2 by default, which was officially sunset by the PSF 6 years ago and deprecated from CODAL more than 3 years ago. @KierPalin if I remember correctly we increased the minimum CMake from 3.1 to 3.6 because we found some files were using APIs only available in 3.6+, but I don't think old features were refactored in preparation for their deprecation, or at least we haven't checked if we are affected. So if CMake v4 drops compatibility with versions lower than 3.5 it's possible CODAL is using some of those deprecated features, or relaying on old behaviour and side effects of those APIs. Have you tried building with CMake v4? Does everything work correctly? |
|
@microbit-carlos I compiled MicroData and MicroCode v2 with this proposed change using cmake version 4.3.0 again just now. These are both relatively demanding applications which enabled me to test the micro:bits sensors, datalogging and display. Both of these programs work correctly on hardware but I don't know how to test for the older features or the micro:bit v1; do you want me to test this change with something else? I can easily compile any MakeCode programs with this change to test this PR further if you have any that would be particularly useful? Thanks, |
|
As an addendum I should mention that I compiled everything locally and that I don't use Docker, so I cannot comment on that issue. Compiled on Linux with: |
Hi @abchatra @thomasjball,
This is the aforementioned compilation issue:
CMake 4.0.0+ removed compatibility with versions older than 3.5. This is a problem because the current githubCorePackage is on v0.2.13 which means that the microbit-v2-samples/utils/cmake/JSONParser.cmake has a cmake_minimum_required of 3.1, thus pxt-microbit cannot be compiled when using the latest versions of CMake.
Fortunately, the latest microbit-v2-samples bumps the cmake_minimum_required to 3.6, so we need only update the githubCorePackage to it.
I tested the change by building microcode-v2 and its dependencies with this change and the latest CMake version 4.3.0.
There are a few changes between v0.3.0 and v0.2.13, as visible in this comparison for v0.3.0 and v0.2.13.
Thanks,
Kier