I love Nim, but Nimony gives me strange compile-time errors
Hi everyone, I’ve been experimenting with Nimony lately (I absolutely love Nim ❤️), but I’m getting some strange capitalization-related errors during compilation.
Command:
nim c -r src/hastur build all
Results in:
Error: 'TypeKindT' should be: 'TypekindT'
[enumField declared in /home/zivoslav/tvorišče/pruga/deps/nimony/src/models/nimony_tags.nim(234, 5)]
FAILURE nim c src/nimony/nimsem.nim
There are several similar errors about letter casing differences (TypeKindT vs. TypekindT, FieldKind vs. Fieldkind, etc.). I don’t really understand why Nim is being so strict about this — I thought Nim identifiers were case-insensitive.
Does anyone have an idea what’s going on here? I’m wondering if this might be related to the Nim version or some recent change in Nimony (I’m using the latest devel build of Nim).
Thanks for any insight 🙏
Thank you. And where should I fix it?
I can see some inconsistency in how it’s used even within the source code itself.
nimony (master)> grep -R TypeKindT
src/hexer/lifter.nim: TypeKindT, UntypedT, TypedT, ItertypeT:
src/hexer/nifcgen.nim: of NoType, ErrT, OrT, AndT, NotT, TypedescT, UntypedT, TypedT, TypeKindT, OrdinalT:
src/nimony/semtypes.nim: c.dest.addParLe(TypeKindT, n.info)
src/nimony/semtypes.nim: SymKindT, UntypedT, TypedT, CstringT, PointerT, TypeKindT, OrdinalT:
src/nimony/sigmatch.nim: of TypeKindT:
src/nimony/sigmatch.nim: if aTag.typeKind == TypeKindT:
src/nimony/sigmatch.nim: of TypeKindT:
src/nimony/sigmatch.nim: ConceptT, DistinctT, StaticT, ItertypeT, AutoT, SymKindT, TypeKindT, OrdinalT:
src/nimony/semuntyped.nim: SymKindT, UntypedT, TypedT, CstringT, PointerT, TypeKindT, OrdinalT,
src/nimony/sizeof.nim: AutoT, SymKindT, TypeKindT, TypedescT, UntypedT, TypedT, OrdinalT:
src/nimony/sizeof.nim: if k in {SinkT, MutT, OutT, TypeKindT, UntypedT, VarargsT, TypedescT, StaticT}:
src/nimony/sem.nim: typeclassBuf.addParLe(TypeKindT, info)
src/nimony/sem.nim: CstringT, PointerT, TypeKindT, OrdinalT, RoutineTypes, ItertypeT:
src/nimony/nimony_model.nim: TypeclassKinds* = {ConceptT, TypeKindT, OrdinalT, OrT, AndT, NotT}
src/nimony/nimony_model.nim: n.typeKind in {TypeKindT, TypedescT, SymKindT, OrT, AndT, NotT, ConceptT, StaticT}
(venv) zivoslav@vesna ~/t/p/d/nimony (master)> grep -R TypekindT
src/models/nimony_tags.nim: TypekindT = (ord(TypekindTagId), "typekind") ## `typekind` type
src/models/nimony_tags.nim: raw in {ErrTagId, AtTagId, AndTagId, OrTagId, NotTagId, ProcTagId, FuncTagId, IteratorTagId, ConverterTagId, MethodTagId, MacroTagId, TemplateTagId, ObjectTagId, EnumTagId, ProctypeTagId, ITagId, UTagId, FTagId, CTagId, BoolTagId, VoidTagId, PtrTagId, ArrayTagId, VarargsTagId, StaticTagId, TupleTagId, OnumTagId, RefTagId, MutTagId, OutTagId, LentTagId, SinkTagId, NiltTagId, ConceptTagId, DistinctTagId, ItertypeTagId, RangetypeTagId, UarrayTagId, SetTagId, AutoTagId, SymkindTagId, TypekindTagId, TypedescTagId, UntypedTagId, TypedTagId, CstringTagId, PointerTagId, OrdinalTagId}
src/models/tags.nim: TypekindTagId
src/nimony/exprexec.nim: SymkindT, TypekindT, TypedescT, UntypedT, TypedT, CstringT, PointerT, OrdinalT:
src/nimony/renderer.nim: of TypekindT:
Thank you very much, my big mistake and lack of knowledge about the compiler's genius settings.
Yes, I had:
--noNimblePath
--styleCheck:usages
--styleCheck:error