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

CXX-Qt-build: Refactor initializers to just call downstream dependencies #1166

Open
LeonMatthesKDAB opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1169
Open

CXX-Qt-build: Refactor initializers to just call downstream dependencies #1166

LeonMatthesKDAB opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1169
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 👷 refactor Something needs to change 🥳🎉 1.0 This issue is part of stabilization for 1.0 release

Comments

@LeonMatthesKDAB
Copy link
Collaborator

We noticed that recompiling the initializers can take quite a while, e.g. cxx-qt-lib registers quite a few types.

On small crates like qml_minimal, this actually takes up the vast majority of the build scripts runtime.

Instead, we should just compile the initializers into a callable function, which we then call from the downstream initializers.
That would drastically simplify the final initializer compilation.

It would also be a prerequisite for supporting something akin to Q_INIT_RESOURCES/Q_INIT_PLUGIN.
As those macros would then just call the corresponding functions.

@LeonMatthesKDAB LeonMatthesKDAB added 👷 refactor Something needs to change 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 🥳🎉 1.0 This issue is part of stabilization for 1.0 release labels Jan 23, 2025
@LeonMatthesKDAB LeonMatthesKDAB moved this from Todo to ToDo - 0.8 in Cxx-Qt 1.0 Jan 23, 2025
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 28, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
@LeonMatthesKDAB LeonMatthesKDAB linked a pull request Jan 28, 2025 that will close this issue
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 29, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 30, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 30, 2025
This speeds up rebuilds, as we only need to link to upstream
dependencies initializers, not build their initializers every time.

It should also allow us to manually initialize certain libraries down
the line with something similar to Q_INIT_RESOURCE, etc.

Closes KDAB#1166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 👷 refactor Something needs to change 🥳🎉 1.0 This issue is part of stabilization for 1.0 release
Projects
Status: ToDo - 0.8
Development

Successfully merging a pull request may close this issue.

1 participant