inkle / inkle/ink

Make inklecate depend on the ink-engine-runtime

Open
#226 2 comments 0 reactions 0 assignees View on GitHub
NEXT
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Currently, the `inklecate` tool comes with the `ink-engine-runtime`'s classes pre-compiled within. This allows for `inklecate` to work as a standalone executable without any dependencies, but makes usage a little awkward in some situations.

For example, I was writing an application that would take a raw ink file, convert it to json and then play it into a command line window. Normally I have included the `ink-engine-runtime` as a dependency and the `inkecate` tool to assist in the JSON conversion Besides the JSON conversion, all that I need for my purposes is already part of the engine. So, as I was referencing both the engine and inklecate dlls, I got error saying the types from the ink-engine-runtume became imported twice.

A more-standard approach (at least the one I am accustomed to) is producing the `ink-engine-runtime.dll` and making `inklecate` reference the former. In the `AssemblyInfo.cs` of a hypothetical version of the engine, you could specify that the internals are visible to the `inklecate` project by using the following directive: `[assembly: InternalsVisibleTo("inklecate")]`, so you will not have issues using the non-public types defined into the engine's dll, while not changing anything in the current engine's codebase. A drawback in this case would be that you have to supply the `ink-engine-runtime` alongside `inklecate` in order for it to work.

If you are interested, I could create pull request with the proposed change unless, of course, you are having other thing in mind in which the current structure is more beneficial.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.