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

Rename libsdl packages to libsdl2 #6292

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

SirLynix
Copy link
Member

@SirLynix SirLynix commented Feb 5, 2025

Now that #6225 is merged, the next step is to rename libsdl package to libsdl2

@SirLynix
Copy link
Member Author

SirLynix commented Feb 5, 2025

Run xmake l ./scripts/test.lua -D -a arm64-v8a -k shared -m debug
{ 
  "blah",
  "centurion",
  "cimgui",
  "fluidsynth",
  "imgui",
  "johnnyengine",
  "libsdl",
  "libsdl2",
  "libsdl2 2.0.8",
  "libsdl2 2.0.12",
  "libsdl2 2.0.14",
  "libsdl2 2.0.16",
  "libsdl2 2.0.18",
  "libsdl2 2.0.20",
  "libsdl2 2.0.22",
  "libsdl2 2.24.0",
  "libsdl2 2.24.2",
  "libsdl2 2.26.0",
  "libsdl2 2.26.1",
  "libsdl2 2.26.2",
  "libsdl2 2.26.3",
  "libsdl2 2.26.4",
  "libsdl2 2.26.5",
  "libsdl2 2.28.0",
  "libsdl2 2.28.1",
  "libsdl2 2.28.2",
  "libsdl2 2.28.3",
  "libsdl2 2.28.4",
  "libsdl2 2.28.5",
  "libsdl2 2.30.0",
  "libsdl2 2.30.1",
  "libsdl2 2.30.2",
  "libsdl2 2.30.3",
  "libsdl2 2.30.4",
  "libsdl2 2.30.5",
  "libsdl2 2.30.6",
  "libsdl2 2.30.7",
  "libsdl2 2.30.8",
  "libsdl2 2.30.9",
  "libsdl2 2.30.10",
  "libsdl2_gfx",
  "libsdl2_gfx 1.0.4",
  "libsdl2_image",
  "libsdl2_image 2.8.4",
  "libsdl2_image 2.8.3",
  "libsdl2_image 2.6.0",
  "libsdl2_image 2.6.1",
  "libsdl2_image 2.6.2",
  "libsdl2_image 2.6.3",
  "libsdl2_image 2.8.0",
  "libsdl2_image 2.8.1",
  "libsdl2_image 2.8.2",
  "libsdl2_mixer",
  "libsdl2_mixer 2.0.4",
  "libsdl2_mixer 2.6.0",
  "libsdl2_mixer 2.6.1",
  "libsdl2_mixer 2.6.2",
  "libsdl2_mixer 2.8.0",
  "libsdl2_net",
  "libsdl2_net 2.2.0",
  "libsdl2_ttf",
  "libsdl2_ttf 2.20.0",
  "libsdl2_ttf 2.20.1",
  "libsdl2_ttf 2.20.2",
  "libsdl2_ttf 2.22.0",
  "libsdl_gfx",
  "libsdl_image",
  "libsdl_mixer",
  "libsdl_net",
  "libsdl_ttf",
  "magnum",
  "openscenegraph",
  "pdcurses",
  "pdcursesmod",
}

there's a high chance at least one of the CI job will fail but this can be safely merged as it's just a package naming.

@SirLynix SirLynix requested review from waruqi and xq114 February 5, 2025 16:50
@waruqi
Copy link
Member

waruqi commented Feb 6, 2025

there's a high chance at least one of the CI job will fail but this can be safely merged as it's just a package naming.

All ci failed. It was very risky to merge so many changes at once.

I think it should at least be split into several patches, tested and merged separately.

patch 1: rename libsdl -> libsdl2, use set_base in libsdl
patch 2: rename libsdl_image -> libsdl2_image, , use set_base in libsdl_image
patch 3: rename libsdl2_mixer, ..
patch 4: rename libsdl2_ttf, ..
...
last patch: rename add_deps() in other packages

@SirLynix
Copy link
Member Author

SirLynix commented Feb 6, 2025

I split it into three commits:

CI will fail because it tries to compile every known version of libsdl2, some broke due to package updates, other were never tested on platforms that were enabled later, etc.

So yeah I think this PR has to be manually reviewed, hopefully the commits diff are quite easy to read

@waruqi
Copy link
Member

waruqi commented Feb 7, 2025

I split it into three commits:

CI will fail because it tries to compile every known version of libsdl2, some broke due to package updates, other were never tested on platforms that were enabled later, etc.

So yeah I think this PR has to be manually reviewed, hopefully the commits diff are quite easy to read

But all in one PR, it is too big, hard to review, and always causes CI to test all versions and packages. I want to split them into three PRs

@SirLynix
Copy link
Member Author

SirLynix commented Feb 7, 2025

I don't see the point, it's easy to review each commit separately.
CI will fail even if I split it in three PR because it will try to test all versions of libsdl on all platforms, or all projects using it (johnnyengine doesn't pass the CI for example)

Also if I split it, there will be a possibility for people to get xmake-repo with an incomplete migration (for example if we merge libsdl2 rename but not imgui dep update, people using imgui will get a warning because it will use libsdl)

@waruqi
Copy link
Member

waruqi commented Feb 7, 2025

CI will fail even if I split it in three PR because it will try to test all versions of libsdl on all platforms, or all projects using it (johnnyengine doesn't pass the CI for example)

you can edit test.lua to only test latest version. if ci tests are passed, we can revert this patch, then merge this pr

elseif line:startswith("+") and line:find("add_versions") then

Also if I split it, there will be a possibility for people to get xmake-repo with an incomplete migration (for example if we merge libsdl2 rename but not imgui dep update, people using imgui will get a warning because it will use libsdl)

pr 1: libsdl -> libsdl2, libsdl set_base + warnings.

It will not break anything, only get one new warning. user still can use add_requires("libsdl").

In addition, even if pr 1 is merged, it will not be synchronized to master immediately, so we still have time to submit pr 2

@SirLynix
Copy link
Member Author

SirLynix commented Feb 7, 2025

That's still quite a lot of work for something as simple as renaming a package, I don't have time right now to do it.

@waruqi
Copy link
Member

waruqi commented Feb 7, 2025

pr1: #6307

@waruqi waruqi closed this Feb 8, 2025
@waruqi waruqi reopened this Feb 8, 2025
@waruqi
Copy link
Member

waruqi commented Feb 8, 2025

pr2: #6316

@waruqi waruqi closed this Feb 8, 2025
@waruqi waruqi reopened this Feb 8, 2025
@waruqi
Copy link
Member

waruqi commented Feb 8, 2025

pr3: #6317

@waruqi
Copy link
Member

waruqi commented Feb 8, 2025

this is the last pr now. and johnnyengine/box2d is broken, but I have no more time to fix it in these days.

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