Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MappieCompilerPluginRegistrar : CompilerPluginRegistrar() {
warningsAsErrors = configuration.get(ARGUMENT_WARNINGS_AS_ERRORS, false),
useDefaultArguments = configuration.get(ARGUMENT_USE_DEFAULT_ARGUMENTS, true),
strictEnums = configuration.get(ARGUMENT_STRICTNESS_ENUMS, true),
strictVisiblity = configuration.get(ARGUMENT_STRICTNESS_VISIBILITY, false),
strictVisibility = configuration.get(ARGUMENT_STRICTNESS_VISIBILITY, false),
reportEnabled = configuration.get(ARGUMENT_REPORT_ENABLED, false),
reportDir = configuration.get(ARGUMENT_REPORT_DIR, ""),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data class MappieConfiguration(
val warningsAsErrors: Boolean,
val useDefaultArguments: Boolean,
val strictEnums: Boolean,
val strictVisiblity: Boolean,
val strictVisibility: Boolean,
val reportEnabled: Boolean,
val reportDir: String,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ fun MappieContext.getUseStrictVisibilityAnnotation(origin: IrFunction): IrConstr
fun MappieContext.useStrictVisibility(origin: IrFunction): Boolean =
getUseStrictVisibilityAnnotation(origin)
?.let { it.getValueArgument(Name.identifier("value"))?.isTrueConst() ?: true }
?: configuration.strictVisiblity
?: configuration.strictVisibility
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object DefaultErrorMessageMappie : BaseDiagnosticRendererFactory() {
map.put(MappieErrors.COMPILE_TIME_RECEIVER, "The function ''{0}'' was called on the mapping dsl which does not exist after compilation", CommonRenderers.NAME)
map.put(MappieErrors.COMPILE_TIME_EXTENSION_RECEIVER, "The function ''{0}'' was called as an extension method on the mapping dsl which does not exist after compilation", CommonRenderers.NAME)
map.put(MappieErrors.NON_CONSTANT_ERROR, "Argument must be a compile-time constant")
map.put(MappieErrors.UNKNOWN_NAME_ERROR, "Identifier ''{0}'' does not occur as as setter or as a parameter in constructor", CommonRenderers.STRING)
map.put(MappieErrors.UNKNOWN_NAME_ERROR, "Identifier ''{0}'' does not occur as a setter or as a parameter in constructor", CommonRenderers.STRING)
map.put(MappieErrors.ANNOTATION_USE_DEFAULT_ARGUMENTS_NOT_APPLICABLE, "Annotation @UseDefaultArguments has no effect on subclass of EnumMappie")
map.put(MappieErrors.ANNOTATION_USE_STRICT_ENUMS_NOT_APPLICABLE, "Annotation @UseStrictEnums has no effect on subclass of ObjectMappie")
map.put(MappieErrors.ANNOTATION_USE_STRICT_VISIBILITY_NOT_APPLICABLE, "Annotation @UseStrictVisibility has no effect on subclass of EnumMappie")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class UnsafePlatformTypeAssignmentProblems(

return when (source) {
is ExplicitPropertyMappingSource -> {
val description = "Target $targetString of type $targetTypeString is unsafe to from ${source.reference.pretty()} of platform type $sourceTypeString"
val description = "Target $targetString of type $targetTypeString is unsafe to assign from ${source.reference.pretty()} of platform type $sourceTypeString"
Problem.warning(description, location(context.function.fileEntry, source.reference))
}
is ExpressionMappingSource -> {
val description = "Target $targetString of type $targetTypeString is unsafe to be assigned from expression of platform type $sourceTypeString"
Problem.warning(description, location(context.function.fileEntry, source.expression))
}
is ValueMappingSource -> {
val description = "Target $targetString of type $targetTypeString is unsafe to assigned from value of platform type $sourceTypeString"
val description = "Target $targetString of type $targetTypeString is unsafe to be assigned from value of platform type $sourceTypeString"
Problem.warning(description, location(context.function.fileEntry, source.expression))
}
is FunctionMappingSource -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class UnsafeTypeAssignmentProblems(
Problem.error(description, location(mapping.origin))
}
is ParameterValueMappingSource -> {
val description = "Target $targetString automatically resolved parameter ${source.parameter.asString()} but cannot assign source type $sourceTypeString to target type $targetTypeString}"
val description = "Target $targetString automatically resolved parameter ${source.parameter.asString()} but cannot assign source type $sourceTypeString to target type $targetTypeString"
Problem.warning(description, location(context.function.fileEntry, mapping.origin))
}
is ParameterDefaultValueMappingSource -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ private fun IrBuilderWithScope.instance(clazz: IrClass) =
} else if (clazz.primaryConstructor != null && clazz.primaryConstructor!!.parameters.isEmpty()) {
irCallConstructor(clazz.primaryConstructor!!.symbol, emptyList())
} else {
panic("Class ${clazz.name.asString()} should either be an object or has an primary constructor without parameters.", clazz)
panic("Class ${clazz.name.asString()} should either be an object or have a primary constructor without parameters.", clazz)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import tech.mappie.ir.util.isSubclassOf
import tech.mappie.ir.util.mappieSuperType
import tech.mappie.ir.util.mappieType

// TODO: we should collect al publicly visible, and add those during resolving that are visible from the current scope.
// TODO: we should collect all publicly visible, and add those during resolving that are visible from the current scope.
class DefinitionsCollector(val context: MappieContext) {
fun collect(module: IrModuleFragment): RequestResolverContext {
val builtin = BuiltinMappieDefinitionsCollector(context).collect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ConstructorParameterNotAFieldTest : MappieTestCase() {
)
} satisfies {
isCompilationError()
hasErrorMessage(6, "Identifier 'fake' does not occur as as setter or as a parameter in constructor")
hasErrorMessage(6, "Identifier 'fake' does not occur as a setter or as a parameter in constructor")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class ObjectMappingConstructor<FROM, out TO> {
generated()

/**
* Reference a constructor parameter or target property in lieu of a property reference, if it not exists as a property.
* Reference a constructor parameter or target property in lieu of a property reference, if it does not exist as a property.
*
* For example
* ```kotlin
Expand Down Expand Up @@ -123,7 +123,7 @@ public class MultipleObjectMappingConstructor<out TO> {
generated()

/**
* Reference a constructor parameter or target property in lieu of a property reference, if it not exists as a property.
* Reference a constructor parameter or target property in lieu of a property reference, if it does not exist as a property.
*
* For example
* ```kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ abstract class AbstractKotlinCompilation<A : CommonCompilerArguments> internal c
/** Do not check presence of 'actual' modifier in multi-platform projects */
var noCheckActual: Boolean = false

/** Enable usages of API that requires opt-in with an opt-in requirement marker with the given fully qualified name */
/** Enable usages of APIs that requires opt-in with an opt-in requirement marker with the given fully qualified name */
var optIn: List<String>? = null

/** Additional string arguments to the Kotlin compiler */
Expand Down
4 changes: 2 additions & 2 deletions website/src/_includes/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ul>
</nav>
{% endif %}
<button class="btn btn--primary btn--icon header__toggle" data-action="sidebar-toggle" aria-controls="primary-menu" aria-expanded="false" aria-label="Toogle navigation">
<button class="btn btn--primary btn--icon header__toggle" data-action="sidebar-toggle" aria-controls="primary-menu" aria-expanded="false" aria-label="Toggle navigation">
{% svgIcon './src/img/icon/menu.svg', 'btn__icon' %}
</button>
</div>
Expand All @@ -41,7 +41,7 @@
</a>
{% endif %}
{% if (site.social.discord) %}
<a href="{{ site.social.discord }}" aria-label="Discrod">
<a href="{{ site.social.discord }}" aria-label="Discord">
{% svgIcon './src/img/icon/discord.svg' %}
</a>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions website/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ changelog:
- date: "2025-03-31"
title: "v2.1.20-1.2.0"
items:
- "Changed versioning methodology. See [Compability](/getting-started/compatibility) for more information."
- "Changed versioning methodology. See [Compatibility](/getting-started/compatibility) for more information."
- "[#179](https://github.com/Mr-Mappie/mappie/issues/179) made all mapping functions open."
- date: "2025-02-28"
title: "v1.1.1"
Expand All @@ -87,7 +87,7 @@ changelog:
items:
- "Migrated multiple checks from the compiler back-end to the FIR compiler front-end."
- "[#148](https://github.com/Mr-Mappie/mappie/issues/148) the `mappie-api` dependency is now applied automatically."
- "Fixed a bug where the constructor of a generated target class is not selected property."
- "Fixed a bug where the constructor of a generated target class is not selected properly."
- date: "2024-12-15"
title: "v0.10.0"
items:
Expand Down