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

YubiKit Bootstrap has no versioning scheme #1981

Closed
Brandon-T opened this issue Nov 18, 2019 · 1 comment
Closed

YubiKit Bootstrap has no versioning scheme #1981

Brandon-T opened this issue Nov 18, 2019 · 1 comment

Comments

@Brandon-T
Copy link
Collaborator

@Brandon-T Brandon-T commented Nov 18, 2019

Description:

When checking out older versions of the code, YubiKit is ALWAYS using the latest bleeding edge master release as dictated by the code in bootstrap.sh (clones the latest repo, builds it manually, manually copies it to the Carthage directories):

# Build Yubikit
YUBIKIT_DIR=Carthage/Checkouts/yubikit-ios
YUBIKIT_OUT=ThirdParty/YubiKit
SRCDIR=$PWD

rm -rf $YUBIKIT_DIR
rm -rf $YUBIKIT_OUT

git clone -b master --single-branch https://github.com/YubicoLabs/yubikit-ios/ $YUBIKIT_DIR

mkdir -p $SRCDIR/$YUBIKIT_OUT/include
pushd $YUBIKIT_DIR/YubiKit
sh build.sh > yubikit.log 2>&1
cp -r releases/YubiKit/YubiKit/release_universal/  $SRCDIR/$YUBIKIT_OUT/
cp -r releases/YubiKit/YubiKit/include/  $SRCDIR/$YUBIKIT_OUT/include/
popd

This means that there is no Carthage cache for YubiKit since it's built manually and the folder is deleted every single time we run bootstrap.sh so it will reclone again.

Currently, if we attempt to compile an older version such as 1.12.1 (current version is 1.13.x), we'd get errors saying:

Value of type 'YubiKitManagerProtocol' has no member 'keySession'

Due to YubiKit removing that in the latest version. Every third-party library we use has versioning and it's kept in the Carthage.resolve as a hash/commit-sha.. EXCEPT YubiKit.

To compile older versions, we must then go to YubiKit's repository and find which version is compatible with the older source code.

Steps to Reproduce

  1. Switch to lower version than current release
  2. Attempt to compile
  3. See error

Actual result:
Value of type 'YubiKitManagerProtocol' has no member 'keySession'

Expected result:
Compile successfully.

Reproduces how often: [Easily reproduced, Intermittent Issue]
Easily Reproduced

Brave Version:

Device details:

Website problems only:

  • did you check with Brave Shields down?
  • did you check in Safari/Firefox (WkWebView-based browsers)?

Additional Information

@iccub
Copy link
Contributor

@iccub iccub commented Nov 18, 2019

I added git checkout 2.0.1 to the script recently, isn't that enough?
https://github.com/brave/brave-ios/blob/development/bootstrap.sh#L101

@Brandon-T Brandon-T closed this Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.