-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
consider a versioning strategy for package:web #145
Comments
I have a leaning towards (4) and (6). I'd like to use a good test suite to validate our assumptions, but I'd also like to properly communicate the policy in a way that can be understood by the community without having to scan through a corpus of tests. Also, I expect for (6) we'd also use internal apps that are not visible to the community. Regarding (4):
|
I too like 4. I don't see us getting to 6 for a while if we're waiting for customer tests, as the usage of this package is probably minimal right now. I think part of doing 4 is examining what APIs have changed in the past with a new IDL version and why. I imagine the changed APIs are mostly unstable/experimental. If that's the case, we should either use an import like Siggi suggests or an annotation to signal that those libraries are subject to change without a major version change. I imagine we'll need to have our own versioning policy, we just need to make it obvious to users. |
I think excluding at least non-standard and non-finalized APIs from the full breaking change policy makes sense (with an annotation and/or documentation explaining the status).
Yeah I'm curious what other IDL changes besides non-standard and non-finalized APIs end up breaking on the Dart side. Perhaps there's a way to avoid or circumvent some of them too? I think a lot of it comes down to what the recommendation for package authors is. If there are a lot of major releases, I can definitely see it ending up as a world where package developers don't use |
OK, for some data, the commits in this PR move this package from webref/idl versions 3.37.0 (published 6 months ago) up through 3.42.0 by minor versions: Clicking on each commit will show the diffs from the previous minor IDL version. |
I think we could limit the content of I think |
@natebosch We could create a mono repo and have I really hate the idea of hand curating every API...I'm not sure we've found the ideal metadata to pin "stable" on. |
|
Short-term: I think Nate is right and we should cut out all the APIs that are not standard/marked experimental or don't have all browsers supporting it. The usage of such APIs is almost certainly low, and the priority should be to get this package to a stable enough version such that we can publish a v1. I think this is more tractable than changing our semantic versioning policy and making it obvious to users. Long-term: We can split the non-standard APIs and tooling into a separate unpublished package like Kevin proposes. I do want to see if we can use the Web IDL data to make that determination of what to cut still, but if that seems like a dead-end, MDN compatibility data will get use close. I'll respond back if I can find more info there. |
I think our first choice should be to not publish Maintenance of The other costly-to-maintain (so now we don't) libraries like |
Instead of That would help enable a more consistent developer experience and provide a solution for those looking to use experimental or niche APIs. While also providing the flexibility to update it as often as they need. |
Publishing a code generator could be valuable, but I don't think we should make it a primary goal. In some cases authors would be better off hand-writing the interop anyway when an API feels non-idiomatic in Dart. I think effort spent in documenting and making full JS interop easy to use will have more pay-off than trying to build tooling to keep more users from having to learn JS interop. Potentially slightly off topic: Do we have a comparison against |
+1 to getting users to write the new interop as needed instead of trying to use our generator somehow. It is likely very rare that a user wants enough experimental APIs that are missing that it's easier for them to hack our generator than to write the definitions themselves.
Informally, yes. Devon has been working to get dart fixes to map |
This has info about the class name differences: https://github.com/dart-lang/web/blob/main/tool/renames.md. It would be great to know the 1/2 dozen - 2 dozen most common method name differences, so we can add those refactors to the dart fix data file. |
I don't think this is any different than what's said above, but I like the idea of having a small, core |
I think it's a bit of a pain to use https://www.npmjs.com/package/web-specs. We have code to parse it currently in package:web, but I'm not sure if we can reliably map every member to the spec/draft that can be looked up in We can do better with the MDN compatibility data, where the mapping is much easier and has info on experimental, whether it's on track to be a standard, and deprecated. This can be a bit weird too when we look at object literals/options objects, as the compatibility info only exists for the experimental options and have a slightly different naming scheme e.g. If we land a PR to parse the compatibility data, I think we can start using it to eliminate experimental and possibly deprecated APIs. If Baseline becomes more useful in the future, we could consider migrating to use that instead. |
* reduce the number of DOM APIs we generate code for * regenerate the dom libraries * review comments * update comments
package:web
sits in an interesting design space:@webref/idl
3.39.1
) will remove APIs, add APIs, or change signatures in ways that we would consider breakingIf we just rev. to new IDLs monthly, and follow semver strictly, we'd likely be publishing a new major version of the package every month. That frequency of major version updates could cause issues for the ecosystem - if this package is in a diamond constraint for a solve, and two different package versions are being referred to.
Some ideas for how to treat this:
cc @sigmundch @kevmoo @srujzs for thoughts
The text was updated successfully, but these errors were encountered: