Class: Dependabot::Julia::PackageManager
- Inherits:
-
Ecosystem::VersionManager
- Object
- Ecosystem::VersionManager
- Dependabot::Julia::PackageManager
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/julia/package_manager.rb
Constant Summary collapse
- ECOSYSTEM =
T.let("julia", String)
- PACKAGE_MANAGER =
T.let("julia", String)
- MINIMUM_VERSION =
Julia versions as of June 2025:
-
1.10 is the LTS (Long Term Support) version
-
1.12 is the current stable version
Update these constants when new LTS or major versions are released
-
T.let("1.10", String)
- CURRENT_VERSION =
Current stable version
T.let("1.12", String)
Class Method Summary collapse
Instance Method Summary collapse
- #ecosystem ⇒ Object
-
#initialize ⇒ PackageManager
constructor
A new instance of PackageManager.
Constructor Details
#initialize ⇒ PackageManager
Returns a new instance of PackageManager.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/dependabot/julia/package_manager.rb', line 47 def initialize detected_ver_str = self.class.detected_version # detected_version always returns a string (either detected or MINIMUM_VERSION fallback), # so we can safely use T.must here super( name: "julia", detected_version: Dependabot::Version.new(T.must(detected_ver_str)), version: Dependabot::Version.new(T.must(detected_ver_str)), supported_versions: [ Dependabot::Version.new(MINIMUM_VERSION), Dependabot::Version.new(CURRENT_VERSION) ], deprecated_versions: [] ) end |
Class Method Details
.detected_version ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/dependabot/julia/package_manager.rb', line 24 def self.detected_version # Try to detect Julia version by executing `julia --version` output = T.let( Dependabot::SharedHelpers.run_shell_command("julia --version"), String ) # Parse output like "julia version 1.10.0" or "julia version 1.6.7" version_match = output.match(/julia version (\d+\.\d+(?:\.\d+)?)/) return version_match[1] if version_match # If we can't parse the version, log and fallback Dependabot.logger.warn("Could not parse Julia version from output: #{output}") MINIMUM_VERSION rescue Dependabot::SharedHelpers::HelperSubprocessFailed => e Dependabot.logger.info("Julia not found or failed to execute: #{e.}") MINIMUM_VERSION rescue StandardError => e Dependabot.logger.error("Error detecting Julia version: #{e.}") MINIMUM_VERSION end |
Instance Method Details
#ecosystem ⇒ Object
64 65 66 67 68 69 |
# File 'lib/dependabot/julia/package_manager.rb', line 64 def ecosystem { package_manager: "julia", version: version # This will use the potentially configured version } end |