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

Does not render correctly on OS X #2

Closed
eliheuer opened this issue Sep 1, 2020 · 20 comments · Fixed by #3
Closed

Does not render correctly on OS X #2

eliheuer opened this issue Sep 1, 2020 · 20 comments · Fixed by #3
Labels
enhancement New feature or request proposal In planning phase

Comments

@eliheuer
Copy link
Contributor

eliheuer commented Sep 1, 2020

I just tested commit 9b1c006 on Arch with Nightly and it worked without issues.

However, on macOS 10.15 I get a series of errors. It would be nice if this worked well on macOS and I'm happy to be a macOS tester for this editor.

The first error I get reads:

error[E0599]: no function or associated item named `from_u32` found for type `char` in the current scope
   --> src/glifparser.rs:203:23
    |
203 |                 char::from_u32(u32::from_str_radix(unicodehex, 16).expect("<unicode> hex not int"))
    |                       ^^^^^^^^ function or associated item not found in `char`
    |
help: you are looking for the module in `std`, not the primitive type
    |
203 |                 std::char::from_u32(u32::from_str_radix(unicodehex, 16).expect("<unicode> hex not int"))
    |                 ^^^^^^^^^^^^^^^^^^^

I fixed this but got a few more errors and couldn't get it to build, I might try a PR to get it working, but thought I would post the issue first so you know I'm thinking about it.

Thanks!

@eliheuer
Copy link
Contributor Author

eliheuer commented Sep 1, 2020

Arch screenshot:
qglif-test

@ctrlcctrlv
Copy link
Collaborator

I just forced pushed for the last time and promise to not do it anymore; can you try on the force pushed branch?

@ctrlcctrlv
Copy link
Collaborator

Nightly is required...I don't know why OS X isn't detecting that @eliheuer

@ctrlcctrlv
Copy link
Collaborator

Unless for some reason the OS X nightly rustc cannot do char::from_u32??

@eliheuer
Copy link
Contributor Author

eliheuer commented Sep 1, 2020

I just checked, I am and was using rustc 1.48.0-nightly on macOS.

@ctrlcctrlv
Copy link
Collaborator

🤔 Hmm...

Please let me know if you figure it out; that is very strange. Or, if you can find an alternative for the function that doesn't need Nightly.

@ctrlcctrlv
Copy link
Collaborator

I'm actively hacking on this right now to finally add the toolbox, as you saw on Twitter I converted all your icons into their own SVG.

b740027#diff-3d350169560e75d0cf9fc8e3574a3639R6

So I hope I don't create a difficult merge conflict as I plan to refactor later probably

@eliheuer
Copy link
Contributor Author

eliheuer commented Sep 2, 2020

This is what I get at commit 6271987:

$ RUSTFLAGS=-Awarnings DEBUG=y RUST_BACKTRACE=1 cargo run -- Q_.glif

    Finished dev [unoptimized + debuginfo] target(s) in 0.70s
     Running `target/debug/Qglif Q_.glif`
Debug: Loaded "Q" (U+0051) from Q_.glif
called `Result::unwrap()` on an `Err` value: GlutinCreationError(NotSupported("could not open gl context"))

@eliheuer
Copy link
Contributor Author

eliheuer commented Sep 2, 2020

I kinda like the idea of this not working on mac now that I think about it.

@eliheuer eliheuer closed this as completed Sep 2, 2020
@ctrlcctrlv
Copy link
Collaborator

I think that I'm requesting too high an OpenGL version for either Mac in general or your computer specifically.

@ctrlcctrlv
Copy link
Collaborator

The internet says that Apple hates OpenGL and that's why it's not working. 🙃

I would need your expertise to figure out how to lower our version. They deprecated it apparently. I'm not dropping it though, let's be clear. Nothing else works on Linux well, and that's the most important platform for this, even above Windows.

@ctrlcctrlv
Copy link
Collaborator

I think @kovidgoyal might know what I'm doing wrong also

@kovidgoyal
Copy link

Without looking at the code, make sure you are requesting an OpenGL version no higher than 3.3, that's the last that reliably works on macOS

@ctrlcctrlv
Copy link
Collaborator

I am:

https://github.com/mfeq/Qglif/blob/62719877eaa2ef511878f430d5071df62784876d/src/main.rs#L123

Although I am using multiple contexts... Perhaps the other context is using a higher version. I'll need to investigate when I get on the computer, but the hard thing is I can't test on Mac. Does anyone know of a service that will allow me to rent and remote in to a Mac? Like via VNC? Of course having graphics is a must.

@ctrlcctrlv ctrlcctrlv reopened this Sep 2, 2020
@ctrlcctrlv ctrlcctrlv changed the title nightly-x86_64-apple-darwin @ commit 9b1c006 -- Build fails Doesn't build on OS X Sep 2, 2020
@ctrlcctrlv ctrlcctrlv added enhancement New feature or request proposal In planning phase labels Sep 2, 2020
@ctrlcctrlv ctrlcctrlv changed the title Doesn't build on OS X Doesn't work right on OS X Sep 2, 2020
@ctrlcctrlv
Copy link
Collaborator

Update: It does build.

image

I posted on Twitter I was looking to rent a Mac and got a few nice offers. In the meantime, this is the trial version of Macincloud. So it does build.

I can't tell if this display problem is Macincloud's fault or not.

@ctrlcctrlv ctrlcctrlv changed the title Doesn't work right on OS X Might not work right on OS X Sep 2, 2020
@ctrlcctrlv
Copy link
Collaborator

Update: It really is broken. A nice guy on Twitter gave me TeamViewer access to his Mac. Debugging...

image

@ctrlcctrlv ctrlcctrlv changed the title Might not work right on OS X Does not render correctly on OS X Sep 4, 2020
@ctrlcctrlv
Copy link
Collaborator

More confirmation: it is not a problem with VNC. l33tguy on Twitter built it on real hardware and got this.

I wonder if rust-skia works at all on Mac.

image

@milezzz
Copy link

milezzz commented Sep 4, 2020

Above screenshot is from 10.15.2:

mac

@ctrlcctrlv
Copy link
Collaborator

Update: I've tracked the problem down. The problem is in Reclutch. All its examples are broken on OS X in some way. I've informed @jazzfool, hopefully they can help as they already have with #1.

@ctrlcctrlv
Copy link
Collaborator

Thanks everyone, @milezzz. #3 will close this. You're all welcome to try the branch early, but do note that you need to pull aclysma/skulpin to the parent directory as well if you do.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal In planning phase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants