You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Save-only error on newly registered file type with custom package #440
Since 1.18, which is the introduction of UFFFiles in the registry, my tests fail for save, but load works fine.
ERROR: ArgumentError: Package UFFFiles [20c5726e-8372-4c34-be2c-190a5a70d483] is required but does not seem to be installed
I could have expected that both success (as in previous FileIO versions) or fail, but I don't understand a partial fail.
Any ideas what could be the reason ?
I've attempted to make a MWE, but in a module, not totally a package, so the init-equivalent step may not be relevant as such.
using Pkg
Pkg.activate("TestFileIO")
Pkg.add(name="FileIO", version="1.17")
unvname =joinpath(tempdir(), "test.unv")
write(unvname, "test")
module TempFileIO
using FileIO
functionload(f::File{FileIO.format"UNV"})
open(f, "r") do s
String(take!(s.io))
endendfunctionsave(f::File{FileIO.format"UNV"}, data)
open(f, "w") do s
write(s.io, data)
endenddetect_unv(io) =endswith(io.name, ".unv>") ||endswith(io.name, ".uff>")
add_loader(format"UNV", detect_unv, [".unv", ".uff"], [TempFileIO])
endusing.TempFileIO
using FileIO
load(unvname) # Works regardless of versionsave(unvname, "test") # Fails in 1.18+ since UFF is registered
Hi @BambOoxX. I am usure about the roots of this partial fail. What I can tellement you is that the changes I made to FileIO are minor and follow the guidelines. From the UFFFiles side, I have implemented the save\load logic using these lines:
Activity
maucejo commentedon Jun 3, 2026
Hi @BambOoxX. I am usure about the roots of this partial fail. What I can tellement you is that the changes I made to FileIO are minor and follow the guidelines. From the UFFFiles side, I have implemented the save\load logic using these lines:
I observe that in the save function I have
format"UFF"instead ofFileIO.format"UFF". I think that it is the root of your problem.I will fix that on Friday.
Could you tell me if this change fix your issue?