Skip to content
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

[Plugins] Sofa Fetch plugin create .gitignore file ignoring all new files #4409

Open
epernod opened this issue Dec 27, 2023 · 2 comments
Open
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework issue: discussion Open topic of discussion

Comments

@epernod
Copy link
Contributor

epernod commented Dec 27, 2023

When fetching plugins such as SofaPython3 or BeamAdapter directly at CMake configure time, the plugin is well added in the list of applications/plugins/ but it create also add a .gitignore file (which is not in the plugin repository).
This .gitignore file has in it:

*

thus all new file created in the plugin are ignored.

Is it a wanted behavior?

@epernod epernod added issue: discussion Open topic of discussion issue: bug (minor) Bug affecting only some users or with no major impact on the framework labels Dec 27, 2023
@damienmarchal
Copy link
Contributor

I consider the fetch mechanism within the Sofa subdirectories as a flawned design that is causing more troubles than it solved. And it is the n°1 cause of "Can you help me, I updated SOFA from master it does not compile anymore " at DEFROST (eg: #4343).

This fetch mechanism is simplifing the initial "fetch" of the plugins but it complexify a lot every subsequent updates for each of them.

So to me, the fetches should be done outside the sofa directory structures (or not be used at all).

@fredroy
Copy link
Contributor

fredroy commented Jan 11, 2024

To answer directly the question of @epernod , yes 🫠

I think it was designed to mimic https://cmake.org/cmake/help/latest/module/FetchContent.html (kind of), at a time where it did not exist in CMake yet ; as ExternalProject_Add https://cmake.org/cmake/help/latest/module/ExternalProject.html have existed since much longer time ago (CMake 3.0 ?)

Now that it is been introduced few years from now (2018 I think), I think the ExternalProject_Add mechanism should be phased out and replaced by the FetchContent one.
It would save the problem of getting the source being pulled into the source dir of SOFA (hence the .gitignore file)
AND also the problem of plugins' updates, as (normally) the cmake configure step updates the source (except if FETCHCONTENT_UPDATES_DISCONNECTED is set)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework issue: discussion Open topic of discussion
Projects
None yet
Development

No branches or pull requests

3 participants