E06260: invalid package property
What went wrong
A property in your 'defines package' block has a value of the wrong shape, or is not a package property at all. This code is raised ONLY for package properties (the message starts "In '<module>' package:"), by the compiler, the language server and every tool alike. A package defines exactly these properties, each with one shape:
version a VersionNumber literal (1.0.0-0) description, license a String literal publicAccess, applyStandardIncludes, applyStandardExcludes a Boolean literal tags, includeFiles, excludeFiles, capabilities a List of String literals deps, devDeps, excludeDeps a Dict of (String, String) literals
Any other name is "unusable" - there is no 'name' property, because the module name IS the package name. A near miss names the property it is near ("unusable 'licence' property - did you mean 'license'?"); that is a hint, never a repair. It is NOT the wrong type passed to a method - that is E06270 / E50060 (the code was called PARAMETER_MISMATCH until it was renamed PACKAGE_PROPERTY_INVALID; the number is the same).
Worked examples
Compilable examples demonstrating this error and the correct fix:
- ek9 -q 955 (Why does EK9 report E06260 when defining package prope...)
How to fix it
- Give the property the shape it requires (the message names it)
- Remove a property name the package does not define; the module name is already the package name
- Package metadata drives versioning and publication, so it is checked before compilation - there is no conversion
The [EXAMPLE] section below shows each wrong shape, and an unknown 'name' property, with the block that gives every property its shape. 'deps' takes module names to version Strings: {"some.module": "1.0.0-0"}.
Common causes
- version written as a String ("1.0.0") instead of a VersionNumber (1.0.0-0)
- publicAccess written as "true" (String) instead of true
- a single String given to a list property: tags <- "tools"
- a 'name' property, as other build files have - the module declares it
- A misspelt or made-up property name ('licence' for 'license')
See also
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E06260: invalid package property
#!ek9 defines module error.e06260.bad defines package version <- "1.0.0-0" description <- 12 license <- 1.0.0-0 publicAccess <- "yes" applyStandardIncludes <- "true" applyStandardExcludes <- 0 tags <- "tools" deps <- {"a.b": 1.0.0-0} name <- "myLib"
Fixed: Give each package property a value of its own kind
#!ek9 defines module error.e06260.good defines package version <- 1.0.0-0 description <- "A library" license <- "MIT" publicAccess <- true applyStandardIncludes <- true applyStandardExcludes <- false tags <- ["tools"]
Questions and answers
These Q&A entries show E06260 and its fix:
Found a problem?
If EK9 reported E06260 for a program you think is valid, or did not report it where it should have, use the compiler form with the smallest program that shows it. If this page is wrong or unclear, use the documentation form. Both are at github.com/ek9lang/ek9-issues.