Re: [fossil-users] Build should be continued for unknown options
> On 15 Oct 2016, at 6:59 AM, Osamu Aokiwrote: > > Hi, > > Here is a trivial patch to build the source tree even with unknown options > for autosetup/autosetup but make sure to warn user. > > The idea is from Barak A. Pearlmutter. > > Regards, > > Osamu autosetup already supports --disable-option-checking (like autoconf) Why wouldn't that be good enough? Cheers, Steve ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Build should be continued for unknown options
On 15 October 2016 at 05:26, Steven Gawroriskiwrote: > On Sat, 15 Oct 2016 05:59:23 +0900 > Osamu Aoki wrote: > > > Hi, > > > > Here is a trivial patch to build the source tree even with unknown > > options for autosetup/autosetup but make sure to warn user. > > > > The idea is from Barak A. Pearlmutter. > > > > Regards, > > > > Osamu > > > > PS: re-send from subscribed addess > > Hello, > > Not a developer of Fossil, but this could have potential compatibility > issues in the future with unknown options being passed. Say someone > builds with `--with-butter=salted`. Then later on Fossil adds a switch > that has the same name `--with-butter=`, but it takes a different kind > of argument that is completely incompatible. If the behavior is relied > upon it cannot really be taken back once it is out in the open. > > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > This won't be a problem - Fossil is a fat-free scm. :-p I guess I better leave a serious response here too... I don't know how other projects handle non-standard build features (apart from rejecting them outright), but a possible solution is for Fossil to agree to never use the --with-my- namespace, or something similar if they don't like -my-. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Build should be continued for unknown options
Hi, Here is a trivial patch to build the source tree even with unknown options for autosetup/autosetup but make sure to warn user. The idea is from Barak A. Pearlmutter. Regards, Osamu PS: re-send from subscribed addess From: "Barak A. Pearlmutter"Date: Sun, 9 Oct 2016 08:05:52 +0900 Subject: Build to be continued for unknown options This patch is based on the patch by Barak A. Pearlmutter used to build Debian package. Osamu Aoki used his idea to update autosetup/autosetup by copy-and-paste existing code in the file with trivial changes. This patch does not contain diff for auto-generated files. This patch can be applied by the upstream to the trunk. --- autosetup/autosetup | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/autosetup/autosetup b/autosetup/autosetup index df3317c..d2888cc 100755 --- a/autosetup/autosetup +++ b/autosetup/autosetup @@ -422,7 +422,7 @@ proc options {optlist} { if {[opt-bool option-checking]} { foreach o [array names ::useropts] { if {$o ni $::autosetup(options)} { -user-error "Unknown option --$o" +user-warning "Unknown option --$o" } } } @@ -759,6 +759,18 @@ proc user-error {msg} { exit 1 } +# @user-warning msg +# +# Indicate incorrect usage to the user, including if required components +# or features are not found. +# autosetup doesn't exit. +# +proc user-warning {msg} { + show-notices + puts stderr "Error: $msg" + puts stderr "Try: '[file tail $::autosetup(exe)] --help' for options" +} + # @user-notice msg # # Output the given message to stderr. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users