-
Notifications
You must be signed in to change notification settings - Fork 25
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
Migrate to 2021 edition and add examples #71
Conversation
We could go right to 2021, I think? |
Oh, I was just being conservative because nothing else in georust is 2021 yet |
Might be a good place to start, since |
67f40e4
to
550ec59
Compare
Well I guess we know it doesn't work. |
We need something like: - name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, rust-src |
nm I did it. |
Two last things I'd like to nail down:
|
.github/workflows/test.yml
Outdated
- run: cargo install cargo-all-features | ||
- run: cargo build-all-features | ||
- run: cargo test-all-features | ||
- run: cargo test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it too slow to run all the feature combinations?
I think we should do at least cargo test --all-features
and cargo test --no-default-features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, although no-default-features
will cause our examples to fail…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a way to declare required features for examples. Testing with --no-default-features
still seems desirable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, trying to find the details now instead of putting cfg
s everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://stackoverflow.com/a/61417700 doesn't look great, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nooo
src/lib.rs
Outdated
//! use std::convert::TryInto; | ||
//! use wkt::Wkt; | ||
//! use geo_types::Point; | ||
//! // point's items field contains a wkt::Geometry enum member |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... items is weird. I guess the idea is that you can express multiple geometries without explicitly putting them into a GeometryCollection?
I tried to track down the corresponding section in the spec, but chickened out after a few minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to not even mention items in the introductory example, and only show it in the case where there are multiple items? Otherwise is there any reason to even know about items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess without the geo-types feature, items
is the only way to get the geometry =(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to know whether anyone actually uses the multiple geometry functionality in the wild…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding some WKT docs! I agree it's unnecessarily difficult to get started with the crate without them.
None of my feedback should be considered blocking.
@urschrei should this be merged? There are two approvals, but no merge, so high chance of bitrot |
Oh, yeah. I think I was just leaving it for a few days. |
bors r+ |
Build succeeded: |
CHANGES.md
if knowledge of this change could be valuable to users.