oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.85k stars 159 forks source link

ship OILS-ERR or -HINT list in (separate?) tarball, and let oils binary use it if available #2095

Open bar-g opened 1 month ago

bar-g commented 1 month ago

Hi, there, I'm kind of sorry to notice that in the sporadic way I was using osh/oils, my experience of nice and well helping error messages seems to have degraded... For months I haven't installed oils on any machine for improved error messages, mostly installing shellcheck, avoiding to get presented some OILS-ERR-??? quest.

If the error list could be in the tarball [edit: or a separate *-help tarball}, or the tarball compiles a [edit: or could optionally download a separate} lookup file, distro packagers could still create separate oils-for-unix-core or oils-for-unix-doc packages from it (depending on the distro's conventions).

The oils binary could just always look for the file and print out the OILS-ERR text (instead of just a number), if the file is installed?

andychu commented 1 month ago

In the latest release, you can do help OILS-ERR-100 and it prints a URL

I don't think we can include the text, just for reasons of size -- similarly we don't include all help topics, just the URLs

bar-g commented 1 month ago

Hm, how large is the error text file?

Hm, I guess distro packagers would usually similarly put the help topics into a -doc or -full package, or would not include them in their *-core package (depending on how distros organize their packages).

But ok, if you want to keep the current default tarball download small, then maybe just let the build scripts look for the local presence of the error and help topics? (Allow users to optionally download a separate *-help tarball?)