Skip to content

Commit 4c32aef

Browse files
committed
Removals
PullRequest: truffleruby/634
2 parents 369050e + 8e093b1 commit 4c32aef

File tree

14 files changed

+63
-138
lines changed

14 files changed

+63
-138
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 1.0 RC 14
2+
3+
Changes:
4+
5+
* `-Xoptions` has been removed - use `--help:languages` instead.
6+
* `-Xlog=` has been removed - use `--log.level=` instead.
7+
* `-J` has been removed - use `--jvm.` instead.
8+
* `-J-cp lib.jar` and so on have removed - use `--jvm.cp=lib.jar` or `--jvm.classpath=lib.jar` instead.
9+
* `-Xoption=value` has been removed - use `--option=value` instead.
10+
* The `-X` option now works as in MRI.
11+
* `--help:debug` is now `--help:internal`.
12+
113
# 1.0 RC 13
214

315
Note that as TruffleRuby RC 13 is built on Ruby 2.4.4 it is still vulnerable
@@ -61,7 +73,7 @@ Performance:
6173
by reducing conversions between native and managed strings and allowing for mutable
6274
metadata in native strings.
6375

64-
# 1.0 RC 12
76+
# 1.0 RC 12, 4 Februrary 2019
6577

6678
Bug fixes:
6779

doc/user/compatibility.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ so, but this isn't always the case. For example `RubyVM` is not available.
116116
`-y`, `--yydebug`, `--dump=` are ignored with a warning as they are internal
117117
development tools.
118118

119-
`-X` is an undocumented synonym for `-C` and we (and other alternative
120-
implementations of Ruby) have repurposed it for extended options. We warn if
121-
your `-X` options look like they are actually intended to be as in MRI.
122-
123119
Programs passed in `-e` arguments with magic-comments must have an encoding that
124120
is UTF-8 or a subset of UTF-8, as the JVM has already decoded arguments by the
125121
time we get them.

doc/user/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ TruffleRuby options are set via `--option=value`, or you can use
6666
`--ruby.option=value` from any launcher. You can omit `=value` to set to `true`.
6767

6868
Available options and documentation can be seen with `--help:languages`.
69-
Additionally set `--help:expert` and `--help:debug` to see those categories of
69+
Additionally set `--help:expert` and `--help:internal` to see those categories of
7070
options. All options all experimental and subject to change at any time.
7171

7272
Options can also be set as JVM system properties, where they have a prefix
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
require_relative '../spec_helper'
2+
require_relative 'shared/change_directory'
23

3-
describe 'The -C command line option' do
4-
before :all do
5-
@script = fixture(__FILE__, 'dash_upper_c_script.rb')
6-
@tempdir = File.dirname(@script)
7-
end
8-
9-
it 'changes the PWD when using a file' do
10-
output = ruby_exe(@script, options: "-C #{@tempdir}")
11-
output.should == @tempdir
12-
end
13-
14-
it 'does not need a space after -C for the argument' do
15-
output = ruby_exe(@script, options: "-C#{@tempdir}")
16-
output.should == @tempdir
17-
end
18-
19-
it 'changes the PWD when using -e' do
20-
output = ruby_exe(nil, options: "-C #{@tempdir} -e 'print Dir.pwd'")
21-
output.should == @tempdir
22-
end
4+
describe "The -C command line option" do
5+
it_behaves_like :command_line_change_directory, "-C"
236
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require_relative '../spec_helper'
2+
require_relative 'shared/change_directory'
3+
4+
describe "The -X command line option" do
5+
it_behaves_like :command_line_change_directory, "-X"
6+
end

spec/ruby/command_line/rubylib_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
dir = tmp("rubylib/incl_front")
3131
ENV["RUBYLIB"] = @pre + dir
3232
paths = ruby_exe("puts $LOAD_PATH").lines.map(&:chomp)
33+
paths.shift if paths.first.end_with?('/gem-rehash')
3334
if PlatformGuard.implementation? :ruby
3435
# In a MRI checkout, $PWD and some extra -I entries end up as
3536
# the first entries in $LOAD_PATH. So just assert that it's not last.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
describe :command_line_change_directory, shared: true do
2+
before :all do
3+
@script = fixture(__FILE__, 'change_directory_script.rb')
4+
@tempdir = File.dirname(@script)
5+
end
6+
7+
it 'changes the PWD when using a file' do
8+
output = ruby_exe(@script, options: "#{@method} #{@tempdir}")
9+
output.should == @tempdir
10+
end
11+
12+
it 'does not need a space after -C for the argument' do
13+
output = ruby_exe(@script, options: "#{@method}#{@tempdir}")
14+
output.should == @tempdir
15+
end
16+
17+
it 'changes the PWD when using -e' do
18+
output = ruby_exe(nil, options: "#{@method} #{@tempdir} -e 'print Dir.pwd'")
19+
output.should == @tempdir
20+
end
21+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
slow:The -X command line option changes the PWD when using a file
2+
slow:The -X command line option does not need a space after -C for the argument
3+
slow:The -X command line option changes the PWD when using -e

spec/tags/truffle/launcher_tags.txt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
slow:The launcher runs when symlinked
22
slow:The launcher preserve spaces in options
3-
slow:The launcher takes options from system properties set on the command line using -J
4-
slow:The launcher takes options from system properties set on the command line using -X
53
slow:The launcher prioritises options on the command line over system properties
6-
slow:The launcher prioritises options on the command line using -X over system properties
7-
slow:The launcher prints available options for -Xoptions
8-
slow:The launcher logs options if -Xoptions.log is set
94
slow:The launcher prints an error for an unknown option
105
slow:The launcher StringArray option appends multiple options
116
slow:The launcher StringArray option parses ,
127
slow:The launcher StringArray option parses , respecting escaping
138
slow:The launcher takes options from system properties set on the command line using --jvm
149
slow:The launcher takes options from system properties set on the command line using --native
15-
slow:The launcher '-J-classpath ' adds the jar
16-
slow:The launcher '-J-cp ' adds the jar
17-
slow:The launcher '-J:classpath ' adds the jar
18-
slow:The launcher '-J:cp ' adds the jar
1910
slow:The launcher '--jvm.classpath=' adds the jar
2011
slow:The launcher '--jvm.cp=' adds the jar
2112
slow:The launcher enables deterministic hashing if --hashing.deterministic is set
@@ -57,9 +48,7 @@ slow:The launcher applies Truffle options
5748
slow:The launcher does not print a Java backtrace for an -S file that's not found
5849
slow:The launcher prints available user options for --help:languages
5950
slow:The launcher prints available expert options for --help:languages --help:expert
60-
slow:The launcher prints available debug options for --help:languages --help:debug
61-
slow:The launcher sets the log level using -Xlog=
62-
slow:The launcher sets the log level using --log.level=
51+
slow:The launcher prints available internal options for --help:languages --help:internal
6352
slow:The launcher takes normal Ruby options from TRUFFLERUBYOPT
6453
slow:The launcher takes --option options from TRUFFLERUBYOPT
6554
slow:The launcher takes --ruby.option options from TRUFFLERUBYOPT
@@ -68,3 +57,5 @@ slow:The launcher takes --option options from RUBYOPT
6857
slow:The launcher takes --ruby.option options from RUBYOPT
6958
slow:The launcher sets the log level using --log.ruby.level=
7059
fails(GR-13956):The launcher prints help containing runtime options
60+
slow:The launcher logs options if --options.log is set
61+
slow:The launcher sets the log level using --log.level=

0 commit comments

Comments
 (0)