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

Relative loading for easier development #821

Merged
merged 3 commits into from
Feb 10, 2022
Merged

Relative loading for easier development #821

merged 3 commits into from
Feb 10, 2022

Conversation

BuonOmo
Copy link
Contributor

@BuonOmo BuonOmo commented Jun 30, 2021

This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at #817.


There is one place I did not change require for require_relative, that is under exe/ because I don't know how that is handled by rubygem, and guessed it could be copied. Moreover, there are no related tests.


I almost went and created a helper autoload_relative method, but I guess I'll let that for ruby core at some point.


The second commit acts as a test for that new behavior, it may feel intrusive. In that case I'll revert that bit

This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at #817.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
Remove Rakefile lib folder to make sure we test that usage of
relative paths

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
@nobu
Copy link
Member

nobu commented Sep 12, 2021

Needs nobu/rdoc@02fa391.

@BuonOmo
Copy link
Contributor Author

BuonOmo commented Sep 13, 2021

@nobu shall I apply the patch you linked, or is in your hands?

@nobu
Copy link
Member

nobu commented Sep 13, 2021

Please apply.

@BuonOmo
Copy link
Contributor Author

BuonOmo commented Sep 13, 2021

@nobu done :)

@nobu nobu merged commit aa41bd4 into ruby:master Feb 10, 2022
matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 12, 2022
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at ruby/rdoc#817.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

ruby/rdoc@aa41bd48eb

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
nobu added a commit to nobu/rdoc that referenced this pull request Nov 27, 2022
Since also the template files are searched from the `$LOAD_PATH`, the
current library should not be removed.
nobu added a commit that referenced this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants