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

Add logger as a runtime dependency #4647

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

Conversation

Earlopain
Copy link

On Ruby 3.4, requiring logger without it being in the bundle shows the following warning:

require "asciidoctor"
/home/earlopain/Documents/asciidoctor/lib/asciidoctor/logging.rb:3: 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.
=> true
irb(main):002> RUBY_VERSION
=> "3.4.1"

On Ruby 3.4, requiring `logger` without it being in the bundle shows the following warning:

```
require "asciidoctor"
/home/earlopain/Documents/asciidoctor/lib/asciidoctor/logging.rb:3: 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.
=> true
irb(main):002> RUBY_VERSION
=> "3.4.1"
```
@mojavelinux
Copy link
Member

We have prided ourselves on having 0 dependencies in Asciidoctor. It infuriates me that the Ruby project is forcing this situation on existing projects by extracting stdlib into RubyGem dependencies.

I DO NOT want to add a mandatory dependency to Asciidoctor. It adds too many complications. The only way I see this going is replacing the logging facility in Asciidoctor with an internal implementation. Given how the logger is used, I don't think it would be terribly difficult to do so. We can just implement the most basic functionality of logging to a stream or file.

@Earlopain
Copy link
Author

Infuriating is one way to feel about the bundled gems, yes. I'm certain there will be more of this with the next versions as well.

Since I'm not at all familiar with the project, please feel free to close it and make an issue instead. For reference, yard also has 0-dependency as a goal and this is how they solved it: lsegal/yard@a589b9a. Does not seem too complicated.

@mojavelinux
Copy link
Member

I'm certain there will be more of this with the next versions as well.

And I will continue to fight it by removing use of any library that gets labeled as a dependency. Ruby is destroying its user base by doing this and I hope they are content with that.

@mojavelinux
Copy link
Member

For reference, yard also has 0-dependency as a goal and this is how they solved it: lsegal/yard@a589b9a. Does not seem too complicated.

Thanks for the reference. That is indeed useful. We will likely do the same.

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.

2 participants