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
I guessing this is probably a dmd issue, and filed it as 19825. But I'm posting here too, just in case std_data_json is part of the problem, or anyone here could help find the exact compiler problem:
dub.sdl:
name "test"
dependency "std_data_json" version="==0.18.3"
main.d:
importstd.stdio;
import stdx.data.json;
enum rawJson = `{ "rootPackage": "vibe-d", "targets": [ { "rootConfiguration": "vibe-core" } ]}`;
voidyap(T...)(lazy T args)
{
writeln(args);
}
structFoo
{
int a;
string name;
}
FoomakeFoo()
{
Foo foo;
auto root = rawJson.toJSONValue;
foo.name = root["rootPackage"].toString.idup;
writeln(foo.name);
yap(root["targets"][0]["rootConfiguration"]);
return foo;
}
voidmain(string[] args)
{
auto foo = makeFoo();
writeln(foo.name); // Garbled output, then an exception
}
Hmm, it appears to be pulling in 0.10.13, not 0.11.4. Apparently the latest release of std_data_json (0.18.3) has its taggedalgebraic dependency set to ~>0.10.1. I tried manually editing dub.selections.json to 0.11.4, and I'm still getting the same issue, but I don't know whether dub might be just simply ignoring the 0.11.4 setting since it conflicts with the dependency constraints.
Cannot reproduce here. Your dub.sdl is not enough to produce a working binary with dub 1.15.0/dmd 2.087.1. When I filled in the missing values, I did not get a crash. Is this still an issue?
I guessing this is probably a dmd issue, and filed it as 19825. But I'm posting here too, just in case std_data_json is part of the problem, or anyone here could help find the exact compiler problem:
dub.sdl:
main.d:
result:
The text was updated successfully, but these errors were encountered: