Skip to content

Eliminate the duplication in ErrorPlaceholder and RuntimeErrorPlaceholder #294

@alexander-yevsyukov

Description

@alexander-yevsyukov

We have two enumerations that contain the same list of items. One of them is io.spine.validation.java.ErrorPlaceholder, another is io.spine.validation.RuntimeErrorPlaceholder. The note in ErrorPlaceholder KDoc says this:

 * We have the same items in this enum as in `io.spine.validation.RuntimeErrorPlaceholder`
 * in the runtime library, which is exactly as this one. Please keep them in sync.
 * This duplication is done intentionally to prevent clash between the runtime library,
 * which is added to the classpath of the Compiler, and the runtime library, which is part
 * of the Compiler itself because it is a part of Spine. As we complete our migration
 * of validation to codegen, the runtime library will either be significantly simplified,
 * or even its content may be moved to `base`. Then, the duplicate enum should be removed.

Since we've already migrated to compiled validation, we can address this duplication, leaving only one ErrorPlaceholder enum which belongs to JVM runtime or Base.

Developer's Guide should be updated accordingly. Now it mentions the duplication explicitly.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions