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

Add Docker container for easier usage #6

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

devnoname120
Copy link
Contributor

No description provided.

@devnoname120 devnoname120 mentioned this pull request Aug 10, 2024
@lucasbaizer2
Copy link
Owner

I've migrated this project to use .NET 8 instead of .NET 5, if you make an amended commit to use the .NET 8 version of this Docker container I would be more than happy to merge it. Thank you for your contribution!

@@ -33,7 +33,7 @@ interface BytecodeDefinitionFile {

const fileExists = async (path: string) => !!(await fs.stat(path).catch((_) => false));

const outputDirectory = path.join(lspDir, 'bin', 'Debug', 'net5.0');
const outputDirectory = path.join(lspDir, 'bin', 'Debug', 'net8.0');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oversight?

hasmer/hasmer-cli/hasmer-cli.csproj Show resolved Hide resolved
hasmer/Dockerfile Show resolved Hide resolved
@devnoname120
Copy link
Contributor Author

@lucasbaizer2 Looks like enabling AOT broke building in Docker. See my comments above.

@devnoname120
Copy link
Contributor Author

devnoname120 commented Oct 7, 2024

@lucasbaizer2 Are you OK with disabling AOT that was introduced with the migration from NET 5.0 → NET 8.0? If yes then you can merge my PR as is, it already contains the needed change.

Edit: hasmer definitely doesn't support AOT because among other things it uses reflection. The <PublishAot>true</PublishAot> must be a mistake/auto-generated by some IDE.

#18 7.296 /source/libhasmer/Decompiler/FunctionDecompiler.cs(31): Trim analysis warning IL2026: Hasmer.Decompiler.FunctionDecompiler..cctor(): Using member 'System.Reflection.Assembly.GetTypes()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.297 /source/libhasmer/Decompiler/FunctionDecompiler.cs(33): Trim analysis warning IL2075: Hasmer.Decompiler.FunctionDecompiler..cctor(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods()'. The return value of method 'System.Collections.Generic.IEnumerator`1<Type>.Current.get' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.545 /root/.nuget/packages/commandlineparser/2.8.0/lib/netstandard2.0/CommandLine.dll : warning IL2104: Assembly 'CommandLine' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.658 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(394): Trim analysis warning IL2026: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags,Type,Type)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Using dynamic types might cause types or members to be removed by trimmer. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.659 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(394): AOT analysis warning IL3050: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'System.Runtime.CompilerServices.CallSite`1<Func`3<CallSite,Object,String>>.Create(CallSiteBinder)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Creating arrays at runtime requires dynamic code generation. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.659 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(511): Trim analysis warning IL2026: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags,Type,Type)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Using dynamic types might cause types or members to be removed by trimmer. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.659 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(511): AOT analysis warning IL3050: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'System.Runtime.CompilerServices.CallSite`1<Func`3<CallSite,Object,JArray>>.Create(CallSiteBinder)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Creating arrays at runtime requires dynamic code generation. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.659 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(533): Trim analysis warning IL2026: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags,Type,Type)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Using dynamic types might cause types or members to be removed by trimmer. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.659 /source/libhasmer/Assembler/Parser/HasmTokenizer.cs(533): AOT analysis warning IL3050: Hasmer.Assembler.Parser.HasmTokenizer.CreateSimpleParser(TokenDefinition): Using member 'System.Runtime.CompilerServices.CallSite`1<Func`3<CallSite,Object,JArray>>.Create(CallSiteBinder)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Creating arrays at runtime requires dynamic code generation. [/source/hasmer-cli/hasmer-cli.csproj]
#18 7.893 /root/.nuget/packages/commandlineparser/2.8.0/lib/netstandard2.0/CommandLine.dll : warning IL3053: Assembly 'CommandLine' produced AOT analysis warnings. [/source/hasmer-cli/hasmer-cli.csproj]
#18 8.120 /root/.nuget/packages/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll : warning IL3053: Assembly 'Newtonsoft.Json' produced AOT analysis warnings. [/source/hasmer-cli/hasmer-cli.csproj]
#18 8.464 /root/.nuget/packages/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll : warning IL2104: Assembly 'Newtonsoft.Json' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/source/hasmer-cli/hasmer-cli.csproj]
#18 8.706 /root/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/8.0.8/framework/Microsoft.CSharp.dll : warning IL3053: Assembly 'Microsoft.CSharp' produced AOT analysis warnings. [/source/hasmer-cli/hasmer-cli.csproj]
#18 8.793 /root/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/8.0.8/framework/System.Linq.Expressions.dll : warning IL3053: Assembly 'System.Linq.Expressions' produced AOT analysis warnings. [/source/hasmer-cli/hasmer-cli.csproj]
#18 10.00 /_/src/libraries/System.Data.Common/src/System/Data/DataSet.cs(3529): Trim analysis warning IL2026: System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.WriteXml(XmlWriter): Using member 'System.Data.DataSet.WriteXmlInternal(XmlWriter)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataSet.WriteXml uses XmlSerialization underneath which is not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]
#18 10.00 /_/src/libraries/System.Data.Common/src/System/Data/DataTable.cs(6722): Trim analysis warning IL2026: System.Data.DataTable.System.Xml.Serialization.IXmlSerializable.WriteXml(XmlWriter): Using member 'System.Data.DataTable.WriteXmlInternal(XmlWriter)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataTable.WriteXml uses XmlSerialization underneath which is not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]
#18 10.40 /root/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/8.0.8/framework/System.Private.Xml.dll : warning IL3053: Assembly 'System.Private.Xml' produced AOT analysis warnings. [/source/hasmer-cli/hasmer-cli.csproj]
#18 11.07 /_/src/libraries/System.Data.Common/src/System/Data/DataSet.cs(3507): Trim analysis warning IL2026: System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader): Using member 'System.Data.DataSet.ReadXmlSerializableInternal(XmlReader)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataSet.ReadXml uses XmlSerialization underneath which is not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]
#18 11.07 /_/src/libraries/System.Data.Common/src/System/Data/DataTable.cs(6704): Trim analysis warning IL2026: System.Data.DataTable.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader): Using member 'System.Data.DataTable.ReadXmlSerializableInternal(XmlReader)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataTable.ReadXml uses XmlSerialization underneath which is not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]
#18 11.23 /_/src/libraries/System.Data.Common/src/System/Data/DataSet.cs(3473): Trim analysis warning IL2026: System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.GetSchema(): Using member 'System.Data.DataSet.WriteXmlSchema(DataSet,XmlWriter)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataSet.GetSchema uses TypeDescriptor and XmlSerialization underneath which are not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]
#18 11.23 /_/src/libraries/System.Data.Common/src/System/Data/DataTable.cs(6668): Trim analysis warning IL2026: System.Data.DataTable.System.Xml.Serialization.IXmlSerializable.GetSchema(): Using member 'System.Data.DataTable.GetXmlSchema()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataTable.GetSchema uses TypeDescriptor and XmlSerialization underneath which are not trimming safe. Members from serialized types may be trimmed if not referenced directly. [/source/hasmer-cli/hasmer-cli.csproj]

@devnoname120 devnoname120 requested a review from lbussell October 7, 2024 17:50
@lucasbaizer2 lucasbaizer2 merged commit 429a7d6 into lucasbaizer2:master Oct 17, 2024
@lucasbaizer2
Copy link
Owner

Thanks for the change!

@devnoname120 devnoname120 deleted the add-dockerfile branch October 18, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants