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

Builds broken due to changes in rive-runtime #449

Open
bjartebore opened this issue Jan 24, 2025 · 2 comments
Open

Builds broken due to changes in rive-runtime #449

bjartebore opened this issue Jan 24, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@bjartebore
Copy link

bjartebore commented Jan 24, 2025

Description

Our build pipeline started failing today with the error Error (Xcode): Undefined symbol: rive::Vec2D::transformMat2D(rive::Vec2D const&, rive::Mat2D const&).

Looking into this it seems to be due to changes in https://github.com/rive-app/rive-runtime.

The update_dependencies.sh in rive_common fetches the HEAD of main from https://github.com/rive-app/rive-runtime for each time we do a clean build, something that often happens in pipelines. The github dependencies should be locked to taged versions or a hash to avoid breaking changes in dependencies.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run flutter pub cache clean
  2. Create flutter project
  3. Add rive
  4. Add reference to rive
  5. build app with flutter build ipa
  6. See error ⚠️

Device & Versions (please complete the following information)

  • Device: Android and iOS

  • Flutter Version:

Flutter 3.27.3 • channel stable • git@github.com:flutter/flutter.git
Framework • revision c519ee916e (3 days ago) • 2025-01-21 10:32:23 -0800
Engine • revision e672b006cb
Tools • Dart 3.6.1 • DevTools 2.40.2
@bjartebore bjartebore added the bug Something isn't working label Jan 24, 2025
@bjartebore
Copy link
Author

Here is a simple fix to mitigate the issue until it is fixed, run this script after flutter pub get

import 'dart:io';
import 'dart:isolate';

void main() async {
  var uri = Uri.parse('package:rive_common/rive_common.dart');
  var packageRoot = await Isolate.resolvePackageUri(uri);

  if (packageRoot != null) {
    var dir = File(packageRoot.toFilePath()).parent.parent;
    var file = File('${dir.path}/update_dependencies.sh');
    // Modify the dependency to use a specific commit
    var contents = await file.readAsString();
    final replaceText = 'git clone https://github.com/rive-app/rive-cpp';
    var modifiedContents = contents.replaceAll(
      RegExp('$replaceText(.*)'),
      '$replaceText && git -C ./rive-cpp checkout 93054af1389039f8c51f77aea17ae4757c838a33',
    );

    await file.writeAsString(modifiedContents);
  }
}

@mtwichel
Copy link

I just want to share our team all also had this issue, and @bjartebore's script worked for us as a work-around. Thanks for doing that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants