libs working
This commit is contained in:
@@ -23,8 +23,6 @@ public class ModuleGraph(Dictionary<string, ModuleGraph.Module> modules)
|
||||
return new Manifest(1, GetModules().Select(x => x.CreateManifestModule()).ToList());
|
||||
}
|
||||
|
||||
public record Manifest(int Version, IReadOnlyList<Module.ManifestModule> Modules);
|
||||
|
||||
public sealed class Module(string name)
|
||||
{
|
||||
public string Name { get; } = name;
|
||||
@@ -110,7 +108,7 @@ public class ModuleGraph(Dictionary<string, ModuleGraph.Module> modules)
|
||||
|
||||
public ManifestCustomTypeInfo CreateManifestCustomTypeInfo()
|
||||
{
|
||||
return new ManifestCustomTypeInfo(Type, Exported);
|
||||
return new ManifestCustomTypeInfo(TypeMangler.Encode(Type), Exported);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,13 +120,9 @@ public class ModuleGraph(Dictionary<string, ModuleGraph.Module> modules)
|
||||
|
||||
public ManifestIdentifierInfo CreateManifestIdentifierInfo()
|
||||
{
|
||||
return new ManifestIdentifierInfo(Type, Exported);
|
||||
return new ManifestIdentifierInfo(TypeMangler.Encode(Type), Exported);
|
||||
}
|
||||
}
|
||||
|
||||
public record ManifestModule(string Name, Dictionary<string, ManifestCustomTypeInfo> CustomTypes, Dictionary<string, ManifestIdentifierInfo> Identifiers);
|
||||
public record ManifestCustomTypeInfo(NubType Type, bool Exported);
|
||||
public record ManifestIdentifierInfo(NubType Type, bool Exported);
|
||||
}
|
||||
|
||||
public class Builder
|
||||
@@ -165,12 +159,14 @@ public class ModuleGraph(Dictionary<string, ModuleGraph.Module> modules)
|
||||
|
||||
foreach (var customType in manifestModule.CustomTypes)
|
||||
{
|
||||
module.AddCustomType(customType.Key, new Module.CustomTypeInfo(customType.Value.Type, customType.Value.Exported, Module.Source.Lib));
|
||||
var decoded = TypeMangler.Decode(customType.Value.EncodedType);
|
||||
module.AddCustomType(customType.Key, new Module.CustomTypeInfo(decoded, customType.Value.Exported, Module.Source.Lib));
|
||||
}
|
||||
|
||||
foreach (var customType in manifestModule.Identifiers)
|
||||
foreach (var identifier in manifestModule.Identifiers)
|
||||
{
|
||||
module.AddIdentifier(customType.Key, new Module.IdentifierInfo(customType.Value.Type, customType.Value.Exported, Module.Source.Lib));
|
||||
var decoded = TypeMangler.Decode(identifier.Value.EncodedType);
|
||||
module.AddIdentifier(identifier.Key, new Module.IdentifierInfo(decoded, identifier.Value.Exported, Module.Source.Lib));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -274,4 +270,9 @@ public class ModuleGraph(Dictionary<string, ModuleGraph.Module> modules)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record Manifest(int Version, IReadOnlyList<ManifestModule> Modules);
|
||||
public record ManifestModule(string Name, Dictionary<string, ManifestCustomTypeInfo> CustomTypes, Dictionary<string, ManifestIdentifierInfo> Identifiers);
|
||||
public record ManifestCustomTypeInfo(string EncodedType, bool Exported);
|
||||
public record ManifestIdentifierInfo(string EncodedType, bool Exported);
|
||||
Reference in New Issue
Block a user