It looks like the type in GLMakie is called Point2f0, not Point2f? Try using Makie.jl, which is the modern replacement for GLMakie.jl (which is deprecated). Makie.jl defines Point2f, it looks like.
Sorry, the GLMakie.jl repository is deprecated, but the package has been moved into Makie.jl. Make sure you have installed the latter rather than the former.
The GLMakie GitHub repo is deprecated but not the GLMakie package (it’s now part of the Makie monorepo). It’s correct to install the GLMakie package in order to use that backend.
Point2f is correct (Point2f0 is the old deprecated name). It should be exported by GLMakie. If not, probably @Wulf installed an old version of GLMakie for some reason. What does ]status say?
I had tried to enforce an old version of GLMakie, but that did not help. Today I kept it undefined, and got GLMakie v0.8.6. However I would appreciate more insight how to get better control of the packages in order to achieve reproducible conditions.
About the old version of GLMakie: Recently I reinstalled julia to version 1.9.2 hoping to remedy such an issue, but it did not influence the behaviour.
Also with Makie I get about one error less run, and about two with errors about Point2f. Typed the two line program into a Windows tablet to check about problems related to the use of an NTFS file system an a dual boot configuration. Get the same UndefVarError: Point2f not defined .
[3f19e933] + p7zip_jll v17.4.0+0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use status --outdated -m
Precompiling project…
36 dependencies successfully precompiled in 181 seconds. 158 already precompiled. 1 skipped during auto due to previous errors.
Observable(Point{2, Float32})
Ah I misunderstood, I thought you still had problems with Point2f (as I understand you are now on the current Makie and it works as expected). For the failed precompiled package I think you can run ]precompile to get more information.
I do not regard the issue as resolved. Point2f fails apparently randomly. Presently I can proceed with my project using Point2. However at sometime this might be no more the case. Thanks for the ]precompile hint.
It’s not surprising that Point2f fails when you use an outdated version of Makie, for example when you manually enforce an old version.
From your first message I understand that you had working code using Point2f and then without you changing anything, you started to get this error. I can see at least two three explanations:
The original problem was actually something else, and while trying to fix it you downgraded Makie and ended up with this error.
Something (some tool, or some command you ran somewhere…) caused Makie to be downgraded. Maybe this can happen when you install a package that (directly or through a dependency) requires an older Makie version.
The code failed because it was executed using the wrong environment, for example maybe you had the global environment active in VsCode when you executed the code, instead of the project environment.
Does any of these explanations sound plausible to you?
Note that you can use the ]pin command to fix GLMakie to some version, see ]help pin for details.