Skip to content
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

API interop - how to control version consistency #359

Closed
dcousens opened this issue Feb 13, 2015 · 3 comments
Closed

API interop - how to control version consistency #359

dcousens opened this issue Feb 13, 2015 · 3 comments
Assignees
Milestone

Comments

@dcousens
Copy link
Contributor

As discussed in #315.

How do we control users using bigi@latest in conjunction with our API instead of what we use internally?
The best we can do is either simplify our API such that common JS types are used for data interchange or we ask the users to verify their dependencies against what we use internally.

The concern was previously ignored because our instructions for compilation were to just use the dependencies found in bitcoinjs-lib itself; however this is an incomplete instruction for users who are using browserify for their entire project.

As far as I can tell, the only way for us to enforce consistency in the interop between our APIs and prospective users who might use things like ecurve etc in their own applications is to let them cross verify their own dependencies, or simply provide typical interfaces with only common data types.

@dcousens dcousens self-assigned this Feb 13, 2015
@dcousens dcousens added this to the 2.0.0 milestone Feb 13, 2015
@weilu
Copy link
Contributor

weilu commented Feb 16, 2015

Note that the version inconsistency issue only exists for users using browserify bundled script directly (i.e. expose bitcoin under window then access it from their own unbrowserified scripts) instead of using browserify proper (i.e. require('bitcoinjs-lib') in one's code and browserify the entire app). It boils down to the issue that the former type of usage does not use a dependency manager.

@dcousens
Copy link
Contributor Author

@weilu not always, you can have a user use a different major and expect interop and node will allow for both libraries.

@weilu
Copy link
Contributor

weilu commented May 3, 2015

That's a good reason to limit the public interface arguments to primitive/native types instead of allowing objects defined by other modules to be passed around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants