dlang-community / DCD

The D Completion Daemon is an auto-complete program for the D programming language
GNU General Public License v3.0
349 stars 71 forks source link

added ufcs completion for string and string literal #738

Closed vushu closed 1 year ago

vushu commented 1 year ago

I noticed UFCS completion should also work for string and string literal.

I also experimented with UFCS completion for number literals, but it is bit more problematic since 42. is tokenized as type doubleLiteral.

Wouldn't it also be annoying for the user to see completion whenever the user actually just want's to write a some floating number? Im not sure in that matter.

github-actions[bot] commented 1 year ago

✅ PR OK, no changes in deprecations or warnings

Total deprecations: 126

Total warnings: 4

Build statistics:

 statistics (-before, +after)
 client size=1055768 bin/dcd-client
-server size=3006192 bin/dcd-server
-rough build time=90s
+server size=3006064 bin/dcd-server
+rough build time=88s

-DCD run_tests.sh   Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.95
-DCD run_tests.sh   Maximum resident set size (kbytes): 9564
+DCD run_tests.sh   Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.08
+DCD run_tests.sh   Maximum resident set size (kbytes): 10552

-short requests: (215x)
-    min request time =     0.015ms
-    10th percentile  =     0.136ms
-    median time      =     0.516ms
-    90th percentile  =     0.872ms
-    max request time =     1.813ms
+short requests: (219x)
+    min request time =     0.021ms
+    10th percentile  =     0.133ms
+    median time      =     0.519ms
+    90th percentile  =     0.896ms
+    max request time =     2.086ms

 top 5 GC sources in server:
 bytes allocated, allocations, type, function, file:line
-        7554112              81399 void[] std.array.Appender!(DSymbol*[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
-        7536640                460 void[] std.array.Appender!(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;")[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
+        7711040              83095 void[] std.array.Appender!(DSymbol*[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
+        7667712                468 void[] std.array.Appender!(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;")[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
         2277376                278 void[] std.array.Appender!(char[][]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
-        1830176              57193 std.array.Appender!(dsymbol.symbol.DSymbol*[]).Appender.Data std.array.Appender!(DSymbol*[]).Appender.this /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3452
-        1586176                609 void[] std.array.Appender!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
+        1868736              58398 std.array.Appender!(dsymbol.symbol.DSymbol*[]).Appender.Data std.array.Appender!(DSymbol*[]).Appender.this /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3452
+        1582080                620 void[] std.array.Appender!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577
Full build output ``` DUB version 1.31.1, built on Mar 12 2023 LDC - the LLVM D compiler (1.32.0): based on DMD v2.102.2 and LLVM 15.0.7 built with LDC - the LLVM D compiler (1.32.0) Default target: x86_64-unknown-linux-gnu Host CPU: skylake-avx512 http://dlang.org - http://wiki.dlang.org/LDC Registered Targets: aarch64 - AArch64 (little endian) aarch64_32 - AArch64 (little endian ILP32) aarch64_be - AArch64 (big endian) amdgcn - AMD GCN GPUs arm - ARM arm64 - ARM64 (little endian) arm64_32 - ARM64 (little endian ILP32) armeb - ARM (big endian) avr - Atmel AVR Microcontroller bpf - BPF (host endian) bpfeb - BPF (big endian) bpfel - BPF (little endian) hexagon - Hexagon lanai - Lanai mips - MIPS (32-bit big endian) mips64 - MIPS (64-bit big endian) mips64el - MIPS (64-bit little endian) mipsel - MIPS (32-bit little endian) msp430 - MSP430 [experimental] nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit ppc32 - PowerPC 32 ppc32le - PowerPC 32 LE ppc64 - PowerPC 64 ppc64le - PowerPC 64 LE r600 - AMD GPUs HD2XXX-HD6XXX riscv32 - 32-bit RISC-V riscv64 - 64-bit RISC-V sparc - Sparc sparcel - Sparc LE sparcv9 - Sparc V9 systemz - SystemZ thumb - Thumb thumbeb - Thumb (big endian) ve - VE wasm32 - WebAssembly 32-bit wasm64 - WebAssembly 64-bit x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 xcore - XCore Upgrading project in /home/runner/work/DCD/DCD/ Not upgrading sub package in dsymbol Not upgrading sub package in common Note: specify -s to also upgrade sub packages. Warning Warning: License in subpackage dcd:dsymbol is different than it's parent package, this is discouraged. Warning Invalid source/import path: /home/runner/work/DCD/DCD/bin Starting Performing "release" build using ldc2 for x86_64. Building msgpack-d 1.0.4: building configuration [default] Building dcd:common 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] Pre-build Running commands common/src/dcd/common/messages.d(264,3): Deprecation: `return` statements cannot be in `scope(failure)` bodies. common/src/dcd/common/messages.d(264,3): Use try-catch blocks for this purpose Building emsi_containers 0.9.0: building configuration [library] Building libdparse 0.22.0: building configuration [library] Building dcd:dsymbol 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` dsymbol/src/dsymbol/conversion/first.d(726,7): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(731,52): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(732,46): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(733,8): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(734,42): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(738,36): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression dsymbol/src/dsymbol/conversion/first.d(739,33): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression Building dcd 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [client] Linking dcd-client Warning Warning: License in subpackage dcd:dsymbol is different than it's parent package, this is discouraged. Starting Performing "release" build using ldc2 for x86_64. Building msgpack-d 1.0.4: building configuration [default] Building dcd:common 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] Pre-build Running commands common/src/dcd/common/messages.d(264,3): Deprecation: `return` statements cannot be in `scope(failure)` bodies. common/src/dcd/common/messages.d(264,3): Use try-catch blocks for this purpose Building emsi_containers 0.9.0: building configuration [library] Building libdparse 0.22.0: building configuration [library] Building dcd:dsymbol 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` dsymbol/src/dsymbol/conversion/first.d(726,7): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(731,52): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(732,46): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(733,8): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(734,42): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(738,36): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression dsymbol/src/dsymbol/conversion/first.d(739,33): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression Building dcd 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [server] ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` Linking dcd-server STAT:statistics (-before, +after) STAT:client size=1055768 bin/dcd-client STAT:server size=3006064 bin/dcd-server STAT:rough build time=88s STAT: Shutting down currently-running server... Running tests for unix sockets Starting server... Server is running unix:tc001: ... Pass unix:tc002: ... Pass unix:tc003: ... Pass unix:tc004: ... Pass unix:tc005: ... Pass unix:tc006: ... Pass unix:tc007: ... Pass unix:tc008: ... Pass unix:tc009: ... Pass unix:tc010: ... Pass unix:tc011: ... Pass unix:tc012: ... Pass unix:tc013: ... Pass unix:tc014: ... Pass unix:tc015: ... Pass unix:tc016: ... Pass unix:tc017: ... Pass unix:tc018: ... Pass unix:tc019: ... Pass unix:tc020: ... Pass unix:tc021: ... Pass unix:tc022: ... Pass unix:tc023: ... Pass unix:tc024: ... Pass unix:tc025: ... Pass unix:tc026: ... Pass unix:tc027: ... Pass unix:tc028: ... Pass unix:tc029: ... Pass unix:tc030: ... Pass unix:tc031: ... Pass unix:tc032: ... Pass unix:tc033: ... Pass unix:tc034: ... Pass unix:tc035: ... Pass unix:tc036: ... Pass unix:tc037: ... Pass unix:tc038: ... Pass unix:tc039: ... Pass unix:tc040: ... Pass unix:tc041: ... Pass unix:tc042: ... Pass unix:tc043: ... Pass unix:tc044: ... Pass unix:tc045: ... Pass unix:tc046: ... Pass unix:tc047: ... Pass unix:tc048: ... Pass unix:tc049: ... Pass unix:tc050: ... Pass unix:tc051: ... Pass unix:tc052: ... Pass unix:tc053: ... Pass unix:tc054: ... Pass unix:tc055: ... Pass unix:tc056: ... Pass unix:tc057: ... Pass unix:tc058: ... Pass unix:tc059: ... Pass unix:tc060: ... Pass unix:tc061: ... Pass unix:tc062: ... Pass unix:tc620: ... Pass unix:tc_access_modifiers: ... Pass unix:tc_accesschain_type: ... Pass unix:tc_anon_class: ... Pass unix:tc_anon_struct: ... Pass unix:tc_bang_op_or_template: ... Pass unix:tc_base_template_type: ... Pass unix:tc_body_var: ... Pass unix:tc_calltip_in_func: ... Pass unix:tc_char_dot: ... Pass unix:tc_complete_kw: ... Pass unix:tc_currmod_fqn: ... Pass unix:tc_ditto_scopes: ... Pass unix:tc_empty_module: ... Pass 00000unix:tc_empty_requests: ... Pass unix:tc_erroneous_body_content: ... Pass unix:tc_extended_ditto: ... Pass unix:tc_extended_types: ... Pass unix:tc_if_auto_array: ... Pass unix:tc_if_var: ... Pass unix:tc_import_symbol_list: ... Pass unix:tc_incomplete_switch: ... Pass unix:tc_issue558: ... Pass unix:tc_locate_ufcs_function: ... Pass unix:tc_middle_of_utf: ... Pass unix:tc_module_scope_op: ... Pass unix:tc_named_mixin: ... Pass unix:tc_opaque_structs: ... Pass unix:tc_pointer_type_printing: ... Pass unix:tc_pointers: ... Pass import: /home/runner/work/DCD/DCD/tests/tc_recursive_public_import/testing unix:tc_recursive_public_import: ... Pass unix:tc_rm_import: ... Pass unix:tc_scope_mess: ... Pass unix:tc_selective_import_list: ... Pass unix:tc_super_scope: ... Pass unix:tc_template_param_props: ... Pass unix:tc_traits: ... Pass unix:tc_ufcs_alias_this_completion: ... Pass unix:tc_ufcs_array_type_completion: ... Pass unix:tc_ufcs_calltip_in_func: ... Pass unix:tc_ufcs_fundamental_types_completion: ... Pass unix:tc_ufcs_pointer_type_completion: ... Pass unix:tc_ufcs_string_and_string_literal_completion: ... Pass unix:tc_ufcs_struct_completion: ... Pass Shutting down server... 106 tests passed and 0 failed. STAT:DCD run_tests.sh Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.08 STAT:DCD run_tests.sh Maximum resident set size (kbytes): 10552 STAT: STAT:short requests: (219x) STAT: min request time = 0.021ms STAT: 10th percentile = 0.133ms STAT: median time = 0.519ms STAT: 90th percentile = 0.896ms STAT: max request time = 2.086ms STAT: STAT: Warning Warning: License in subpackage dcd:dsymbol is different than it's parent package, this is discouraged. Starting Performing "profile-gc" build using dmd for x86_64. Up-to-date msgpack-d 1.0.4: target for configuration [default] is up to date. Building dcd:common 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] Pre-build Running commands common/src/dcd/common/messages.d(264,3): Deprecation: `return` statements cannot be in `scope(failure)` bodies. common/src/dcd/common/messages.d(264,3): Use try-catch blocks for this purpose Up-to-date emsi_containers 0.9.0: target for configuration [library] is up to date. Up-to-date libdparse 0.22.0: target for configuration [library] is up to date. Building dcd:dsymbol 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [library] ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` dsymbol/src/dsymbol/conversion/first.d(726,7): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(731,52): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(732,46): Deprecation: function `dparse.ast.IfStatement.identifier` is deprecated - use condition.identifier dsymbol/src/dsymbol/conversion/first.d(733,8): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(734,42): Deprecation: function `dparse.ast.IfStatement.type` is deprecated - use condition.type dsymbol/src/dsymbol/conversion/first.d(738,36): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression dsymbol/src/dsymbol/conversion/first.d(739,33): Deprecation: function `dparse.ast.IfStatement.expression` is deprecated - use condition.expression Building dcd 0.16.0-beta.1+commit.11.ga9bb7e8: building configuration [server] ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(936,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(950,18): Deprecation: reference to local variable `this` assigned to non-scope `(*this.left).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(951,19): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).right` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(908,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(922,19): Deprecation: reference to local variable `this` assigned to non-scope `(*this.right).parent` ../../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/ttree.d(923,18): Deprecation: reference to local variable `this` assigned to non-scope `(*newRoot).left` Linking dcd-server Finished To force a rebuild of up-to-date targets, run again with --force Shutting down currently-running server... Running tests for unix sockets Starting server... Server is running unix:tc001: ... Pass unix:tc002: ... Pass unix:tc003: ... Pass unix:tc004: ... Pass unix:tc005: ... Pass unix:tc006: ... Pass unix:tc007: ... Pass unix:tc008: ... Pass unix:tc009: ... Pass unix:tc010: ... Pass unix:tc011: ... Pass unix:tc012: ... Pass unix:tc013: ... Pass unix:tc014: ... Pass unix:tc015: ... Pass unix:tc016: ... Pass unix:tc017: ... Pass unix:tc018: ... Pass unix:tc019: ... Pass unix:tc020: ... Pass unix:tc021: ... Pass unix:tc022: ... Pass unix:tc023: ... Pass unix:tc024: ... Pass unix:tc025: ... Pass unix:tc026: ... Pass unix:tc027: ... Pass unix:tc028: ... Pass unix:tc029: ... Pass unix:tc030: ... Pass unix:tc031: ... Pass unix:tc032: ... Pass unix:tc033: ... Pass unix:tc034: ... Pass unix:tc035: ... Pass unix:tc036: ... Pass unix:tc037: ... Pass unix:tc038: ... Pass unix:tc039: ... Pass unix:tc040: ... Pass unix:tc041: ... Pass unix:tc042: ... Pass unix:tc043: ... Pass unix:tc044: ... Pass unix:tc045: ... Pass unix:tc046: ... Pass unix:tc047: ... Pass unix:tc048: ... Pass unix:tc049: ... Pass unix:tc050: ... Pass unix:tc051: ... Pass unix:tc052: ... Pass unix:tc053: ... Pass unix:tc054: ... Pass unix:tc055: ... Pass unix:tc056: ... Pass unix:tc057: ... Pass unix:tc058: ... Pass unix:tc059: ... Pass unix:tc060: ... Pass unix:tc061: ... Pass unix:tc062: ... Pass unix:tc620: ... Pass unix:tc_access_modifiers: ... Pass unix:tc_accesschain_type: ... Pass unix:tc_anon_class: ... Pass unix:tc_anon_struct: ... Pass unix:tc_bang_op_or_template: ... Pass unix:tc_base_template_type: ... Pass unix:tc_body_var: ... Pass unix:tc_calltip_in_func: ... Pass unix:tc_char_dot: ... Pass unix:tc_complete_kw: ... Pass unix:tc_currmod_fqn: ... Pass unix:tc_ditto_scopes: ... Pass unix:tc_empty_module: ... Pass 00000unix:tc_empty_requests: ... Pass unix:tc_erroneous_body_content: ... Pass unix:tc_extended_ditto: ... Pass unix:tc_extended_types: ... Pass unix:tc_if_auto_array: ... Pass unix:tc_if_var: ... Pass unix:tc_import_symbol_list: ... Pass unix:tc_incomplete_switch: ... Pass unix:tc_issue558: ... Pass unix:tc_locate_ufcs_function: ... Pass unix:tc_middle_of_utf: ... Pass unix:tc_module_scope_op: ... Pass unix:tc_named_mixin: ... Pass unix:tc_opaque_structs: ... Pass unix:tc_pointer_type_printing: ... Pass unix:tc_pointers: ... Pass import: /home/runner/work/DCD/DCD/tests/tc_recursive_public_import/testing unix:tc_recursive_public_import: ... Pass unix:tc_rm_import: ... Pass unix:tc_scope_mess: ... Pass unix:tc_selective_import_list: ... Pass unix:tc_super_scope: ... Pass unix:tc_template_param_props: ... Pass unix:tc_traits: ... Pass unix:tc_ufcs_alias_this_completion: ... Pass unix:tc_ufcs_array_type_completion: ... Pass unix:tc_ufcs_calltip_in_func: ... Pass unix:tc_ufcs_fundamental_types_completion: ... Pass unix:tc_ufcs_pointer_type_completion: ... Pass unix:tc_ufcs_string_and_string_literal_completion: ... Pass unix:tc_ufcs_struct_completion: ... Pass Shutting down server... 106 tests passed and 0 failed. Running tests for tcp sockets Starting server... Server is running tcp:tc001: ... Pass tcp:tc002: ... Pass tcp:tc003: ... Pass tcp:tc004: ... Pass tcp:tc005: ... Pass tcp:tc006: ... Pass tcp:tc007: ... Pass tcp:tc008: ... Pass tcp:tc009: ... Pass tcp:tc010: ... Pass tcp:tc011: ... Pass tcp:tc012: ... Pass tcp:tc013: ... Pass tcp:tc014: ... Pass tcp:tc015: ... Pass tcp:tc016: ... Pass tcp:tc017: ... Pass tcp:tc018: ... Pass tcp:tc019: ... Pass tcp:tc020: ... Pass tcp:tc021: ... Pass tcp:tc022: ... Pass tcp:tc023: ... Pass tcp:tc024: ... Pass tcp:tc025: ... Pass tcp:tc026: ... Pass tcp:tc027: ... Pass tcp:tc028: ... Pass tcp:tc029: ... Pass tcp:tc030: ... Pass tcp:tc031: ... Pass tcp:tc032: ... Pass tcp:tc033: ... Pass tcp:tc034: ... Pass tcp:tc035: ... Pass tcp:tc036: ... Pass tcp:tc037: ... Pass tcp:tc038: ... Pass tcp:tc039: ... Pass tcp:tc040: ... Pass tcp:tc041: ... Pass tcp:tc042: ... Pass tcp:tc043: ... Pass tcp:tc044: ... Pass tcp:tc045: ... Pass tcp:tc046: ... Pass tcp:tc047: ... Pass tcp:tc048: ... Pass tcp:tc049: ... Pass tcp:tc050: ... Pass tcp:tc051: ... Pass tcp:tc052: ... Pass tcp:tc053: ... Pass tcp:tc054: ... Pass tcp:tc055: ... Pass tcp:tc056: ... Pass tcp:tc057: ... Pass tcp:tc058: ... Pass tcp:tc059: ... Pass tcp:tc060: ... Pass tcp:tc061: ... Pass tcp:tc062: ... Pass tcp:tc620: ... Pass tcp:tc_access_modifiers: ... Pass tcp:tc_accesschain_type: ... Pass tcp:tc_anon_class: ... Pass tcp:tc_anon_struct: ... Pass tcp:tc_bang_op_or_template: ... Pass tcp:tc_base_template_type: ... Pass tcp:tc_body_var: ... Pass tcp:tc_calltip_in_func: ... Pass tcp:tc_char_dot: ... Pass tcp:tc_complete_kw: ... Pass tcp:tc_currmod_fqn: ... Pass tcp:tc_ditto_scopes: ... Pass tcp:tc_empty_module: ... Pass 00000tcp:tc_empty_requests: ... Pass tcp:tc_erroneous_body_content: ... Pass tcp:tc_extended_ditto: ... Pass tcp:tc_extended_types: ... Pass tcp:tc_if_auto_array: ... Pass tcp:tc_if_var: ... Pass tcp:tc_import_symbol_list: ... Pass tcp:tc_incomplete_switch: ... Pass tcp:tc_issue558: ... Pass tcp:tc_locate_ufcs_function: ... Pass tcp:tc_middle_of_utf: ... Pass tcp:tc_module_scope_op: ... Pass tcp:tc_named_mixin: ... Pass tcp:tc_opaque_structs: ... Pass tcp:tc_pointer_type_printing: ... Pass tcp:tc_pointers: ... Pass import: /home/runner/work/DCD/DCD/tests/tc_recursive_public_import/testing tcp:tc_recursive_public_import: ... Pass tcp:tc_rm_import: ... Pass tcp:tc_scope_mess: ... Pass tcp:tc_selective_import_list: ... Pass tcp:tc_super_scope: ... Pass tcp:tc_template_param_props: ... Pass tcp:tc_traits: ... Pass tcp:tc_ufcs_alias_this_completion: ... Pass tcp:tc_ufcs_array_type_completion: ... Pass tcp:tc_ufcs_calltip_in_func: ... Pass tcp:tc_ufcs_fundamental_types_completion: ... Pass tcp:tc_ufcs_pointer_type_completion: ... Pass tcp:tc_ufcs_string_and_string_literal_completion: ... Pass tcp:tc_ufcs_struct_completion: ... Pass Shutting down server... 212 tests passed and 0 failed. STAT:top 5 GC sources in server: STAT:bytes allocated, allocations, type, function, file:line STAT: 7711040 83095 void[] std.array.Appender!(DSymbol*[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577 STAT: 7667712 468 void[] std.array.Appender!(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;")[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577 STAT: 2277376 278 void[] std.array.Appender!(char[][]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577 STAT: 1868736 58398 std.array.Appender!(dsymbol.symbol.DSymbol*[]).Appender.Data std.array.Appender!(DSymbol*[]).Appender.this /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3452 STAT: 1582080 620 void[] std.array.Appender!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.102.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3577 ```
WebFreak001 commented 1 year ago

Wouldn't it also be annoying for the user to see completion whenever the user actually just want's to write a some floating number? Im not sure in that matter.

I think it wouldn't really matter, since users would just continue to type numbers when writing floats and would write method names/identifiers if they want ufcs.

vushu commented 1 year ago

@WebFreak001 I understand you concern I could just remove the support for string variable for now? by removing || symbolType.name.data == "string") // special case for string I only added support for stringLiteral to keep PR small , It would be trivial to add bool literal if this get s merged, numbers require a little more work.

WebFreak001 commented 1 year ago

sure we can add string support here, but we should not extend this code further with more types. Rather instead integrate it into the semantic passes to make sure everything benefits from this.

vushu commented 1 year ago

I agreed I will see if I can integrate UFCS more within the semantic passes and maybe remove ufcs.d altogether, but I will probably do it gradually.