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

fcitx5-mozc: 2.26.4220.102 -> 2.30.5544.102 #346680

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

musjj
Copy link
Contributor

@musjj musjj commented Oct 5, 2024

Upgrades fcitx5-mozc to 2.30.5544.102 with the bazel build system.

I didn't choose the latest version (2.30.5595.102) because it uses the new local.bzl feature that is only available in bazel >7.2 (see: bazelbuild/bazel#22612), so that's blocked until #338264 is merged.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

This package can be consumed and used by not just ibus, but by many
other packages/tools, so it should have a more generic name.
mozc-ut is not an ibus-exclusive package, so it should live in a higher
namespace
Comment on lines +131 to +136
asl20 # abseil-cpp
bsd3 # mozc, breakpad, gtest, gyp, japanese-usage-dictionary, protobuf
mit # wil
naist-2003 # IPAdic
publicDomain # src/data/test/stress_test, Okinawa dictionary
unicode-30 # src/data/unicode, breakpad
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of bazel we cannot unvendor things, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@stephen-huan stephen-huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this PR over more than a year (!)! I don't know bazel and fcitx that much so I'll just comment on the ibus integration. The integration here is tight and exactly what I imagined when I made my comments.

The old PR #251706 packaged google/mozc with the bazelTargets

bazelTargets = [
  "server:mozc_server"
  "gui/tool:mozc_tool"
];

I proposed in #251706 (comment) to remove this in favor of re-using ibus-engines.mozc.

It seems possible to expose one mozc derivation packaging google/mozc and use this for both ibus-engines.mozc and fcitx5-mozc to prevent redundancy and simplify maintenance.

but was shot down by @mikunimaru in #251706 (comment) and #251706 (comment).

Also you mentioned in #251706 (comment)

As for the ibus stuff, I'm not really sure since I never used it. But theoretically it should be possible to share the mozc package between it, by making the right overrides to the bazelTargets.

That seems to have happened in this PR, now that mozc is no longer being re-packaged (the first two commits rename ibus-mozc to mozc and expose mozc-ut at the top level). But the bazelTargets of current mozc is different than the mozc packaged in the old PR.

bazelTargets = [ "package" ];

What changed in the derivation to not require overriding bazelTargets? And what do you think about @mikunimaru's comments about the re-use?

@musjj
Copy link
Contributor Author

musjj commented Oct 5, 2024

The new package by @pineapplehunter uses the package target which bundles in other targets, including fcitx5, ibus and emacs:

mozc/src/unix/BUILD.bazel

genrule(
    name = "package",
    srcs = [
        ":icons",
        "//gui/tool:mozc_tool",
        "//server:mozc_server",
        "//unix/emacs:mozc_emacs_helper",
        "//unix/ibus:gen_mozc_xml",
        "//unix/ibus:ibus_mozc",
        "//unix/emacs:mozc.el",
        "//renderer/qt:mozc_renderer",
    ],

So it's just a lot more convenient now.

As for @mikunimaru's concerns, the original PR was actually built using google/mozc from the start (for mozc_server). I've daily-driven it since then and I have yet to see any issues, so incompatibility shouldn't be a concern. It's also how the AUR package is built, which is what I based my PR on.

Copy link
Member

@stephen-huan stephen-huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested fcitx, but the integration with ibus-mozc and mozc-ut looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants