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

Import Irrlicht #13642

Closed
wants to merge 2 commits into from
Closed

Import Irrlicht #13642

wants to merge 2 commits into from

Conversation

numberZero
Copy link
Contributor

@numberZero numberZero commented Jul 2, 2023

To do

This PR is Ready for Review.

How to test

Play Minetest on various platforms.

@wsor4035 wsor4035 added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements @ Build CMake, build scripts, official builds, compiler and linker errors labels Jul 3, 2023
@lhofhansl
Copy link
Contributor

Big fan of this in general. Will try out in a bit.

@numberZero numberZero marked this pull request as ready for review July 10, 2023 09:04
@numberZero
Copy link
Contributor Author

@nerzhul Is this what you meant in #13215 (comment)?

@Desour
Copy link
Member

Desour commented Sep 13, 2023

  • Skimming 100'000 lines of code is obviously not feasible. Therefore I'd like to have exact instructions on how to produce the same outcome, so that one can check that there's not some malicious code or other unwanted change included.
  • It would be nice to have a final revision in the irrlicht repo and then the code reformatting done in the irrlicht repo, and only then have the irrlicht code copied to the minetest repo (all at once, but in this order). This way it should be easier to find the history of a line of code afterwards, because there's then a 1to1 mapping of first-commit-in-minetest line to archieved-irrlicht-repo line.
  • Imo it makes more sense to put irrlicht in the src directory (i.e. src/irrlicht/). But it's fine by me if that's done in a later PR that then moves all the files, and changes the build process.

@erlehmann
Copy link
Contributor

Huge commits can easily break Git tooling.

At least one of the commits in which lots of stuff got deleted from IrrlichtMT is able to hang some GUI git clients.

So a drawback of making one giant commit definitely exists. Just mentioning it in case no one has thought of that.

@SmallJoker
Copy link
Member

The general consensus of today's meeting (https://irc.minetest.net/minetest-dev/2023-09-17#i_6114769) is that Irrilicht will eventually have to be imported.

I agree with #13642 (comment) that a reproduction is needed as sanity-check prior to merge. The last version of the IrrlichtMt repo should be archived to git blame and bisect (if needed).

@rubenwardy rubenwardy added the Roadmap The change matches an item on the current roadmap label Sep 17, 2023
@nerzhul
Copy link
Member

nerzhul commented Sep 22, 2023

Huge commits can easily break Git tooling.

At least one of the commits in which lots of stuff got deleted from IrrlichtMT is able to hang some GUI git clients.

So a drawback of making one giant commit definitely exists. Just mentioning it in case no one has thought of that.

to be honest it's tinier than downloading android source code. There is no issue here :)

@nerzhul
Copy link
Member

nerzhul commented Sep 22, 2023

@numberZero can you rebase ? and we can integrate it smoothly fast to close this topic :)

@numberZero
Copy link
Contributor Author

Updated to latest masters (of both Minetest and IrrlichtMt).

Therefore I'd like to have exact instructions on how to produce the same outcome

Described in the commit message. (forgot to mention the commands need to be executed in the irrlicht directory, not in the repository root...)

  • Imo it makes more sense to put irrlicht in the src directory (i.e. src/irrlicht/). But it's fine by me if that's done in a later PR that then moves all the files, and changes the build process.

I agree with your opinion but it’s not a straightforward thing to do, the build system isn’t all that simple. Besides, that would make porting existing PRs (of which there are 5 alive apparently) much harder. So I’d leave that to a subsequent PR, or rather PRs.

Imported commit: ea1b583

Line ends cleaned up with:

    find -type f |  # list all regular files
    grep -E '\.(h|cpp|fsh|vsh|mm)|LICENSE$' |  # filter for text files
    xargs -n 1 sed -i 's:\s*$::'  # for each file, trim trailing whitespace including the CR

in the lib/irrlichtmt directory
@numberZero
Copy link
Contributor Author

Updated to minetest/irrlicht@ea1b583.

So core devs, what is your choice?

  1. Merge Irrlicht now
  2. Reformat it first, in the Irrlicht repo

In either case, there are two ways to reformat:

  1. Wholesale, with e.g. sed and clang-format
  2. Gradual, manually, with full review

The latter would take months for sure.

As for me, 2-1 and 1-2 are both viable options, with 1-1 okay and 2-2 the black hole.

@sfan5
Copy link
Member

sfan5 commented Oct 3, 2023

I vote for 2-1.

@nerzhul
Copy link
Member

nerzhul commented Oct 3, 2023

i'm with @sfan5 , thanks for working on this

@garymm
Copy link
Contributor

garymm commented Nov 28, 2023

Any blockers to this? What still needs to be done?

@numberZero
Copy link
Contributor Author

Have no idea.

@Desour
Copy link
Member

Desour commented Dec 10, 2023

I don't know either.
And if nobody does, I guess it's safe to assume there is nothing blocking this.
@sfan5 might have an answer.

(The reformat PR (minetest/irrlicht#248) needs to be reapplied, I'll review then.)

@sfan5
Copy link
Member

sfan5 commented Jan 16, 2024

There's nothing directly blocking this.
I was just hoping we could delete the non-SDL drivers from Irrlicht before importing it.

@Desour
Copy link
Member

Desour commented Jan 16, 2024

I was just hoping we could delete the non-SDL drivers from Irrlicht before importing it.

I'd rather not do this. If we merge them into minetest git, we can revert the removal if necessary. And it's not like they're super duper big.

@appgurueu
Copy link
Contributor

This might also help the gltf loader slightly since it shares the common dependency of Jsoncpp with Minetest.

@sfan5
Copy link
Member

sfan5 commented Jan 21, 2024

thought: We should preserve the source separation between Irrlicht and Minetest as long as reasonable because it's convenient to be able to build it independently during development. Irrlicht compiles in like half a minute while Minetest takes four.

I'd rather not do this. If we merge them into minetest git, we can revert the removal if necessary. And it's not like they're super duper big.

Alright.

@appgurueu
Copy link
Contributor

appgurueu commented Jan 21, 2024

This might also help the gltf loader slightly since it shares the common dependency of Jsoncpp with Minetest.

Current state of affairs: The gltf loader just fetches jsoncpp via FetchContent. Hence whether or not Irrlicht is integrated with Minetest doesn't make much of a difference to us anymore.

@sfan5
Copy link
Member

sfan5 commented Jan 21, 2024

Friendly advice: Distro packagers will curse you for doing source downloads at build-time

@numberZero numberZero closed this by deleting the head repository Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Roadmap The change matches an item on the current roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.