Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertError on style check #931

Open
zorael opened this issue Sep 15, 2023 · 1 comment
Open

AssertError on style check #931

zorael opened this issue Sep 15, 2023 · 1 comment
Labels

Comments

@zorael
Copy link

zorael commented Sep 15, 2023

Arch/EndeavourOS x86_64, dmd 2.105.0, ldc v1.35-beta1, dscanner v0.15.2 from dub.

dscanner errors out when performing a style check on my project. I am unsure of whether the fault lies in dscanner or in dcd.

  1. git clone https://github.com/zorael/kameloso.git -b v3.12.1
  2. dub fetch dscanner
  3. dub run dscanner -- -S --skipTests kameloso/source
Running ../../home/zorael/.dub/packages/dscanner/0.15.2/dscanner/bin/dscanner -S --skipTests kameloso/source
kameloso/source/kameloso/plugins/common/core.d(757:18)[warn]: Variable origAux is never modified and could have been declared const or immutable.
core.exception.AssertError@/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d(515): How did this happen?
----------------
??:? _d_assert_msg [0x55c2579324f0]
/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d:515 void dsymbol.conversion.second.resolveType(dsymbol.symbol.DSymbol*, ref containers.unrolledlist.UnrolledList!(dsymbol.type_lookup.TypeLookup*, std.experimental.allocator.gc_allocator.GCAllocator, true, 64uL).UnrolledList, dsymbol.scope_.Scope*, ref dsymbol.modulecache.ModuleCache) [0x55c2577fa302]
/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d:58 void dsymbol.conversion.second.secondPass(dsymbol.semantic.SemanticSymbol*, dsymbol.scope_.Scope*, ref dsymbol.modulecache.ModuleCache) [0x55c2577f96dc]
/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d:85 void dsymbol.conversion.second.secondPass(dsymbol.semantic.SemanticSymbol*, dsymbol.scope_.Scope*, ref dsymbol.modulecache.ModuleCache) [0x55c2577f97a1]
/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d:85 void dsymbol.conversion.second.secondPass(dsymbol.semantic.SemanticSymbol*, dsymbol.scope_.Scope*, ref dsymbol.modulecache.ModuleCache) [0x55c2577f97a1]
/home/zorael/.dub/packages/dscanner/0.15.2/dscanner/src/dscanner/analysis/run.d:534 std.container.rbtree.RedBlackTree!(dscanner.analysis.base.Message, " a.startLine < b.startLine || (a.startLine == b.startLine&& a.startColumn < b.startColumn) ", true).RedBlackTree dscanner.analysis.run.analyze(immutable(char)[], const(dparse.ast.Module), const(dscanner.analysis.config.StaticAnalysisConfig), ref dsymbol.modulecache.ModuleCache, const(std.experimental.lexer.TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;").TokenStructure)[], bool) [0x55c257774ec1]
/home/zorael/.dub/packages/dscanner/0.15.2/dscanner/src/dscanner/analysis/run.d:394 bool dscanner.analysis.run.analyze(immutable(char)[][], const(dscanner.analysis.config.StaticAnalysisConfig), immutable(char)[], ref dparse.lexer.StringCache, ref dsymbol.modulecache.ModuleCache, bool) [0x55c2577748db]
/home/zorael/.dub/packages/dscanner/0.15.2/dscanner/src/dscanner/main.d:296 _Dmain [0x55c2577ccc83]
Error Program exited with code 1
@zorael
Copy link
Author

zorael commented Sep 16, 2023

Reduced:

void foo()
{
    with (bar) mixin Baz;
}
$ dub run dscanner -- -S foo.d
[...]
Running ../home/zorael/.dub/packages/dscanner/0.15.2/dscanner/bin/dscanner -S foo.d
core.exception.AssertError@/home/zorael/.dub/packages/dcd/0.16.0-beta.2/dcd/dsymbol/src/dsymbol/conversion/second.d(515): How did this happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants