Fix forwarding of missing arguments#835
Open
LeonidasZhak wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow truly missing function arguments to be forwarded inside future expressions.
Thanks to maintainers
Thanks for maintaining future and for considering this fix.
Issue or motivation
Closes #756. A function can normally pass an omitted argument to another function, but the same call failed while creating a future.
Root cause
Automatic global discovery identified the missing argument as a global and then tried to retrieve its value. A truly missing promise has no value to retrieve, so collection stopped before the future was launched.
Change
If automatic collection fails, inspect referenced bindings without forcing them. Truly missing arguments are represented as missing formals around the future expression before collection is retried. Arguments with defaults keep their existing value-forwarding behavior. The patch also adds backend coverage and a NEWS entry.
Tests
R CMD build .R CMD check --as-cran future_1.70.0-9014.tar.gz(85 test scripts passed; two NOTEs for the development version and the local HTML Tidy version)Scope
This does not change scheduling, explicit
globalsinputs, or global discovery in the globals package. The fallback runs only after automatic global collection errors and only wraps bindings that are truly missing without defaults.