-
Notifications
You must be signed in to change notification settings - Fork 1
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
prepare v0.3.0: change API to Iterator, implement core::error::Error
& add some Copy
, Clone
, Hash
where applicable
#38
prepare v0.3.0: change API to Iterator, implement core::error::Error
& add some Copy
, Clone
, Hash
where applicable
#38
Conversation
by adding a single `build-results` job which depends on all other jobs we can simplify the setting of required builds in the repository. currently, all builds - including all variations of the build matrix! - need to be manually specified. once this has been merged the settings can be changed to require only this one job (which will fail if any of the other jobs failed). this way it's also easier to add/remove jobs or change the build matrix as it no longer requires changing the settings on the repository. this is inspired by [this discussion on GH][discussion]. [discussion]: https://github.com/orgs/community/discussions/26822
this API has been stabilised with Rust 1.81.0. accordingly the MSRV has been raised.
this resolves the [C-FEATURE] finding from the API guidelines which states: > Do not include words in the name of a Cargo feature that convey zero > meaning, as in `use-abc` or `with-abc`. Name the feature `abc` > directly. note that this is a breaking change for existing consumers which must rename their usage of the feature. [C-FEATURE]: https://rust-lang.github.io/api-guidelines/naming.html#c-feature
note that `Hash` cannot be added to types which use floats underneath. for the same reason `Eq` cannot be added (but `PartialEq` is present). this resolves [C-COMMON-TRAITS] of the API guidelines. [C-COMMON-TRAITS]: https://rust-lang.github.io/api-guidelines/interoperability.html#c-common-traits
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
as an alternative to doing a v0.3.0 now and v1.0.0 at an unknown future date i could also add a statement to the README labelling optional 0.x dependencies (all 0.x dependencies are optional) as being out-of-scope of regular semver guarantees and that any breaking change there can happen in a major release here until they reach 1.0. WDYT? |
I don't understand why you won't merge this PR, do the release, and create a new PR for the release commit? |
either works fine, there's no difference. i can go with the new PR, that's fine 👍
so i went ahead and prototyped this: i think that's a much more idiomatic rust API. i'm not sure why i hadn't had this idea before! |
core::error::Error
, rename use_..
features & add some Copy
, Clone
, Hash
where applicablecore::error::Error
& add some Copy
, Clone
, Hash
where applicable
cd06859
to
ca26f48
Compare
i've now completely changed the API to use an Iterator, thus removing the need to return a so the main question remaining now will be: should this be v0.3.0 or v1.0.0 (with later major releases when the optional dependencies |
this completely revamps the API. the `parse` function is gone, instead you now construct a new `Parser` using `Parser::new` and then use the iterator API on it which will yield a `next` until the whole input has been parsed. due to this there's now no longer a need to return a list of values from the API as instead we return the individual events (or errors) step by step. thus the dependency on `alloc` and `heapless` has been removed. to get the same result as before (everything collected into a vector) the `collect` API of `Iterator` can be used by consumers.
ca26f48
to
6240970
Compare
see the individual commit messages for further details.
this is one step towards an eventual v1.0 release, the only missing thing after this will be stable dependencies (see #25)
NOTE: