dependabot-go_modules 0.293.0 → 0.295.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b55d08bdb68cde72a94e977ca92b348710e12f9ba9f3c2320bfe717ce77bcdb
4
- data.tar.gz: 9f5d859a17a611704587d52dc7be538155f6e8f72ea916773fc81622e2186424
3
+ metadata.gz: 0402ca3421b5b0c5b8fa4e55f5abbb60212308707a2aa7150bebc5fe32a5a6d9
4
+ data.tar.gz: ceedaaaad0f5fc209d631653cae59f93a9ffbd45ef9d5cdfc72efe478d967630
5
5
  SHA512:
6
- metadata.gz: 0c3e9b41fa3e9198942d067cd5962f8a77b0ab7398e6c9f811c705b13c45aab0f6b960cf1da855ebbcfe9c651be2e299229c3d972ccb32eb612fa0c724e9c252
7
- data.tar.gz: f0713d1b6f7a70b7e21cfa9a21e5fa96c4eee456b9bf7c27d542fc40f6a65af94365178d02743ce9ee956ed42b5f61a88562f2bf11e65f0a762e6421af79a16c
6
+ metadata.gz: de519026d214114588f8eb2eaa19e83f2088415fe19c972c582fc70cb33b2dd6aad5621919ffc7665aca926762527bbaefeb688ebeaf8c7197a537bda2f786cc
7
+ data.tar.gz: dc46878cfbfe6153b7b5300a71d49e1e15d07b3e0ad470628efebe8efb5c09046fa09d863c07af77a0b1593123da5f2408173da084081644ea35bfb11e3d28be
@@ -66,6 +66,12 @@ module Dependabot
66
66
  /Out of diskspace/
67
67
  ].freeze, T::Array[Regexp])
68
68
 
69
+ GO_LANG = "Go"
70
+
71
+ AMBIGUOUS_ERROR_MESSAGE = /ambiguous import: found package (?<package>.*) in multiple modules/
72
+
73
+ GO_VERSION_MISMATCH = /requires go (?<current_ver>.*) .*running go (?<req_ver>.*);/
74
+
69
75
  GO_MOD_VERSION = /^go 1\.\d+(\.\d+)?$/
70
76
 
71
77
  sig do
@@ -292,6 +298,8 @@ module Dependabot
292
298
  write_go_mod(body)
293
299
  end
294
300
 
301
+ # rubocop:disable Metrics/AbcSize
302
+ # rubocop:disable Metrics/PerceivedComplexity
295
303
  sig { params(stderr: String).returns(T.noreturn) }
296
304
  def handle_subprocess_error(stderr) # rubocop:disable Metrics/AbcSize
297
305
  stderr = stderr.gsub(Dir.getwd, "")
@@ -323,10 +331,21 @@ module Dependabot
323
331
  raise Dependabot::OutOfDisk.new, error_message
324
332
  end
325
333
 
334
+ if (matches = stderr.match(AMBIGUOUS_ERROR_MESSAGE))
335
+ raise Dependabot::DependencyFileNotResolvable, matches[:package]
336
+ end
337
+
338
+ if (matches = stderr.match(GO_VERSION_MISMATCH))
339
+ raise Dependabot::ToolVersionNotSupported.new(GO_LANG, T.must(matches[:current_ver]),
340
+ T.must(matches[:req_ver]))
341
+ end
342
+
326
343
  # We don't know what happened so we raise a generic error
327
344
  msg = stderr.lines.last(10).join.strip
328
345
  raise Dependabot::DependabotError, msg
329
346
  end
347
+ # rubocop:enable Metrics/AbcSize
348
+ # rubocop:enable Metrics/PerceivedComplexity
330
349
 
331
350
  sig { params(message: String, regex: Regexp).returns(String) }
332
351
  def filter_error_message(message:, regex:)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-go_modules
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.293.0
4
+ version: 0.295.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-16 00:00:00.000000000 Z
11
+ date: 2025-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.293.0
19
+ version: 0.295.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.293.0
26
+ version: 0.295.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +270,7 @@ licenses:
270
270
  - MIT
271
271
  metadata:
272
272
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
273
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.293.0
273
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.295.0
274
274
  post_install_message:
275
275
  rdoc_options: []
276
276
  require_paths: