Skip to content

Remove AutoMapper dependency and implement manual property mapping#37

Open
corpo-iwillspeak wants to merge 23 commits intoolegtarasov:masterfrom
crispthinking:master
Open

Remove AutoMapper dependency and implement manual property mapping#37
corpo-iwillspeak wants to merge 23 commits intoolegtarasov:masterfrom
crispthinking:master

Conversation

@corpo-iwillspeak
Copy link
Copy Markdown

Due to the presence of CVE-2026-32933 in AutoMapper and the more restrictive licensing of AutoMapper after 15.0 this PR removes the use of AutoMapper completely and replaces it with two dedicated mapping methods.

Open to suggestions here.


This pull request removes the dependency on AutoMapper from the FastText.NetWrapper project and replaces its usage with custom mapping methods. This change simplifies the codebase and reduces external dependencies. The referenced version of AutoMapper contains a vulnerability and later versions have moved to a restrictive license.

Dependency removal:

  • Removed the AutoMapper NuGet package from the project file FastText.NetWrapper.csproj and all related using AutoMapper; statements from code files. [1] [2] [3]

Code refactoring for argument mapping:

  • Replaced AutoMapper-based mapping logic in FastTextArgs and its derived classes with a new MapFromStruct method for manual property assignment from FastTextWrapper.FastTextArgsStruct. [1] [2] [3]
  • Removed static AutoMapper configuration and usage from the FastTextArgs class.
  • Removed the AutoMapper instance and configuration from the FastTextWrapper class constructor. [1] [2] [3]
  • Replaced all usages of AutoMapper for struct conversions in FastTextWrapper methods with new static mapping methods ToArgsStruct and ToAutotuneArgsStruct. [1] [2] [3] [4]

@corpo-iwillspeak
Copy link
Copy Markdown
Author

This also solves half of your issues with #36 by removing the dependency.

@corpo-iwillspeak
Copy link
Copy Markdown
Author

@olegtarasov Apologies for the ping, but is there anything I can do to help move this along?

Copilot AI and others added 20 commits April 1, 2026 09:28
Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/1b48ca3f-b1f8-4149-8de3-35cd1f5c4feb

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/3ab7d767-3d26-4149-bdf7-0a60df5a755d

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…ferences

Remove AutoMapper dependency from nuspec
Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/3b911b56-bca6-4835-8de4-1efb167fab6c

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…ackage name

Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/3b911b56-bca6-4835-8de4-1efb167fab6c

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…ile write

Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/3b911b56-bca6-4835-8de4-1efb167fab6c

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…-automapper

Remove AutoMapper dependency from nuspec
…PI key secret

Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/e33d7de8-1098-4fb4-8342-d5bec1e045de

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…lishing

Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/1e170fc6-c3a2-4651-85a5-ab9e754e253f

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
…rked-libraries

Switch to 2-stage CI/Publish workflow with MinVer versioning and NuGet trusted publishing
…tion-issues

Fix MinVer generating fallback version instead of tag-based version
Agent-Logs-Url: https://github.com/crispthinking/FastText.NetWrapper/sessions/fc8c6a29-df52-4028-9dcb-cf0a44d9de2c

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
@corpo-iwillspeak
Copy link
Copy Markdown
Author

Forked version is published on Nuget.org as https://www.nuget.org/packages/CrispThinking.FastText.NetWrapper/

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.

2 participants