@typescript-eslint/naming-convention configuration

I dropped this rule because it's too complex and incomplete. If we want to enforce some naming conventions with the linter I suggest we use someone else's config and stick to it without exceptions or else we (I) will end up doing this:

Unfortunately the biggest drawback of Sindre Sorhus’ configuration for this rule excludes UPPER_SNAKE_CASE, which you might not like.

From https://github.com/pixiebrix/pixiebrix-app/pull/1246#discussion_r811072628
Related:

https://github.com/pixiebrix/pixiebrix-app/issues/845
https://github.com/pixiebrix/pixiebrix-extension/pull/2387
https://github.com/pixiebrix/eslint-config-pixiebrix/commit/b12ef0987ddbcbb5d1666d8c31d5fb8919ab1c35

Presumably we could find one like Sindre Sorhus and then tweak it for some naming conventions we care about?

The issue is the config is lengthy and it doesn't lend itself to quick fixes, especially because it's hard to figure out what a specific value will and will not allow in practice.
Basically I don’t think it's worth spending time tweaking it manually and frustrate other developers until we find perfection. If possible I'd take the Prettier way and just go with it.
I'll try other configurations on the extensions

I thought that the recommended config included by @typescript-eslint/naming-convention would work for us, but 1085 errors (also no ALL_UPPERCASE allowed)


Fix Sushi Scan

Closes #328

When is it gonna work ?

oops I didn't bump the version, the update should show now though


Remove equal at every Base64 URL encode/decoding

Multipart upload id in S3 does not includes equal '=' which made its
handling diverse among client libraries. Contrary to this, Riak CS
issues multipart upload ids that include '='. With this change
base64url module changes its behaviour, to automatically removing
trailing '=' at encoding time, and to automatically adding trailing
'=' at decoding time. This is harmless because in Base64 codes '=' is
just a filler.
This commit also removes several unused functions.
This addresses #1292 (RCS-349) and #1063 (RCS-350).

@borshop merge

Note that during update to version which includes this, a '==' omitted uploadIds might be passed to CS node with old version, which may lead to process-crash by failing on decoding uploadId.


"Lipănești", "Satu Nou", "Șipotu" and "Zamfira" villages are listed in the drop-down menu.

Description:
The villages are listed in the drop-down menu alongside its corresponding county and commune, according to the law
Preconditions : the website (https://peviitor-ro.github.io/ui.orase/) is up and runing. After every step delete the text you typed from the search bar.

Step 1
Write in the search bar "Lipănești"

Expected results
The location is listed in the drop-down menu as "Sat Lipănești, PRAHOVA (Lipănești)".

Step 1
Write in the search bar "Satu Nou"

Expected results
The location is listed in the drop-down menu as "Sat Satu Nou, PRAHOVA (Lipănești)".

Step 3
Write in the search bar "Șipotu"

Expected results
The location is listed in the drop-down menu as "Sat Șipotu, PRAHOVA (Lipănești)".

Step 4
Write in the search bar "Zamfira"

Expected results
The location is listed in the drop-down menu as "Sat Zamfira, PRAHOVA (Lipănești)".


Configuration Method 1 graphic does not match

Configuration Method 1 graphic does not match.
should be:

create pipeline
create data flow
create pipeline from template
copy data
configure ssis integration

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

ID: 7309c102-934f-e073-823d-684804e38ff9
Version Independent ID: 2035c3ea-1e64-4f1b-0194-c1b407812e28
Content: Source control - Azure Data Factory
Content Source: articles/data-factory/source-control.md
Service: data-factory
GitHub Login: @dcstwh
Microsoft Alias: weetok

@marktab  Thanks for bringing this to our attention. I have assigned the issue to the content author to review further and update the document as appropriate.
@dcstwh Could you please update the screenshot in this section: Configuration method 1: Home page
In the Azure Data Factory home page, select Set up Code Repository.

Replace with the latest screenshot:

@nabhishek  Do help to update the latest screenshot for this.

@nabhishek  Do help to update the latest screenshot for this.

This should already be fixed.

#please-close


Support TRIM syntax

Implement the following cases

[x] TRIM([BOTH | LEADING | TRAILING] <expr> [FROM <expr>])
[x] TRIM(<expr>)

I referred to link

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

33 of 37 (89.19%)  changed or added relevant lines in 5 files are covered.
10 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.09%) to 90.107%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/ast/mod.rs
7
11
63.64%

Files with Coverage Reduction
New Missed Lines
%

tests/sqlparser_postgres.rs
1
99.68%

src/parser.rs
2
86.06%

tests/sqlparser_common.rs
7
98.66%

Totals

Change from base Build<PHONE_NUMBER>:
-0.09%

Covered Lines:
5492

Relevant Lines:
6095

💛  - Coveralls


Addition of footer section

A footer section can be added to the website with some social media icons along with their links connected to them and copyright section
Please assign this to me as a GSSOC'23 Contributor

Already assigned issue, please have a look at the issue section, before creating any new issue.


Consider using ErrorOr or OneOf types instead of returning tuples

With ErrorOr the SendMessageAsync would become:
public async Task<ErrorOr> SendMessageAsync(PostalMessage requestModel)
and would be used like:
var result = await _postalApiClient.SendMessageAsync(message);

if(result.IsError) Console.WriteLine(result.FirstError.Description);

Console.WriteLine(result.Value.MessageId); // Value is the SendResponse type

ErrorOr: https://github.com/amantinband/error-or
OneOf: https://github.com/mcintyre321/OneOf
I use ErrorOr because it fits my need better, but I OneOf has been around longer and allows you to return multiple types. Since I use this mostly to return the thing, or an error I feel like ErrorOr suits my needs better.

@jbennink thanks for recommendation. I looked at OneOf and I liked this approach


Crash when clicking to switch to Creative+

The game simply crash when I try to switch modes.
debug.log
crash-2021-02-01_12.23.02-server.txt

What the hell?

Can confirm I get the same issue as well. I've tried going as far back as forge-36.0.4 and the same issue still occurs, even if i disable every mod
[23:47:21] [main/INFO]: ModLauncher running: args [--username, ranger10700, --version, forge-36.0.13, --gameDir, C:\Users\FatRanga\Documents\Curse\Minecraft\Instances\tealeave3's creative modpack, --assetsDir, C:\Users\FatRanga\Documents\Curse\Minecraft\Install\assets, --assetIndex, 1.16, --uuid, 538af5802e5c4819a1769cda14c44693, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 1920, --height, 1080, --launchTarget, fmlclient, --fml.forgeVersion, 36.0.13, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210115.111550] [23:47:21] [main/INFO]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_51 by Oracle Corporation [23:47:21] [main/WARN]: LEGACY JDK DETECTED, SECURED JAR HANDLING DISABLED [23:47:21] [main/INFO]: Added Lets Encrypt root certificates as additional trust [23:47:21] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/C:/Users/FatRanga/Documents/Curse/Minecraft/Install/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=CLIENT [23:47:23] [main/INFO]: Launching target 'fmlclient' with arguments [--version, forge-36.0.13, --gameDir, C:\Users\FatRanga\Documents\Curse\Minecraft\Instances\tealeave3's creative modpack, --assetsDir, C:\Users\FatRanga\Documents\Curse\Minecraft\Install\assets, --uuid, 538af5802e5c4819a1769cda14c44693, --username, ranger10700, --assetIndex, 1.16, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 1920, --height, 1080] [23:47:33] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [23:47:34] [Render thread/INFO]: Setting user: ranger10700 [23:47:35] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10 [23:47:38] [modloading-worker-3/INFO]: Forge mod loading, version 36.0.13, for MC 1.16.5 with MCP 20210115.111550 [23:47:38] [modloading-worker-3/INFO]: MinecraftForge v36.0.13 Initialized [23:47:41] [Render thread/INFO]: Narrator library for x64 successfully loaded [23:47:41] [Render thread/INFO]: Reloading ResourceManager: Default, Mod Resources [23:47:41] [Forge Version Check/INFO]: [forge] Starting version check at https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [23:47:42] [Forge Version Check/INFO]: [forge] Found status: BETA Current: 36.0.13 Target: 36.0.13 [23:47:48] [Render thread/INFO]: OpenAL initialized. [23:47:48] [Render thread/INFO]: Sound engine started [23:47:49] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas [23:47:49] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas [23:47:49] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas [23:47:49] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas [23:47:49] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas [23:47:49] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas [23:47:49] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas [23:47:50] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas [23:47:50] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas [23:47:50] [Render thread/INFO]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas [23:48:28] [Render thread/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [23:48:28] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [23:48:28] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [23:48:28] [Render thread/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [23:48:28] [Render thread/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [23:48:28] [Render thread/INFO]: Reloading ResourceManager: Default, forge-1.16.5-36.0.13-universal.jar, NotEnoughCreativity-Forge-1.16-1.2.4.jar [23:48:29] [Render thread/INFO]: Loaded 7 recipes [23:48:29] [Render thread/INFO]: Loaded 927 advancements [23:48:30] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [23:48:30] [Server thread/INFO]: Starting integrated minecraft server version 1.16.5 [23:48:30] [Server thread/INFO]: Generating keypair [23:48:30] [Server thread/WARN]: Configuration file C:\Users\FatRanga\Documents\Curse\Minecraft\Instances\tealeave3's creative modpack\saves\New World (1)\serverconfig\forge-server.toml is not correct. Correcting [23:48:30] [Server thread/WARN]: Incorrect key server was corrected from null to SimpleCommentedConfig:{} [23:48:30] [Server thread/WARN]: Incorrect key server.removeErroringEntities was corrected from null to false [23:48:30] [Server thread/WARN]: Incorrect key server.removeErroringTileEntities was corrected from null to false [23:48:30] [Server thread/WARN]: Incorrect key server.fullBoundingBoxLadders was corrected from null to false [23:48:30] [Server thread/WARN]: Incorrect key server.zombieBaseSummonChance was corrected from null to 0.1 [23:48:30] [Server thread/WARN]: Incorrect key server.zombieBabyChance was corrected from null to 0.05 [23:48:30] [Server thread/WARN]: Incorrect key server.logCascadingWorldGeneration was corrected from null to true [23:48:30] [Server thread/WARN]: Incorrect key server.fixVanillaCascading was corrected from null to false [23:48:30] [Server thread/WARN]: Incorrect key server.dimensionUnloadQueueDelay was corrected from null to 0 [23:48:30] [Server thread/WARN]: Incorrect key server.treatEmptyTagsAsAir was corrected from null to false [23:48:30] [Server thread/WARN]: Incorrect key server.fixAdvancementLoading was corrected from null to true [23:48:30] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld [23:48:30] [Render thread/INFO]: Preparing spawn area: 0% [23:48:31] [Render thread/INFO]: Preparing spawn area: 0% [23:48:31] [Render thread/INFO]: Preparing spawn area: 0% [23:48:32] [Render thread/INFO]: Preparing spawn area: 20% [23:48:33] [Render thread/INFO]: Preparing spawn area: 27% [23:48:33] [Render thread/INFO]: Preparing spawn area: 27% [23:48:33] [Render thread/INFO]: Preparing spawn area: 53% [23:48:34] [Render thread/INFO]: Preparing spawn area: 61% [23:48:34] [Render thread/INFO]: Preparing spawn area: 71% [23:48:35] [Render thread/INFO]: Preparing spawn area: 72% [23:48:35] [Render thread/INFO]: Preparing spawn area: 89% [23:48:36] [Render thread/INFO]: Preparing spawn area: 97% [23:48:36] [Render thread/INFO]: Time elapsed: 5584 ms [23:48:36] [Server thread/INFO]: Changing view distance to 11, from 10 [23:48:40] [Netty Local Client IO #0/INFO]: Connected to a modded server. [23:48:40] [Server thread/INFO]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@2c5a8e5a [23:48:40] [Server thread/INFO]: ranger10700[local:E:ec73184d] logged in with entity id 1 at (221.5, 4.0, 99.5) [23:48:40] [Server thread/INFO]: ranger10700 joined the game [23:48:40] [Server thread/INFO]: Saving and pausing game... [23:48:40] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld [23:48:40] [Render thread/INFO]: Loaded 0 advancements [23:48:41] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether [23:48:41] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end [23:48:44] [Server thread/ERROR]: Encountered an unexpected exception java.lang.IllegalAccessError: null 	at com.unascribed.notenoughcreativity.CreativePlusScreenHandler.<init>(CreativePlusScreenHandler.java:52) ~[?:1.2.4] 	at com.unascribed.notenoughcreativity.NotEnoughCreativity.updateInventory(NotEnoughCreativity.java:66) ~[?:1.2.4] 	at com.unascribed.notenoughcreativity.network.MessageSetEnabled.handle(MessageSetEnabled.java:32) ~[?:1.2.4] 	at com.unascribed.notenoughcreativity.repackage.com.elytradev.concrete.network.Message.lambda$doHandleServer$0(Message.java:109) ~[?:1.2.4] 	at com.unascribed.notenoughcreativity.repackage.com.elytradev.concrete.network.Message$$Lambda$5864/521164344.run(Unknown Source) ~[?:?] 	at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?] 	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?] 	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:733) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159) ~[?:?] 	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:716) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:710) ~[?:?] 	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:696) ~[?:?] 	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:645) [?:?] 	at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) [?:?] 	at net.minecraft.server.MinecraftServer$$Lambda$5082/2112011719.run(Unknown Source) [?:?] 	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] [23:48:44] [Server thread/FATAL]: Preparing crash report with UUID d1a65549-4c7f-4fab-856b-64dbf69d4dec

As AntauriTV posted on the forge comments, it does appear installing Mantle fixes the issue. Is this intended @unascribed ?

No, and I don't even have Mantle in my test modpack.

I tried adding Mantle to my mod list and I don't know how, but Creative+ is now working.

I finally had a moment to look into this, and it's because NEC+'s AccessTransformer isn't applying properly. Mantle uses an AT to do the same things NEC+'s would if it were being applied right, so Mantle fixes it entirely by accident.
Currently looking into why the AT is broken.


chore: Upgrade to Sveltekit 2

Current dependencies on/for this PR:

main

PR #15   👈

This stack of pull requests is managed by Graphite.


Problems API does not report problem from thread

Current Behavior
When a problem is reported in thread, it seems to be a silent no-op.
In the reproducer below, only the 3 problems not in a thread are reported. The other 3 do not show up in the report.
Expected Behavior
Problems API should be threadsafe.
Context (optional)
No response
Self-contained Reproducer Project
build.gradle.kts
import kotlin.concurrent.thread

tasks.withType<Wrapper> {
    gradleVersion = "8.11"
}

tasks.register<MyTask>("myTask")

@Suppress("LeakingThis", "UnstableApiUsage")
abstract class MyTask: DefaultTask() {
    @Inject
    abstract fun getProblems(): Problems
    init {
        getProblems().reporter.reporting {
            id("My Name", "My Display Name")
                .details("Reported from task initialization")
                .severity(Severity.WARNING)
        }
        thread {
            getProblems().reporter.reporting {
                id("My Name", "My Display Name")
                    .details("Reported from task initialization in thread")
                    .severity(Severity.WARNING)
            }
            println("reported issue in thread 1")
        }.join()

    }

    @Inject
    abstract fun getWorkerExecutor(): WorkerExecutor?

    @TaskAction
    fun taskAction() {
        getProblems().reporter.reporting {
            id("My Name", "My Display Name")
                .details("Reported from task action")
                .severity(Severity.WARNING)
        }
        thread {
            getProblems().reporter.reporting {
                id("My Name", "My Display Name")
                    .details("Reported from task action in thread")
                    .severity(Severity.WARNING)
            }
            println("reported issue in thread 2")
        }.join()
        val workQueue = getWorkerExecutor()!!.noIsolation()

        workQueue.submit(MyWorkAction::class.java) {

        }
    }
}

@Suppress("UnstableApiUsage")
abstract class MyWorkAction : WorkAction<WorkParameters.None> {
    @Inject
    abstract fun getProblems(): Problems

    override fun execute() {
        getProblems().reporter.reporting {
            id("My Name", "My Display Name")
                .details("Reported from task work action")
                .severity(Severity.WARNING)
        }
        thread {
            getProblems().reporter.reporting {
                id("My Name", "My Display Name")
                    .details("Reported from task work action in thread")
                    .severity(Severity.WARNING)
            }
            println("reported issue in thread 3")
        }.join()
        throw GradleException("task work action failed")
    }
}

Gradle version
8.11
Build scan URL (optional)
No response
Your Environment (optional)
No response

I was able to reproduce the issue. Reproducer in ProblemsServiceIntegrationTest:
    def "can emit a problem from different thread"() {
        given:
        withReportProblemTask """
            Thread.start {
                println "Running in a separate thread"
                problems.getReporter().reporting {
                    it.id('type', 'label')
                }
            }.join()
        """

        when:
        run('reportProblem')

        then:
        verifyAll(receivedProblem) {
            definition.id.fqid == 'generic:type'
            definition.id.displayName == 'label'
        }
    }


Addition of Health Hero's Web-3 grant submission.

Grant Application Checklist

[ ] The application template has been copied, renamed ( project_name.md) and updated.
[ ] A BTC or Ethereum (DAI) address for the payment of the milestones is provided inside the application.
[ ] I have read and acknowledged the Terms and Conditions.
[ ] The software delivered for this grant will be released under an open-source license specified in the application.
[ ] The total funding amount of the project is below USD $30k for initial grant applications and $100k for follow-up grants.
[ ] The initial PR contains only one commit (squash if needed before submitting your PR).
[ ] The grant will only be announced once the first milestone has been accepted.

Hi David, sorry for the delay. We have been looking at other NFT analytic tools out there and there seem to be some great new options on the market.
Our team was wondering if we can adjust the grant scope to an open-source scope of decentralized game API(s) which would enable game developers to build "Play to earn" games based on people's fitness/steps & 7 other gamification attributes Ex. XP/HP/Levels/Life/Stars/Badges/Skins/Parcels of land etc?


Add imdone to tools section

@mattcone Let me know if you think anything needs work.  Thanks!

Thanks!


Proposed fix for wildcard operator when loading conf files on Nginx / IIS

Proposed fix for #1285 by @thierry-f-78.

Merged. thanks.


Applies the Baseline plugin for iceberg-api only.

Part of #24. Replaces #28.
Previously, whenever styles were inconsistent across the Iceberg codebase, it was up to code reviewers to catch the inconsistencies and to catch them before merging. This is prone to error, and little code linting problems can add up over time.
Baseline is a code linting toolkit for Gradle. It consists of multiple submodules that when taken together allow automation to enforce consistent coding guidelines. For more information, refer to the Baseline docs.
As a proof of concept, the full Baseline suite minus spotless-java is now only applied for the iceberg-api project, while IntelliJ project configuration is applied for all projects. We apply the Baseline linting changes only to iceberg-api to minimize code churn and to show how we can introduce baseline checks incrementally. Eventually we can add the same tooling to all the submodules.
Baseline's coding conventions are inherited from the Google Style Guide. For more information on the style rules that are given out of the box, refer to this documentation. There were a number of style conventions that we've adopted from Baseline that were not previously enforced in the project. A subset of them are listed as follows.

We no longer allow parameter names and local variable names to hide the names of fields. So if a field is named name, no parameters of any methods in the class can be called name.
All field, parameter, and variable names must be more than 1 character long. So W is no longer a valid field name in Truncate, for example. There were a lot of cases like this.
All fields must be private with accessor methods. I believe in one case this affects a public API.
Utility classes must have a private no-arg constructor.
All unnecessary parentheses are disallowed.
Preconditions must use a constant format string. Variance in what the preconditions message would produce must be given as format string arguments.
Overloaded methods must be grouped together.
Use Java's StandardCharsets instead of Guava's Charsets.
Declaring collection types using the concrete types, such as LinkedList and ArrayList, is disallowed. Use the interface types, like List and Deque, instead.
There were some cases where static constants weren't marked as final, but they were named with all-capital letters and using underscores instead of camelCase, and Checkstyle didn't like that naming convention. We mark all such constants as final.

There's a number of Baseline-opinionated defaults that we don't adopt here to reduce the code churn and also just because Iceberg appears to hold different opinions. Here's some of them:

Baseline's spotless plugin doesn't work when we allow static imports, so we just disable it entirely.
Indentation is still 2 spaces with 4 space continuation indent.
No opinions are held about Javadoc formatting (should we set a standard for this?)
We allow a larger variety of static imports, though by default static imports are still forbidden
Static imports are listed after non-static imports, not before
Cyclomatic complexity is bumped to 12, up from 10
We allow some more abbreviations - particularly UUID, ID, IO, and UTC. In one case we allow a method to be called flipLR by applying a SuppressWarnings annotation on the method directly.
No opinions are held about the assertion methods we use for tests.

I usually prefer line breaks at 100 characters. This uses 120? Do we want to go with that?

One more thing: I don't see a lot of changes to method parameter lists. What is the convention for those?

I usually prefer line breaks at 100 characters. This uses 120? Do we want to go with that?

Interestingly, Google Style Guide wants the column limit to be 100 characters: https://google.github.io/styleguide/javaguide.html#s4.4-column-limit
But Baseline wants 120: https://github.com/palantir/gradle-baseline/blob/develop/docs/java-style-guide/readme.md#column-limit-120.
I've always found in my coding that 100 characters is far too short, even for Scala (when building on Spark), much less so for Java which is more verbose. I'd be a vote for the 120 character per line limit, but open to changing if the community builds consensus on shorter lines.

One more thing: I don't see a lot of changes to method parameter lists. What is the convention for those?

I believe the convention I've always seen when using Baseline is this:
public Type myMethod(
    int param1,
    int param2,
    ...

So, each parameter on its own line, with 4 space indent from the visibility modifier keyword (public in this example. Also, it would be 8 spaces in projects that use 4 spaces as a base for indentation.). But, notably, Baseline checkstyle does not enforce a hard rule on this. I did some brief searching on Google and Checkstyle doesn't have a built-in rule for this, so we'd have to write one ourselves. Sounds a bit involved. What do you think we should do here to proceed @rdblue?

I've always found in my coding that 100 characters is far too short, even for Scala

I've not had a problem with 100. I'm fine with either one as long as we enforce something. 120 is probably a better choice because there are cases where merges and refactors have accidentally created longer lines. I think we will have fewer changes to standardize if we use 120.

Checkstyle doesn't have a built-in rule for this, so we'd have to write one ourselves. Sounds a bit involved.

My vote is to set some reasonable guidelines and not worry about it.
Here's what I would do for this project:

If all arguments etc. fit on one line, leave it that way
If not, start a new line for arguments at 2 indents / 4 spaces from the start of the method definition (e.g. public)
When the argument line is full, start a new one at 2 indents / 4 spaces

That would look like this:
  public void shortMethodArgs(int foo) throws IOException {
  }

  public void longMethodArgs(
      Map<String, String> properties1, Map<String, String> properties2,
      Map<String, String> properties3) throws IOException, ClassNotFoundException {
  }

I don't really care for the Spark style that puts one arg on every line. It wastes a lot of vertical space.

One more comment on line length: I checked the default view for github and it looks like 120 doesn't cause horizontal scrolling, which would be bad. The limit is around 130 characters.

@rdblue @rdsr @xabriel - I addressed the comments so far. Let me know if there's anything else to change. Thanks!

Overall, the commit looks good to me. Everyone else okay with it?
Should we also have a STYLE.md file somewhere that documents what we decide? If method parameter style isn't enforced, then we should write it down. It would also help to have things like the line limit and import settings documented so that people can configure their editors (or is that automatic using the idea task?). We don't have to add it in this PR though, if you'd like to close this out and get it in.

Should we also have a STYLE.md file somewhere that documents what we decide? If method parameter style isn't enforced, then we should write it down.

+1 to eventually document anything that a reviewer could just cite, instead of writing it manually all the time.

(or is that automatic using the idea task?)

Looks like Baseline will indeed give us ./gradlew idea and ./gradlew eclipse to import the guidelines to IDEs: https://github.com/palantir/gradle-baseline#compalantirbaseline-idea
Nice stuff @mccheah. LGTM.

Looks like Baseline will indeed give us ./gradlew idea and ./gradlew eclipse to import the guidelines to IDEs: https://github.com/palantir/gradle-baseline#compalantirbaseline-idea

The default project configuration given by Baseline adheres to the default project style guidelines Baseline is opinionated about. I changed the default project configuration to match as many of the style guideline deviations as I could remember here, but there might be cases where the generated IDEA project doesn't match what we changed in checkstyle.xml. The main style setup I changed in the IDEA project were license headers, indentation numbers, and import ordering (static vs. non-static). I think we'll have to unfortunately catch the other deviations we made on a case by case basi moving forward.

I should also mention that I only changed the project configuration for IntelliJ IDEA. I didn't adjust the style configuration for Eclipse. I can do that now, or in a follow-up patch.

The main style setup I changed in the IDEA project were license headers, indentation numbers, and import ordering (static vs. non-static). I think we'll have to unfortunately catch the other deviations we made on a case by case basis moving forward.

Not sure I follow. I work on other projects were the equivalent to checkstyle.xml is part of the Maven build, and thus the build will fail if the rules set is not abided by.
Here is an example from a Maven Scala project I work on:
        <!-- Scala style checking configuration -->
        <plugin>
          <groupId>org.scalastyle</groupId>
          <artifactId>scalastyle-maven-plugin</artifactId>
          <version>${scalastyle-maven-plugin.version}</version>
          <configuration>
            <verbose>false</verbose>
            <failOnViolation>true</failOnViolation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <failOnWarning>false</failOnWarning>
            <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
            <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
            <configLocation>${basedir}/../scalastyle-config.xml</configLocation>
            <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
            <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
          </configuration>
          <executions>
            <execution>
              <id>scalastyle</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

Are we saying that a similar integration is not possible with Gradle + Baseline?

I think from the discussion here that there is consensus for these changes. There are still some open issues around IDE integration, but I'd rather get this in so we can work on other modules than solve all of those challenges at once. I'm going to commit this.

@xabriel sorry I didn't get to this earlier. In Baseline, the IDE project files are not tied to the checkstyle.xml files. So it's possible to follow the conventions the IDE thinks it should follow, but proceed to fail when CI runs ./gradlew checkstyleMain. However, the IDE project settings should be picking up the correct checkstyle.xml files.
If we notice that our work done in our IDE is causing bad style behaviors, we can look into the specific parts of the IDE projects to fix.


chore(main): release 2.13.0

:robot: I have created a release beep boop
2.13.0 (2024-08-14)
Features

embed k8s rpms in container (#1140) (d68fbfb)

Bug Fixes

removes duplicate key (#1147) (9800bf5)
set sysctl settings for fs.inotify (#1148) (aa0c060)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/mesosphere/konvoy-image-builder/releases/tag/v2.13.0 :sunflower:


Add hardware wallet support

It would be nice if I could use the safe-cli with my ledger or trezor
--- Edit By Uxío ---
This task will be replaced by:

https://github.com/5afe/safe-cli/issues/269
https://github.com/5afe/safe-cli/issues/270

Probably not possible until https://github.com/ethereum/web3.py/issues/847 is added

Probably not possible until ethereum/web3.py#847 is added

It's not completely necessary, but it would be awesome if they support it, then it would be really easy to add support

Does this mean that if a user initiates a send transaction using the CLI, they will not be able to sign the transaction with a hardware wallet?
Or can a user still sign with a hardware wallet, it's just the CLI won't provide any feedback on the signature, thus requiring the user to check on Etherscan?

Does this mean that if a user initiates a send transaction using the CLI, they will not be able to sign the transaction with a hardware wallet?

That's right, Cli does not have integration with hardware wallets, but if you use --tx-service in a network supported (mainnet or rinkeby) you will be able to sign the transaction with a hardware wallet in the web ui.

I must say this is what I was  looking for. besides this would be nice to have integration with eth-brownie framework. it already connects with clef to hw wallet. I just need safe operations available

👍

You are welcome! You got it right until this point:

Then, a browser will launch with a Web UI or does the user need to run the Safe React UI in order to interact with the command

You need to open the browser yourself and go to the Safe React UI.
One important note: You need at least one valid owner (key) imported on the Safe-cli, as Web UI only shows transactions with at least one signature.

Does the web UI only show pending transactions with signatures from one of the owners or can it be signed by any key? I ask this because I would like to generate a transaction from the CLI but the owner addresses are all hardware wallets. If I generate a message via the cli with some random private key, will it show in the web UI and have 0/n confirmations?

Does the web UI only show pending transactions with signatures from one of the owners or can it be signed by any key? I ask this because I would like to generate a transaction from the CLI but the owner addresses are all hardware wallets. If I generate a message via the cli with some random private key, will it show in the web UI and have 0/n confirmations?

For transactions to show in the UI they need to be signed by at least one owner or delegate

Superseded by #269 and #270


The previous product is displayed on top of the scanned product card

The previous product is displayed on top of the scanned product card:
What the French is seen on top of Ben and Jerry's, which was scanned after.

didn't manage to reproduce. Maybe because the n-1 call ended after the n call...
A check has been added in the scan to avoid it:
if a new scan / update is started, we check if the previous one is finished ( disposed). If not, we dispose it.

Is this still an issue? @teolemon

Is this still an issue? @teolemon


Docs.rs missing documentation for SwapchainBuilder struct.

Version of vulkano: 0.23.0
OS: Firefox 88 and Chrome 90

The SwapchainBuilder struct introduced in vulkano 0.23.0 from https://github.com/vulkano-rs/vulkano/blob/01fcd53faa6980d2bfbaf1542afeecabccb74d87/vulkano/src/swapchain/swapchain.rs#L502-L521 is not present in https://docs.rs/vulkano/0.23.0/vulkano/swapchain/index.html#structs
and https://docs.rs/vulkano/0.23.0/vulkano/swapchain/struct.SwapchainBuilder.html does not exist.
Searching the docs.rs for SwapchainBuilder only yields the two functions with a SwapchainBuilder return type:

vulkano::swapchain::Swapchain::start
vulkano::swapchain::Swapchain::recreate

Ah, because it's not re-exported. I submitted a PR to fix it.


node 6 IncomingMessage events fix

Something seems to have changed between v4 and v6 around event ordering and piped streams,
The following will behave differently between v4 and v6 (the end event is ignored in v6)
var fs = require('fs')
var Busboy = require('busboy')
var http = require('http')

http.createServer((req, res) => {
  var busboy = new Busboy({ headers: req.headers })
  req.pipe(busboy)

  busboy.on('file', (field, file) => {
    var dest = fs.createWriteStream('/dev/null')
    file.pipe(dest)
  })

  req.on('end', () => console.log('req end')) // logs in v4, not in v6
  res.end(':)')
}).listen(8080)

Wrapping boy.emit('finish') in a setImmediate solves this,
I haven't found any side effects to doing this, although that doesn't mean there may be some

Can you provide a full example (including client side and a file) to reproduce the issue you're describing first?

Ah so I was testing the above with curl, should have included
$ curl -v -F userfile1=@/bin/echo http://localhost:8080

I'm unable to share the actual code I'm working on (it's for a book), but the side effect of this is it prevents the pump module from working effectively (because it use end-of-stream on every stream in a pipeline, and req isn't firing end events in v6 when it's piped to busboy instance)

Your code example + that curl usage works for me. 'req end' is printed to the console. I tested with node v6.9.1.

ok sorry - I changed the file to /bin/echo so it would be easier, but it turns out the problem only occurs if the file < 16384 (i.e. the highWaterMark)
$ dd if=/dev/random bs=1 count=16383 > fail
$ dd if=/dev/random bs=1 count=16384 > pass
$ curl -v -F userfile1=@fail http://localhost:8080 # node v6 will not log req end, but v4 will
$ curl -v -F userfile1=@pass http://localhost:8080 # node v6 will log req end (as will v4)

If you put res.end in the finish handler, the behavior is the same

@davidmarkclements the problem is that you are calling res.end() before the file has finished uploading. Can you please verify?

@mcollina - no that isn't it - this happens regardless of when res.end is called (you could wrap it in a 10 second setTimeout and it would make no difference)
I've not explained the problem very well, just to outline it:
The end event on the request object is not fired WHEN

Node version is 6+ AND
the request object is piped to a busboy instance AND
a busboy FileStream instance (passed via the file event handler) is piped to another stream

This has unwanted side effects at higher levels, for instance the pattern of using pump
for pipeline management becomes unworkable because it relies on each stream ending.

I can duplicate it now. Whatever it is it seems to have started in node v4.5.0, node versions prior to that work fine.
It appears that it's automatically unpipe()ing when the destination stream is finished, but this causes the request (readable) stream to not emit end because it's somehow stuck in an unfinished state. You can verify this by calling req.resume() from busboy.on('finish', () => { ... })

Ok, bisecting reveals it's this PR: https://github.com/nodejs/node/pull/5419

Any update on this bug? I see that the node PR has been closed without a fix.

There should no longer be a problem with this in busboy v1.0.0.


Windows 10 v2004 support

This PR adds v2004 compatibility and support for address range filtering.

This is amazing work. Thank you so much!!! I left a few code style comments for you to please address before merge. Thanks again.

Perfect -- I'm ready to merge this -- that being said, if you'd like to update all the files with your author info and add in the date and "Added v2004 support for address range filtering", you certainly deserve the credit :)

Thank you very much but let's keep the files clean as they are now. Github will remember this contribution and that's enough for me :)


MarkDown syntax C++ code segment high-light is broke.

Issue Type: Bug
In '{}' brackets of any C++ code segment, those code won't be highlighted.
VS Code version: Code 1.37.1 (f06011ac164ae4dc8e753a3fe7f9549844d15e35, 2019-08-15T16:17:55.855Z)
OS version: Windows_NT x64 10.0.17763
Extensions (4)

Extension
Author (truncated)
Version

vsc-material-theme
Equ
30.0.0

code-runner
for
0.9.14

cpptools
ms-
0.25.0

markdown-preview-enhanced
shd
0.4.3

(14 theme extensions excluded)

Can repro in c and cpp modes, making sure that c# and java work as expected:

(To the left, the test markdown document can be seen; on the right there is the cpp file properly highlighted)

Markdown test document
Test

```cpp
int id;
void test {
	int num;
}
```

```c
int id;
void test {
	int num;
}
```

```c#
int id;
class Main {
	int num;
}
```

@MarcelGerber

Edit: running the latest OSS Dev version, without extensions

Do you mean Visual Studio Code Insiders?

This is likely a duplicate of #34525
As far as I can tell, we cannot fix this in VS Code itself; the upstream grammar requires changes

Ah, I see. Apparently, there's an upstream fix available that can (hopefully) be incorporated into the next VS Code version.
@FilaretKun If you can't wait for a fix, you can install https://marketplace.visualstudio.com/items?itemName=jeff-hykin.better-cpp-syntax, which provides you with the latest version of the C++ syntax and fixes this bug.


Change layout of MPS plugin to avoid double zip problem

See issue #38
This seems to solve the problem for me, when I import lioncore-mps in the lionweb-pricing-demo it now works when running ./gradlew setup without the need to manually unzip anything

I just change this part, by removing a zip command wrapping the plugin entry

Thank you for the approval!


Toast should inherit autoDismiss from ToastProvider

I need to set autoDismiss to true by default.
right now, I'm setting it explicitly whenever I call addToast. It is redundant.
It is better if the Toast could inherit autoDismiss in the same way it inherits the autoDismissTimeout from ToastProvider

@Vivek205 I had implemented this but was worried about unexpected effects in large scale applications. May I recommend exposing your own hook?
import { useToasts as useOriginalToasts } from 'react-toast-notifications';

export const useToasts = () => {
  const { addToast, removeToast, toastStack } = useOriginalToasts();

  return {
    addToast: (content, config) => addToast(content, { autoDismiss: true, ...config }),
    removeToast,
    toastStack,
  };
}

Closing if favour of #57

The autoDismiss property will be inherited from the provided since 2.3.0


No good way to create a 'Parsed' object

It's currently common to call a method with the Parsed object:
  --run=:: foo it

foo parsed/cli.Parsed:
  ...

If I wanted to call the foo function directly, then I would need to create a Parsed object myself. That's currently not really possible.
We should either make this possible, or discourage passing the Parsed object around.
For example, we could encourage to always extract the options in the lambda:
  --run=:: foo it["option1"] it["option2"] ...

That could get messy, and would go against future API plans, where we would like to give a Cli object that has ui, config, and cache (in addition to parsed). That said, maybe parsed shouldn't be part of that object.

If it's just for testing then Map has a similar interface as Parsed, so leaving off the type annotation would work.
Slightly less hacky would be to have a TestingParsed that takes a map and implements the Parsed interface.


Norminate @charlie0129 to be a reviewer member of KubeVela Org

He has contributed a lot of powerful features to kubevela repo!
https://github.com/kubevela/kubevela/commits?author=charlie0129
I think he'll be glad to continue his contribution as a reviewer member! \cc @charlie0129
Anyone who agree with me, please help vote on this issue. Thanks.

Yes, it's my honor to become a review member, with more contributions to come!

lgtm

LGTM

LGTM
Since there're two Maintainers vote for approval, according to our community rules, congratulations! @charlie0129

Thanks for lots of great works.  Congratulations! @charlie0129!


Feature Request: GraphQL over SSE

Description
Implement GraphQL Subscription over SSE (Subscription operation only). Shouldn't be too difficult as to GraphQL over WebSocket. However, I need to support the graphql-sse protocol to be fully client compatible. Not sure whether to support other protocols and client implementation.
Prerequisites

#2
#5
#4

Implementation and Plans

Start with focusing solely on Distinct connections mode on HTTP/2 (require enabling HTTP/2 for akka-http).
Continue with implementing Single connection mode which require a lot more configuration with the HTTP side of the applications but allow for HTTP/1.1.

Unit Test Addition
Server-Side Events

Able parse query from request.
Using a simple schema, able to execute GraphQL Subscription operation using the graphql-sse protocol.
a. Able to format response as text encoded in next  message event.
b. Able to format response as text encoded in complete  message event.
Able to handle closing and opening connection.
HTTP/2 support for Distinct connection mode.
HTTP/1 support for Single connection mode.


Add list command

Coverage decreased (-0.2%) to 97.481% when pulling e36a2524b5b6babea4af9c84f9c981103db9b53d on list-command into 0af4ecce91576fd94735ecf37aead9ed97aaabb9 on master.

Coverage decreased (-0.07%) to 97.575% when pulling 45115f7c2871e1d7c4b5449140cbaaab0db7b737 on list-command into 0af4ecce91576fd94735ecf37aead9ed97aaabb9 on master.


Nodejs version not compatible: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:

When my nodejs version is  v12.16.2, I got this error when run ws:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /my-project-path/node_modules/local-web-server/bin/cli.mjs
I can fix this problem by upgrading my node version to v14, but  on other machines they can't upgrade node version, so how can we make ws work on node v12?
Thank you for your contribution to this project !

Hi, the current version requires node v12.20 or above.. Please use local-web-server version 4 on your other machines until you can upgrade to node v12.20 or above..
npm install local-web-server@^4


Use named indices for n-rank arrays

For n-rank arrays (n > 1) it may be useful to give the indices names to understand the code faster.

I think it is particularly useful for the arrays where we don't store all the elements in memory.


Using compiled version on Windows

Hi
I built sqlite-vss on Windows 11 x64 using cygwin64
I followed the instructions in #building-sqlite-vss-yourself
$ make loadable
cmake -B build; make -C build
-- Could NOT find MKL (missing: MKL_LIBRARIES)
-- Using the multi-header code from /cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/vendor/json/include/
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/build
make[1]: Entering directory '/cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/build'
[  1%] Linking CXX shared library vector0.dll
...
[ 98%] Building CXX object vendor/faiss/faiss/CMakeFiles/faiss.dir/invlists/OnDiskInvertedLists.cpp.o
[100%] Linking CXX static library libfaiss.a
[100%] Built target faiss
make[1]: Leaving directory '/cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/build'
cp build/vector0.dll dist/debug/vector0.dll
cp build/vss0.dll dist/debug/vss0.dll

And as shown, I got vector0.dll and vss0.dll
Then I placed the dll files in the same folder of sqlite-vss/vendor/sqlite/.libs which has the compiled sqlite.exe
and tried to load the extension into sqlite
C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs>sqlite3.exe
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .load vector0.dll
sqlite> .load vss0.dll
Error: The specified module could not be found.

sqlite>

Looks like it loads successfully vector0.dll but it fails to load vss0.dll

ldd output
C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs>ldd vector0.dll
      ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffd2ad10000)
      KERNEL32.DLL => /cygdrive/c/Windows/System32/KERNEL32.DLL (0x7ffd2a160000)
      KERNELBASE.dll => /cygdrive/c/Windows/System32/KERNELBASE.dll (0x7ffd283c0000)
      msvcrt.dll => /cygdrive/c/Windows/System32/msvcrt.dll (0x7ffd2a0b0000)
      cygwin1.dll => /usr/bin/cygwin1.dll (0x7ffceece0000)
      cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x3fec80000)
      cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x3ff870000)
      advapi32.dll => /cygdrive/c/Windows/System32/advapi32.dll (0x7ffd2ab00000)
      sechost.dll => /cygdrive/c/Windows/System32/sechost.dll (0x7ffd293e0000)
      RPCRT4.dll => /cygdrive/c/Windows/System32/RPCRT4.dll (0x7ffd29920000)
      CRYPTBASE.DLL => /cygdrive/c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffd27860000)
      bcryptPrimitives.dll => /cygdrive/c/Windows/System32/bcryptPrimitives.dll (0x7ffd288c0000)

C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs>ldd vss0.dll
      ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffd2ad10000)
      KERNEL32.DLL => /cygdrive/c/Windows/System32/KERNEL32.DLL (0x7ffd2a160000)
      KERNELBASE.dll => /cygdrive/c/Windows/System32/KERNELBASE.dll (0x7ffd283c0000)
      msvcrt.dll => /cygdrive/c/Windows/System32/msvcrt.dll (0x7ffd2a0b0000)
      cygwin1.dll => /usr/bin/cygwin1.dll (0x7ffceece0000)
      cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x3fec80000)
      cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x3ff870000)
      cygblas-0.dll => /cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/vendor/sqlite/.libs/cygblas-0.dll (0x3fe3d0000)
      cyggomp-1.dll => /usr/bin/cyggomp-1.dll (0x3fe310000)
      cyglapack-0.dll => /cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/vendor/sqlite/.libs/cyglapack-0.dll (0x3f8160000)
      cyggfortran-5.dll => /usr/bin/cyggfortran-5.dll (0x3f8890000)
      cygquadmath-0.dll => /usr/bin/cygquadmath-0.dll (0x3fc150000)
      advapi32.dll => /cygdrive/c/Windows/System32/advapi32.dll (0x7ffd2ab00000)
      sechost.dll => /cygdrive/c/Windows/System32/sechost.dll (0x7ffd293e0000)
      RPCRT4.dll => /cygdrive/c/Windows/System32/RPCRT4.dll (0x7ffd29920000)
      CRYPTBASE.DLL => /cygdrive/c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffd27860000)
      bcryptPrimitives.dll => /cygdrive/c/Windows/System32/bcryptPrimitives.dll (0x7ffd288c0000)

update
I managed to load the extension into sqlite3 cli. it refused to load it because cyglapack-0.dll was missing. I added it to the folder so it will be in the PATH and then managed to load the extension and create virtual table.
I successfuly loaded the extensions in Python as well. but unfortunately when executing
db.execute("""
    CREATE VIRTUAL TABLE IF NOT EXISTS vss_post USING vss0(embeddings(3));
""")

it crash the program without any error.

Thanks for the detailed report and updates! You're the first person to report being able to compile sqlite-vss, so I'm very interested in getting this to work.
A few questions:

After loading vector0.dll, does select vector_version() return a string?
After loading vss0.dll, does select vss_version() return a string?
Could you run select vss_distance_l1('[0.1, 0.1]', '[0.2, 0.2]') and see if that works?

yes
yes
works

See it in action:
C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs>sqlite3.exe
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open random.db
sqlite> .load vector0.dll
sqlite> select vector_version();
v0.1.2
sqlite> .load vss0.dll
sqlite> select vector_version();
v0.1.2
sqlite> select vss_distance_l1('[0.1, 0.1]', '[0.2, 0.2]');
0.200000002980232
sqlite>

When running the same from Python, the program crash without error in
select vss_distance_l1('[0.1, 0.1]', '[0.2, 0.2]');

Does it throw an OperationalError, or just completely crash? Is there a segmentation fault, or any other messaging that gets logged out?

No error, it just exit from python with status 1

Code here
import sqlite3

conn = sqlite3.connect('random.db')
conn.enable_load_extension(True)
conn.load_extension('vector0.dll')
conn.load_extension('vss0.dll')

cur = conn.cursor()
cur.execute('select vector_version();')
version = cur.fetchone()
print(version) # Working

cur.execute("select vss_distance_l1('[0.1, 0.1]', '[0.2, 0.2]');") # < ---- Crash
res = cur.fetchone()
print(res)

cur.close()
conn.close()

The fact that it only happens when executing functions that use Faiss's vector computations (ie fails on vss_distance_l1 and not vss_version) makes me thing that it's a dynamically library error. I'm guess that windows holds off on resolving + executing the cygblas-0.dll / cyggomp-1.dll / cyglapack-0.dll libraries until they're actually needed. It also might explain the spectacular no-error message failures - if it's a deep underlying dll error, then Python may not have a chance to catch it.
That's my guess at least - my knowledge with Windows is very limited. I'd say double check that those dll's exist and work correctly (probably with ldd ? ). I'd be curious to see if there's a sample Faiss C++ project you could compile + execute on your Windows machine, to see if it's a Faiss compilation error or a sqlite-vss specific error.

I used the same faiss submodule in your repo. Just installed the necessary tools and libraries in cygwin setup and followed your instructions to build the library

I added strace output when running the python script

Strace output
User@DESKTOP-HPEE9O3 /cygdrive/c/Users/User/Documents/projects/vss/sqlite-vss/vendor/sqlite/.libs
$ strace /cygdrive/c/Users/User/AppData/Local/Programs/Python/Python311/python.exe main.py
--- Process 17912 created
--- Process 17912 loaded C:\Windows\System32\ntdll.dll at 00007ff9bb4f0000
--- Process 17912 loaded C:\Windows\System32\kernel32.dll at 00007ff9ba020000
--- Process 17912 loaded C:\Windows\System32\KernelBase.dll at 00007ff9b8cf0000
--- Process 17912 thread 19168 created
--- Process 17912 thread 9276 created
--- Process 17912 loaded C:\Windows\System32\ucrtbase.dll at 00007ff9b8b10000
--- Process 17912 thread 3052 created
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\vcruntime140.dll at 00007ff9206e0000
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\python311.dll at 00007ff915b90000
--- Process 17912 loaded C:\Windows\System32\version.dll at 00007ff9af240000
--- Process 17912 loaded C:\Windows\System32\ws2_32.dll at 00007ff9b9fa0000
--- Process 17912 loaded C:\Windows\System32\msvcrt.dll at 00007ff9b92b0000
--- Process 17912 loaded C:\Windows\System32\rpcrt4.dll at 00007ff9ba740000
--- Process 17912 loaded C:\Windows\System32\advapi32.dll at 00007ff9ba9f0000
--- Process 17912 loaded C:\Windows\System32\sechost.dll at 00007ff9b94f0000
--- Process 17912 loaded C:\Windows\System32\bcrypt.dll at 00007ff9b8210000
--- Process 17912 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ff9b8a90000
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\python3.dll at 000002db01780000
--- Process 17912 unloaded DLL at 000002db01780000
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\python3.dll at 000002db01780000
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\DLLs\_sqlite3.pyd at 00007ff9b31c0000
--- Process 17912 loaded C:\Users\User\AppData\Local\Programs\Python\Python311\DLLs\sqlite3.dll at 00007ff923b90000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\vector0.dll at 000000055d4d0000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cyggcc_s-seh-1.dll at 00000003ff870000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cygwin1.dll at 00007ff921030000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cygstdc++-6.dll at 00000003fec80000
  0       0 [main] python (17912) **********************************************
206     206 [main] python (17912) Program name: c:\Users\User\AppData\Local\Programs\Python\Python311\python.exe (windows pid 17912)
165     371 [main] python (17912) OS version:   Windows NT-10.0
132     503 [main] python (17912) **********************************************
--- Process 17912 loaded C:\Windows\System32\cryptbase.dll at 00007ff9b8040000
3365    3868 [main] python (17912) sigprocmask: 0 = sigprocmask (0, 0x0, 0x7FF9213093B0)
533    4401 [main] python (17912) open_shared: name shared.5, shared 0x1A4000000 (wanted 0x1A4000000), h 0x1A0, m 0, created 1
216    4617 [main] python (17912) shared_info::initialize: Installation root: <┬ג┬ה> key: <a32a5794382fce65>
167    4784 [main] python (17912) user_heap_info::init: heap base 0xA00000000, heap top 0xA00000000, heap size 0x20000000 (536870912)
169    4953 [main] python (17912) open_shared: name S-1-5-21-567552140-2017299312-2275771347-1001.1, shared 0x1A4010000 (wanted 0x1A4010000), h 0x1A4, m 1, created 1
158    5111 [main] python (17912) user_info::create: opening user shared for 'S-1-5-21-567552140-2017299312-2275771347-1001' at 0x1A4010000
171    5282 [main] python (17912) user_info::create: user shared version 0
175    5457 [main] python (17912) dll_crt0_0: finished dll_crt0_0 initialization
202    5659 [main] python (17912) time:<PHONE_NUMBER> = time(0x0)
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\vss0.dll at 00000005ca2f0000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cygblas-0.dll at 00000003f8ca0000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cyggomp-1.dll at 00000003fe310000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cyglapack-0.dll at 00000003f8160000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cyggfortran-5.dll at 00000003f8890000
--- Process 17912 loaded C:\Users\User\Documents\projects\vss\sqlite-vss\vendor\sqlite\.libs\cygquadmath-0.dll at 00000003fc150000
('v0.1.2',)
28871   34530 [main] python (17912) mmap: addr 0x0, len<PHONE_NUMBER>4, prot 0x3, flags 0x22, fd -1, off 0x0
233972  268502 [main] python (17912) mmap: 0x6FF802610000 = mmap()
--- Process 17912, exception c0000005 at 00007ff921031026
--- Process 17912 thread 19168 exited with status 0xc0000005
--- Process 17912 thread 9276 exited with status 0xc0000005
--- Process 17912 thread 3052 exited with status 0xc0000005
--- Process 17912 exited with status 0xc0000005
Segmentation fault

Also, when I run the script using Python version of cygwin64 it works:

cygwin64 python output
$ file /usr/bin/python3.9.exe
/usr/bin/python3.9.exe: PE32+ executable (console) x86-64, for MS Windows, 11 sections

$ /usr/bin/python3.9.exe main.py
('v0.1.2',)
(0.20000000298023224,)

I tried faiss sample faiss c++ project and it compiled and run without errors:

code
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <random>

#include <sys/time.h>

#include <faiss/IndexFlat.h>
#include <faiss/IndexIVFFlat.h>
#include <faiss/IndexPQ.h>
#include <faiss/index_io.h>

double elapsed() {
  struct timeval tv;
  gettimeofday(&tv, nullptr);
  return tv.tv_sec + tv.tv_usec * 1e-6;
}

int main() {
  double t0 = elapsed();

  // dimension of the vectors to index
  int d = 128;

  // size of the database we plan to index
  size_t nb = 1000 * 1000;

  // make a set of nt training vectors in the unit cube
  // (could be the database)
  size_t nt = 100 * 1000;

  //---------------------------------------------------------------
  // Define the core quantizer
  // We choose a multiple inverted index for faster training with less data
  // and because it usually offers best accuracy/speed trade-offs
  //
  // We here assume that its lifespan of this coarse quantizer will cover the
  // lifespan of the inverted-file quantizer IndexIVFFlat below
  // With dynamic allocation, one may give the responsability to free the
  // quantizer to the inverted-file index (with attribute do_delete_quantizer)
  //
  // Note: a regular clustering algorithm would be defined as:
  //       faiss::IndexFlatL2 coarse_quantizer (d);
  //
  // Use nhash=2 subquantizers used to define the product coarse quantizer
  // Number of bits: we will have 2^nbits_coarse centroids per subquantizer
  //                 meaning (2^12)^nhash distinct inverted lists
  size_t nhash = 2;
  size_t nbits_subq = int(log2(nb + 1) / 2);     // good choice in general
  size_t ncentroids = 1 << (nhash * nbits_subq); // total # of centroids

  faiss::MultiIndexQuantizer coarse_quantizer(d, nhash, nbits_subq);

  printf("IMI (%ld,%ld): %ld virtual centroids (target: %ld base vectors)",
         nhash,
         nbits_subq,
         ncentroids,
         nb);

  // the coarse quantizer should not be dealloced before the index
  // 4 = nb of bytes per code (d must be a multiple of this)
  // 8 = nb of bits per sub-code (almost always 8)
  faiss::MetricType metric = faiss::METRIC_L2; // can be METRIC_INNER_PRODUCT
  faiss::IndexIVFFlat index(&coarse_quantizer, d, ncentroids, metric);
  index.quantizer_trains_alone = true;

  // define the number of probes. 2048 is for high-dim, overkilled in practice
  // Use 4-1024 depending on the trade-off speed accuracy that you want
  index.nprobe = 2048;

  std::mt19937 rng;
  std::uniform_real_distribution<> distrib;

  { // training
      printf("[%.3f s] Generating %ld vectors in %dD for training\n",
             elapsed() - t0,
             nt,
             d);

      std::vector<float> trainvecs(nt * d);
      for (size_t i = 0; i < nt * d; i++) {
          trainvecs[i] = distrib(rng);
      }

      printf("[%.3f s] Training the index\n", elapsed() - t0);
      index.verbose = true;
      index.train(nt, trainvecs.data());
  }

  size_t nq;
  std::vector<float> queries;

  { // populating the database
      printf("[%.3f s] Building a dataset of %ld vectors to index\n",
             elapsed() - t0,
             nb);

      std::vector<float> database(nb * d);
      for (size_t i = 0; i < nb * d; i++) {
          database[i] = distrib(rng);
      }

      printf("[%.3f s] Adding the vectors to the index\n", elapsed() - t0);

      index.add(nb, database.data());

      // remember a few elements from the database as queries
      int i0 = 1234;
      int i1 = 1244;

      nq = i1 - i0;
      queries.resize(nq * d);
      for (int i = i0; i < i1; i++) {
          for (int j = 0; j < d; j++) {
              queries[(i - i0) * d + j] = database[i * d + j];
          }
      }
  }

  { // searching the database
      int k = 5;
      printf("[%.3f s] Searching the %d nearest neighbors "
             "of %ld vectors in the index\n",
             elapsed() - t0,
             k,
             nq);

      std::vector<faiss::idx_t> nns(k * nq);
      std::vector<float> dis(k * nq);

      index.search(nq, queries.data(), k, dis.data(), nns.data());

      printf("[%.3f s] Query results (vector ids, then distances):\n",
             elapsed() - t0);

      for (int i = 0; i < nq; i++) {
          printf("query %2d: ", i);
          for (int j = 0; j < k; j++) {
              printf("%7ld ", nns[j + i * k]);
          }
          printf("\n     dis: ");
          for (int j = 0; j < k; j++) {
              printf("%7g ", dis[j + i * k]);
          }
          printf("\n");
      }
  }
  return 0;
}

Compile output
$ g++ main.cpp -I./sqlite-vss/vendor/faiss ./sqlite-vss/build_release/vendor/faiss/faiss/libfaiss.a  -fopenmp -lblas -llapack
$ ls
a.exe  main.cpp  sqlite-vss

Program output
$ ./a.exe
IMI (2,9): 262144 virtual centroids (target: 1000000 base vectors)[0.005 s] Generating 100000 vectors in 128D for training
[0.648 s] Training the index
Training level-1 quantizer
IVF quantizer trains alone...
Training IVF residual
IndexIVF: no residual training
[8.816 s] Building a dataset of 1000000 vectors to index
[15.241 s] Adding the vectors to the index
MultiIndexQuantizer::search: 0:32768 / 1000000
MultiIndexQuantizer::search: 32768:65536 / 1000000
MultiIndexQuantizer::search: 65536:98304 / 1000000
MultiIndexQuantizer::search: 98304:131072 / 1000000
MultiIndexQuantizer::search: 131072:163840 / 1000000
MultiIndexQuantizer::search: 163840:196608 / 1000000
MultiIndexQuantizer::search: 196608:229376 / 1000000
MultiIndexQuantizer::search: 229376:262144 / 1000000
MultiIndexQuantizer::search: 262144:294912 / 1000000
MultiIndexQuantizer::search: 294912:327680 / 1000000
MultiIndexQuantizer::search: 327680:360448 / 1000000
MultiIndexQuantizer::search: 360448:393216 / 1000000
MultiIndexQuantizer::search: 393216:425984 / 1000000
MultiIndexQuantizer::search: 425984:458752 / 1000000
MultiIndexQuantizer::search: 458752:491520 / 1000000
MultiIndexQuantizer::search: 491520:524288 / 1000000
MultiIndexQuantizer::search: 524288:557056 / 1000000
MultiIndexQuantizer::search: 557056:589824 / 1000000
MultiIndexQuantizer::search: 589824:622592 / 1000000
MultiIndexQuantizer::search: 622592:655360 / 1000000
MultiIndexQuantizer::search: 655360:688128 / 1000000
MultiIndexQuantizer::search: 688128:720896 / 1000000
MultiIndexQuantizer::search: 720896:753664 / 1000000
MultiIndexQuantizer::search: 753664:786432 / 1000000
MultiIndexQuantizer::search: 786432:819200 / 1000000
MultiIndexQuantizer::search: 819200:851968 / 1000000
MultiIndexQuantizer::search: 851968:884736 / 1000000
MultiIndexQuantizer::search: 884736:917504 / 1000000
MultiIndexQuantizer::search: 917504:950272 / 1000000
MultiIndexQuantizer::search: 950272:983040 / 1000000
MultiIndexQuantizer::search: 983040:1000000 / 1000000
IndexIVFFlat::add_core: added 1000000 / 1000000 vectors
[20.667 s] Searching the 5 nearest neighbors of 10 vectors in the index
[20.684 s] Query results (vector ids, then distances):
query  0:    1234   65776  815632  518751  168411
   dis:       0 13.2041 13.7313 13.9331 13.9852
query  1:    1235  235209   32981  339156  485140
   dis:       0 12.5675 13.2757 13.3526 13.3626
query  2:    1236   46384  393794  279123  803578
   dis:       0 13.2079  13.337 13.5685 13.5999
query  3:    1237  172600  435871  490284  116815
   dis:       0 12.9845 13.4125 13.4894 13.5741
query  4:    1238  185348  630264  685103  672356
   dis:       0 11.3711 12.2562 12.2871 12.2897
query  5:    1239  820990  306204    3096  549432
   dis:       0 12.4804 13.2535 13.5721 13.5853
query  6:    1240  122701  687644  802575  350632
   dis:       0 13.7758 13.9611 14.1327 14.2155
query  7:    1241  985126  686744  336958  926803
   dis:       0 13.2923  13.636 13.7428 14.0614
query  8:    1242  880999  488401  181311  712631
   dis:       0 13.1505 13.4343  13.488 13.6331
query  9:    1243  829029  233144  108428  402759
   dis:       0 12.5892 12.7777 12.8653 13.1447

$ echo $?
0

So to summarize, on your windows machine using cygwin64:

Compiling a sample C++ Faiss program works as expected
Running sqlite-vss with the cygwin64 version of Python works as expected
Running sqlite-vss with regular Python does now work and crashes
Running sqlite-vss from the sqlite3 CLI does not work and still crashes

Is that right?

Everything correct, except for the last one -
using sqlite-vss from sqlite3 CLI works, both from cygwin environemnt or just from cmd

Cool - so is there anything actionable you'd like from this issue then? My guess is that since sqlite-vss was built with cygwin64, it requires cygwin64 applications to load the extension.
I'll probably try compiling sqlite-vss with cygwin64 on a github actions runner, but its been very difficult in the past

Currenly I want to figure out why do I get segfault when running from Python / Nodejs that is not part of cygwin
I'm not sure how to debug it.

I managed to compile faiss on Windows in msys2 environment.
msys2 works pretty well, I think it's suitable for doing it pretty easily in Github actions as well.
https://github.com/facebookresearch/faiss/issues/3067

Hello,
I try to use VSS in combination with SQLite on Windows. As I'm using SQLite in my solution, as well as the SQL interface I like the approach.
Did you make any progress with the Windows install?
I'm struggling now with settings in the Makefile and the CMakelist.txt.
Thanks in advance,
Léon

Here's a way that worked for me, based on @thewh1teagle 's approach. I haven't tested it in-depth, but the sqlite3 cli can load the extensions and select vss_distance_l1('[0.1, 0.1]', '[0.2, 0.2]') works.

Install MSYS2
Open UCRT terminal
Run

# see https://github.com/facebookresearch/faiss/issues/3067#issuecomment-1873007384
pacman --needed -S $MINGW_PACKAGE_PREFIX-{toolchain,cmake,make,swig,autotools,lapack} git
git clone https://github.com/asg017/sqlite-vss.git && cd sqlite-vss
# see https://github.com/asg017/sqlite-vss/blob/main/docs.md
./vendor/get_sqlite.sh
cd vendor/sqlite
./configure && make
cd ../../

Apply the following patch to vendor/faiss:

diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
index 16eb9e9c..12c80eab 100644
--- a/faiss/CMakeLists.txt
+++ b/faiss/CMakeLists.txt
@@ -214,7 +214,7 @@ add_library(faiss_avx2 ${FAISS_SRC})
 if(NOT FAISS_OPT_LEVEL STREQUAL "avx2")
   set_target_properties(faiss_avx2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 endif()
-if(NOT WIN32)
+if(NOT MSVC)
   target_compile_options(faiss_avx2 PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-mavx2 -mfma -mf16c -mpopcnt>)
 else()
   # MSVC enables FMA with /arch:AVX2; no separate flags for F16C, POPCNT
diff --git a/faiss/impl/platform_macros.h b/faiss/impl/platform_macros.h
index 9cec8260..44293e3e 100644
--- a/faiss/impl/platform_macros.h
+++ b/faiss/impl/platform_macros.h
@@ -83,6 +83,17 @@ inline int __builtin_clzll(uint64_t x) {
 #endif

 #else
+
+/*******************************************************
+ * Windows MinGW
+ *******************************************************/
+#ifdef _WIN32
+
+#define posix_memalign(p, a, s) \
+    (((*(p)) = _aligned_malloc((s), (a))), *(p) ? 0 : errno)
+#endif
+
+
 /*******************************************************
  * Linux and OSX
  *******************************************************/
diff --git a/faiss/invlists/InvertedListsIOHook.cpp b/faiss/invlists/InvertedListsIOHook.cpp
index 0081c4f9..18e1b8f4 100644
--- a/faiss/invlists/InvertedListsIOHook.cpp
+++ b/faiss/invlists/InvertedListsIOHook.cpp
@@ -13,9 +13,9 @@

 #include <faiss/invlists/BlockInvertedLists.h>

-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
 #include <faiss/invlists/OnDiskInvertedLists.h>
-#endif // !_MSC_VER
+#endif

 namespace faiss {

@@ -33,7 +33,7 @@ namespace {
 /// std::vector that deletes its contents
 struct IOHookTable : std::vector<InvertedListsIOHook*> {
     IOHookTable() {
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
         push_back(new OnDiskInvertedListsIOHook());
 #endif
         push_back(new BlockInvertedListsIOHook());

Build with

cmake -B build-release . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fpermissive" -DCMAKE_C_FLAGS="-fpermissive"
cmake --build build-release -- -j<number of cores here>
# copy dlls for use outside of MSYS2
cp /ucrt64/bin/{libgcc_s_seh-1.dll,libwinpthread-1.dll,libblas.dll,libgomp-1.dll,liblapack.dll,libgfortran-5.dll,libquadmath-0.dll,libstdc++-6.dll} ./build-release/

Done! Just remember to copy all dlls under build-release on deployment.

Hi, @ma-chengyuan  could you please share the dll file?
I would like to use the windows version of sqlite-vss, but the make process seems too complicated. If you can share it, I would like to try it to see if it works in my environment.

@ma-chengyuan hi, I follow your instruction. The dlls only work with sqlite tool only. The built-in version sqlite3 (installed using .msi file on Windows) or node sqlite3 cannot load that dll as extension.
Here is the message error: The specified module could not be found


Adds Tracing.Builder.addOrphanedSpanHandler

This continues work of #971 on a shared branch so that others can
contribute to finishing it. Notably, this takes a cautious approach as
not only are the served use cases edge case, but only a few types of
handlers make sense on the abandoned span path due to reasons including
bugs and data retained which is smaller to reduce tracking overhead.
Closes #971

ps the least complex, and side-effect causing alternative to this so far is adding a method supportsOrphans() to the FinishedSpanHandler, defaulting to false.
If we did that route, we'd have to change how composites work to make sure only handlers marked supportsOrphans() are added. It also assumes a relationship that orphan handling is a subset of normal handling. I don't like this conflation because it causes tension around operations that only apply to orphans.
For example, in okhttp you have the same interceptor type for network and application layer. having two collections allows you to write interceptors in a specific way for the call site, only considering the circumstances that apply there, and without risk of being invoked the wrong way.
it may seem that configuration would be easier if we had only one collection for FinishedSpanHandler, but the cost is complexity in other areas. Especially knowing this is only about bugs, it seems a prudent choice to push that up. Ex in spring, a qualifying annotation could mark a handler for the abandon path, and yeah it can be annoying to add the same handler, like redaction, twice, but this also prevents inlining those decisions. In other words the decision about which handlers do what are purely config time and therefore cannot cause late bugs or runtime complexity.
my 2p and hope it helps.

one last thought.. by adding mutableSpan.hasAnnotation(String), someone can do their own layering to make one handler act differently according to if it was flushed or not, and without adding more heft to the mutableSpan object which has already collected a fair amount of state.

something we could do to make this more effective at big catching is to reverse implement the abandon span logging as a finished span handler. that way we can have the abandoned handler users provide get a hook regardless of if there was data or not. for example you could have a counter for call sites that abandon spans without writing any data. things that leak are important to track, regardless of if they produce data or not. the way things are currently plumbed, only by looking at logs can you tell if leaks occur. if we rejigged the abandon site a little more. you could count all leaks.

Thanks for the detailed notes, which I agree with, @lambcode.
supportsOrphans() seems the way out, but keep in mind this assumes that in order to handle orphans you also have to also handle non-orphans. In the rare case that exists, an added method MutableSpan.hasAnnotation(String) should work that out without adding more state.
The end goal is that no-one cares about or has to be aware of supportsOrphans() when writing a span handler. they don't need to go back and change existing handlers etc as it is false by default.
Later, the propagation thing about keys not being visible at abandon, we can try something different which is to make it easier to make tags based on custom propagation. At that point you don't need as much state at the end anyway.
Do you agree this approach?

I think I have a way to retain extra fields.. that's the only thing we can safely retain in FinishedSpanHandler as we control the type used, it is package private so unlikely someone will stash a reference and hold up GC.

ok I will do some work to pay off the debt. I think I can redesign the state of MutableSpan to use similar overhead for multiple booleans (shared and orphaned). this will allow a simple check to see if something is orphaned or not. I will also add benchmark comparing GC profile of retaining a reference to extra fields in PendingSpans. If both of these succeed, we can have cake and eat it too.
Firstly, I will change the design to FinishedSpanHandler.supportsOrphans() as that allows others to review the api (who may not care about internals)

@lambcode very good point about the maintenance stealing work elsewhere (not on GC thread). this actually makes testing leak detection tricky because you have to use the tracer to trigger maintenance.

test coverage TODO before polishing state around how to decide if you are handling an orphan or not:

FinishedSpanHandlersTest

show throwable doesn't crash

PendingSpansTest

callable present on orphan path when log level fine

TracingTest

add coverage of zipkinReportingFinishedSpanHandler
mixed handlers test (supportsOrphans true and false)

both Tracing and PendingSpans handlers are no-op aware
Tracing handler composes both
PendingSpans handler only includes the supports orphans one

@lambcode I think we'll leave extra field handling out of scope. it keeps the change cheaper and less risky to release anyway

@lambcode PTAL I tried to complete the minimal changes to make this work. I don't think you were adding a negative handler (one that exclusively works with abandoned spans), but I made it possible with a new method MutableSpan.containsAnnotation(String)
Hopefully, this can get you going as I'd like to divert attention asap to some other in-flight PRs.
Cheers and thanks for all the guidance.

cc @jonathan-lo as probably this is interesting to you. Basically if there are any hooks trying to scrub data, before there was a path where scrubbing wouldn't apply. This aims to close that gap by allowing scrubbers to tag themselves capable of dealing with orphaned data.

thanks for the instant review @anuraaga!

Thanks @anuraaga and @devinsba for the tips.. I'll work them in.
Much appreciated @lambcode for the spike and all the review passes, especially testing it out. Feel free to raise follow-up issues. Even if we don't action it, please do open an issue describing the scenario for extra, but not extra fields on the orphan path.


Use Ultraball If No Other Balls (With Constraint)

Short Description:
There is an issue when there is "No usable pokeballs found!" and the greatball is way big amount. The bot will just walk without catch any pokemon that is not VIP. There should be a feature say "Hey, you can use my ultraball if it is bigger than 20!" 😄
My idea is to config the min_ultraball_to_be_kept with 10, for example. Then tell the bot to use ultraball with the constraint of min_ultraball_to_be_kept  if pokeball and greatball are zero.
Fixes:
This is the current code.
if items_stock[current_ball] == 0:
    self.emit_event('no_pokeballs', formatted='No usable pokeballs found!')
        break

This is the modified code.
if items_stock[current_ball] == 0:
    self.emit_event('no_pokeballs', formatted='No usable pokeballs found!')
    if maximum_ball != ITEM_ULTRABALL and items_stock[ITEM_ULTRABALL] > min_ultraball_to_be_kept:
        maximum_ball = ITEM_ULTRABALL
        self.emit_event(
            'use_ultraball',
            formatted='Use ultraball instead (ultraball count > {ultraball_count})',
            data={
                'ultraball_count': min_ultraball_to_be_kept
            }
        )
        continue
    else:
        break

The min_ultraball_to_be_kept is taken from config file. If it is not set, set it to current amount of ultraball.
min_ultraball_to_be_kept = self.config.get('min_ultraball_to_be_kept', items_stock[ITEM_ULTRABALL])

Also, use_ultraball register event is required.
self.event_manager.register_event(
    'use_ultraball',
    parameters=(
        'ultraball_count'
    ))

@douglascamata Please review this

@joaodragao check my comment and fix merge conflicts, please. Then I think the PR is good to go.

Does this work for greatballs too?

@douglascamata Done! No use_ultraball event emit.

@douglascamata I think greatball is automatically used when there is no pokeball which already serve the purpose.

@joaodragao you have merge conflicts again, sorry. I'll take another look tomorrow, didn't have enough time today. :/

@douglascamata How to sync from current PokemonGo-Bot repository? I will make new PR for this. Also, I want to fix another issue I found. But I can't pull new request since my repository is not synced with the main.

@douglascamata I'm able to open new PR with rebasing to a new branch of mine. But how to deal with this PR?

@joaodragao just follow this procedure to rebase the changes from the official repository

@thiromi @douglascamata Ok! I cleaned the mess!

@joaodragao now I just need a example configuration with explanation about this setting and we're good to merge. 👍

Done!

@joaodragao, shouldn't it check if there are any poke balls higher up in the call stack? I feel like it would save the time spent looping through trying catch every pokemon within the map cell whenever the position updates. Maybe somewhere in move_to_map_pokemon.py?

#3683

min_ultraball_to_be_kept is ok, but how about ulraballs_reserved_for_vip instead?

@ahammond It's not reserved for vip. It will use when there is no other ball.

Done! I removed the counting. Can you merge now?

👍

Quickly tested the dev branch after this commit was merged and was instantly greeted with:
  File "C:\Users\REDACTED\Desktop\PokemonGo-Bot-Dev\pokemongo_bot\cell_workers\pokemon_catch_worker.py", line 269, in _do_catch     min_ultraball_to_keep = items_stock[ITEM_ULTRABALL] NameError: global name 'items_stock' is not defined

@umbreon222 fix being deployed in under 5 minutes.


Document implicit sum in csr_matrix() constructor

My issue is about csr_matrix().
Reproducing code example:

from scipy.sparse import csr_matrix
csr_matrix(([1,1,1],([0,0,0],[0,0,0])), shape=(1,1)).todense()

Result: matrix([[3]])
Expected: matrix([[1]])
This is an implicit behaviour. I can not find anything about this in the documentation.
I assume, there are 3 options:

Raise a error.
Use only last value in the list.
Document current behaviour.

This is indeed the intended behavior, and it's documented (albeit not very prominently) here:
https://docs.scipy.org/doc/scipy/reference/sparse.html#example-2
I agree that we should make this more prominent in the docs.

I think, it will be ok if you add notice right to https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html

@aikho I would love to work on this. Do you want me to add the above example as a notice to https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html

@sameshl would be great to add something similar to example 2 from https://docs.scipy.org/doc/scipy/reference/sparse.html#example-2 right to https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html

Hi! My guess is that @sameshl is not working on this, and wouldn't be angry if I'll make the PR

@erheron please go ahead!


Docs site search UX improvement suggestions

Thanks for the docs site example with working search. Here are a few suggestions for improvements.
No Results Found
Problem definition: To an end user, the search doesn't appear to be working.
Steps to reproduce:

Navigate to the Squido docs site.
In the left sidebar, search for something you know will return zero results.

Observed:

To the end user, nothing appears to happen.

Expected:

A "No results found" or similar message.

Case Sensitivity
Steps to reproduce:

Create a post with a string that starts with an uppercase letter.
Search for that string in lowercase.

Observed:

No results found.

Expected:

Results found.

Titles Not Indexed
Steps to reproduce:

Create a post where the title is not mentioned in the content. Example: Title: "First Post", Content: "Lorem Ipsum".
Search for the title.

Observed:

No results found.

Expected:

Search results for the post with that title.

Notes:

This problem is likely low priority as it is unlikely that a post title would not be mentioned in the content.

Fixed


libdrm: 2.4.94 -> 2.4.96

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libdrm/versions.
meta.description for libdrm is: '"Library for accessing the kernel's Direct Rendering Manager"'.

Checks done (click to expand)

built on NixOS

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 2.4.96 with grep in /nix/store/fph5kknlx5jvjijfqs5wv7cszfli92nx-libdrm-2.4.96

directory tree listing: https://gist.github.com/b5f98c6dcb32be86972c77429a51b117

du listing: https://gist.github.com/f2cd7ac7e8f237b624240d46a7ee44c8

Rebuild report (click to expand)

14343 total rebuild path(s)
5264 package rebuild(s)
5247 x86_64-linux rebuild(s)
4641 i686-linux rebuild(s)
27 x86_64-darwin rebuild(s)
4428 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
AgdaSheaves
AgdaStdlib
DisnixWebService
EmptyEpsilon
R
SDL
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer
SDL2_net
SDL2_ttf
SDL_gfx
SDL_image
SDL_mixer
SDL_net
SDL_sound
SDL_stretch
SDL_ttf
TotalParserCombinators
_20kly
_90secondportraits
a2jmidid
aacskeys
abcde
abcl
abcm2ps
abiword
accountsservice
acgtk
acoustidFingerprinter
adapta-gtk-theme
adobe-reader
adom
adoptopenjdk-bin
adoptopenjdk-hotspot-bin-11
adoptopenjdk-jre-bin
adoptopenjdk-jre-hotspot-bin-11
adoptopenjdk-jre-openj9-bin-11
adoptopenjdk-openj9-bin-11
adwaita-qt
aegisub
aesop
afew
afterstep
agdaBase
agdaIowaStdlib
agdaPrelude
agg
ahoviewer

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/fph5kknlx5jvjijfqs5wv7cszfli92nx-libdrm-2.4.96 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A libdrm https://github.com/r-ryantm/nixpkgs/archive/aaf4e5bc7bcfa230ae91efa73fe9d5421c0aab28.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/fph5kknlx5jvjijfqs5wv7cszfli92nx-libdrm-2.4.96
ls -la /nix/store/fph5kknlx5jvjijfqs5wv7cszfli92nx-libdrm-2.4.96/bin

Success on aarch64-linux (full log)
Attempted: libdrm
Partial log (click to expand)
/nix/store/jks3dr379m37d3rbwzxharw2mxr18ww6-libdrm-2.4.96

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: libdrm
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: libdrm
Partial log (click to expand)
/nix/store/34cpq4b1r7d32jdr05v2wdh8ng9h8kwj-libdrm-2.4.96

Done in #49292


pg_dump from an azure postgres server

Is it possible to remotely run a pg_dump on an azure hosted postgresql server. This document is specifically targeted towards creating a backup of a local db and then restoring to azure. When I initially attempted to run the script like so:
pg_dump -Fc -v --host=test.postgress.database.azure.com --port=5432 --username=test@test --dbname=test > testdmp.sql
The following error was returned:
pg_dump: [archiver (db)] connection to database "test" failed: could not translate host name "test.postgress.database.azure.com" to address: Unknown host
Wondering where I might be going wrong here or if this is something that is possible.

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

ID: 43b2566e-1fc7-cf49-512a-794f56760672
Version Independent ID: fe824068-38f3-d7db-260f-e2af6e5fa7a1
Content: How To Dump and Restore in Azure Database for PostgreSQL
Content Source: articles/postgresql/howto-migrate-using-dump-and-restore.md
Service: postgresql
GitHub Login: @rachel-msft
Microsoft Alias: raagyema

@parsoFish Thanks for the feedback. We are actively investigating and will get back to you soon.

Fixed this on my end. Needed to add my IP to the connection security settings. I hadnt initially done this because when I first tried it seemed the IP was already stored in there but the rule name seems to be significant to that as well


Few questions on usage

@ccbrown Just have a few questions so far that I haven't been able to figure out.
1 - How to pass children through for custom components? Maybe we need a Fragment component here?
#[derive(Default, Props)]
pub struct EntryProps<'a> {
    pub title: String,
    pub children: Vec<AnyElement<'a>>,
}

#[component]
pub fn Entry<'a>(props: &EntryProps<'a>) -> impl Into<AnyElement<'static>> {
    element! {
        Box {
            Box(margin_right: 1) {
                Text(content: format!("{}:", props.title))
            }
            Box {
                // What to do here???
                #(props.children.iter())
            }
        }
    }
}

2 - Is it possible to render components as props to other components? Or is it only possible with children?
// This
Box {
    Entry(title: "Root", value: StyledText(content: env.store.dir.to_string_lossy(), style: Style::Path))
}

// Instead of
Box {
    Entry(title: "Root") {
        StyledText(content: env.store.dir.to_string_lossy(), style: Style::Path)
    }
}

What you have almost works, except props needs to become a mutable reference, and the lifetime of the returned element becomes 'a:

#[component]
pub fn Entry<'a>(props: &mut EntryProps<'a>) -> impl Into<AnyElement<'a>> {
    element! {
        Box {
            Box(margin_right: 1) {
                Text(content: format!("{}:", props.title))
            }
            Box {
                #(&mut props.children)
            }
        }
    }
}

There's nothing particularly special about the props values. Anything you can express in Rust can be passed. So to pass another element, you would need to use the element! macro like so:

#[derive(Default, Props)]
pub struct ExampleProps<'a> {
    pub my_child: Option<AnyElement<'a>>,
}

#[component]
fn Example<'a>(props: &mut ExampleProps<'a>) -> impl Into<AnyElement<'a>> {
    element! {
        Box {
            #(&mut props.my_child)
        }
    }
}

fn main() {
    element! {
        Example(my_child: element! {
            Text(content: "foo")
        }.into_any())
    }
    .print();
}

Or alternatively, if you want to avoid nesting, you can define the child beforehand:
fn main() {
    let my_child = element! {
        Text(content: "foo")
    }
    .into_any();

    element! {
        Example(my_child)
    }
    .print();
}

Awesome, got these working, thank you! It would be great of their was an example file with all the different ways things can be done in regards to the syntax.

For convenience, it would be nice to maybe offer an any_element! macro that just calls element!().into_any() internally. Would help keep the JSX-like syntax a little cleaner.

Another suggestion, rename Box to View so that it doesn't conflict with Rust's native Box. I've bad to rename this a few times now.

Another suggestion, rename Box to View so that it doesn't conflict with Rust's native Box. I've bad to rename this a few times now.

In hindsight I wish I had done this from the start. But as this would undoubtedly break every program using the library, I would want to wait until I have other breaking changes to release before making a change like this.

This can be closed now.


feat: add sound on timer

@andrewinci is there any reason you never merged this? just gave it a go locally and it cuckoo'ed nicely


bug(cdk/cdkTextareaAutosize): size is not properly set with display none

Reproduction
https://stackblitz.com/edit/components-issue-pnodhc?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:

Hover the blue area

Expected Behavior
The textarea should have the size matching 3 rows without having to edit the field.
Actual Behavior
The textarea shows up on a single line even though cdkAutosizeMinRows="3" is set and the value has a line break.
Environment

Angular: 11.1.0
CDK/Material: 11.1.1
Browser(s): Chrome, Firefox
Operating System (e.g. Windows, macOS, Ubuntu): macOS

Hi, instead of display: none use visibility: hidden. https://stackblitz.com/edit/components-issue-e6i9eg?file=src%2Fapp%2Fexample-component.css

Hi, thanks for your answer.
That's my current workaround but it also forces to add hacky CSS rules to work with the fact that a visibility: hidden element still occupies space on the page.

Closing the issue, because unfortunately we can't do much about it. The way the it works is by measuring how tall the content is supposed to be and setting it to the textarea element. When the element is inside a display: none parent, the browser will return that the size is 0. It can be worked around by polling the DOM for size changes, but that will be really inefficient. Alternatively, you can get a hold of the CdkTextareaAutosize instance and call resizeToFitContent when you know that it's visible.


Add Clone trait implementation to Lang enum

Hi,
I'm currently using the deepl-rs crate and I found it difficult to work with the Lang enum. It currently does not implement the Clone trait, which makes it cumbersome to use in certain scenarios.
I believe that adding the Clone trait implementation to the Lang enum would make it much easier to work with. Is there any reason why the trait was not implemented in the first place? If there are no concerns or objections, would it be possible to add the Clone trait implementation to the Lang enum?
Thank you for your time and consideration.

Sry I just forgot to add that derive. It should be fixed now :)

Thank you for your prompt response. I'm glad to hear that the issue will be fixed in v0.4.1. I appreciate your effort in resolving this issue.
Looking forward to using the updated version. Thank you again for your support.


Updates for release 0.28.0 development

Before submitting
Please complete the following checklist when submitting a PR:

[x] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests directory!

[x] All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running make docs.

[x] Ensure that the test suite passes, by running make test.

[x] Add a new entry to the .github/CHANGELOG.md file, summarizing the
change, and including a link back to the PR.

[x] Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.

Context: This PR prepare the package for the 0.28 release cycle. The following changes will be added:

Update release tag to 0.28.0_devx
Pin CMake to 3.24.x to avoid pitfalls encountered with 3.25
Deprecate Python 3.7 support

Description of the Change: As above.
Benefits: Package updates, continued builds, and reduced build overhead.
Possible Drawbacks:
Related GitHub Issues:

Thanks folks!


Formatted everything except maps and rpatool

Formatted with black and did Sourcery cleanup

This had merge conflicts so it wasn't suitable for pulling, sorry. I've run all the Python files through autopep8 and they look a lot tidier now. Hopefully that's OK for you?


Forecasting refactor capstone with dynamic tags to address grid search failure

This is a follow-on from #1088 attempting to address the incompatibility of the grid search refactor due to its "dynamic tag like" behaviour pre-refactor.
Apologies from working with the tags here, but this naturally emerged in trying to address issues and finish the forecaster refactor.
The solution I've adopted overrides the "requires-fh-in-fit" tag in the constructor of the grid search algorithms with the value of the single component.
This is achieved by newly introduced tag handling functionality in the BaseEstimator class, via object (not class) methods: getters get_tags, get_tag and setters set_tags and mirror_tags. These make use of dynamic tags that can be set in construction and override class tags and their inheritance.
The one other change is replacing the tag access in _set_fh by get_tag so it can see the dynamic tag set in the constructor.

FYI @GuzalBulatova

@GuzalBulatova, @mloning, @TonyBagnall, if you remember we went back and forth about _update etc in the grid search.
This is now almost identical with the middle stage (except for the dynamic tag on fh use), please have a look whether it makes sense.


[RPC] Fix Server connecting to RPC Tracker through a Proxy

Fixed Server connecting to RPC Tracker through a Proxy which was broken. Additionally, a test has been added to check this type of connection in regular CI.

Thanks @KJlaccHoeUM9l . made a minor comment on test