-
Notifications
You must be signed in to change notification settings - Fork 4
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
Using the future package to aid in determining symbols and packages to export #2
Comments
@HenrikBengtsson do you think there's still a need for different "master" and "richcala/foreachFutureTake3" branches? Just trying to rationalise the structure. |
Yes, I think for a bit longer. The long story... My suggestions:
I've used above branching model and tools for several years now and I can't imagine doing something else. It really cleared things up for me when I found it. |
Also, lately I've made |
Yeah, it's just a bit complicated here because master isn't really a master; it's another staging branch that contains some of the work done to interop with future. The rest of the work is in richcala/foreachFutureTake3. I think the reason for this structure is because master corresponds to the version of foreach loaded on the Azure DSVM image, but that's actually pretty old now. |
I've now done something like what you suggested and made the new "staging" branch the default. |
Another thing you could do is |
I've renamed master to mro/1.5.2 to reflect what it actually is. I'm not too worried about tracking releases, since they're always available from CRAN itself. |
You want to have a Not critical, but tagging CRAN releases help devs/users when troubleshooting among other things, e.g. makes it easy to Tags can be kept for ever. Most branches tend to come and go. |
Background
Original implementation
In April 2018, in an unreleased version 1.4.6 of foreach, Rich Calaway introduced a new feature that used Henrik Bengtsson's future package (if available) to determine the appropriate symbols and packages to export to the foreach workers. In the initial implementation, future was used if it was installed and its namespace could be loaded via
requireNamespace
. Henrik responded with the following comments:First revised implementation
Rich revised the implementation in foreach 1.5.0/1.5.1, adding a check for a global option foreachGlobals to see if the user preferred the original foreach functionality (which found some global symbols but did not search for additional package exports), and expanding the symbol search to include the union of those found by future's
getGlobalsAndPackages
function and those found by foreach's original method.This revision addressed issue #3 and part of #1, but did not address the size of globals problem.
Henrik responded with the following additional comments (and Rich responded with >RBC inline comments):
Henrik responded to Rich's responses with the following additional comments:
The second of these final comments is addressed with this issue; foreach has indeed been brought to GitHub and this issue is the first to be set into the issue tracker.
Current Development
Rich has handed off maintenance of foreach to Hong Ooi, but is leaving one final pass at the future integration as a branch richcala/foreachFutureTake3. This addresses most of the remaining issues--including the surprise factor. In this implementation, if the user is not using Microsoft R Open, the future option is added only if one of the foreachGlobals options "future+foreach", "foreach+future", or "future" is explicitly set. All of those act the same, however--the union of future and foreach previously implemented.
The text was updated successfully, but these errors were encountered: