Skip to content

fix: Add logger dependency to gemspec #227

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jgarber623
Copy link

The functions_framework gem requires the logger gem in lib/functions_framework/cli.rb. Under Ruby 3.4, this emits a warning:

logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.

This commit adds the logger gem as a dependency to the gemspec which should silence the warning message.

The functions_framework gem requires the logger gem in
`lib/functions_framework/cli.rb`. Under Ruby 3.4, this emits a warning:

> logger was loaded from the standard library, but will no longer be
part of the default gems starting from Ruby 3.5.0.
> You can add logger to your Gemfile or gemspec to silence this warning.

This commit adds the logger gem as a dependency to the gemspec which
should silence the warning message.

See-also: https://rubygems.org/gems/logger
@jgarber623
Copy link
Author

Good heavens. That's a lot of failures.

Not sure what the CodeQL failure is all about:

  node:events:502
        throw er; // Unhandled 'error' event
        ^
  
  Error: connect ECONNREFUSED 54.185.253.63:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
  Emitted 'error' event on Writable instance at:
      at eventHandlers.<computed> (/home/runner/work/_actions/github/codeql-action/181d5eefc20863364f96762470ba6f862bdef56b/node_modules/follow-redirects/index.js:49:24)
      at ClientRequest.emit (node:events:524:28)
      at emitErrorEvent (node:_http_client:101:11)
      at TLSSocket.socketErrorListener (node:_http_client:504:5)
      at TLSSocket.emit (node:events:524:28)
      at emitErrorNT (node:internal/streams/destroy:169:8)
      at emitErrorCloseNT (node:internal/streams/destroy:128:3)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '54.185.253.63',
    port: 443
  }

The remaining failures all seem to be because files named like .toys-tmp-gemfile-<datestamp>-<random> are locking to an older version of logger (something in the 1.5 range). I'm not familiar with that file, but it has the appearance of a caching problem, maybe?

Bundler could not find compatible versions for gem "logger":
  In .toys-tmp-gemfile-20250805183302-ux3uhudlqr:
    logger (= 1.5.0)

    functions_framework was resolved to 1.6.2, which depends on
      logger (~> 1.7)

Not sure what the best approach is here. If it's a caching issue, I'm not sure how to address that. Or, we could relax the logger version to ~> "1.5" in my proposed changes.

@akerekes Looks like you kicked off the Actions run (thanks for your help!). Do you have any guidance on how to tackle this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant