Feature/enhance node java async options 90115432#198
Conversation
…ants. Generalizes asyncOptions to allow changing the suffix used for sync and async style methods, and also allow any of them to be omitted.
We need a convenient way to invoke nodeunit multiple times in independent processes. This testRunner runs the standard tests in the `test` and `test8` directory in on process, and then runs each of the files in testAsyncOptions, each in their own process. Perhaps I could have done this with a script, but it's unclear to me whether a shell style script would work on Windows. I expect this should be portable across all platforms.
|
The second build error is with node 0.8. @joeferner, do you think that 0.8 support is still necessary? Perhaps 0.10 and 0.12 is sufficient? I'm going to add a commit to this PR to change .travis.yml, and a separate PR with only that change, which could be merged first. |
…-options_90115432 Feature/enhance node java async options 90115432
|
Nice, I really like these options. |
|
Thanks! Please tag and publish 0.4.7. |
|
@joeferner I just noticed that the package.json |
|
Since we are dropping node 0.8.0 I'm wondering if the release should be 0.5.0. Will any of the changes you have planned change the API? |
|
Good point. Nothing I have done so far breaks backwards compatibility. Is there a chance that our planned varargs change will break compatibility? I haven't started working with your branch yet, so I don't know. With the change, we will no longer be forced to create an array to pass in the varargs position, but code that does that now won't have to change, right? If we do skip 0.4.7, we need to update one spot in the README.md where I reference 0.4.7. By the way, README.md has a short section titled Release Notes, but the only release with any notes is 0.2.0. It seems to me that either we should remove that section, or we should try to retroactively update it with some of the highlights since 0.2.0. What do you think? |
This PR extends the asyncOptions/Promises feature I added previously in PR #187 and PR #189.
It is now possible to specify the suffix that should be used for the Sync and Async variants, or to disable the generation of either of them. See the tests in the testAsyncOptions directory for examples.
Note that while in the previous PRs for promises I arranged to promisify three of the exported functions of the java module (
newInstance,callMethod,callStaticMethod), this feature as currently implemented does not allow changing the names of the sync and async variants of those functions, due to complications with order of initialization. I'm currently just documenting this inconsistency.Note also that this branch changes the
npm testcommand to use a test runner. I'm open to suggestions for a better approach.to: @joeferner
cc: @mhfrantz @jsdevel