Add more dependencies of standard libraries#29
Merged
mame merged 1 commit intoruby:masterfrom Jan 21, 2021
Merged
Conversation
Member
Author
|
The CI is failed wiht the minitest dependency problem on |
Member
|
Sorry for my late action. I've updated minitest to 5.14.3, so I believe that the test will work. Thank you very much! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds more fixed dependencies to standard libraries.
Problem
Currently typeprof command fails if a Ruby code has
require 'logger'. For example:I know this problem because of a Qiita article. https://qiita.com/kure/items/6f93429978466d2860c7#typeprof%E3%81%A7%E3%81%AE%E8%A9%A6%E3%81%BF
Cause
Logger actually depends on
MonitorMixinmodule that is defined bymonitorlibrary. But typeprof doesn't know the dependency, so it doesn't loadmonitorlibrary.Solution
Add
monitorlibrary to the loader ifloggeris required. This patch also adds other dependencies.The list came from here: https://github.com/ruby/rbs/blob/4e5ee848b318c6c9cd4131a825f0b794017acb3a/Rakefile#L35-L54
I know it is an ad-hoc approach, but I think we need the approach currently. Because RBS doesn't have any feature to manage dependency. And actually the users couldn't use typeprof by this problem.