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

fix(event)!: use typed-path for filesystem paths #26

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gnosek
Copy link
Collaborator

@gnosek gnosek commented Dec 5, 2024

This should make them work consistently on Windows, where e.g. PT_FSPATH still describes a Unix-style path.

Also, this lets the SDK build on Windows in the first place.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area ci

/area event

/area event_derive

/area plugin

/area plugin_api

/area plugin_derive

/area plugin_tests

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@gnosek
Copy link
Collaborator Author

gnosek commented Dec 5, 2024

/hold (there might be some more low-hanging Windows fruit)

@gnosek
Copy link
Collaborator Author

gnosek commented Dec 26, 2024

This PR now makes the tests actually pass on Windows (some win11 VM I had lying around)

@gnosek gnosek added this to the 0.5 milestone Dec 27, 2024
Andreagit97
Andreagit97 previously approved these changes Dec 30, 2024
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link

poiana commented Dec 30, 2024

LGTM label has been added.

Git tree hash: cb8bfec29e30f7af3ca050e845451ae258112552

This should make them work consistently on Windows,
where e.g. PT_FSPATH still describes a Unix-style path.

Signed-off-by: Grzegorz Nosek <[email protected]>
They're there because of some system header and they're not used at all
in the API. Still, `long` inside imaxdiv_t has a different size
on Windows (MSVC) vs Linux and causes a generated test to (harmlessly)
fail.

Signed-off-by: Grzegorz Nosek <[email protected]>
There's only one occurrence, that's never actually shared
across the API boundary (and never really used by the Rust bindings),
so any type would work fine.

Still, `long` has a different size on Windows, so this (harmlessly)
breaks two tests.

Signed-off-by: Grzegorz Nosek <[email protected]>
When testing the string representation of SystemTime values,
rather than setting the time zone to UTC (which doesn't work
on Windows), generate the right string representations in whatever
the local time zone is and compare the values from the plugin
against those.

Signed-off-by: Grzegorz Nosek <[email protected]>
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana poiana added the lgtm label Jan 13, 2025
@poiana
Copy link

poiana commented Jan 13, 2025

LGTM label has been added.

Git tree hash: f94fb07ea243597be99fb990924c3e1f07bbf0fc

@Andreagit97
Copy link
Member

/lgtm

@poiana
Copy link

poiana commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, gnosek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@poiana
Copy link

poiana commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, gnosek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Successfully merging this pull request may close these issues.

3 participants