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

Build Sparkle from source #493

Closed
wants to merge 1 commit into from

Conversation

LEOYoon-Tsaw
Copy link
Member

Building Sparkle from source is more flexible in choosing between different architectures to support.

@lotem
Copy link
Member

lotem commented Jan 31, 2021

I lean towards using an official binary release.
Pros:

  • reliable source;
  • faster (CI) build;
  • requires no extra attention of source code users; ci failure is a sign;

Cons:

  • updating the framework creates a large diff; but we won't update unless there is a must.

The flexibility to build for other architectures is not a big issue. A universal build is sufficient.

@LEOYoon-Tsaw
Copy link
Member Author

LEOYoon-Tsaw commented Jan 31, 2021

Well, it's an option, I don't have particular preference. But the reasons of building from source are:

  1. The submodule can be set to specific branch/commit, reliability is not an issue
  2. Building Sparkle is fast, only takes less than 1 minute to build
  3. The size difference in Universal and architecture specific Sparkle is roughly 2MB
  4. All other parts of rime are in source code, having a binary in the project is inelegant

I actually like the previous experiment with SPM, but it just turns out SPM is not reliable enough, but submodule is reliable enough, and is equivalent in functionality.

@LEOYoon-Tsaw
Copy link
Member Author

Build passed, I forgot to mkdir -p Frameworks in makefile

@lotem
Copy link
Member

lotem commented Jan 31, 2021

 

Well, it's an option, I don't have particular preference. But the reasons of building from source are:

  1. The submodule can be set to specific branch/commit, reliability is not an issue
  2. Building Sparkle is fast, only takes less than 1 minute to build
  3. The size difference in Universal and architecture specific Sparkle is roughly 2MB
  4. All other parts of rime are in source code, having a binary in the project is inelegant

I actually like the previous experiment with SPM, but it just turns out SPM is not reliable enough, but submodule is reliable enough, and is equivalent in functionality.

�Reasonable. Let me have a try.

@lotem
Copy link
Member

lotem commented Jan 31, 2021

I quickly gave up the try.
For me it takes forever to clone the submodule. Maybe it's because of the network. But that definitely hinders developers' velocity.
Compare the PR build to latest master build, the time diff "4 min 22 sec" vs. "3 min 31 sec" is a significant increase.

@LEOYoon-Tsaw
Copy link
Member Author

LEOYoon-Tsaw commented Jan 31, 2021

Sparkle source code is 12MB in size, it’s large, but not unacceptably large. Capnproto is 8.3MB, opencc is 7.6MB, yaml is 6.6MB, all these third party reps are cloned with a combined size way larger than sparkle.

30% increase in building time is a thing, but that’s still nothing compared to librime, and librime’s dependency build time. Like for librime, people want to avoid building the deps can just use the precompiled binary, it’s the same for Sparkle, once there is already Sparkle.framework in Frameworks, makefile will skip compiling it

@lotem
Copy link
Member

lotem commented Jan 31, 2021

I'm sitting on the fence.
But now I need to skip this to move fast for a release.

@LEOYoon-Tsaw
Copy link
Member Author

Of course, it's a minor pull, and doesn't affect user

(cherry picked from commit 997a450)
@LEOYoon-Tsaw
Copy link
Member Author

Replaced with #749

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