Skip to content

Remove AutoMapper dependency and implement manual property mapping#37

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

Remove AutoMapper dependency and implement manual property mapping#37
corpo-iwillspeak wants to merge 3 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.

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