heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
36 stars 16 forks source link

Provide .NET core version of HeuristicLab framework libraries #2924

Open HeuristicLab-Trac-Bot opened 6 years ago

HeuristicLab-Trac-Bot commented 6 years ago

Issue migrated from trac ticket # 2924

milestone: HeuristicLab 4.x Backlog | component: General | priority: medium

2018-06-17 07:28:07: @gkronber created the issue


HeuristicLab is primarily developed as a Windows desktop application. We provide a build configuration for Mono which allows building and running HL on Linux. With a trick it is even possible to use a limited version of the GUI on Linux.

Currently, .NET core is the recommended way to implement cross-plattform .NET applications. .NET core does not support the Windows.Forms API. However, large parts of the HeuristicLab framework do not depend on the GUI parts and can therefore be potentially migrated to .NET core.

HeuristicLab-Trac-Bot commented 6 years ago

2018-06-17 07:31:05: @gkronber commented


r15961: created branch for ticket

HeuristicLab-Trac-Bot commented 6 years ago

2018-06-18 12:00:27: @gkronber commented


Necessary pre-conditions:

  • Split PluginInfrastructure in two plugins to remove dependency on Windows.Forms (see #2522)
  • Remove Image property in Item to remove dependency on System.Drawing (some efforts are underway to support System.Drawing on .NET core, https://github.com/dotnet/corefx/issues/20325)
HeuristicLab-Trac-Bot commented 6 years ago

2018-06-18 13:17:25: @abeham commented


If I read the issue correctly you should use one of the compatibility packages on nuget if you want System.Drawing support, for instance System.Drawing.Common + System.Drawing.Primitives. There are more, but they don't look so good to me (CoreCompat.System.Drawing and CoreCompat.System.Drawing.v2).

HeuristicLab-Trac-Bot commented 6 years ago

2018-08-16 10:07:14: @mkommend uploaded file PortabilityReport.xlsx (44.5 KiB)

.Net Core 3.0 Portability Analyzer Report

HeuristicLab-Trac-Bot commented 6 years ago

2018-08-27 11:38:24: @s-wagner changed status from new to assigned

HeuristicLab-Trac-Bot commented 6 years ago

2018-08-27 11:38:24: @s-wagner changed owner from @gkronber to dpiringe

HeuristicLab-Trac-Bot commented 6 years ago

2018-08-27 11:38:24: @s-wagner commented


I assign this ticket to dpiringe as he will look into this in his internship.

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:17:16: @jkarder commented


I will recreate this branch from [16144/branches/2522_RefactorPluginInfrastructure] and reapply the changes from r16143.

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:17:38: @jkarder changed status from assigned to accepted

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:17:38: @jkarder changed owner from dpiringe to @jkarder

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:24:55: @jkarder commented


r16145 (not migrated): deleted branch [15961/branches/2924-dotnet-core]

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:29:23: @jkarder commented


r16146: created branch for .NET Core migration

HeuristicLab-Trac-Bot commented 6 years ago

2018-09-14 18:46:38: @jkarder commented


r16147: reapplied changes from r16143

HeuristicLab-Trac-Bot commented 5 years ago

2018-09-28 14:09:02: dpiringe commented


r16192: added packages.config

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 16:33:35: dpiringe changed status from accepted to assigned

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 16:33:35: dpiringe changed owner from @jkarder to dpiringe

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 16:33:45: dpiringe changed status from assigned to accepted

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 16:35:01: dpiringe commented


r16854: changed projects to reference System.Drawing.Common package instead of Microsoft.Windows.Compatibility package

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 16:52:57: dpiringe commented


r16857: separated PasswordDialog from HeuristicLab.Clients.Common into new Project called HeuristicLab.PasswordDialog and migrated HeuristicLab.Clients.Common to .NET Standard

HeuristicLab-Trac-Bot commented 5 years ago

2019-04-19 17:16:20: dpiringe commented


r16859:

  • migrated PluginInfrastructure to .NET Standard
  • created a new .NET Core project HeuristicLab.PluginInfrastructure.Runner, which contains the logic to load and isolate assemblies, based on the new interfaces from HeuristicLab.PluginInfrastructure
  • recycled old plugin validation code
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-20 13:17:07: dpiringe commented


r16965: changed project HeuristicLab.Persistence to be .net core compatible

HeuristicLab-Trac-Bot commented 5 years ago

2019-05-24 12:28:57: dpiringe commented


r16984:

  • merged projects HeuristicLab.PluginInfrastructure.Runner and HeuristicLab.PluginInfrastructure
  • applied changes of code reviews (13.05.2019 and 22.05.2019) -> the old Runner is now RunnerHost and uses a Runner, which is executed on the child process
  • added Type GetType(string) to IApplicationManager and implemented it for LightweightApplicationManager
  • removed IActivator and IActivatorContext
  • deleted unused types like PluginDescriptionIterator
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-24 13:08:26: dpiringe commented


r16985:

  • added CLI Framework HeuristicLab.CommandLineInterface
  • added definition language test project HeuristicLab.DefinitionLanguage
  • added test project HeuristicLab.DynamicAssemblyTestApp, for PluginInfrastructure testing
  • changed project HeuristicLab to .NET Core and used it to create a CLI-Tool with the new CLI Framework
  • added Docker support to HeuristicLab
  • added IRunnerHost.cs ... forgot last commit
  • changed DockerRunnerHost and NativeRunnerHost to HeuristicLab-3.3.exe, was a little test project before
  • added new solution file HeuristicLab 3.3 No Views.sln, where all view projects are unloaded at start
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-24 13:14:52: dpiringe commented


r16986:

  • changed the use of AppDomain.CurrentDomain.BaseDirectory to Directory.GetCurrentDirectory() in projects HeuristicLab.MathJax and HeuristicLab.Problems.GeneticProgramming, this change helps to load these plugins correctly with the new PluginInfrastructure
  • deleted obsolete files from folder HeuristicLab/3.3/Properties and added launchSettings.json for docker
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-29 10:50:47: dpiringe commented


r16990: removed unused NuGet package references and migrated CodeDom NuGet package from packages.config to PackageReference format

HeuristicLab-Trac-Bot commented 5 years ago

2019-05-29 11:10:17: dpiringe commented


r16991:

  • removed unused NuGet packages for Projects:
    • HeuristicLab.Visualization.ChartControlsExtensions-3.3
    • HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3
    • HeuristicLab.Problems.DataAnalysis.Views-3.4
    • HeuristicLab.Optimizer-3.3
  • updated NuGet package System.Drawing.Common from 4.5.0 to 4.5.1 for Project HeuristicLab.Problems.DataAnalysis.Views-3.4
  • added NuGet PackageReference Microsoft.Win32.Registry.AccessControl for Project HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3
  • added Key Files for Projects:
    • HeuristicLab.DynamicAssemblyTestApp
    • HeuristicLab.DefinitionLanguage
    • HeuristicLab.CommandLineInterface
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-29 12:16:35: dpiringe commented


r16993:

  • added IEnumerable<T> GetInstances<T>(params object[] args) where T: class and IEnumerable<object> GetInstances(Type type, params object[] args) method to IApplicationManager and implemented them in LightweightApplicationManager -> to instantiate types with specific constructor arguments
  • added RunnerState State { get; } property in IRunnerHost, was already in RunnerHost
  • added user authentication for NativeRunnerHost
  • added optional check for a running docker daemon and available image for type DockerRunnerHost + Exception DockerException
  • added caching of the saved IApplication in ApplicationRunner to prevent a new instance every get call
  • removed System.ServiceModel.Primitives NuGet package
  • lots of formatting
HeuristicLab-Trac-Bot commented 5 years ago

2019-05-29 12:32:17: dpiringe commented


r16998:

  • in project HeuristicLab.CommandLineInterface changed output for options -> hidden options are not shown in the help box anymore
  • in project HeuristicLab.DynamicAssemblyTestApp:
    • added ApplicationAttributes
    • added full cancel/pause/resume support for class AppTest to test the same behaviour between main and child process
  • in project HeuristicLab:
    • changed auto generated Dockerfile -> only copies necessary projects -> speeds up the build process
    • in file HeuristicLab-3.3.csproj:
    • changed DockerDefaultTargetOS to Linux
    • removed reference HeuristicLab.DefinitionLanguage
    • added icon and manifest
    • deleted folder Properties with file launchSettings.json
    • changed the direct access to ApplicationTypes for OptimizeCommand and InspectCommand to new method IApplicationManager.GetInstances<T>(params object[] args)
  • added build script for docker image dockerImageBuild.ps1
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-17 10:41:08: dpiringe commented


r17013:

  • some changes in CLIApplication.cs to reduce unnecessary allocation of string objects
  • renamed AppTest to ConsoleOptimizer and fixed race condition
  • replaced enum RunnerJob with class RunnerMessage for more control of saved data
  • changed usage of BinaryFormatter with HEAL.Attic, following types are now Storable:
    • ConsoleOptimizer
    • InspectApplication
    • ApplicationBase
    • ApplicationRunner
    • AssemblyInfo
    • Runner
    • UniPath
    • RunnerMessage
  • switched QuietMode from ApplicationRunner to IRunner
  • DockerRunnerHost can now automatically build docker images for linux and windows containers (also identifies which container type is active) -> removes the condition to have the image preinstalled
    • to achieve this, there are two new folders DockerLinuxBuild and DockerWindowsBuild included in build output, which include Dockerfiles to build images for linux and windows container
  • added NuGet package System.CodeDom to project HeuristicLab.Scripting-3.3
  • added method Send(RunnerMessage) to IRunnerHost and transferred methods Pause and Resume to IRunner
  • added internal reference of RunnerHost in Runner
  • added abstract method SendMessage(RunnerMessage) in RunnerHost which gets called from method Send(RunnerMessage)
  • because of a Google.Protobuf "bug", RunnerMessages cannot get serialized/deserialized directly on stream -> workaround with a byte array, which gets written and read
    • additionally, the length of the array gets sent first (length as integer -> 4 bytes)
    • static method in RunnerMessage to read a message from a stream
    • the method SendMessage(RunnerMessage) in RunnerHost implements this functionality
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-19 13:28:56: dpiringe commented


r17025:

  • added base attribute CLIBaseAttribute for CLI attributes, which contains the property Description
  • changed inheritance from Attribute to CLIBaseAttribute for types: CommandAttribute, OptionAttribute and ValueAttribute
  • added comment in RunnerHost
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-19 15:03:45: dpiringe commented


r17026:

  • renamed HeuristicLab.DynamicAssemblyTestApp to HeuristicLab.ConsoleApplications
    • incl. Namespace and plugin name
  • renamed InspectApplication to ConsoleInspector
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-19 15:38:38: dpiringe commented


r17027:

  • renamed HeuristicLab.DynamicAssemblyTestApp to HeuristicLab.ConsoleApplications on folder/solution level
  • changed references from HeuristicLab.DynamicAssemblyTestApp to HeuristicLab.ConsoleApplications in HeuristicLab-3.3.csproj
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-26 12:16:54: dpiringe commented


r17039:

  • removed a blank line in InspectCommand.cs
  • removed BuildCommand.cs and project HeuristicLab.DefinitionLanguage, because it was only a test
  • removed reference BuildCommand in ApplicationCommand
HeuristicLab-Trac-Bot commented 5 years ago

2019-06-26 12:20:02: dpiringe commented


r17040:

  • removed reference in HeuristicLab 3.3.sln to previous deleted project HeuristicLab.DefinitionLanguage