Exception when creating a new class

Hi,
I installed the extension with the instructions provided (you might want to add installing yarn, tsc and one npm install which is missing) and then enabled it.
When I create a file for the first time (say, Class4.php in the root namespace), and then create class inside:
<?php

class Class4 {
}

I get the following exception in the output multiple times
[Error - 1:23:09 PM] Request textDocument/codeAction failed.
   When I reload the window, it seems to work.
My main interest is using phpactor's refactoring functions and I am willing to work around bugs and stuff if needed. There is literally nothing out there which I have found and does what you say phpactor does.

Sorry - versions:
I am using WSL 2 with Ubuntu. I have installed everything in /root, the extension is in /root/.vscode-server/extensions/vscode-phpactor. I am using VSCode's functionality to run directly on the Ubuntu.

Not sure if you need anything else.

you might want to add installing yarn, tsc and one npm install which is missing

It would be great if you could make a pull request for that, I don't work with VS code (or javascript!) much.

I have probably missed something. When I reload the window, it seems to work.

Did you do anything in particular which caused the error (incoke auto-completion f.e.)? Or did you simply create the file?

It would be great if you could make a pull request for that (can be as easy as clicking edit in github), I don't work with VS code (or javascript/typescript!) much.

I'd be happy to.

Did you do anything in particular which caused the error (incoke auto-completion f.e.)? Or did you simply create the file?

Not really. Created the file in an empty folder and started typing. If you give me more context on what that error means we can debug it I think.

You can enable logging, I think similar to the following:
{
        "logging.level": "debug",
        "logging.path": "/home/<user>/www/phpactor/phpactor-session.log",
}

One thing that can be tricky is if Phpactor gets the wrong project root path.

Is that a Phpactor config? I can't seem to make it log anything. The file does not seem to get created also.

It might be (at the VS code level):
{
    "phpactor": {
        "config": {
            "loggiing ...": "foo"
        }
    }
}

in anycase they should be eventually passed as the initialization options here: https://github.com/phpactor/vscode-phpactor/blob/master/src/extension.ts#L46

oh .. and also "logging.enable": true :facepalm:

That config crashed it:
	"phpactor.config": {
		"language_server_completion.trim_leading_dollar": true,
		"logging.level": "debug",
		"logging.path": "/root/phpactor-session.log",
		"logging.enable": true
	}

I still can't figure out why.

How can I run Phpactor manually with this config so I can probably see the error message?

It's logging.enabled not enable sorry.
Ideally you would be able to run the server as a standalone TCP server but this isn't currently possible with the extension I think: https://phpactor.readthedocs.io/en/develop/lsp/running.html#run-with-tcp-server.
Alternatively you can run phpactor from the CLI: ~/path/to/phpactor/bin/phpactor config:dump for example - although this WILL NOT use the config from vscode.

Dude... 😌
phpactor-session.log
There:
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0000] "Class6" with locator "Phpactor\Extension\LanguageServerWorseReflection\SourceLocator\WorkspaceSourceLocator" : Class "Class6" not found [] []
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0000] "Class6" with locator "Phpactor\Indexer\Adapter\Worse\IndexerClassSourceLocator" : Class "Class6" is indexed, but it does not exist at path ""! [] []
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0000] "Class6" with locator "Phpactor\Indexer\Adapter\Worse\IndexerFunctionSourceLocator" : Function "Class6" is indexed, but it does not exist at path ""! [] []
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0015] "Class6" with locator "Phpactor\WorseReflection\Core\SourceCodeLocator\StubSourceLocator" : Could not find source for "Class6" in stub directory "/root/phpactor/vendor/jetbrains/phpstorm-stubs" [] []
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0000] "Class6" with locator "Phpactor\WorseReflection\Core\SourceCodeLocator\NativeReflectionFunctionSourceLocator" : Could not locate function with Reflection: "Class6" [] []
[2020-12-13 14:53:43] phpactor.DEBUG: NOK [0.0002] "Class6" with locator "Phpactor\WorseReflection\Bridge\Phpactor\ClassToFileSourceLocator" : Could not locate a candidate for "Class6" [] []
[2020-12-13 14:53:43] phpactor.ERROR: Diagnostic error from provider "Phpactor\Extension\LanguageServerCodeTransform\CodeAction\TransformerCodeActionPovider": Could not find source with "Class6" {"trace":"#0 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/CoreReflector.php(126): Phpactor\\WorseReflection\\Core\\SourceCodeLocator\\ChainSourceLocator->locate(Object(Phpactor\\WorseReflection\\Core\\ClassName))\n#1 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/ClassReflector/MemonizedReflector.php(88): Phpactor\\WorseReflection\\Core\\Reflector\\CoreReflector->reflectClassLike(Object(Phpactor\\WorseReflection\\Core\\ClassName))\n#2 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Cache/TtlCache.php(44): Phpactor\\WorseReflection\\Core\\Reflector\\ClassReflector\\MemonizedReflector->Phpactor\\WorseReflection\\Core\\Reflector\\ClassReflector\\{closure}()\n#3 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/ClassReflector/MemonizedReflector.php(89): Phpactor\\WorseReflection\\Core\\Cache\\TtlCache->getOrSet('__class_like__C...', Object(Closure))\n#4 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/CompositeReflector.php(73): Phpactor\\WorseReflection\\Core\\Reflector\\ClassReflector\\MemonizedReflector->reflectClassLike(Object(Phpactor\\WorseReflection\\Core\\ClassName))\n#5 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/ReflectionMethod.php(94): Phpactor\\WorseReflection\\Core\\Reflector\\CompositeReflector->reflectClassLike(Object(Phpactor\\WorseReflection\\Core\\ClassName))\n#6 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php(37): Phpactor\\WorseReflection\\Bridge\\TolerantParser\\Reflection\\ReflectionMethod->declaringClass()\n#7 [internal function]: Phpactor\\WorseReflection\\Bridge\\TolerantParser\\Reflection\\Collection\\ReflectionMemberCollection->Phpactor\\WorseReflection\\Bridge\\TolerantParser\\Reflection\\Collection\\{closure}(Object(Phpactor\\WorseReflection\\Bridge\\TolerantParser\\Reflection\\ReflectionMethod))\n#8 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php(38): array_filter(Array, Object(Closure))\n#9 /root/phpactor/vendor/phpactor/code-transform/lib/Adapter/WorseReflection/Transformer/AddMissingProperties.php(108): Phpactor\\WorseReflection\\Bridge\\TolerantParser\\Reflection\\Collection\\ReflectionMemberCollection->belongingTo(Object(Phpactor\\WorseReflection\\Core\\ClassName))\n#10 /root/phpactor/vendor/phpactor/language-server-phpactor-extensions/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php(76): Phpactor\\CodeTransform\\Adapter\\WorseReflection\\Transformer\\AddMissingProperties->diagnostics(Object(Phpactor\\CodeTransform\\Domain\\SourceCode))\n#11 /root/phpactor/vendor/phpactor/language-server-phpactor-extensions/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php(60): Phpactor\\Extension\\LanguageServerCodeTransform\\CodeAction\\TransformerCodeActionPovider->getDiagnostics(Object(Phpactor\\LanguageServerProtocol\\TextDocumentItem))\n#12 /root/phpactor/vendor/phpactor/language-server/lib/Core/Diagnostics/AggregateDiagnosticsProvider.php(40): Phpactor\\Extension\\LanguageServerCodeTransform\\CodeAction\\TransformerCodeActionPovider->provideDiagnostics(Object(Phpactor\\LanguageServerProtocol\\TextDocumentItem))\n#13 [internal function]: Phpactor\\LanguageServer\\Core\\Diagnostics\\AggregateDiagnosticsProvider->Phpactor\\LanguageServer\\Core\\Diagnostics\\{closure}()\n#14 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(118): Generator->send(Array)\n#15 /root/phpactor/vendor/amphp/amp/lib/Internal/Placeholder.php(46): Amp\\Coroutine->Amp\\{closure}(NULL, Array)\n#16 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(151): Amp\\Coroutine->onResolve(Object(Closure))\n#17 /root/phpactor/vendor/amphp/amp/lib/functions.php(96): Amp\\Coroutine->__construct(Object(Generator))\n#18 /root/phpactor/vendor/phpactor/language-server/lib/Core/Diagnostics/AggregateDiagnosticsProvider.php(59): Amp\\call(Object(Closure))\n#19 /root/phpactor/vendor/phpactor/language-server/lib/Core/Diagnostics/DiagnosticsEngine.php(85): Phpactor\\LanguageServer\\Core\\Diagnostics\\AggregateDiagnosticsProvider->provideDiagnostics(Object(Phpactor\\LanguageServerProtocol\\TextDocumentItem))\n#20 [internal function]: Phpactor\\LanguageServer\\Core\\Diagnostics\\DiagnosticsEngine->Phpactor\\LanguageServer\\Core\\Diagnostics\\{closure}()\n#21 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(118): Generator->send(NULL)\n#22 /root/phpactor/vendor/amphp/amp/lib/Internal/Placeholder.php(149): Amp\\Coroutine->Amp\\{closure}(NULL, NULL)\n#23 /root/phpactor/vendor/amphp/amp/lib/Delayed.php(26): Amp\\Delayed->resolve(NULL)\n#24 /root/phpactor/vendor/amphp/amp/lib/Loop/NativeDriver.php(111): Amp\\Delayed->Amp\\{closure}('bew', NULL)\n#25 /root/phpactor/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\\Loop\\NativeDriver->dispatch(true)\n#26 /root/phpactor/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\\Loop\\Driver->tick()\n#27 /root/phpactor/vendor/amphp/amp/lib/Loop.php(95): Amp\\Loop\\Driver->run()\n#28 /root/phpactor/vendor/phpactor/language-server/lib/Core/Server/LanguageServer.php(113): Amp\\Loop::run(Object(Closure))\n#29 /root/phpactor/vendor/phpactor/language-server-extension/lib/LanguageServer/Command/StartCommand.php(59): Phpactor\\LanguageServer\\Core\\Server\\LanguageServer->run()\n#30 /root/phpactor/vendor/symfony/console/Command/Command.php(255): Phpactor\\Extension\\LanguageServer\\Command\\StartCommand->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#31 /root/phpactor/vendor/symfony/console/Application.php(1009): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#32 /root/phpactor/vendor/symfony/console/Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand(Object(Phpactor\\Extension\\LanguageServer\\Command\\StartCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#33 /root/phpactor/lib/Application.php(53): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#34 /root/phpactor/vendor/symfony/console/Application.php(149): Phpactor\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#35 /root/phpactor/bin/phpactor(42): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#36 {main}"} []

ok - looks like it's a bug with using the root path for code - can you see if it behaves in a sub-directory?

I did. It has the same bug. Do you want me to generate log for it too?

No I can reproduce, on VIM it's enough to close the file and open it again to make Phpactor recognise the file.
I don't get this issue in a normal project (with composer etc). So would need to investigate.

It's okay. Take your time.

This seems to happen when you rename namespaces and classes, too.

@dantleech I tried debugging this. It does happen to composer based projects also - I created one and tested. This is where I got, I would appreciate a bit of help (if possible):
So I took up the IndexerClassSourceLocator error. It had a reference to a Phpactor\Indexer\Adapter\Php\Serialized\SerializedIndex and it returned totally empty Phpactor\Indexer\Model\Record\ClassRecord:
Phpactor\Indexer\Model\Record\ClassRecord^ {#4588
  -implementations: []
  -implements: []
  -type: null
  -fqn: "Temp\Class4"
  -start: null
  -references: []
  #filePath: null
}

This is what it's instance of the index looks like:
Phpactor\Indexer\Model\Index\SearchAwareIndex^ {#1198
  -innerIndex: Phpactor\Indexer\Adapter\Php\Serialized\SerializedIndex^ {#1194
    -repository: Phpactor\Indexer\Adapter\Php\Serialized\FileRepository^ {#1192
      -path: "/root/.cache/phpactor/index/temp2-5738b5"
      -lastUpdate:<PHONE_NUMBER>
      -logger: Psr\Log\NullLogger^ {#1191}
      -buffer: []
      -counter: 0
      -serializer: Phpactor\Indexer\Model\RecordSerializer\PhpSerializer^ {#1193}
    }
  }
  -search: Phpactor\Indexer\Model\SearchIndex\FilteredSearchIndex^ {#1197
    -innerIndex: Phpactor\Indexer\Model\SearchIndex\ValidatingSearchIndex^ {#1196
      -innerIndex: Phpactor\Indexer\Adapter\Php\FileSearchIndex^ {#1195
        -initialized: false
        -subjects: []
        -path: "/root/.cache/phpactor/index/temp2-5738b5/search"
        -counter: 0
        -dirty: false
      }
      -index: Phpactor\Indexer\Adapter\Php\Serialized\SerializedIndex^ {#1194}
      -logger: Psr\Log\NullLogger^ {#1191}
    }
    -recordTypes: array:2 [
      0 => "class"
      1 => "function"
    ]
  }
}
```;
Meanwhile, this is what the instance that is actually indexing looks like (or rather, it's `innerIndex`):
```php
Phpactor\Indexer\Adapter\Php\Serialized\SerializedIndex^ {#1233
  -repository: Phpactor\Indexer\Adapter\Php\Serialized\FileRepository^ {#1190
    -path: "/root/.cache/phpactor/index/temp2-5738b5"
    -lastUpdate:<PHONE_NUMBER>
    -logger: Psr\Log\NullLogger^ {#1191}
    -buffer: array:2 [
      "classTemp\Class3" => Phpactor\Indexer\Model\Record\ClassRecord^ {#437
        -implementations: []
        -implements: []
        -type: "class"
        -fqn: "Temp\Class3"
        -start: 49
        -references: []
        #filePath: "/root/temp2/src/Class3.php"
      }
      "classTemp\Class4" => Phpactor\Indexer\Model\Record\ClassRecord^ {#1762
        -implementations: []
        -implements: []
        -type: "class"
        -fqn: "Temp\Class4"
        -start: 49
        -references: []
        #filePath: "/root/temp2/src/Class4.php"
      }
    ]
    -counter: 16
    -serializer: Phpactor\Indexer\Model\RecordSerializer\PhpSerializer^ {#1232}
  }
}

I hope that rings a bell. When I reload the window, IndexerClassSourceLocator doesn't get called at all.
P.S. I am just trying to help. I hope that is not too annoying. I figured this is not your day job so you don't have much time to tinker with my issues and I am happy to try and help when I have time. I would be reeeeealy happy to be able to use those refactorings so I am willing to reverse engineer how they work and see if I can be of help there as well.

On composer projects it works, you just have to wait a bit for the indexer to pick it up (several seconds).

UPDATE2: But you can make it lose it's mind when you change the namespace. Then no amount of saving or wating seems to help. Will try to debug that and post an update.

OK, I think I see the same problem if I try and apply a refactoring:

ok I found the cause of the above issue which also caused similar problems ocassionally with complete constructor and some other code actions.
can you try updating the vendor/phpactor/language-server-phpactor-extensions package (just doing a git pull in that directory should do if you are on develop.

I did a pull, my two test cases - the one at the top (creating a class) and the second renaming a namespace still give exceptions. The last one was while renaming a namespace from Temp3 to Temp4, it gave this:
[Error - 8:47:36 AM] Request textDocument/codeAction failed.
  Message: Exception [Phpactor\WorseReflection\Core\Exception\ClassNotFound] Unable to locate class "Temp4\Class2"
  Code: -32603
#0 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/ClassReflector/MemonizedReflector.php(88): Phpactor\WorseReflection\Core\Reflector\CoreReflector->reflectClassLike(Object(Phpactor\WorseReflection\Core\ClassName))
#1 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Cache/TtlCache.php(44): Phpactor\WorseReflection\Core\Reflector\ClassReflector\MemonizedReflector->Phpactor\WorseReflection\Core\Reflector\ClassReflector\{closure}()
#2 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/ClassReflector/MemonizedReflector.php(89): Phpactor\WorseReflection\Core\Cache\TtlCache->getOrSet('__class_like__T...', Object(Closure))
#3 /root/phpactor/vendor/phpactor/worse-reflection/lib/Core/Reflector/CompositeReflector.php(73): Phpactor\WorseReflection\Core\Reflector\ClassReflector\MemonizedReflector->reflectClassLike(Object(Phpactor\WorseReflection\Core\ClassName))
#4 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/ReflectionMethod.php(94): Phpactor\WorseReflection\Core\Reflector\CompositeReflector->reflectClassLike(Object(Phpactor\WorseReflection\Core\ClassName))
#5 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php(37): Phpactor\WorseReflection\Bridge\TolerantParser\Reflection\ReflectionMethod->declaringClass()
#6 [internal function]: Phpactor\WorseReflection\Bridge\TolerantParser\Reflection\Collection\ReflectionMemberCollection->Phpactor\WorseReflection\Bridge\TolerantParser\Reflection\Collection\{closure}(Object(Phpactor\WorseReflection\Bridge\TolerantParser\Reflection\ReflectionMethod))
#7 /root/phpactor/vendor/phpactor/worse-reflection/lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php(38): array_filter(Array, Object(Closure))
#8 /root/phpactor/vendor/phpactor/code-transform/lib/Adapter/WorseReflection/Transformer/CompleteConstructor.php(97): Phpactor\WorseReflection\Bridge\TolerantParser\Reflection\Collection\ReflectionMemberCollection->belongingTo(Object(Phpactor\WorseReflection\Core\ClassName))
#9 /root/phpactor/vendor/phpactor/code-transform/lib/Adapter/WorseReflection/Transformer/CompleteConstructor.php(111): Phpactor\CodeTransform\Adapter\WorseReflection\Transformer\CompleteConstructor->candidateClasses(Object(Phpactor\CodeTransform\Domain\SourceCode))
#10 /root/phpactor/vendor/phpactor/language-server-phpactor-extensions/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php(76): Phpactor\CodeTransform\Adapter\WorseReflection\Transformer\CompleteConstructor->diagnostics(Object(Phpactor\CodeTransform\Domain\SourceCode))
#11 /root/phpactor/vendor/phpactor/language-server-phpactor-extensions/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php(84): Phpactor\Extension\LanguageServerCodeTransform\CodeAction\TransformerCodeActionPovider->getDiagnostics(Object(Phpactor\LanguageServerProtocol\TextDocumentItem))
#12 /root/phpactor/vendor/amphp/amp/lib/functions.php(90): Phpactor\Extension\LanguageServerCodeTransform\CodeAction\TransformerCodeActionPovider->Phpactor\Extension\LanguageServerCodeTransform\CodeAction\{closure}()
#13 /root/phpactor/vendor/phpactor/language-server-phpactor-extensions/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php(103): Amp\call(Object(Closure))
#14 /root/phpactor/vendor/phpactor/language-server/lib/Core/CodeAction/AggregateCodeActionProvider.php(30): Phpactor\Extension\LanguageServerCodeTransform\CodeAction\TransformerCodeActionPovider->provideActionsFor(Object(Phpactor\LanguageServerProtocol\TextDocumentItem), Object(Phpactor\LanguageServerProtocol\Range))
#15 [internal function]: Phpactor\LanguageServer\Core\CodeAction\AggregateCodeActionProvider->Phpactor\LanguageServer\Core\CodeAction\{closure}()
#16 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(118): Generator->send(Array)
#17 /root/phpactor/vendor/amphp/amp/lib/Internal/Placeholder.php(46): Amp\Coroutine->Amp\{closure}(NULL, Array)
#18 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(151): Amp\Coroutine->onResolve(Object(Closure))
#19 /root/phpactor/vendor/amphp/amp/lib/functions.php(96): Amp\Coroutine->__construct(Object(Generator))
#20 /root/phpactor/vendor/phpactor/language-server/lib/Core/CodeAction/AggregateCodeActionProvider.php(34): Amp\call(Object(Closure))
#21 /root/phpactor/vendor/phpactor/language-server/lib/Handler/TextDocument/CodeActionHandler.php(59): Phpactor\LanguageServer\Core\CodeAction\AggregateCodeActionProvider->provideActionsFor(Object(Phpactor\LanguageServerProtocol\TextDocumentItem), Object(Phpactor\LanguageServerProtocol\Range))
#22 /root/phpactor/vendor/amphp/amp/lib/functions.php(90): Phpactor\LanguageServer\Handler\TextDocument\CodeActionHandler->Phpactor\LanguageServer\Handler\TextDocument\{closure}()
#23 /root/phpactor/vendor/phpactor/language-server/lib/Handler/TextDocument/CodeActionHandler.php(60): Amp\call(Object(Closure))
#24 /root/phpactor/vendor/phpactor/language-server/lib/Core/Handler/HandlerMethodRunner.php(86): Phpactor\LanguageServer\Handler\TextDocument\CodeActionHandler->codeAction(Object(Phpactor\LanguageServerProtocol\CodeActionParams), Object(class@anonymous))
#25 [internal function]: Phpactor\LanguageServer\Core\Handler\HandlerMethodRunner->Phpactor\LanguageServer\Core\Handler\{closure}()
#26 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(67): Generator->current()
#27 /root/phpactor/vendor/amphp/amp/lib/functions.php(96): Amp\Coroutine->__construct(Object(Generator))
#28 /root/phpactor/vendor/phpactor/language-server/lib/Core/Handler/HandlerMethodRunner.php(102): Amp\call(Object(Closure))
#29 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/HandlerMiddleware.php(38): Phpactor\LanguageServer\Core\Handler\HandlerMethodRunner->dispatch(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#30 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\HandlerMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#31 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/ResponseHandlingMiddleware.php(35): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#32 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\ResponseHandlingMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#33 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/MethodAliasMiddleware.php(37): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#34 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\MethodAliasMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#35 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/CancellationMiddleware.php(49): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#36 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\CancellationMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#37 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/InitializeMiddleware.php(68): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#38 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\InitializeMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#39 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/ErrorHandlingMiddleware.php(39): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#40 [internal function]: Phpactor\LanguageServer\Middleware\ErrorHandlingMiddleware->Phpactor\LanguageServer\Middleware\{closure}()
#41 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(67): Generator->current()
#42 /root/phpactor/vendor/amphp/amp/lib/functions.php(96): Amp\Coroutine->__construct(Object(Generator))
#43 /root/phpactor/vendor/phpactor/language-server/lib/Middleware/ErrorHandlingMiddleware.php(64): Amp\call(Object(Closure))
#44 /root/phpactor/vendor/phpactor/language-server/lib/Core/Middleware/RequestHandler.php(37): Phpactor\LanguageServer\Middleware\ErrorHandlingMiddleware->process(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage), Object(Phpactor\LanguageServer\Core\Middleware\RequestHandler))
#45 /root/phpactor/vendor/phpactor/language-server/lib/Core/Dispatcher/Dispatcher/MiddlewareDispatcher.php(29): Phpactor\LanguageServer\Core\Middleware\RequestHandler->handle(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#46 /root/phpactor/vendor/phpactor/language-server/lib/Core/Server/LanguageServer.php(204): Phpactor\LanguageServer\Core\Dispatcher\Dispatcher\MiddlewareDispatcher->dispatch(Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#47 [internal function]: Phpactor\LanguageServer\Core\Server\LanguageServer->Phpactor\LanguageServer\Core\Server\{closure}()
#48 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(67): Generator->current()
#49 /root/phpactor/vendor/amphp/amp/lib/functions.php(96): Amp\Coroutine->__construct(Object(Generator))
#50 /root/phpactor/vendor/amphp/amp/lib/functions.php(121): Amp\call(Object(Closure))
#51 /root/phpactor/vendor/phpactor/language-server/lib/Core/Server/LanguageServer.php(221): Amp\asyncCall(Object(Closure))
#52 /root/phpactor/vendor/phpactor/language-server/lib/Core/Server/LanguageServer.php(195): Phpactor\LanguageServer\Core\Server\LanguageServer->dispatchRequest(Object(Phpactor\LanguageServer\Core\Server\Transmitter\ConnectionMessageTransmitter), Object(Phpactor\LanguageServer\Core\Dispatcher\Dispatcher\MiddlewareDispatcher), Object(Phpactor\LanguageServer\Core\Server\StreamProvider\Connection), Object(Phpactor\LanguageServer\Core\Rpc\RequestMessage))
#53 [internal function]: Phpactor\LanguageServer\Core\Server\LanguageServer->Phpactor\LanguageServer\Core\Server\{closure}()
#54 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(118): Generator->send(Object(Phpactor\LanguageServer\Core\Rpc\RawMessage))
#55 /root/phpactor/vendor/amphp/amp/lib/Internal/Placeholder.php(149): Amp\Coroutine->Amp\{closure}(NULL, Object(Phpactor\LanguageServer\Core\Rpc\RawMessage))
#56 /root/phpactor/vendor/amphp/amp/lib/Coroutine.php(123): Amp\Coroutine->resolve(Object(Phpactor\LanguageServer\Core\Rpc\RawMessage))
#57 /root/phpactor/vendor/amphp/amp/lib/Internal/Placeholder.php(149): Amp\Coroutine->Amp\{closure}(NULL, 'Content-Length:...')
#58 /root/phpactor/vendor/amphp/amp/lib/Deferred.php(52): class@anonymous->resolve('Content-Length:...')
#59 /root/phpactor/vendor/amphp/byte-stream/lib/ResourceInputStream.php(101): Amp\Deferred->resolve('Content-Length:...')
#60 /root/phpactor/vendor/amphp/amp/lib/Loop/NativeDriver.php(183): Amp\ByteStream\ResourceInputStream::Amp\ByteStream\{closure}('a', Resource id #1, NULL)
#61 /root/phpactor/vendor/amphp/amp/lib/Loop/NativeDriver.php(96): Amp\Loop\NativeDriver->selectStreams(Array, Array, 0.167)
#62 /root/phpactor/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch(true)
#63 /root/phpactor/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#64 /root/phpactor/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#65 /root/phpactor/vendor/phpactor/language-server/lib/Core/Server/LanguageServer.php(113): Amp\Loop::run(Object(Closure))
#66 /root/phpactor/vendor/phpactor/language-server-extension/lib/LanguageServer/Command/StartCommand.php(59): Phpactor\LanguageServer\Core\Server\LanguageServer->run()
#67 /root/phpactor/vendor/symfony/console/Command/Command.php(255): Phpactor\Extension\LanguageServer\Command\StartCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#68 /root/phpactor/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#69 /root/phpactor/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Phpactor\Extension\LanguageServer\Command\StartCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#70 /root/phpactor/lib/Application.php(53): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#71 /root/phpactor/vendor/symfony/console/Application.php(149): Phpactor\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#72 /root/phpactor/bin/phpactor(42): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#73 {main}

I installed inotofy just to shorten the delay when using find, not sure why in a composer project still throws this error sometimes (I just tried it).
These are (I think) the relevant log lines:
[2020-12-23 08:51:34] phpactor.DEBUG: NOK [0.0001] "Temp3\Class4" with locator "Phpactor\WorseReflection\Core\SourceCodeLocator\NativeReflectionFunctionSourceLocator" : Could not locate function with Reflection: "Temp3\Class4" [] []
[2020-12-23 08:51:34] phpactor.DEBUG: NOK [0.0001] "Temp3\Class4" with locator "Phpactor\WorseReflection\Bridge\Phpactor\ClassToFileSourceLocator" : Could not locate a candidate for "Temp3\Class4" [] []
[2020-12-23 08:51:34] phpactor.DEBUG: Indexed file: /root/temp2/src/Class4.php [] []
[2020-12-23 08:51:35] phpactor.DEBUG: NOK [0.0000] "Temp3\Class4" with locator "Phpactor\Extension\LanguageServerWorseReflection\SourceLocator\WorkspaceSourceLocator" : Class "Temp3\Class4" not found [] []
[2020-12-23 08:51:35] phpactor.DEBUG: NOK [0.0000] "Temp3\Class4" with locator "Phpactor\Indexer\Adapter\Worse\IndexerClassSourceLocator" : Class "Temp3\Class4" is indexed, but it does not exist at path ""! [] []
[2020-12-23 08:51:35] phpactor.DEBUG: NOK [0.0000] "Temp3\Class4" with locator "Phpactor\Indexer\Adapter\Worse\IndexerFunctionSourceLocator" : Function "Temp3\Class4" is indexed, but it does not exist at path ""! [] []
[2020-12-23 08:51:35] phpactor.DEBUG: NOK [0.0014] "Temp3\Class4" with locator "Phpactor\WorseReflection\Core\SourceCodeLocator\StubSourceLocator" : Could not find source for "Temp3\Class4" in stub directory "/root/phpactor/vendor/jetbrains/phpstorm-stubs" [] []

Can you please help me with this - what are the responsibilities of WorkspaceSourceLocator as opposed to IndexerClassSourceLocator? The other two indexers/locators (IndexerFunctionSourceLocator and StubSourceLocator) seem obvious, I think, and don't participate in this bug.
Why does the same file work when you reload (and therefore reindex)? I see that WorkspaceSourceLocator's index class seems to track document events. Is it possible it is not called for some reason?
I managed to get the dump function working so I can debug relatively comfortably.

Also, is there an easy way to dump the contents of an Index? I know I can probably read the saved to disc version in ~/.cache/. I wonder (and will try to find out tonight):

Who is returning an empty record with just the class name with it?
Why does (and who, presumably WorkspaceSourceLocator) get confused when a class or a namespace are renamed?

cannot locate the file

when you say "rename namespace" what do you mean? (Phpactor supports moving files/classes etc, but not the from the language server currently)
the problem I fixed was due to the incorrect file path being passed when performing the code action, in your example the ingress for the file path is here:
https://github.com/phpactor/language-server-phpactor-extensions/blob/3265e505691b5ce9e19d61125fdbed6f0250f476/lib/LanguageServerCodeTransform/CodeAction/TransformerCodeActionPovider.php#L76
this already using the correct method - but it might be worth checking which path is being used - the "class-to-file" system depends on file paths, so if there are some unexpected paths getting through that might explain it).
saying that - the "class-to-file" system (which attempts to convert a path to a class FQN) shoud only be used as a last-resort, the class should be located in the workspace first, and then the index.

inotify

This only works on Linux AFAIK - not sure if it's possible for that to work on WSL (?) You could install Facebook's watchman (although that is experimental and has some issues currently)

workspace/indexer locator

workspace locator finds classes/functions in files which may not have been saved to disk yet, indexer locator is only files on disk.

dump contents of index

you can search the index from the command line:
phpactor index:search --is-class --short-name-begins=Array

by the way there is #phpactor channel on the ]Symfony Slack](https://symfony.com/community) which might be better to real-time questions and answers.

when you say "rename namespace" what do you mean? (Phpactor supports moving files/classes etc, but not the from the language server currently)

I mean just changing the name through typing, not using actions. Both changing the namespace or the class give the same problem. I saw the commands about moving classes and stuff - exciting! Tried from the command line with no success, but I didn't read a line of doc before that, so it's probably just me. ;)

the problem I fixed was due to the incorrect file path being passed when performing the code action, in your example the ingress for the file path is here:

I did review your changes, it's just that I am still finding my way around so I can't understand the significance yet.
What you said about indexers confirms what I thought, so I will continue debugging tonight and will keep you posted.

Fixed in this PR.


run container purges

docker rm docker ps -a | grep Exit | awk '{print $1}'

euch, but for only jobs we control or something? Not sure on this one


[RFC] Stride.Math with the new .NET 7 System.Numerics interfaces

Using the newly added abstract static method for interfaces we can reduce code repetition.
This shouldn't affect anything but number of lines of code for the vector implementations.
Some questions to answer before going forward with it :

Is it usable and comfortable ?
Is it viable performance wise ?
Can we do SIMD with it ?
Does it allow inlining ?

Implementation
using System;

namespace Stride.Maths

public struct Double2 : IVector2<Double2, double>
{
    public double X {get;set;}
    public double Y {get;set;}

    public Double2(double value)
    {
        X = value;
        Y = value;
    }
    public Double2(double x, double y)
    {
        X = x;
        Y = y;
    }

    public static double Distance(in Double2 value)
    {
        return (double)Math.Sqrt(value.X * value.X + value.Y * value.Y);
    }

    public static Double2 New(double value)
    {
        return new(value);
    }

    public static Double2 New(double x, double y)
    {
        return new(x,y);
    }

    public static void SquareRoot(in Double2 value, out Double2 result)
    {
        result = new((double)Math.Sqrt(value.X), (double)Math.Sqrt(value.Y));
    }
}

public struct Half2 : IVector2<Half2, Half>
{
    public Half X {get;set;}
    public Half Y {get;set;}

    public Half2(Half value)
    {
        X = value;
        Y = value;
    }
    public Half2(Half x, Half y)
    {
        X = x;
        Y = y;
    }

    public static Half Distance(in Half2 value)
    {
        return (Half)MathF.Sqrt((float)(value.X * value.X + value.Y * value.Y));
    }

    public static Half2 New(Half value)
    {
        return new(value);
    }

    public static Half2 New(Half x, Half y)
    {
        return new(x,y);
    }

    public static void SquareRoot(in Half2 value, out Half2 result)
    {
        result = new((Half)MathF.Sqrt((float)value.X), (Half)MathF.Sqrt((float)value.Y));
    }
}

Interface
using System.Numerics;

internal interface IVector2<T, Num>
    where T :
        struct,
        IVector2<T, Num>
    where Num : INumber<Num>
{
    public Num X { get; set; }
    public Num Y { get; set; }
    public T One => T.New(Num.One);
    public T Zero => T.New(Num.Zero);

    public static abstract T New(Num value);
    public static abstract T New(Num x, Num y);
    public static virtual void Abs(in T value, out T result)
    {
        result = T.New(Num.Abs(value.X), Num.Abs(value.Y));
    }

    public static virtual void Add(in T left, Num scalar, out T result)
    {
        result = T.New(
            left.X + scalar,
            left.Y + scalar
        );
    }
    public static virtual void Add(in T left, in T right, out T result)
    {
        result = T.New(
            left.X + right.X,
            left.Y + right.Y
        );
    }

    public static virtual void Clamp(in T value, in T min, in T max, out T result)
    {
        result = T.New(
            Num.MaxMagnitude(Num.MinMagnitude(value.X,max.X), min.X),
            Num.MaxMagnitude(Num.MinMagnitude(value.Y,max.Y), min.Y)
        );
    }
    public static abstract Num Distance(in T value);
    public static virtual Num DistanceSquared(in T value)
    {
        return value.X * value.X + value.Y * value.Y;
    }
    public static virtual void Divide(Num scalar, in T value, out T result)
    {
        result = T.New(
            scalar / value.X,
            scalar / value.Y
        );
    }
    public static virtual void Divide(in T value, Num scalar, out T result)
    {
        result = T.New(
            value.X / scalar,
            value.Y / scalar
        );
    }
    public static virtual void Divide(in T left, in T right, out T result)
    {
        result = T.New(
            left.X / right.X,
            left.Y / right.Y
        );
    }
    public static virtual Num Dot(in T left, in T right)
    {
        return left.X * right.X + left.Y * right.Y;
    }
    public static virtual void Lerp(in T value1, in T value2, Num amount, out T result)
    {
        T.Subtract(value2, value1, out var sub);
        T.Multiply(sub, amount, out var mul);
        T.Add(value1, mul, out result);
    }
    public static virtual void Multiply(in T value, Num scalar, out T result)
    {
        result = T.New(
            value.X * scalar,
            value.Y * scalar
        );
    }
    public static virtual void Multiply(in T left, in T right, out T result)
    {
        result = T.New(
            left.X * right.X,
            left.Y * right.Y
        );
    }
    public static virtual void Negate(in T value, out T result)
    {
        result = T.New(
            -value.X,
            -value.Y
        );
    }
    public static virtual void Normalize(in T value, out T result)
    {
        var x = value.X;
        var y = value.Y;
        result = T.New(
            x < -Num.One ? -Num.One : x > Num.One ? Num.One : x,
            x < -Num.One ? -Num.One : x > Num.One ? Num.One : y
        );
    }
    public static virtual void Reflect(in T vector, in T normal, out T result)
    {
        Num dot = T.Dot(vector,normal);
        result = T.New(
            vector.X - (Num.One + Num.One) * dot * normal.X,
            vector.Y - (Num.One + Num.One) * dot * normal.Y
        );
    }
    public static abstract void SquareRoot(in T value, out T result);

    public static virtual void Subtract(in T left, Num scalar, out T result)
    {
        result = T.New(
            left.X - scalar,
            left.Y - scalar
        );
    }
    public static virtual void Subtract(Num scalar, in T left, out T result)
    {
        result = T.New(
            scalar - left.X,
            scalar - left.Y
        );
    }
    public static virtual void Subtract(in T left, in T right, out T result)
    {
        result = T.New(
            left.X - right.X,
            left.Y - right.Y
        );
    }

    public static virtual void Transform(in T vector, in T transform, out T result)
    {
        T.Add(vector,transform, out result);
    }
    // public static virtual void TransformNormal(in T left, in T right, out T result);
}

I like this idea. But we definitely need to figure out a good shape of the interface (for example I don't like that distance is abstract but distance squared isn't - what if this vector is using a different distance measure?) and I think it should be public rather than internal.
Another thing - I don't remember what was the difference between Stride.Math and System. Numerics in terms of data shape/order but would it make sense to do a breaking change for the next release and move to Numerics types fully? Especially if they already have such static interfaces like this one.
From the performance standpoint - these methods are static. For each struct type a new specialized variant will be generated at runtime and inlining should apply as normal.
On the SIMD question - it will be used for the operations as it normally would. For batch SIMD operations (say on array of vectors) I don't know if JIT supports it or if it's something additional we'd need to implement.

For System.Numerics i think we have two things related to that discussion
#291
#1161
And for the abstract Distance function, i haven't yet found a way to call Math.Sqrt without having to cast the number to double, there doesn't seem to be any interface that allows this behavior. Will keep searching or we can wait an see what's going to come in .NET 8+

Thanks for the reference to those issues.
Yeah, I would be definitely for using those static interfaces to simplify things.
Have you seen this reddit question? https://www.reddit.com/r/csharp/comments/ti11e1/can_i_cast_an_inumber_or_similar_to_systemdouble/ You can use double.CreateChecked to cast onto a double and feed it to the Sqrt and then Num.CreateTruncating to convert it back onto a Num or something like that. Though my quick check of the source code didn't find a conversion between Half and Double (maybe I wasn't looking in the right place)...

Also some good discussion here https://github.com/dotnet/runtime/issues/24168 and one of the recent comments suggested looking at Silk.NET.Maths

Can I suggest not doing this unless it is part of a replacement for Stride.Math? The current implementation is up to at least 40x slower than necessary and the programming experience with it, and/or the availability of a large amount of duplicated operations is not quite right anymore and this also makes changing the code as opposed to rewriting a lot of work.


Cross Partition Query Error

I've tried to run through this example a few times just to make sure I haven't missed a step.  I'm using Visual Studio for Mac and when I try to run the app, I get the following error:
Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception.
ActivityId: c24d3f0a-304d-42a3-833a-4e2feb08addc, Microsoft.Azure.Documents.Common/2.5.1, Darwin/10.14 documentdb-netcore-sdk/1.9.1
Any suggestions?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e20117b0-215d-d6aa-584e-89d3b6141980
Version Independent ID: 427b8f4b-a590-be9b-e3a7-ed37add89295
Content: Azure Cosmos DB: Build a todo app with Xamarin
Content Source: articles/cosmos-db/create-sql-api-xamarin-dotnet.md
Service: cosmos-db
Sub-service: cosmosdb-sql
GitHub Login: @codemillmatt
Microsoft Alias: masoucou

@sjbolinger  Thanks for the question! We are investigating and will update you shortly.

I fixed the issue with two edits to the CosmostDBService.cs file:
var todoQuery = docClient.CreateDocumentQuery(
UriFactory.CreateDocumentCollectionUri(databaseName, collectionName),
new FeedOptions { MaxItemCount = -1**, EnableCrossPartitionQuery = true** })
.Where(todo => todo.Completed == false)
.AsDocumentQuery();
var completedToDoQuery = docClient.CreateDocumentQuery(
UriFactory.CreateDocumentCollectionUri(databaseName, collectionName),
new FeedOptions { MaxItemCount = -1**, EnableCrossPartitionQuery = true** })
.Where(todo => todo.Completed == true)
.AsDocumentQuery();

@sjbolinger Thank you very much for posting the solution to this issue. I will have the content author review this and make an appropriate update to the sample solution. Thanks again.

@codemillmatt Looks like the customer identified an issue with this tutorial and wanted to bring this to your attention. Please let CXP know if there is a change you would like use to make. Thank you.

Fix merged into master of the azure sample. Thanks @SnehaGunda !!
Thank you @sjbolinger for finding it.

@sjbolinger in addition to the code sample, I made some fixes to the doc. We will now close this issues if there aren't further questions.
#please-close


Prebuilt binary reported as malware?

Any idea why I get so many reports from the prebuilt release?
https://www.virustotal.com/gui/file/66b7c456e74d4c633cd0119392e2147dd29f84e8e110df254ae42ad8fb008448
Chrome even blocks the download completely and windows deletes the dll file in the client folder when trying to access it.

The loader injects an unsigned dll (the mod itself) and patches the game from within. That's why you get those detections, if you want to use the binaries disable chrome security to download files and disable windows defender or download the source and compile it yourself. Either way, you will have to disable or lower windows defender.


Add quiet to CLI

Don't output anything if problems not found. BTW, most CLI programs don't output anything by default. Maybe change behavior on this. I can do PR if your accept.

A PR to add a quiet flag would be acceptable so long as the default behavior stays the same.

I agree with this! This will enable nice integration when running multiple NPM scripts like npm run nsp && npm run tests

added in<EMAIL_ADDRESS>


Update ocp client

There are newer versions on
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
I have been pinged about oc being out of date. Probably nothing major.

Specifically, the RHPDS catalog is right now at version 4.1.3 serverside and they want the oc client inside homeroom to match that version.
I see there's already 4.1.7 out.
This file and the Dockerfile probably needs updating to include other client versions

Updated to 4.1.7 in 2.11.2. Updated derived dashboard image still to come.


AZ function Dotnet app with eventhub trigger: 404 message entity could not be found

deployment:
apiVersion: v1
kind: ConfigMap
metadata:
  name: demoapp
  namespace: demo-ns
  labels:
    app: demoapp
data:
  DemoAppEventHubName: "demoapp"
  DemoAppConsumerGroupName: "demoappconsumer"
  EventhubConnectionString: "Endpoint=sb://demo-app-eventhub.servicebus.windows.net/;SharedAccessKeyName=demokey;SharedAccessKey=adasfsdafdasdfasdfasdfasdfasd=;TransportType=AmqpWebSockets"
  AzureWebJobsStorage: "DefaultEndpointsProtocol=https;AccountName=demoappsa;AccountKey=asdfadfasdfasdfasdf==;EndpointSuffix=core.windows.net"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demoapp
  namespace: demo-ns
  labels:
    app: demoapp
spec:
  selector:
    matchLabels:
      app: demoapp
  template:
    metadata:
      labels:
        app: demoapp
    spec:
      containers:
      - name: demoapp
        image: demoapp
        envFrom:
        - configMapRef:
            name: demoapp
---
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
  name: demoapp
  namespace: demo-ns
  labels:
    deploymentName: demoapp
spec:
  scaleTargetRef:
    deploymentName: demoapp
  triggers:
  - type: azure-eventhub
    metadata:
      type: eventHubTrigger
      connection: EventhubConnectionString
      storageConnection: AzureWebJobsStorage
      blobContainer: 'azure-webjobs-eventhub'
      consumerGroup: '%DemoAppConsumerGroupName%'
      eventHubName: '%DemoAppEventHubName%'
---

Keda logs:
"msg":"unable to get runtimeInfo for isActive","error":"unhandled error link a0b394d6-215a-4f54-9772-20bc57128cf9: status code 404 and description: The messaging entity 'sb://demo-app-eventhub.servicebus.windows.net/' could not be found. To know more visit https://aka.ms/sbResourceMgrExceptions. ","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/kedacore/keda/pkg/scalers.(*AzureEventHubScaler).IsActive\n\tkeda/pkg/scalers/azure_eventhub_scaler.go:152\ngithub.com/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment\n\tkeda/pkg/handler/scale_loop.go:119\ngithub.com/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale\n\tkeda/pkg/handler/scale_loop.go:45\ngithub.com/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop\n\tkeda/pkg/handler/scale_loop.go:28"

Not sure of where the issue is. when I run the app without the scaler it works.

@marchenm Is there anything we can improve on our end or did you manage to figure it out?

@tomkerkhove I managed to figure it out.
My connection string didn't have the EntityPath appended to it. From the docs I wasn't sure if the scaler would append based on the eventHubName passed in.
Also I had to change the consumerGroup to the actual consumer group. Setting it to the env var used by the deployment didn't work for me.
Also the scaler that the func tools spit out wasn't usable, but thats an issue for that repository.

Glad to hear it's resolved!
Will try to improve this a bit to make it easier for you!


Add support for removing unused .9.png files

In addition to .png files, this will remove .9.png files too that are unused.

Thanks for the pull request by the way!

I wonder high-level if it'd be easier to manually sub-string off the '.png' or '.9.png'

Other than that, I think this looks good. Thanks for the addition!

@joshruesch Can we merge this?

Looks good to me. @hhoang, will you please merge this in (:

Yeah. Sorry for the delay. Thank you for your contribution @ayjindal!


suggestion: replace cf_cli.sh with kwt; support all routes

During the hands on demo at The Hague, cf_cli.sh was given as a workaround to not having setup public DNS + an ingress service into the Router. It only supported a limited set of hostAliases.
Instead, I propose we promote the use of kwt net start to map the CF domains to the local machine and allow http/https/tcp routing from the local machine into the k8s cluster.
sudo -E kwt net start --dns-map scf.suse.dev=$(kubectl get svc -n scf scf-router-0 --template '{{.spec.clusterIP}}') --namespace scf

This allows any route under .scf.suse.dev (all deployed apps) to be work as expected, not just a fixed set of hostAliases such as app1, app2, etc.

I tried this, and while it worked, it was way too slow. @drnic Did you notice the same thing?

I’ve not thought it was too slow ( even for multiple API requests like many
cf commands).
@cppforlife - any ideas when/why kwt net start proxies might feel slow?
Dr Nic Williams
Stark & Wayne LLC
http://starkandwayne.com
+61 437 276 076
twitter @drnic

For me, it took many seconds for each cf command.

Sample of cf login with all its internal calls where I'm in Australia and the cluster is Azure westus2 (200msec away):

cf login - https://cl.ly/25fce29be469
cf apps + cf buildpacks commands - https://cl.ly/bae09426bec5

It's definitely way faster than what I experienced. I'll try again later. Thanks for the samples.


Not found backup engine S3

Hi!
Running the latest version of helm chart 0.20.3.
Trying to restore a database from a backup previously made by a different clickhouse instance via BACKUP TABLE ... TO S3(...)
The query looks like the one documented here:
RESTORE DATABASE stats AS stats FROM S3('s3path', 's3keyid', 's3secret')

And I get an error:
Code: 627. DB::Exception: Not found backup engine S3. (BACKUP_ENGINE_NOT_FOUND) (version <IP_ADDRESS> (official build))

Any ideas on how to fix this or what I am doing wrong?

Question is not related to clickhouse-operator itself
try clickhouse/clickhouse-server:23.1 image for support S3 backup engine
all https://clickhouse.com/docs documentations always generated from master branch and could contains features which not supported in older versions


Google Cloud documentation displays jibberish text

Your Environment
Not applicable. The issue is related to documentation.
Describe the bug
The Google Cloud documentation is non existent, even worse it displays jibberish.

Markdown File: https://github.com/verdaccio/verdaccio/blob/master/website/docs/google-cloud.md
Docs Site Link: https://verdaccio.org/docs/google-cloud/

To Reproduce

Visit Docs > Google Cloud
Read documentation

Expected behavior
There should be instructions on how to setup Verdaccio with GCP
Screenshots, server logs, package manager log

Configuration File (cat ~/.config/verdaccio/config.yaml)
N/A
Environment information
N/A
Debugging output
N/A
Contribute to Verdaccio

[ ] I'm willing to fix this bug 🥇

Im new to Verdaccio, setting up npm registries and GCP so I may not be the best person to do this. That said, I'm willing to give it a shot if my time permits.

Good one, I always forgot remove that file because I have much clue about GCP, or maybe I was just waiting :-) someone fill it out with some nice info.

I've removed the page https://github.com/verdaccio/verdaccio/commit/bf0f331dfcb59e5d58c03577883b1eec4275cfb2 if someone wants to contribute by put it again with more info be my guest.


Check for ecr-fips endpoint availability

Description of changes:
Adds a check that the ecr-fips endpoint actually exists falling back to the default ECR endpoint if not.
The FIPS endpoint only exists in a handful of regions: https://aws.amazon.com/compliance/fips/
And I'd like to avoid hard-coding that list here, so I've used a DNS lookup.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This is more critical than it initially appears. #1458 was added to the bootstrap script a month ago. It adds an --enable-fips flag, but then it doesn’t use the flag when determining the ECR endpoint here:
AWS_ECR_SUBDOMAIN="ecr"
if [[ "$(sysctl -n crypto.fips_enabled)" == 1 ]]; then
  AWS_ECR_SUBDOMAIN="ecr-fips"
fi

We have fips enabled in our custom AMI, so this is always returning true, causing the bootstrap script to attempt to pull from a fips endpoint that may not exist.
The initial change is currently breaking any EKS node spun up in a region without a fips endpoint (pretty much everything not usa) that’s using an AMI built after this script was merged. Please review!

@imdevin567 the --enable-fips flag is a build-time argument, to produce a custom AMI with FIPS support. It's not intended to be used at runtime.
We'll get a fix merged for this so you can pull it in for your custom AMI's ASAP.

/ci launch
+build enable_fips=true

@cartermckinnon I understand -- we aren't using the flag at all, but our hardening scripts enable FIPS during build time, which is causing the FIPS url to be used regardless of the flag.

Thank you for the quick resolution!

I switched from dig to getent hosts to avoid installing bind-utils.
https://man7.org/linux/man-pages/man1/getent.1.html
The latter uses this syscall, should be sufficient: https://man7.org/linux/man-pages/man3/gethostbyname2.3.html

/ci launch
+build enable_fips=true

Checked a 1.28 node from CI in us-west-2, it's pulling from ecr-fips as expected:

-- Logs begin at Tue 2023-11-21 00:27:24 UTC, end at Tue 2023-11-21 01:03:51 UTC. --
Nov 21 00:28:28 ip-192-168-71-195.us-west-2.compute.internal systemd[1]: Starting pull sandbox image defined in containerd config.toml...
Nov 21 00:28:28 ip-192-168-71-195.us-west-2.compute.internal sudo[2886]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ctr#040--namespace#040k8s.io#040image#040ls
Nov 21 00:28:34 ip-192-168-71-195.us-west-2.compute.internal sudo[2908]:     root : TTY=unknown ; PWD=/ ; USER=root ;
Nov 21 00:28:34 ip-192-168-71-195.us-west-2.compute.internal sudo[2908]:     root : (command continued) COMMAND=/bin/ctr#040--namespace#040k8s.io#040content#040fetch#040602401143452.dkr.ecr-fips.us-west-2.
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]:<PHONE_NUMBER>52.dkr.ecr-fips.us-west-2.amazonaws.com/eks/pause:3.5:               resolved       |++++++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: index-sha256:529cf6b1b6e5b76e901abc43aee825badbd93f9c5ee5f1e316d46a83abbce5a2: downloading    |--------------------
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: elapsed: 0.1 s                                                                 total:   0.0 B (0.0 B/s)
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]:<PHONE_NUMBER>52.dkr.ecr-fips.us-west-2.amazonaws.com/eks/pause:3.5:                  resolved       |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: index-sha256:529cf6b1b6e5b76e901abc43aee825badbd93f9c5ee5f1e316d46a83abbce5a2:    done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: manifest-sha256:666eebd093e91212426aeba3b89002911d2c981fefd8806b1a0ccb4f1b639a60: downloading    |-----------------
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: elapsed: 0.2 s                                                                    total:  741.0  (3.6 KiB/s)
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]:<PHONE_NUMBER>52.dkr.ecr-fips.us-west-2.amazonaws.com/eks/pause:3.5:                  resolved       |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: index-sha256:529cf6b1b6e5b76e901abc43aee825badbd93f9c5ee5f1e316d46a83abbce5a2:    done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: manifest-sha256:666eebd093e91212426aeba3b89002911d2c981fefd8806b1a0ccb4f1b639a60: done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: layer-sha256:0692f38991d53a0c28679148f99de26a44d630fda984b41f63c5e19f839d15a6:    downloading    |-----------------
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: config-sha256:6996f8da07bd405c6f82a549ef041deda57d1d658ec20a78584f9f436c9a3bb7:   downloading    |-----------------
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: elapsed: 0.3 s                                                                    total:  1.2 Ki (4.1 KiB/s)
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]:<PHONE_NUMBER>52.dkr.ecr-fips.us-west-2.amazonaws.com/eks/pause:3.5:                  resolved       |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: index-sha256:529cf6b1b6e5b76e901abc43aee825badbd93f9c5ee5f1e316d46a83abbce5a2:    done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: manifest-sha256:666eebd093e91212426aeba3b89002911d2c981fefd8806b1a0ccb4f1b639a60: done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: layer-sha256:0692f38991d53a0c28679148f99de26a44d630fda984b41f63c5e19f839d15a6:    done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: config-sha256:6996f8da07bd405c6f82a549ef041deda57d1d658ec20a78584f9f436c9a3bb7:   done           |+++++++++++++++++
Nov 21 00:28:35 ip-192-168-71-195.us-west-2.compute.internal pull-sandbox-image.sh[2881]: elapsed: 0.4 s

@imdevin567 Please let me know if this doesn't resolve things in your environments.

@cartermckinnon we are pretty much blocked on our cluster upgrades because of this. How soon can we release a new AMI having this fix ?
Context: We have our own bespoke build process that takes base EKS ami and adds few tools on top of it. In one of the step, we enable fips in the kernel and by doing so the sandbox image script  automatically sets sandbox image with ecr-fips for non us-east/us-west regions (which is wrong).
Since this is merge to master, can we release a new version ?


New output mechanism

Allow command returns a CommandOutput object which defines the output format.
Also, keep reorganizing the commands.

If no more comments, I will merge then.


[BTS-1017] Fix optimizer rule for Hybrid Disjoint Smart Graphs

Scope & Purpose
EE PR:  https://github.com/arangodb/enterprise/pull/1073
Backport of DEVEL PR. Please see all related information in this PR:

https://github.com/arangodb/enterprise/pull/1069

Jenkins green.


Adding the ability to skip files

Thank you for this great project!
For my project I have several resx files that I would prefer to not leverage the source generator for. I have added a new option that can be put on the EmbeddedResource that enables ignoring the file completely (since removing the resx as an embedded resource is not an option for me). This is somewhat related to the problem identified in issue #2, but with a more generalized solution.
Happy to make any needed adjustments to this PR

Thank you for this great PR! Looks good to me, but could you please add a section for the new SkipFile option in README? You can do it in another PR if you want.

Thank you for this great PR! Looks good to me, but could you please add a section for the new SkipFile option to README? You can do it in another PR if you want.

Sure, I can add that.

Thanks for the PR!


More patterns

More patterns could be great

Not possible due to memory constraints.

good reason, I fully understand.
Thanks gain for your work and for making it open source!!


Acceptance CI tests

Would be great is to have some acceptance tests, because a lot of the problems are dependent on the host or guest OS' particularities. Of course those can't run on travis.
Is there another free CI service that allows to run Virtualbox VMs?
Otherwise we could look into running a jenkins on some dedicated hosting.

@njam This is rather complicated - the basic reason here is that most (at least all I am aware of) run their tests in a container of some sort, and you cant start a vagrant virtualization within an already virtualized env). At work, we currently develop some sort of "CI" for vagrant running on a normal root server - while this could technically work, it obviously wont be free.
As a first step, we maybe could still shell out those tests to be able to work in the respective dev env, and then later test ideas how to run them in a CI env?

Just ran into https://github.com/mitchellh/vagrant-spec - maybe thats worth looking into?

Thanks for the link! I started to draft two different options:
cucumber: https://github.com/phinze/landrush/pull/144

Good docu, community, support

Can run scenarios with different environments (providers, boxes) - "Scenario Outline"

Test isolation needs to be done manually after each test (vagrant destroy)

vagrant-spec: https://github.com/phinze/landrush/pull/145

Explicitly for vagrant, robust test isolation

Outdated and only little docu or examples

Can't find good way to run test in different environments

I would rather go with cucumber. What do you think? Or we should go a completely different way?

Wow, using cucumber here is a cool idea. Totally up for giving it a shot.

@njam So, finally was able to resolve my vagrant issues, and gave both approaches a shot. However, the cucumber version still seems not to be fully working, some test cases fail (details in the pr).
I agree with your assessment on vagrant-spec, though, it seems to be not that well suited for our cases here. I would suggest to close the vagrant-spec pr, and focus on cucumber, to get it in a better/fully running state. Not sure how to get this running within travis since a vm cant run in a vm, but maybe we can come up with another solution for a CI env.
What do you think, how should we proceed from here?

Closing in favor of https://github.com/vagrant-landrush/landrush/pull/144

Merged pull request #182.


CMS & APP: Embedded links in text editor

[x] Add automatic conversion of links to anchor tags ()

Technical notes
Look up the Link extension which does what we want: https://tiptap.dev/docs/editor/extensions/marks/link#page-title

Hey @ivanslabbert @DirkDevelopmentFreelance
The new package installed (@tiptap/extension-link) from Tiptap make most of test failing. We need to find a way to fix that. Mostly the tests where we are expecting datas to be rendered. Also, swichting back on the main branch keeps the tests failing as well.


Initial support for Terrain SmoothGrid data

DISCLAIMER: THIS IS MY FIRST ACTUAL PROJECT IN RUST. Terrible code will bleach your eyes!
Because of that, this PR also has edits by maintainers on.
This PR adds support for serialization and deserialization to rbx-types for the Terrain object SmoothGrid property data.
This fully permits the creation of external tooling for modification and generation of smooth terrain data, as Roblox Studio, along with RCCService (presumably) generate the additionally-required PhysicsGrid data at runtime/publish-time.
As a bonus, no reverse engineering of the client had to be done here; just a lot of comparing outputs with ImHex peddled by this article.
https://zeux.io/2017/03/27/voxel-terrain-storage/
Rendered spec.

further code commits are paused until structure is reviewed so I don't add the deserializer and have to immediately rewrite it

Architecturally I have some things I'd like to change but they involve files outside of this PR so I won't force them onto you.. Stuff like moving smooth_grid and material_colors into a submodule named terrain and having them share a Material enum, as an example. If you want to make those changes you're welcome to but otherwise I'll do it after this is merged.

i could give this a shot but I was mainly wondering how the enum should be structured with it being like this? the easiest way would be to just put it in order but you'd have to include air and some other non-colorable materials i think and then implement an error for them??

i could give this a shot but I was mainly wondering how the enum should be structured with it being like this? the easiest way would be to just put it in order but you'd have to include air and some other non-colorable materials i think and then implement an error for them??

for this

i could give this a shot but I was mainly wondering how the enum should be structured with it being like this? the easiest way would be to just put it in order but you'd have to include air and some other non-colorable materials i think and then implement an error for them??

There's a few ways I can imagine this working.
The first is that we just have a TerrainMaterial enum and error if you ever try to use a material that isn't allowed. This seems reasonable, but it's kind of a bummer that it would mean being unable to statically verify that a material was allowed.
Another option is to just say "to hell with it" and have multiple TerrainMaterial enums, which is how it's implemented right now. This solves the static analysis problem but it means that working with Terrain in rbx-dom requires two identically named enums, which is a terrible UX.
The final option I can see is that we have a centralized TerrainMaterial enum and then also module-specific material enums, which can be converted back and forth via from and try_from. I think I hate this idea, since it'd mean SmoothGridMaterial::try_from(TerrainMaterial::Water).unwrap() is a thing.
I'm inclined to go with the first option since it's the easiest and have the least obstructive UX possible. Moving us to a central TerrainMaterials enum is technically breaking, but I think I'm willing to accept it. We need to reorganize rbx_types either way, so if nothing else that can be done with this release. Curious to know what @kennethloeffler thinks though.

In terms of actual implementation, I imagine that each Terrain would have its own internal variant that it used that it just tried to convert into from the central TerrainMaterials. That'd allow each module to do its own thing while still giving a consistent public interface.

Can't wait for Ken for the rest of our days, so I'm gonna go ahead and say go for the plan I gave above with moving us to a central TerrainMaterials enum.


Vault widget in the Admin was not showing the correct connector state

Description
While GoLayer was trying out our platform they noticed that while the API Explorer was indicating that a connection was callable (screenshot 2), clicking on "Test Vault" via the configuration page led to "Unauthorized" status (screenshot 1).
I, @brahimmouhamou , tried it to with the<EMAIL_ADDRESS>account but the widget indicated Connected. Clicking around the admin and trying it again led to me reproducing the problem a couple of times. 10 minutes later was not able to reproduce the problem again.

I've been trying to reproduce it, but I can't. The problem does not seem to be in React Vault, because it will only show "Unauthorized" if the connection state is "added".  Not sure how the connection state can be added from React Vault but "callable" from API Exporer. That should only be possible if they used a different applicationId or consumerId. ConsumerId should be "test-consumer" in both cases, so don't think that's the problem. Do they have multiple applications? Would love to see the requests that are being made, but unfortunately, I'm just not able to reproduce it. Any specific steps I could take to reproduce it?

Not sure 🤷♂ couldn't reproduce it either. Maybe put the issue on hold or ask the customer if they can still reproduce the issue?


[SPARK-39916][SQL][MLLIB][REFACTOR] Merge ml SchemaUtils to SQL

What changes were proposed in this pull request?
Today we have two SchemaUtils: SQL SchemaUtils and mllib SchemaUtils. This pr is try to remove SchemaUtils in mllib.
Why are the changes needed?
Two SchemaUtils are often confused for us. MLlib SchemaUtils add a TODO flag and now we can do it.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
exist UT

CC @gengliangwang  @dongjoon-hyun @cloud-fan

Could you make the GitHub Action CI happy, @deshanxiao ?

Sure, seem that all checks have passed.

Can one of the admins verify this patch?

Very happy to receive these suggestions. Please let me know if anyone have any questions. Will close this PR.


How to get the score (confidence) of a 3D Bounding Box?

Hi folks,
I have observed this part of the source code:
"""
det.type in self.classes and det.score > self.score_thres):
            intrinsics = ros_intrinsics(self.camera_info.P)
            input_tensor,theta_ray = preprocessing(image,det,intrinsics)
            [orient, conf, dim] = self.model(input_tensor) #Apply the model to get the estimation
            orient = orient.cpu().data.numpy()[0, :, :]
            conf = conf.cpu().data.numpy()[0, :]
            dim = dim.cpu().data.numpy()[0, :]
            # print("Conf:{}".format(conf))
            dim += self.averages.get_item(det.type)

            argmax = np.argmax(conf)
            orient = orient[argmax, :]
            cos = orient[0]
            sin = orient[1]
            alpha = np.arctan2(sin, cos)
            alpha += self.angle_bins[argmax]
            alpha -= np.pi

"""
But that conf is a tuple of two numbers, which is used to determine the best orientation, like this:
"""
Conf:[ 6.3896847 -6.5501723]
Conf:[ 6.496025  -6.7066655]
Conf:[ 5.410366  -5.5474744]
Conf:[ 7.092432  -7.3124714]
Conf:[ 9.061753 -9.251386]
Conf:[ 7.587371 -7.831802]
Conf:[ 2.149212  -2.1235662]
Conf:[-0.84504336  0.89392436]
Conf:[ 4.436549  -4.5268965]
Conf:[ 1.2938225 -1.4327605]
"""
How can I get the score of the final 3D Bounding Box? (0 to 1 value, like in every 2D or 3D object detector)
Thanks in advance.

you solve it? @RobeSafe-UAH

Why don't you normalize the confidence array?


yaml_files and yaml_directories Resource precondition failed even if resource meets condition

Below error encountered even if both variable contain values. Example:
yaml_files = ["data/ndo.yaml"]
or
yaml_directories = ["data"]
│ Error: Resource precondition failed
│
│   on merge.tf line 21, in data "utils_yaml_merge" "model":
│   21:       condition     = length(var.yaml_directories) != 0 || length(var.yaml_files) != 0 || length(keys(var.model)) != 0
│     ├────────────────
│     │ var.model is empty map of dynamic
│     │ var.yaml_directories is empty list of string
│     │ var.yaml_files is empty list of string
│
│ Either yaml_directories,yaml_files or a non-empty model value must be provided.

Could you share the full module configuration you are using?

code.zip
i uploaded my test environment files

You are not using the module correctly. You should only have a single main.tf file and your data folder. Don't clone the repository.
This is all your main.tf needs to contain:
terraform {
  required_providers {
    aci = {
      source = "CiscoDevNet/mso"
    }
  }
}

provider "mso" {
  username = "admin"
  password = "xxxxx!"
  url      = "https://x.x.x.x:8443"
  platform = "nd"
}

module "nac-ndo" {
  source  = "netascode/nac-ndo/mso"
  version = ">= 0.8.1"

  yaml_files = ["data/ndo.yaml"]
  #yaml_directories = ["data"]

  manage_schemas = true
  manage_sites   = false
  manage_tenants = true
}


Load version info records with empty value

Load version info records that have empty values.
Let's say that a version info key Comments has a ValueLength = 0.
Right now such values are skipped and thus this key is not displayed in a dump.
These items do not include a null terminator in their values, that's why they have to be added manually.
This PR aims to display such key-value as
version_info_list
  [0]
    key = "Comments"
    value = ""
  ...
version_info
  Comments = ""
  ...

@googlebot I fixed it.

@tomaskender I test case for this edge case would be nice, do you have some small PE file with this characteristic that can be added to the tests?

@tomaskender I test case for this edge case would be nice, do you have some small PE file with this characteristic that can be added to the tests?

Addressed in the pr above


feedback -  aws-my-sample-app-ios-swift generated sample crashes

sample file
https://drive.google.com/file/d/1yVFNaLgfxu5S44zysgejjIdquSuvMVvB/view?usp=sharing
Cannot find executable for CFBundle 0x7fa8e5e42ea0 </Users/johndpope/Library/Developer/CoreSimulator/Devices/8ECCD6EE-9AB3-4559-810E-C00739F786BA/data/Containers/Bundle/Application/0522829F-326A-4059-B105-D39FC02E46AE/MySampleApp.app/Frameworks/AWSAuthUI.framework/AWSAuthUI.bundle> (not loaded)
upon logging in with google - I get a
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

I have run
pod install --repo-update

tried on device / simulator no joy
after signing into google page - it's coming up with google search page.

import GoogleSignIn
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {

    return GIDSignIn.sharedInstance().handle(url,
                                             sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String,
                                             annotation: options[UIApplicationOpenURLOptionsKey.annotation])
}

@johndpope
Just checking in to see if you are good to go or need help on this thread?

so the sample code that's spat out by aws mobile hub is missing above code. This is a critical bug.
thus - will crash when you successfully sign in to google.
I got it working for myself - but needs to be fixed upstream.
also - would make a lot of sense to have this sample dummy app in it's own repo (perhaps with all sign in / additional capabilities enabled.) the wizard style coding is great - but when you need to add stuff - I think it would beneficial to community to be able to chime in on features.
eg. how to read email from facebook / google - this is not supported in sample.
I'd also suggest using a protocol approach to adding code.
eg. Extend LoginViewController to support facebook - this would keep code separated / and not a massive hodge podge. Users can then cherry pick code into their own apps.

AppDelegate+Google.swift

extension AppDelegate{
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {

        return GIDSignIn.sharedInstance().handle(url,
                                                 sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String,
                                                 annotation: options[UIApplicationOpenURLOptionsKey.annotation])
    }
}

to be clear - the permissions are set to read public profile / and potentially email - but there's no actual call to invoke this from sample code. this needs it's own ticket - and preferrably where the repo for sample app is.
extension LoginViewController : FBSDKLoginButtonDelegate {

    func configureFacebook(){
        // log out the user if previously logged in.
        let facebookLoginManager = FBSDKLoginManager()
        facebookLoginManager.logOut()

        // set up the information you want to read from the user's Facebook account.
        facebookButton.readPermissions = ["public_profile", "email"];
    }

    func loginButton(_ loginButton: FBSDKLoginButton!,
                     didCompleteWith result: FBSDKLoginManagerLoginResult!,
                     error: Error!) {

        if error != nil {
            displayLoginError(error: error as NSError)
            return
        }

        if result.isCancelled {
                return
        }

        guard let idToken = FBSDKAccessToken.current() else {
            let error = NSError(domain: "com.asmtechnology.awschat",
                                code: 100,
                                userInfo: ["__type":"Unknown Error", "message":"Facebook JWT token error."])
            self.displayLoginError(error: error)
            return
        }

        let graphRequest : FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me",
                                                                 parameters: ["fields":"email,name"])

        graphRequest.start(completionHandler: { (connection, result, error) -> Void in

            if let error = error {
                self.displayLoginError(error: error as NSError)
                return
            }

            if let result = result as? [String : AnyObject],
                let name = result["name"] as? String {

                let email = result["email"] as? String

                CognitoIdentityPoolController.shared.getFederatedIdentityForFacebook(idToken: idToken.tokenString,
                    username: name, emailAddress: email,
                    completion: { (error: Error?) in

                        if let error = error {
                            self.displayLoginError(error:error as NSError)
                            return
                        }

                        self.displaySuccessMessage()
                        return
                })

            }

        })

    }

    func loginButtonDidLogOut(_ loginButton: FBSDKLoginButton!) {
        // do nothing.
    }

}

Hello @johndpope
We have instructions where we mention to add interceptors in delegate which are handled by AWSMobileClient and call underlying provider's methods (Google in this case)
https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-user-sign-in.html#set-up-google -> Step 4 in this link
That should prevent the crash.
I also understand your point where if we want to separately add Google handler, we need to call Google Sign In SDK directly.
Thanks,
Rohan


Use info loglevel in logging

https://github.com/radaron/torrent-ds/commit/e1214544a348ebef56e44713f77a1b381a27bb1c


[webapi][XWALK-3337] Update subcase num for SIMD

Case number isn't consistent in tests.xml and tests.full.xml, so update.

@haoxli seems we need to clean the xmlsimplifier.py and publish it.


add log file

Recreate a new PR based on this PR.
cc @technicalpickles

Overall, looks good to me. Just style and polish.

@michaelansel sorry for this late reply. I already pushed a new commit, could you please check again?

@vinhlh Thanks for the pull request! We're working on returning Hubot to its former glory, and as part of that we're establishing a new process for adding new features called Hubot Evolution. This change is a feature that I think would be worth going through this new process so we can talk about logging holistically.
If you're interested, you're welcome to start a proposal on the Hubot Evolution repo. No worries if that's more work than you signed up for, maybe someone else in the community will want this feature.
Let me know if you have any questions or concerns.


Claims are not granted when inviting participant by email

The inDeployment Claim is not granted correctly to participants invited through email.
This results for all endpoints require this claim to fail, including 'required participant data'
This only happens for new users

This happens if the keycloak realm email settings is not configured. So when keyloak api endpoint execute-actions-email is called, the request fails.
I have try catched that block of code. This is because the method might be called in the loop and the other emails still need to be handled.


Preview is stretched on some devices

I run on Sony Xperia M4 Aqua Dual E2312 and preivew screen looks like stretched.
Could you fix it?

Unfortunately this also seems to effect the resulting video. I have set
.videoPreferredHeight(720)
.videoPreferredAspect(16f / 9f)
and it results in a stretched video on at least
motorolla g2
samsung galaxy s4
samsung galaxy s7
Until recently I used the commit https://github.com/afollestad/material-camera/commit/8f51691d2e5fdba1efb54befd9ed12e3649926e4 where this problem did not occur and checked every commit after that for changes that might affect this -  but the only thing I can think of is an update in one of the libs (material dialogs maybe?)

@ManicMapple my Material Dialogs library couldn't have any affect on video previews.

@afollestad I guess the problem is the surface. http://stackoverflow.com/questions/22105251/android-mediarecorder-aspect-ratio-incorrect
The cases where I had Problems were when preview size (chooseOptimalSize()) and videosize (chooseVideoSize()) had different aspects. (1280x720 vs 960x720)
I solved teh problem (for me, badly) by using the video size as preview size...  This way the videos had the correct aspect.
Sadly, on samsung galaxy s7 thsi dows not help... the video is just a still image.

Same issue on my Galaxy S4 Advanced

https://github.com/afollestad/material-camera/releases/tag/0.2.6


[WIP] Refactor dense_head and speedup

@ZwwWayne  idxes or idxs?
seems we use idxs for a quite long time.


provide stable ordering of generated IaC across all runs

The trickiest big will be the topological ordering. The library we currently use doesn't support it, so we would need to either work around that or propose a change to the library.
Some options:

propose a change to the library (we should first check to see if they'd be willing)
soft-fork the library to add our change, even if we don't get it into upstream; or, just cp the TopologicalSort method specifically into our code base, and use that rather than the library's
use a different library

#459 did a lot of this, but we still need to ensure stability with:

[ ] subnetIds
[ ] dependsOn
(and possibly more, but those are the ones I've found so far)

To test:

pick a package (I didi the above with ts-cloudfs in sample-apps)
klotho-compile
mv compiled/index.ts ~/Desktop
klotho-compile again
diff compiled/index.ts ~/Desktop/index.ts

The "resolves" in my comment (which is what auto-closed this ticket) was incorrect, as noted in my comment above.


move the techlahoma site code to another repo?

just wondering if we should split up discussion/todos and website code into 2 different repos (like 200okc-site for website and 200ok for getting non-site stuff done)

@amandaharlin Is the techlahoma/discussions repo not good for the discussion half of things? (Maybe I'm misunderstanding the goal of this issue?)

There does seem to be a lot of places for people to report bugs/concerns or ask questions. Maybe we could encourage non-contributing members to post to techlahoma/discussions and have a few board volunteers moderate it and echo the concerns to concerning project repo if necessary?


fix 64-bit precision in low-end GPUs

For #4237
The only difference is
position_world.xyz += position64Low;

vs.
position_world += project_uModelMatrix * vec4(position64Low, 0.0);

Looks like the former triggers some optimization in shader compilation.
Tested on iPhone; will release an alpha for testing on other devices once merged.

Coverage remained the same at 83.402% when pulling 3cdb6bcf4e9570a0a019f6a5a04f781dccfafe46 on x/64-bit-fix into 32c4c0e40ee076ec37f21e9a5ac7756fccaae6e9 on master.


Style guide/tabs

Changes in this PR:
Trello card / Rollbar error (etc)
https://trello.com/c/yXaeElqW/647-eui-style-tab-switcher-for-html-pdf-view
Screenshots of UI changes:
Before

After

[ ] Requires env variable(s) to be updated

Just wanted to note, while there's JS in here, this will work fine without it too :-)

I would like at some point to extend this to cope with more than 2 tabs, but that can wait 'til needed. It ought to be pretty simple, just a matter of refactoring the template a little


[Find In Files]: Files Search Count for a single character and for a word differs

Steps:

Launch Brackets
Open find in files and type any charcater eg m
Again do find in files and search for "ma"

Result : The searched files number for m is less than the count for "ma"

That is expected based on the implementation.
Currently we have a hard limit on 100,000 results across all files and search will stop as soon as over 100k results are got.
So what is happening in the case is,

whem m is searched, it found say 108k results in 8 files and returned.
a search for ma could then find 120k across 200 files and then return.

Yes, this is as per expectation. Please note that the phrase over X results in Y files would be mentioned in the panel in your case and hence the values of X in this case should not be compared until it is not preceded by "over".
Please close the issue if you are okay with the explanation.

yes, I understand that and over X results in Y files defines it as well but 100,000 results is our limitation to not the display the all results.
Some results are left unidentified. Is there any way to see the results which were not displayed as part of search results

yes, yu can filter the search by directories to narrow the search, it is anyway not a good thing to find something from a list of 100,000+, so i think the filtration workflow will be much better in that case.


Fix CI test runs on stable

The CI test runs on stable fail consistently right now. Looking through the list of installed packages I saw that pyvirtualdisplay is now missing in the list for the recent runs of the tests. This might be the reason for the failures.

I guess the issue is that the installation of pyvirtualdisplay was removed from the Dockerfile that builds the image for stable, but stable still needs it (develop doesn't). It was removed here: https://github.com/Open-MSS/dockertesting/commit/753d79a8d15b5a894c14ece8c4ef1b4cf310cf02#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L42
The workflow should probably just install it into the environment until it is no longer necessary, or just use xvfb-run like on develop.


meson: format all meson files

Fixes #241
Previously the formatters only globbed the top-level files. I tried several different combos and found these work. The other globs I tried:
*/meson.build
**/meson.build
Did not work. But these seem to.

thanks!


I attempted to reinstall both Windows and Visual Studio to resolve the problem, but the issue persists. The lack of automatic configuration for enviro

This issue has been moved from a ticket on Developer Community.

Dear Microsoft Support Team,
I hope this email finds you well. I am writing to seek assistance regarding a persistent issue I am facing with the automatic configuration of environment variables in Visual Studio.
I recently installed Visual Studio on my computer, and during the installation process, I selected multiple language packs, including Python. According to the normal behavior, the installation should automatically set up the environment variables for the installed languages. However, to my disappointment, the environment variables for Python were not added as expected.
I attempted to reinstall both Windows and Visual Studio to resolve the problem, but the issue persists. The lack of automatic configuration for environment variables with two fresh installations is perplexing and frustrating.
I have checked the installation logs, reviewed the installation options, and ensured that I have sufficient administrator privileges during installation. Still, the problem remains unresolved.
As a developer, having to manually set up the environment variables for each language separately is extremely time-consuming and inconvenient. I believe this should not be the expected behavior for a professional development environment like Visual Studio.
I kindly request your expertise and guidance in resolving this matter. Is there a specific step I might be missing during the installation process, or is there a known issue causing this behavior? Any help or insights you can provide would be greatly appreciated.
If you require any additional information or logs to assist with troubleshooting, please let me know, and I will be more than willing to provide them.
Thank you for your time and attention to this matter. I look forward to your prompt response and a resolution to the environment variables configuration problem in Visual Studio.
Best regards,
Andre Lübke

Original Comments
Feedback Bot on 7/23/2023, 05:35 PM:
(private comment, text removed)

Original Solutions
(no solutions)

Thanks for sharing your issues with different programming languages. While some of these might be outside the scope of PTVS, I can help with the Python issue you mentioned. Regarding the installation of Python and its environment variables, could you please provide more details about the specific problem you encountered during the Python installation? Were you trying to set the PATH variable, or is it related to other environment variables?
Additionally, we could use more detailed logs to see what's really going on. Can you please collect more logs by running http://aka.ms/vscollect.exe and uploading %temp%\vslogs.zip? Thanks.

Hello everyone,
I recently encountered an issue where the automatic addition of environment variables during program installation was not functioning correctly in Visual Studio. After trying various solutions, I ended up resolving the problem by performing a fresh installation of Windows, which seemed to fix the issue.
However, as this was the third Windows reinstallation to address the problem, I'm left wondering about the root cause. I'd like to inquire if Windows has any built-in function or setting that might prevent or interfere with the addition of environment variables during program installation.
Could there be a Windows feature or setting that disabled the automatic configuration of environment variables during Visual Studio installation? It would be helpful to know if there's a specific setting I should check or configure to avoid facing the same issue in the future.
I appreciate any insights or experiences you can share regarding this matter. Thank you for your time and assistance!
Best regards,
A-L
.
……

Not that I am aware of. Did that happen to just python or also other languages? What's the version of Visual Studio you were using before encountering the problem and the version after the issue has been resolved?

Translate to English:
"I used Visual Studio 2022 during the first and second installations, and now, on the third installation, I reinstalled Windows, but this time, I also recreated the installation stick. After each installation of any program, can I use environment variables? I haven't installed Visual Studio yet, but the main issue with the environment variables is no longer present. So, there are no settings that prevent adding them during an installation, right?"


Add github action to rebase pull request automatically

Test summary for commit 0050f4631cfb113cdf8ae44782bebf1d30544c1b
Driver commits used in build
CWPACK: amd-master 7387247eb9889ddcabbc1053b9c2052e253b088e
METROHASH: amd-master 3c566dd9cda44ca7fd97659e0b53ac953f9037d2
LLPC: dev b031c5dccceb478c8b00a2308df60f1d1ce4e0df
SPVGEN: dev 5bf4618ac00d4675f57ca5b571a485bbc4d4fa33
XGL: dev 9b77f6008d4316922cde45baf39d079b4d328893
LLVM-PROJECT: amd-gfx-gpuopen-dev 1b94c3bf02ef6b638e199aa5c41d2fa31ea5455d

CTS tests (Failed: 0/225557)Built with version <IP_ADDRESS>
Rhel 8.2, Gfx10
Passed: 30786/56392 (54.6%)
Failed: 0/56392 (0.0%)
Not Supported: 25606/56392 (45.4%)

Ubuntu 18.04, Gfx9
Passed: 30785/56392 (54.6%)
Failed: 0/56392 (0.0%)
Not Supported: 25607/56392 (45.4%)

Ubuntu 20.04, Gfx8
Passed: 30917/56381 (54.8%)
Failed: 0/56381 (0.0%)
Not Supported: 25464/56381 (45.2%)

Ubuntu 20.04, Gfx103
Passed: 34387/56392 (61.0%)
Failed: 0/56392 (0.0%)
Not Supported: 22005/56392 (39.0%)


Cannot connect to DORNA Virtual Robot

Hi, I am trying to connect to the Dorna virtual robot but it is not showing as a device on the wireless LAN. Does this virtual device even have an ip address?  I have attached nMAP results. I don't know what to use to connect.  The default comes up as ws://dorna:443 but that doesn't work.

@crystal-pete
Hi, Are you talking about Dorna 2 or Dorna 1.
This is the Dorna 1 repo, and Dorna 1 does not have ws://dorna:443 port.
If you are referring to Dorna 2, and try to connect to the robot via ethernet, please follow the instructions given here:
https://doc.dorna.ai/docs/guides/connection/#direct-connection

Sorry @smhty but do you mean that I should connect the Laptop, on which the DORNA 2 virtual robot is running, to the broadband modem using ethernet cable? I don't have a physical DORNA device - I just want to run the simulator.

I also have the issues about connecting to virtual arm with websockets... I tried all kinds of my pc IP

I contacted Dorna but did not receive a reply. I think you need to actually
purchase one of their robot arms to be able to use the simulator. If that
is the case then, from a marketing perspective, they are not thinking
outside of the square. A free simulator would be the ideal way of promoting
interest in their products and, as a result, help to generate sales.
Pete
On Fri, Aug 5, 2022 at 9:48 PM WorldWarriorIII @.***>
wrote:

I also have the issues about connecting to virtual arm with websockets...
I tried all kinds of my pc IP
[image: image]
https://user-images.githubusercontent.com/35788780/183071404-ce257a09-823e-4317-9c71-7db1a44eba6c.png
—
Reply to this email directly, view it on GitHub
https://github.com/dorna-robotics/dorna/issues/30#issuecomment-1206358148,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIE5H4QAQQRYJ3ODEXP4WYLVXT5SPANCNFSM5JKXTWCQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

I contacted Dorna but did not receive a reply. I think you need to actually purchase one of their robot arms to be able to use the simulator. If that is the case then, from a marketing perspective, they are not thinking outside of the square. A free simulator would be the ideal way of promoting interest in their products and, as a result, help to generate sales. Pete
…
On Fri, Aug 5, 2022 at 9:48 PM WorldWarriorIII @.> wrote: I also have the issues about connecting to virtual arm with websockets... I tried all kinds of my pc IP [image: image] https://user-images.githubusercontent.com/35788780/183071404-ce257a09-823e-4317-9c71-7db1a44eba6c.png — Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIE5H4QAQQRYJ3ODEXP4WYLVXT5SPANCNFSM5JKXTWCQ . You are receiving this because you were mentioned.Message ID: @.>

where can I  buy the simulator? I only see some hardware selling there...

I don't think that they actually *sell *the simulator - it comes with the
robotic arm. If your goal is to learn how to code robotic arms then I would
suggest that you search for another free solution if one exists.
On Sat, Aug 6, 2022 at 12:59 PM WorldWarriorIII @.***>
wrote:

I contacted Dorna but did not receive a reply. I think you need to
actually purchase one of their robot arms to be able to use the simulator.
If that is the case then, from a marketing perspective, they are not
thinking outside of the square. A free simulator would be the ideal way of
promoting interest in their products and, as a result, help to generate
sales. Pete
… <#m_1559104892840584554_>
On Fri, Aug 5, 2022 at 9:48 PM WorldWarriorIII @.> wrote: I also have
the issues about connecting to virtual arm with websockets... I tried all
kinds of my pc IP [image: image]
https://user-images.githubusercontent.com/35788780/183071404-ce257a09-823e-4317-9c71-7db1a44eba6c.png
https://user-images.githubusercontent.com/35788780/183071404-ce257a09-823e-4317-9c71-7db1a44eba6c.png
— Reply to this email directly, view it on GitHub <#30 (comment)
https://github.com/dorna-robotics/dorna/issues/30#issuecomment-1206358148>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIE5H4QAQQRYJ3ODEXP4WYLVXT5SPANCNFSM5JKXTWCQ
https://github.com/notifications/unsubscribe-auth/AIE5H4QAQQRYJ3ODEXP4WYLVXT5SPANCNFSM5JKXTWCQ
. You are receiving this because you were mentioned.Message ID: @.>
where can I buy the simulator? I only see some hardware selling there...
—
Reply to this email directly, view it on GitHub
https://github.com/dorna-robotics/dorna/issues/30#issuecomment-1207133128,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIE5H4SB42DCNZ3FKOO3CKTVXXII5ANCNFSM5JKXTWCQ
.
You are receiving this because you were mentioned.Message ID:
@.***>