Skip to content

Fix the FileX and ThreadX dependencies#318

Merged
fdesbiens merged 7 commits intoeclipse-threadx:devfrom
hnguyenHWI:master
May 16, 2025
Merged

Fix the FileX and ThreadX dependencies#318
fdesbiens merged 7 commits intoeclipse-threadx:devfrom
hnguyenHWI:master

Conversation

@hnguyenHWI
Copy link
Contributor

@hnguyenHWI hnguyenHWI commented May 15, 2025

Detailed Notes

The Azure IOT SDK was properly configured as a submodule dependency but the FileX and ThreadX repositories were not. Previously the dependencies were cloned into the repository by the shell scripts.

I believe commit c505fcd removed the .gitignore affecting those folders, and a subsequent commit by a different contributor added the /test/cmake/filex and test/cmake/threadx repositories because the build script cloned them into that location.

However, because they were directly cloned and not configured properly as submodules, future clones of the NetXDuo repository only contained those folders but not their contents. This broke the build scripts and also broke using NetXDuo as a submodule (see #310 and #315 ).

This PR fixes that and configures the dependencies properly. I've also updated the build scripts to catch the common error condition (or maybe it's just me 😄 ) where a user clones the NetXDuo repository without the --recursive option. Without it, the build scripts will fail to find the bootstrap script .run.sh.

I originally printed an error message and hint to the user to cd to the root and run git submodule update --init --recursive but then figured we could at least detect that one error condition and try to automatically resolve it and re-run the build script, making it easier for the user.

Also, because the build scripts automatically fetch the dependency submodules, the run scripts no longer need to check for their existence and clone the repos. Removing the clone command will help prevent the repository from getting into weird states in the future with the folders added with no content inside.

Edit: I wrote a long explanation because I wasn't sure that my changes follow the original intention of how the dependencies are structured. Hopefully the notes will help reviewers decide if this implementation is correct, and help future committers if the structure is changed.

fdesbiens and others added 6 commits March 18, 2025 12:42
A common error condition is that the user cloned the repo
without the --recursive option. We'll try to get the
submodules for them.

We remove the git clone command because the submodule update
should fix the issue.
Need to update to include the CMake version changes so that the
NetXDuo build scripts succeed.
@hnguyenHWI hnguyenHWI requested a review from fdesbiens May 15, 2025 14:59
@fdesbiens fdesbiens merged commit c0bde1c into eclipse-threadx:dev May 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants