Skip to content

Commit 5ce890c

Browse files
committed
Remove the no longer used nokogiri stubs
1 parent 3735167 commit 5ce890c

File tree

4 files changed

+9
-27
lines changed

4 files changed

+9
-27
lines changed

doc/contributor/quick-rails-testing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ API, and shut downs the rails server. It requires Redis as a database to be
88
running in its default configuration on `localhost:6379`.
99

1010
The `jt test ecosystem rails-app` should be executed in TruffleRuby's home. The
11-
output will be similar to following:
11+
output will be similar to following:
1212

1313
```txt
1414
jt test ecosystem rails-app
@@ -88,7 +88,7 @@ Use `bundle show [gemname]` to see where a bundled gem is installed.
8888
+ path/to/truffleruby/bin/truffleruby path/to/truffleruby/test/truffleruby-tool/bin/truffleruby-tool run --offline -- -S bundle exec bin/rails server
8989
....jtt: loading YAML configuration path/to/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool.yaml
9090
jtt: executing "run" command
91-
jtt: $ TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" path/to/truffleruby/bin/truffleruby -J-Xmx2G -J-ea -J-esa -Xcore.load_path\=path/to/truffleruby/src/main/ruby -I path/to/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -r openssl-stubs -r stubs -S bundle exec bin/rails server
91+
jtt: $ TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" path/to/truffleruby/bin/truffleruby -J-Xmx2G -J-ea -J-esa -Xcore.load_path\=path/to/truffleruby/src/main/ruby -I path/to/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -S bundle exec bin/rails server
9292
....[ruby] WARNING rubygems.rb:11 Could not find 'did_you_mean' (>= 0) among 148 total gem(s)
9393
Checked in 'GEM_PATH=path/to/truffleruby/truffleruby-gem-test-pack-5/gems', execute `gem env` for more information
9494
.HTML sanitization stubbed
@@ -151,29 +151,29 @@ true+ kill %1
151151
+ kill 9617
152152
```
153153

154-
There are several levels of indirection but it always prints what command is actually
154+
There are several levels of indirection but it always prints what command is actually
155155
executed. It's prefixed with `+` if it's executed by bash or by `$` if it's our tool.
156156

157157
If the test finishes without problem then the rails server can be executed from
158158
the `path/to/truffleruby/test/truffle/ecosystem/rails-app` directory for further investigation.
159159
The server can be started with following command which can be copied out from the output.
160160

161161
```bash
162-
TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" path/to/truffleruby/bin/truffleruby -J-Xmx2G -J-ea -J-esa -Xcore.load_path\=path/to/truffleruby/src/main/ruby -I path/to/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -r openssl-stubs -r stubs -S bundle exec bin/rails server
162+
TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" path/to/truffleruby/bin/truffleruby -J-Xmx2G -J-ea -J-esa -Xcore.load_path\=path/to/truffleruby/src/main/ruby -I path/to/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -S bundle exec bin/rails server
163163
```
164164

165165
The command can be further modified for inspection.
166-
First it's useful to use jt not to run TruffleRuby directly.
166+
First it's useful to use jt not to run TruffleRuby directly.
167167
(`-Xcore.load_path` option can be then omitted.)
168168

169169
```bash
170-
env TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" ../../../../tool/jt.rb ruby -J-Xmx2G -J-ea -J-esa -I /Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -r openssl-stubs -r stubs -S bundle exec ./bin/rails server
170+
env TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" ../../../../tool/jt.rb ruby -J-Xmx2G -J-ea -J-esa -I /Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -S bundle exec ./bin/rails server
171171
```
172172

173173
To run on Graal pass `--graal` to `jt ruby`.
174174

175175
```bash
176-
env TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" ../../../../tool/jt.rb ruby --graal -J-Xmx2G -J-ea -J-esa -I /Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -r openssl-stubs -r stubs -S bundle exec ./bin/rails server
176+
env TRUFFLERUBY_RESILIENT_GEM_HOME="" GEM_HOME="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" GEM_PATH="/Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/truffleruby-gem-test-pack-5/gems" PATH="path/to/truffleruby/truffleruby-gem-test-pack-5/gems/bin:<snipped>" NO_FORK="true" ../../../../tool/jt.rb ruby --graal -J-Xmx2G -J-ea -J-esa -I /Users/pitr/Workspace/labs/truffleruby-ws/truffleruby/test/truffle/ecosystem/rails-app/.truffleruby-tool_bundle/mocks -S bundle exec ./bin/rails server
177177
```
178-
178+
179179
The command can be further modified as needed to investigate.

lib/truffle/nokogiri-stubs.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/truffle/nokogiri-stubs/nokogiri.rb

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/truffle/integration/no_extra_output/all_stdlibs.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ def glob(pattern)
1717
}
1818

1919
glob('lib/truffle/*.rb').map { |file|
20-
lib = File.basename(file, '.*')
21-
stdlibs << lib unless lib.end_with? '-stubs'
20+
stdlibs << File.basename(file, '.*')
2221
}
2322

2423
glob('lib/mri/net/*.rb').map { |file| File.basename(file, '.*') }.each { |file|
@@ -46,8 +45,6 @@ def glob(pattern)
4645

4746
stdlibs.uniq!
4847

49-
stdlibs.reject! { |lib| lib.end_with? '-stubs' }
50-
5148
stdlibs.each { |lib| require lib }
5249

5350
puts 3 * 4

0 commit comments

Comments
 (0)