ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar
@ 2022-12-01 22:03 masterleep2 (Bill Lipa)
  2022-12-12 11:38 ` [ruby-core:111260] " zzak (Zak Scott)
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: masterleep2 (Bill Lipa) @ 2022-12-01 22:03 UTC (permalink / raw)
  To: ruby-core

Issue #19168 has been reported by masterleep2 (Bill Lipa).

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168

* Author: masterleep2 (Bill Lipa)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:111260] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
@ 2022-12-12 11:38 ` zzak (Zak Scott)
  2022-12-12 12:31 ` [ruby-core:111261] " nobu (Nobuyoshi Nakada)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zzak (Zak Scott) @ 2022-12-12 11:38 UTC (permalink / raw)
  To: ruby-core

Issue #19168 has been updated by zzak (Zak Scott).


Judging by the [diff](https://github.com/ruby/ruby/pull/6908) to produce this change, we would be breaking bundler -- which probably won't work 🤔

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-100571

* Author: masterleep2 (Bill Lipa)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:111261] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
  2022-12-12 11:38 ` [ruby-core:111260] " zzak (Zak Scott)
@ 2022-12-12 12:31 ` nobu (Nobuyoshi Nakada)
  2023-02-13  0:05 ` [ruby-core:112386] " rubyFeedback (robert heiler) via ruby-core
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-12-12 12:31 UTC (permalink / raw)
  To: ruby-core

Issue #19168 has been updated by nobu (Nobuyoshi Nakada).


In general, libraries should use `LoadError#path` instead of parsing the messages.
In addition, `.`s in a regexp don’t seem intentional.

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-100572

* Author: masterleep2 (Bill Lipa)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:112386] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
  2022-12-12 11:38 ` [ruby-core:111260] " zzak (Zak Scott)
  2022-12-12 12:31 ` [ruby-core:111261] " nobu (Nobuyoshi Nakada)
@ 2023-02-13  0:05 ` rubyFeedback (robert heiler) via ruby-core
  2023-05-10  0:32 ` [ruby-core:113440] " jeremyevans0 (Jeremy Evans) via ruby-core
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rubyFeedback (robert heiler) via ruby-core @ 2023-02-13  0:05 UTC (permalink / raw)
  To: ruby-core; +Cc: rubyFeedback (robert heiler)

Issue #19168 has been updated by rubyFeedback (robert heiler).


Hmm. This reminds me a bit of File.exists? versus File.exist?.
Not that it is the same, mind you, but which variant is 
"correct" depends on the point of view. For literal english
it would be "if file exists, do that". But from an object-centric
point of view, aka "object xyz, do you exist?" the second 
variant is the more technically correct one. Just mentioning
this, even if it is not applicable in the case here.

Personally I don't mind either way really. I am so used to it
that I did not even notice it. I am more concerned with load
speed of .rb files content than any grammar-centric
consideration. ;)

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-101828

* Author: masterleep2 (Bill Lipa)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:113440] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
                   ` (2 preceding siblings ...)
  2023-02-13  0:05 ` [ruby-core:112386] " rubyFeedback (robert heiler) via ruby-core
@ 2023-05-10  0:32 ` jeremyevans0 (Jeremy Evans) via ruby-core
  2023-05-10  0:35 ` [ruby-core:113441] " headius (Charles Nutter) via ruby-core
  2023-05-12  4:18 ` [ruby-core:113457] " masterleep2 (Bill Lipa) via ruby-core
  5 siblings, 0 replies; 7+ messages in thread
From: jeremyevans0 (Jeremy Evans) via ruby-core @ 2023-05-10  0:32 UTC (permalink / raw)
  To: ruby-core; +Cc: jeremyevans0 (Jeremy Evans)

Issue #19168 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

@headius, @alanwu, @ioquatix, and I agree this is not a bug.

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-103016

* Author: masterleep2 (Bill Lipa)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:113441] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
                   ` (3 preceding siblings ...)
  2023-05-10  0:32 ` [ruby-core:113440] " jeremyevans0 (Jeremy Evans) via ruby-core
@ 2023-05-10  0:35 ` headius (Charles Nutter) via ruby-core
  2023-05-12  4:18 ` [ruby-core:113457] " masterleep2 (Bill Lipa) via ruby-core
  5 siblings, 0 replies; 7+ messages in thread
From: headius (Charles Nutter) via ruby-core @ 2023-05-10  0:35 UTC (permalink / raw)
  To: ruby-core; +Cc: headius (Charles Nutter)

Issue #19168 has been updated by headius (Charles Nutter).


Note that this verbiage is similar to the standard ENOENT message: "No such file or directory". I suspect this message was just modified for load/require purposes.

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-103017

* Author: masterleep2 (Bill Lipa)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:113457] [Ruby master Bug#19168] "such file" is bad grammar
  2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
                   ` (4 preceding siblings ...)
  2023-05-10  0:35 ` [ruby-core:113441] " headius (Charles Nutter) via ruby-core
@ 2023-05-12  4:18 ` masterleep2 (Bill Lipa) via ruby-core
  5 siblings, 0 replies; 7+ messages in thread
From: masterleep2 (Bill Lipa) via ruby-core @ 2023-05-12  4:18 UTC (permalink / raw)
  To: ruby-core; +Cc: masterleep2 (Bill Lipa)

Issue #19168 has been updated by masterleep2 (Bill Lipa).


"No such file" is proper English, while "cannot load such file" is not.  It seems like this message was written by a non native speaker.  It's also one of the most common Ruby error messages that a new (or experienced) Ruby user will see.

Obviously, it is a cosmetic issue only, but I do think it would be better to have a correct grammatical message for this frequent case.

----------------------------------------
Bug #19168: "such file" is bad grammar
https://bugs.ruby-lang.org/issues/19168#change-103035

* Author: masterleep2 (Bill Lipa)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The error message for a missing required file has bad grammar:

$ irb   
irb(main):001:0> require 'wuxx'
<internal:/opt/local/lib/ruby3.1/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- wuxx (LoadError)

The "such" should be removed. "cannot load file" reads more normally in English.




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-12  4:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 22:03 [ruby-core:111136] [Ruby master Bug#19168] "such file" is bad grammar masterleep2 (Bill Lipa)
2022-12-12 11:38 ` [ruby-core:111260] " zzak (Zak Scott)
2022-12-12 12:31 ` [ruby-core:111261] " nobu (Nobuyoshi Nakada)
2023-02-13  0:05 ` [ruby-core:112386] " rubyFeedback (robert heiler) via ruby-core
2023-05-10  0:32 ` [ruby-core:113440] " jeremyevans0 (Jeremy Evans) via ruby-core
2023-05-10  0:35 ` [ruby-core:113441] " headius (Charles Nutter) via ruby-core
2023-05-12  4:18 ` [ruby-core:113457] " masterleep2 (Bill Lipa) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).