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

[DO NOT MERGE] bump(main/fish): 4.0b1 #22609

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TomJo2000
Copy link
Member

This PR is intended for build testing.

DO NOT MERGE.

Fish 4.0 transitions the project to Rust.
Meaning we gotta write new patches.

CC: @AminurAlam

@Biswa96
Copy link
Member

Biswa96 commented Dec 18, 2024

This probably needs some work for Android. For example, the first error was fixed in libc 0.2.165 version https://github.com/rust-lang/libc/releases/tag/0.2.165

@TomJo2000
Copy link
Member Author

We're probably not going to wanna package the beta release anyway, this is just intended for testing.

@thunder-coding thunder-coding self-assigned this Dec 19, 2024
@thunder-coding
Copy link
Member

Assigning myself as I use the fish shell, so will try to test this out

@TomJo2000
Copy link
Member Author

Push access for maintainers is enabled on this PR.
So feel free to push to this branch as necessary, or open up a new branch/PR.

@thunder-coding thunder-coding added the rust Any problem related to the Rust ecosystem (including cargo) label Dec 20, 2024
@thunder-coding
Copy link
Member

Rust's libc has no support for posix_spawn primitives. I'll create an issue upstream and try to create a PR as well with the fix.

The integer conversion errors also seem to be Rust libc bugs:

error[E0308]: mismatched types

   --> src/wutil/dir_iter.rs:115:50
    |
115 |             self.typ.set(stat_mode_to_entry_type(s.st_mode));
    |                          ----------------------- ^^^^^^^^^ expected `u16`, found `u32`
    |                          |
    |                          arguments to this function are incorrect

ino_t is defined as c_ulong whereas d_eno is of type u64. The correct behaviour is that ino_t should also be defined as ino_t like how it is done for Linux.
https://github.com/rust-lang/libc/blob/1867bf30eb9d22d3f8e86c2a8c25cf92fe5580da/src/unix/linux_like/android/mod.rs#L24
https://github.com/rust-lang/libc/blob/1867bf30eb9d22d3f8e86c2a8c25cf92fe5580da/src/unix/linux_like/android/mod.rs#L531

error[E0308]: mismatched types
   --> src/wutil/dir_iter.rs:115:50
    |
115 |             self.typ.set(stat_mode_to_entry_type(s.st_mode));
    |                          ----------------------- ^^^^^^^^^ expected `u16`, found `u32`
    |                          |
    |                          arguments to this function are incorrect

mod_t definition
https://github.com/rust-lang/libc/blob/1867bf30eb9d22d3f8e86c2a8c25cf92fe5580da/src/unix/linux_like/android/b32/mod.rs#L8
https://github.com/rust-lang/libc/blob/1867bf30eb9d22d3f8e86c2a8c25cf92fe5580da/src/unix/linux_like/android/b64/mod.rs#L8

st_mode definition:
https://github.com/search?q=repo%3Arust-lang%2Flibc+path%3A%2F%5Esrc%5C%2Funix%5C%2Flinux_like%5C%2F%2F+path%3A%2F%5Esrc%5C%2Funix%5C%2Flinux_like%5C%2Fandroid%5C%2F%2F+st_mode&type=code

mod_t should instead be c_uint and st_mode should have it's type as mod_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Any problem related to the Rust ecosystem (including cargo)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants