-
Notifications
You must be signed in to change notification settings - Fork 202
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
Sample 3D/M implementation without WKT #790
Conversation
@@ -5,5 +5,5 @@ edition = "2021" | |||
publish = false | |||
|
|||
[dependencies] | |||
wkt = { version = "0.10.0", default-features = false } | |||
wkt = { git = "https://github.com/nyurik/wkt.git", branch = "wkt-dim", optional = true } |
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.
Why do you need this?
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.
@lnicola try to compile without it. This PR requires the changes from georust/wkt#85
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 get an error on your branch:
error: failed to select a version for `cc`.
... required by package `cmake v0.1.48`
... which satisfies dependency `cmake = "^0.1.48"` of package `proj-sys v0.22.0 (https://github.com/georust/proj?rev=e39a671d9afd52c13e180516d6dffd9b79a89d2e#e39a671d)`
... which satisfies git dependency `proj-sys` of package `proj v0.25.2 (https://github.com/georust/proj?rev=e39a671d9afd52c13e180516d6dffd9b79a89d2e#e39a671d)`
... which satisfies git dependency `proj` of package `geo v0.19.0 (/home/grayshade/Projects/georust/geo/geo)`
versions that meet the requirements `^1.0.72` are: 1.0.73, 1.0.72
all possible versions conflict with previously selected packages.
previously selected package `cc v1.0.71`
... which satisfies dependency `cc = "^1.0.62"` (locked to 1.0.71) of package `ring v0.16.20`
... which satisfies dependency `ring = "^0.16.20"` (locked to 0.16.20) of package `rustls v0.20.2`
... which satisfies dependency `rustls = "^0.20.1"` (locked to 0.20.2) of package `hyper-rustls v0.23.0`
... which satisfies dependency `hyper-rustls = "^0.23"` (locked to 0.23.0) of package `reqwest v0.11.9`
... which satisfies dependency `reqwest = "^0.11.9"` of package `proj v0.25.2 (https://github.com/georust/proj?rev=e39a671d9afd52c13e180516d6dffd9b79a89d2e#e39a671d)`
... which satisfies git dependency `proj` of package `geo v0.19.0 (/home/grayshade/Projects/georust/geo/geo)`
Never mind, removing my lockfile fixed it. Instead, I get:
Checking geo-test-fixtures v0.1.0 (/home/grayshade/Projects/georust/geo/geo-test-fixtures)
error[E0432]: unresolved import `wkt`
--> geo-test-fixtures/src/lib.rs:4:5
|
4 | use wkt::{Geometry, Wkt, WktFloat};
| ^^^ use of undeclared crate or module `wkt`
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.
Your code doesn't build for whatever reason, but I can revert your wkt
version change, bump some versions (because these changes are actually breaking) and it builds fine for me:
So I'm not convinced there's any valid reason to move wkt
from one repo to another.
cargo test
still fails, but that seems to be due to jts-test-runner
, which I agree is cursed.
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.
@lnicola once again, this is not about being able to run cargo check
locally - it might pass because it is a test compile that fails, not a production one. This is about being unable to get CI to pass. Our CI will not allow your code in, so we cannot use bors
to check it in without some hacking around the issues
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 mean that if I merge wkt
as a module into the geo
repo, it works well because i can override which wkt version is being used from the top Crates.toml
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.
My whole point is that we shouldn't move wkt to this repo.
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.
@lnicola I'm all for keeping them separate if we have a good process in place for introducing the breaking changes into the core repo without CI going bonkers :)
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.
@nyurik Agree that a good robust CI is what we all aim for. To evaluate our options, could you please create a simpler PR; it's difficult to pin-point the issues / have a streamlined discussion when many different files are modified even if they're conceptually simple.
Here's a suggestion. Create a PR that only:
- declares
CoordTZM<T, Z, M>
, and makes the existingCoordinate<T>
a type-alias - fix any issues with using
Coordinate<T>
as a constructor / function (as it is now a type-alias) - make no changes to the other geometry types / algorithms
- make no changes to any Cargo.toml / other top-level config files
- do not bring in any other repo. in
In essence, I'm requesting the simplest step towards introducing ZM. This already helps us to discuss:
- is CI going to break / why?
- what sort of vector calc. to impose on M (Add/Sub/Neg), and what are the implications?
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.
@rmanoka makes perfect sense, thx. I might have to take some time off to do this (getting ready for the SOTM-US conference next week), but should be able to do it soon. In the mean time, let me know if i can help with merging the other non-breaking PRs -- they should also help with making the change simpler. Thanks for all your support!!!
e5ff5e2
to
6b3aba5
Compare
I just tested to see if merging #791 into this PR would solve geo/jts-test-runner/src/input.rs Lines 41 to 42 in 6b3aba5
|
Should we move |
@rmanoka I am beginning to suspect that yes - either we will have to combine That said - I am still planning to create a simple change that demonstrates the issue as you suggested above. |
Is this still a problem after #791? I thought I showed why wkt is not problematic. |
@lnicola yes, still a problem. This PR now includes #791 content, and it will still fail to build because jts uses wkt to parse geo types, and compare the parsed results with the results generated by the local geo algorithms. Local algorithms use different geo-types, thus cannot be compared. See geo/jts-test-runner/src/input.rs Lines 41 to 42 in 6b3aba5
|
The problem here is using |
@lnicola I was thinking of something along those lines - basically take the geo-types as they come from wkt, and have a giant match statement to convert every geo-type to its local geo-type equivalent. This is extremely hacky IMO, as it relies on the fact that the list of geotypes never changes, and it is always possible to convert one type version to another, but I guess it will work for some of the breaking changes. Do we really want to go this route? |
It's not really hacky. See the |
@lnicola I implemented your proposal in https://github.com/georust/geo/pull/742/files#diff-d540e35931c0109d7b7d24d53436d1f2e5d883fc264fcfa22d517b8a43ec7cbb -- closing this PR in favor of #742. Note that there is still a problem in there that i am not certain we can resolve as easily. See #742 (comment) |
This is a test PR to demonstrate circular dependency of GEO and WKT repos