-
-
Notifications
You must be signed in to change notification settings - Fork 234
enabling runtime argument checking for free (part 2) #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
now available, this when provided is used by the functions function_bind_variables, function_run, argument_error allowing the checking of arguments that otherwise cannot happen
ALWAYS, LEAVES, NOCARE, NOTIME, NOTFILE, NOUPDATE, TEMPORARY, ISFILE, FAIL_EXPECTED, RMOLD
now available, notice that documented signature of MATCH differs form the actual one, the function allows for 0 regexps (first arg), beacuse that is the way the function has always worked and to not break compatibility.
Would be great to include such a documentation change in this PR. :-) Also would be great to update the history.adoc to note the change. |
|
I see the changes caught some "problems" in |
The MATCH never, or no longer, takes the match indices to return.
So I'd say it's not time to close this PR yet, to be absolutely clear point 4 is the only one that will be performed. |
fixed typo in jamfile.jam, updated MATCH and BACKTRACE in §12.2.4 Built-in Ryles, fixed formatting in §12.2.2 Targets, fixed syntax in §6.2 Builtin rules
|
I fixed some things in the documentation, but I didn't add the Should we change the name before publishing it? I didn't even add and even if unlike the Maybe that's why it wasn't published. Should we reverse the params before publishing it? Finally:
or I could update |
fixed formatting in §12.2.3 Rules fixed formatting in §12.2.4 Built-in Rules fixed escaping of __XYZ__ in §6.5.1 modules fixed escaping of __XYZ__ in §6.5.2 class fixed escaping of __XYZ__ in §6.6.1 Class abstract-target fixed escaping of __XYZ__ in §6.6.4 Class basic-target fixed escaping of __XYZ__ in §6.6.5 Class typed-target
NOTIME can be quickly restored, removed hdrmacro.cpp from compiled sources.
|
Ok René, I think there are more pressing things right now than thinking about |
grafikrobot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paolopas you mentioned ignoring the errors withe older Boost version for the MATCH.. Unfortunately it's not an impossible use case to build the old Boost version with the current B2. It can happen in the Conan packages if one builds from source. As that package is written to use the B2 recipe for all versions. My suggestion would be to change the signature to: rule MATCH ( regexps * : list * : unused * ). And then in the implementation print a warning if the unused argument is used instead of a hard error.
I can work on doing that change if you don't feel like spending more time on this. :-)
| } | ||
|
|
||
| /* Special treatment for #include MACRO. */ | ||
| /* NOTE: Faulty feature HDRMACRO, discontinued. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove the dead code entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I agree, I'll proceed with the changes you proposed so we can close this PR, then we'll decide what to do with GLOB-RECURSIVELY and REBUILDS.
now available; notice that documented signature of MATCH differs form the actual one for two reasons: 1. the rule allows for 0 regexps (first param), beacuse that is the way the rule has always worked and to not break compatibility; 2. a new "unused *" param was added at the end to emit a warning and skip extra arguments, this also to not break compatibility (see bfgroup#487)
|
Replaced by #492 |
Note
Note this PR ends the work of #486, the code is branched from there, so this one accumulate all the changes.
ECHOandMATCHbuiltins; for the latter I do not use the documented signature (regexps + : list *) but the safer (regexps * : list *). This is the way the code has always worked and to no risk to break compatibility with expression likeMATCH "$(foo)" : ...in case foo var is empty or undefined. Cannot find original documentation ("Perforce Software") about MATCH signature. The documentation has other problems as well.GLOB-RECURSIVELYbuiltin rule; this might be handy to have on hand.of
HDRMACROwhich is the only one left we would do well to forget about, since it will never work reliably even if we removeOPT_HEADER_CACHE_EXTfromconfig.h.The documentation (
bjam.adoc) forBACKTRACEandMATCHstill needs to be updated, whileGLOB-RECURSIVELY,REBUILDSandNOTIMEare not even mentioned.