Coder Social home page Coder Social logo

Comments (4)

apps4everyone avatar apps4everyone commented on May 3, 2024

Hey @mokagio do you know why there is the verify_block: Helper::XcodesHelper::Verify.method(:requirement)) in xcodes.rb ? if value.empty? would be enough?

like

verify_block: proc do |value|
UI.user_error!("Version has to be defined with version value or in .xcode-version file!") if value.empty?
end)

from fastlane.

mokagio avatar mokagio commented on May 3, 2024

As the error suggests and the code confirms, the xcodes action expects the version parameter to be a valid RubyGems style version. "15.0 Beta 4" is not valid, "15.0-beta.4" would be.

For reference, the verify_block is here:

FastlaneCore::ConfigItem.new(key: :version,
env_name: "FL_XCODE_VERSION",
description: "The version number of the version of Xcode to install. Defaults to the value specified in the .xcode-version file",
default_value: Helper::XcodesHelper.read_xcode_version_file,
default_value_dynamic: true,
verify_block: Helper::XcodesHelper::Verify.method(:requirement)),

And the implementation here:

module Verify
def self.requirement(req)
UI.user_error!("Version must be specified") if req.nil? || req.to_s.strip.size == 0
Gem::Requirement.new(req.to_s)
rescue Gem::Requirement::BadRequirementError
UI.user_error!("The requirement '#{req}' is not a valid RubyGems style requirement")
end
end

I don't know why the code was written in that fashion, but I think it's worth noting that the valid RubyGems style syntax doesn't seem to work in xcodes itself.

image image

@apps4everyone I think your suggestion makes sense under the assumption that xcodes does not require RubyGems style versions but uses whatever Apple set upstream to identify the binary to install. You should make a PR with the change and see what the more knowledgeable core team thinks 😄

from fastlane.

apps4everyone avatar apps4everyone commented on May 3, 2024

Opened a PR, maybe someone can try to run and review ❤️
#21434

from fastlane.

apps4everyone avatar apps4everyone commented on May 3, 2024

xcodes itself works for me (latest version)
xcodes install 15.0 Beta 4

from fastlane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.