cluster: make each member's service owned by its pod

Continue https://github.com/coreos/etcd-operator/pull/680#discussion_r98117640
fix https://github.com/coreos/etcd-operator/issues/290

lgtm

@etcd-bot retest this please
All failed.. Not sure if it's bug or GKE not responding.

@etcd-bot test this please

Latest update on failure debug: It seems like the way we create pod first and then create service introduces a race that the new pod couldn't talk to any others. For example, [A0, A1] is current membership, A1 was created, but Service for A1 wasn't ready yet. A1 trying to talk to A0 but got:
etcdserver: could not get cluster response from http://test-etcd-eunq6-0000:2380: Get http://test-etcd-eunq6-0000:2380/members: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
etcdmain: stopping listening for client requests on <IP_ADDRESS>:2379
etcdmain: stopping listening for peers on http://<IP_ADDRESS>:2380
etcdmain: cannot fetch cluster info from peer urls: could not retrieve cluster information from the given urls

And then exit.

This is strange. service allows other members to talk to new member, not the way around.

Found the error and fixed.

fixed

LGTM if CI passes.


How do i handle @ in package names?

I was wondering on what the strategy is for handling packages with an @ in the name like https://formulae.brew.sh/cask/firefox@developer-edition ?
I tried parsing as a string but it seems that this breaks the flake.
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'darwin-system-24.11.20240804.f3834de+darwin4.f7142b8'
         whose name attribute is located at /nix/store/f5ykynf933aab7nd1arqz6dm79hdh91q-source/pkgs/stdenv/generic/make-derivation.nix:334:7

       … while evaluating attribute 'activationScript' of derivation 'darwin-system-24.11.20240804.f3834de+darwin4.f7142b8'

         at /nix/store/gja289s0jhbrz7kgypdq8p4x0pin5axg-source/modules/system/default.nix:95:7:

           94|
           95|       activationScript = cfg.activationScripts.script.text;
             |       ^
           96|       activationUserScript = cfg.activationScripts.userScript.text;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: A definition for option `environment.systemPackages."[definition 10-entry 7]"' is not of type `package'. Definition values:
       - In `/nix/store/awlw9r6cby3g0sw2y33981f4vdvzpxy1-source/brew-apps.nix': "firefox@developer-edition"

Best regards

The packages are just contained in an attribute set and such sets can have special characters in their attributes, see Nix language documentation here. So something along the lines of pkgs.brewCasks."firefox@developer-edition" should work.

environment.systemPackages = with pkgs.brewCasks; [
  firefox
  zotero
  ticktick
  obsidian
  pkgs.brewCasks."firefox@developer-edition" # works
  "firefox@developer-edition" # doesn't work
];

Ahhh i see my mistake, you can't just write it as a string, you have to include the whole thing.
Thanks for the tip! I am still early in my nix journey :)


Changed rate change validatin + add validation for amount out

#86931508w
I also fixed the case where amountIn was being rounded to zero in amountOut by adding a positiveAmount validation for amountOut and changing the field validator.

Task linked: CU-86931508w Android: Change slippage validation


Add a way to prefix the current candidate with a single character.

Add user option selectrum-prefix-current-candidate.
Add corresponding face selectrum-prefix-current-candidate.
Update changelog.

Images:
find-file

consult-line

No longer requested.


Examine and clarify the desired behavior of overlaying profiles on existing attributes

Background
In OCSF's schema definition files, there is the concept of a profile.  As documented here, a profile is akin to an overlay or mixin:

Profiles overlay additional related attributes into event classes and objects allowing for cross-category event class augmentation and filtering.  Event classes register for profiles that when optionally applied, can be mixed into event classes and objects, by a producer or mapper.

As described further on in the documentation, classes may explicitly declare attributes that overlap with a profile.  The described behavior is that the class defined attribute requirement (e.g. required, recommended, optional) takes precedence over that of the profile:

However some classes, such as System Activity classes, build-in the attributes of a profile, for example the Host profile attributes device and actor are defined in the class. When a class definition includes the profile attributes, it still registers for that profile in the class definition so as to match any searches across events for that profile. In this case the class defined attribute requirement definitions take precedence.

As discussed in the working group call on 03/05/2024, this behavior may or may not be desired.  Specifically, it was not clear if a profile with a more restrictive requirement should be overridden by an explicitly declared attribute with a less restrictive requirement.
Examples
1. when a profile attribute is more restrictive than an event attribute
This can be seen in action today with the combination of the rdp_activity event in the network category and the host profile:

The event as represented by the schema server can be seen here: https://schema.ocsf.io/1.2.0-dev/classes/rdp_activity
The event as represented by the OCSF schema definition can be seen here: https://github.com/ocsf/ocsf-schema/blob/main/events/network/rdp.json
The host profile as represented by the OCSF schema definition can be seen here: https://github.com/ocsf/ocsf-schema/blob/main/profiles/host.json

Note how the host profile includes a recommended device attribute, but the rdp_activity event includes a less restrictive optional device attribute.
On the schema server, the "device" attribute is not shown unless the host profile is active, and when the profile is active, it is shown with the less restrictive optional requirement.
2. when a profile attribute is less restrictive than an event attribute
This can be seen in several cases, but here we'll use the same host profile and the patch_state event in the discovery category:

The event as represented by the schema server can be seen here: https://schema.ocsf.io/1.2.0-dev/classes/patch_state
The event as represented by the OCSF schema definition can be seen here: https://github.com/ocsf/ocsf-schema/blob/main/events/discovery/patch_state.json
The host profile as represented by the OCSF schema definition can again be seen here: https://github.com/ocsf/ocsf-schema/blob/main/profiles/host.json

Note how the host profile includes a recommended device attribute, but the patch_state event includes a more restrictive required device attribute.
On the schema server, the "device" attribute is shown with the more restrictive required regardless of whether the host profile is active.  When the profile is active, interestingly the additional actor attribute from the profile does not seem to appear.
To Do
The above behavior in the OCSF schema server does conform to what is stated in the documentation, in a way: the requirement of the event is always preferred over the requirement of the profile.  However, there does seem to be some inconsistency on whether attributes exist or not based on whether the profile is applied.  Why doesn't the device attribute exist on rdp_activity without the host profile applied, and why does the actor attribute not exist on patch_state when it is?

Why doesn't the device attribute exist on rdp_activity without the host profile applied

I recently learned that preventing this behavior is the purpose of "profile": null, though this feature does not seem to be well-documented.


Fix issue with IOU amount

Details
Updates the logic in BaseTextInput to fix an issue where we were unable to delete the first digit in the IOU amount page.
cc @amyevans
Fixed Issues
$ https://github.com/Expensify/App/issues/9362
Tests

Navigate to + > Send money.
Enter an amount with at least 2 digits.
Verify that you can delete all the digits.
Navigate to Settings > Profile
Verify that the first name text input works as expected, i.e. we can enter text, edit and completely delete it. Also verify that the labels work as expected, i.e. they move up when the input is focused and has text in it and moves down when the input is empty and unfocused.
Navigate to Settings > Payments > Add payment method > Debit card
Run step 5 again for the Name on card field

[x] Verify that no errors appear in the JS console

PR Review Checklist
Contributor (PR Author) Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] iOS / native
[x] Android / native
[x] iOS / Safari
[x] Android / Chrome
[x] MacOS / Chrome
[x] MacOS / Desktop

[x] I verified there are no console errors (if there’s a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] Any functional components have the displayName property
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose and it is

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn’t already exist
[ ] The style can’t be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

PR Reviewer Checklist

[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

[ ] I verified there are no console errors (if there’s a console error not related to the PR, report it or open an issue for it to be fixed)
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] Any functional components have the displayName property
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose and it is broken down into smaller components in order to separate concerns and functions

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn’t already exist
[ ] The style can’t be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

QA Steps

Navigate to + > Send money.
Enter an amount with at least 2 digits.
Verify that you can delete all the digits.
Navigate to Settings > Profile
Verify that the first name text input works as expected, i.e. we can enter text, edit and completely delete it. Also verify that the labels work as expected, i.e. they move up when the input is focused and has text in it and moves down when the input is empty and unfocused.
Navigate to Settings > Payments > Add payment method > Debit card
Run step 5 again for the Name on card field

[ ] Verify that no errors appear in the JS console

Screenshots

Web
https://user-images.githubusercontent.com/22219519/172747476-a3ab4e7e-d494-4044-adc8-2105a0458cd2.mov
Mobile Web
https://user-images.githubusercontent.com/22219519/172747500-94af5cf0-8500-442d-961c-82256b1fdc85.mov
Desktop
https://user-images.githubusercontent.com/22219519/172747600-82b6e7b8-f260-423e-bc26-2e472a642d94.mov
iOS
https://user-images.githubusercontent.com/22219519/172747653-3fa6e981-aeed-4026-9e1f-36a5fb3f171c.mov
Android
https://user-images.githubusercontent.com/22219519/172747695-9cad9a89-3153-465d-bca8-f9928acd8233.mov

🚀 Cherry-picked to staging by @mountiny in version: 1.1.74-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

Confirmed on my phone with the latest staging release that this has been fixed! Checking it off

🚀 Deployed to production by @yuwenmemon in version: 1.1.74-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Intent Guides

VSCode Version: 1.11.2
OS Version: Windows 10

Steps to Reproduce:

Turn intent guides on
Use any language that doesn't use any type of brackets (say Python)

What to see: The intent guide goes all the way down till it doesn't matches the same indentation rather than limiting itself at the function definition in the picture.
Sublime Text executes it right, but VS code doesn't. Moreover there is no option of active intent guides. These both seem to be obvious features for a good editor like VS Code, right?

Related to this, folding code in Python also folds all the way down to the next line of actual code. So all whitespace between methods is lost when folding.

Both folding and indent guides use the same algorithm in determining the relevant areas.

To fix this we would have to add a property to our language specification to differentiate between c-style language where a block ends with a end token ('end', '}' ...) vs languages use indendation (https://en.wikipedia.org/wiki/Off-side_rule)

This is fixed by PR #26258


scn_Latn: likely closer to 4.7M speakers

English Wikipedia, based on Ethnologue 18, indicates 4.7M (2002). Note that Sicily has 4.8M speakers.
/cc @gino-m
https://en.wal.unesco.org/languages/sicilian gives a range 1_000_000 to 9_999_999. Ethnologue 26 gives a range 1_000_000 to 1_000_000_000. Neither seems adequate.

English Wikipedia, based on Ethnologue 18, indicates 4.7M (2002). Note that Sicily has 4.8M speakers.
/cc @gino-m https://en.wal.unesco.org/languages/sicilian gives a range 1_000_000 to 9_999_999. Ethnologue 26 gives a range 1_000_000 to 1_000_000_000. Neither seems adequate.

SGTM!


[INFINITY-2736][INFINITY-2726] Remove kinit dependency for kerberized HDFS service spec

This PR moves away from using kinit (as it might not be in the task's environment) and relies on JAAS to auth.
This also moves the krb5.conf file out of the JRE folder.

Upon investigation, I believe the HDFS commands do not use the JAAS file.
We will defer fixing this for now.

Closing for now to unclutter PR list


Bing Ads.js injected with AI scripts

Hi, I recently enabled application insights on an app service app from the Azure Portal. As expected scripts are added to enable AI to do its thing.
When testing the website, I found pages have the bing_ad.js script injected, not the home page but the next level. I've read some documentation (https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript) where I can't find any reference to bing ads and I've looked at the source here where I've found some references to bing.com in tests but no luck finding out how/where this script is injected.
This script is what I'm trying to find information on.

Specifically, am I able to exclude it?
thanks in advance
Merry Christmas!

Well it appears that the name Bing Ads is the name given to the resource by the test tool I am using, google pagespeed insights. I don't know enough about the inner working of AI at the moment to be sure but it looks like it is actually this script "ai.0.js" that the page speed tool is identifying as bing ad.
The reason I'm interested is that I don;t have tracking of any kind on our sites, there's no marketing analytics or ads. I'd like to use AI but would like confirm there is no interaction with ad services, it doesn't look like there is

Just to check, am I asking this in the right place? Any help appreciated,
Many thanks

You are correct, ai.0.js is the (version 1 - now called legacy) of the Application Insights and it has NO marketing or ads.

Thanks Nev.


Add "On Hold" status for documenation

This status is used currently when an issue is waiting for the up-stream code to be merged.

This should go along with "Ready", don't you think?

I think "Ready" should be removed and "Status: Reviewed" should be used instead. I think these are equal.

A PR could be "reviewed" and "on hold", so "ready" would be missing opposite here.
Currently, "ready" in symfony core should be private and maybe implemented in a listener when there is to ":+1:"  from maintainers. And this could go for the docs but with "finished" instead of "ready".

#25 is indeed similar to this idea about "ready" :)

Ah, I was not aware of #25 :) This is not the same as "reviewed" IMHO, it's independent from the review (that can be from anyone), also sometimes a core member change the status to reviewed with a ":+1:" but there is still not two of them.
I think "Ready" and "Finished" should be used for private hooks.

Please note that one :+1: is enough to call it ready, as the merger will have the other +1.

Is this something we still want to implement?

So, I think I can solve this.
On symfony-docs:

I see if the PR body contains a link to a symfony/symfony PR. If that PR is open, then I add the "On hold".
I also save a reference to the docs PR in the database

On symfony:

On merge, I ask github for the PR timeline
I look a the time line for a "cross-referenced" event. If the related issue matches something I have in the databse, then I remove the "On hold" label.

Do we want this? How useful is the "on hold" label?

Im leaning towards closing this

Oh sorry for not responding here.
This is a process I'm currently doing manually. We all tag PRs related to unmerged features as "Waiting Code Merge" and go over the list of WCM PRs every once in a while (it's only really needed to do it once every 6 months).
So this is definitely not a must have and given the complexity required to automate, I agree that closing is the best thing for now.

Okey. Let's close for now and see if the requirement changes in the future.


Add the "nasm" package into the dependencies of building ALVR Streamer under Fedora on the "Building From Source" page in Wiki.

The "nasm" package is required when compiling x264 under Fedora.

closing going to fix this myself


spec: clarify rune literal escape sequences

What version of Go are you using (go version)?
N/A - github current
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
N/A
What did you do?
Read the specification
What did you expect to see?
Correct specification of Rune literals
What did you see instead?
The informal discussion is clear, but just below the specification of single-character rune escapes, the spec says "All other sequences starting with a backslash are illegal inside rune literals." Immediately following which, it goes on to specify a grammar for rune literals that incorporates octal, hex, and unicode escapes.
Recommendation:
Move that line below the grammar specification. Above the grammar specification (where that line currently sits), put a sentence that says something along the lines of "Valid rune escapes are defined by the following grammar:"

Thank you, @seankhilao. It was not clear to me how to title this one correctly, and I appreciate the assist.
Spec edits will break this link, but right now you can see the specific piece of text that concerns me here. The PRE block immediately below this sentence clearly shows that the sentence is false.


bug: windows not supported

Did you check docs and existing issues?

[X] I have read the documentation.
[X] I have searched the existing issues.

Neovim version (nvim -v)
0.10.0
Operating system/version
Windows 10 Pro 22H2
Output from :checkhealth neotest-golang
neotest-golang: require("neotest-golang.health").check()

- OK Go binary found on PATH: C:\Program Files\Go\bin\go.EXE
- OK Found go.mod file for C:\Users\santiago.rendong\dev\rendxn\leetcode\arraystring\length_of_last_word_test.go in C:\Users\santiago.rendong\dev\rendxn\leetcode/go.mod
- OK neotest is available
- OK nvim-treesitter is available
- OK nio is available
- WARNING dap-go is not available
- OK plenary is available

Describe the bug
When running the nearest test with neotest.run.run() and the cursor is under the definition of the last test in that file, it errors with the following output:
neotest-golang: ...-data/lazy/neotest-golang/lua/neotest-golang/lib/cmd.lua:20: attempt to concatenate local 'cwd' (a nil value)
                            stack traceback:
...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:89: in function '__concat'                                                                        ...-
data/lazy/neotest-golang/lua/neotest-golang/lib/cmd.lua:20: in function 'golist_data'
.../lazy/neotest-golang/lua/neotest-golang/runspec/test.lua:17: in function 'build_spec'
...cal/nvim-data/lazy/neotest/lua/neotest/client/runner.lua:76: in function '_run_tree'
...cal/nvim-data/lazy/neotest/lua/neotest/client/runner.lua:65: in function <...cal/nvim-data/lazy/neotest/lua/neotest/client/runner.lua:22>
[C]: in function 'xpcall'                                                                                ...Local/nvim-data/lazy/
neotest/lua/neotest/client/init.lua:84: in function 'run_tree'                                                                        ...cal/nvim-data/lazy/
neotest/lua/neotest/consumers/run.lua:85: in function 'func'                                                                            .../AppData/Local/
nvim-data/lazy/nvim-nio/lua/nio/tasks.lua:173: in function <.../AppData/Local/nvim-data/lazy/nvim-nio/lua/nio/tasks.lua:172>

Steps To Reproduce

Open a test file
Place your cursor under the last func TestXxx
Run neotest.run.run()

Expected Behavior
Run the nearest test, no matter if it's under or above cursor.
Your Lua setup
{
  {
    "nvim-neotest/neotest",
    dependencies = {
      "nvim-neotest/nvim-nio",
      "nvim-lua/plenary.nvim",
      "antoinemadec/FixCursorHold.nvim",
      "nvim-treesitter/nvim-treesitter",
      "fredrikaverpil/neotest-golang",
    },
    config = function()
      local neotest = require("neotest")

      neotest.setup({
        adapters = {
          require("neotest-golang"),
        }
      })
    end,
  },
}

I'm actually not sure if it should run the nearest or the next one. According to neotest docs, neotest.run.run() should run the nearest. In any case, I believe the concatenate should check for nil values.

Hey @santiagorendong and thanks for the bug report.
I don't really have any control over what gets executed in terms of being "nearest". That's the responsibility of Neotest (the framework).
But, like you say, a nil-check is definitively something we can do here. However, there should never be a nil-value for the cwd which means this is likely an issue on Windows with this regex:
https://github.com/fredrikaverpil/neotest-golang/blob/main/lua/neotest-golang/runspec/test.lua#L16
I don't have easy access to Windows and I'm currently also on vacation (no laptop) but I suspect more issues on that OS, as I haven't tested the adapter on it at all. But if you have the time, you can try editing that regex so that it works with backslashes and see if you can get a value for cwd so you can at least run the test.

You could try something like this:
string.match(pos.path, "(.+)[/\\]")

Or perhaps better:
local sep = package.config:sub(1,1)
string.match(pos.path, "(.+)" .. sep)

I'll try and take a look. Don't worry about it for now, enjoy your vacations 🏖

I haven't tested this myself on Windows yet, but if you like, you can give #149 a go by setting the branch and updating the plugin:
{
  "fredrikaverpil/neotest-golang", -- Installation
  branch = "windows",
},

I would also be super helpful if you enabled logging (see the README for details) and filtered the log to only show neotest-golang entries and then post the log here.

@santiagorendong I had a quick look at this today, and I've fixed some issues for running individual tests. For me on Windows 11 with Powershell, there's a bunch of weird ANSI codes and whatnot that gets printed and garbled into the command execution output. This does not happen on macOS (or Linux as far as I know).
I've tried to mitigate some common ANSI codes by detecting them and stripping them out, but it's not perfect. Have a look at this to see what I mean:
{ '\27[?25l\27[2J\27[m\27[H{"Time":"2024-07
22T17:04:04.2598864+02:00","Action":"start","Package":"github.com/fredrikaverpil/neotest-golang"}', '{"Time":"2024-07-22T17:04:04.2605315+02:00","Action":"run","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest"}', '{"Time":"2024-07-22T17:04:04.2606674+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest","Output":"=== RUN TestTopLevelWithSubTest\\n"}', '{"Time":"2024-07-22T17:04:04.2606674+02:00","Action":"run","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest/SubTest"}', '{"Time":"2024-07-22T17:04:04.2606674+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest/SubTest","Output":"=== RUN TestTopLevelWithSubTest/SubTest\\n"}', '{"Time":"2024-07-22T17:04:04.2616854+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest","Output":"--- PASS: TestTopLevelWithSubTest (0.01s)\\n"}', '{"Time":"2024-07-22T17:04:04.2623877+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest/SubTest","Output":" --- PASS: TestTopLevelWithSubTest/SubTest (0.00s)\\n"}', '{"Time":"2024-07-22T17:04:04.2626941+02:00","Action":"pass","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest/SubTest","Elapsed":0}', '{"Time":"2024-07-22T17:04:04.264017+02:00","Action":"pass","Package":"github.com/fredrikaverpil/neotest-golang","Test":"TestTopLevelWithSubTest","Elapsed":0.01}', '{"Time":"2024-07-22T17:04:04.2645792+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Output":"PASS\\n"}', '{"Time":"2024-07-22T17:04:04.2651107+02:00","Action":"output","Package":"github.com/fredrikaverpil/neotest-golang","Output":"ok \\tgithub.com/fredrikaverpil/neotest-golang\\t(cached)\\n"}', '{"Time":"2024-07-22T17:04:04.2657592+02:00","Action":"pass","Package":"github.com/fredrikaverpil/neotest-golang","Elapsed":0.006}', "\27]0;C:\\Program Files\\Go\\bin\\go.EXE\a\27[?25h" }

Next, I'll have a look at running a directory of files, and a file of tests, as there's some issue there still remaining.

Hi there, I didn't expect to you to get a draft going this quickly.
Thanks for the overall effort and attitude 🚀
I'll take a look now 😄

I ran some tests from a table (the one in the discussion related to this issue) and it still gave me the same error. Here are the logs after filtering... It does look lime some ANSI codes are getting through as well as some weird stuff going on with the TestFunc name "TestLenghtOfW", "ord"
DEBUG | 2024-07-22T10:40:59Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Searching for go.mod in C:\Users\santiago.rendong\dev\rendxn\leetcode\arraystring
DEBUG | 2024-07-22T10:40:59Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Searching for go.mod in C:\Users\santiago.rendong\dev\rendxn\leetcode
DEBUG | 2024-07-22T10:40:59Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Found go.mod at C:\Users\santiago.rendong\dev\rendxn\leetcode\go.mod
DEBUG | 2024-07-22T10:40:59Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Go mod filepath C:\Users\santiago.rendong\dev\rendxn\leetcode\go.mod
DEBUG | 2024-07-22T10:40:59Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Running Go list: go list -json ./... in C:\Users\santiago.rendong\dev\rendxn\leetcode
INFO | 2024-07-22T10:41:00Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:64 | [neotest-golang] Go list output:  { "Dir": "C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\arraystring", "ImportPath": "leetcode/arraystring", "Name": "arraystring", "Root": "C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode", "Module": { "Path": "leetcode", "Main": true, "Dir": "C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode", "GoMod": "C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\go.mod", "GoVersion": "1.22.1" }, "Match": [ "./..." ], "Stale": true, "StaleReason": "build ID mismatch", "GoFiles": [ "length_of_last_word.go" ], "Imports": [ "strings" ], "Deps": [ "errors", "internal/abi", "internal/bytealg", "internal/chacha8rand", "internal/coverage/rtcov", "internal/cpu", "internal/goarch", "internal/godebugs", "internal/goexperiment", "internal/goos", "internal/race", "internal/reflectlite", "internal/unsafeheader", "io", "runtime", "runtime/internal/atomic", "runtime/internal/math", "runtime/internal/sys", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8", "unsafe" ], "TestGoFiles": [ "length_of_last_word_test.go" ], "TestImports": [ "testing" ] }
INFO | 2024-07-22T10:41:00Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:64 | [neotest-golang] Test command: go test -json -v -race -count=1 leetcode/arraystring -run ^(^TestLengthOfLastWord$)$
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Raw output from readfile { '\27[2J\27[m\27[H{"Time":"2024-07-22T10:41:03.6282708-05:00","Action":"start","Package":"leetcode/arraystring"}', '\27]0;C:\\Program Files\\Go\\bin\\go.EXE\a\27[?25h{"Time":"2024-07-22T10:41:03.9288903-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '"}\27[K', '{"Time":"2024-07-22T10:41:03.9295549-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord","Output":"=== RUN TestLengthOfLastWord\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/single_word"}\27[K', '{"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/single_word","Output":"=== RUN TestLengthOfLastWord/single_word\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9304063-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/multiple_words"}\27[K', '{"Time":"2024-07-22T10:41:03.9308903-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/multiple_words","Output":"=== RUN TestLengthOfLastWord/multiple_words\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/excess_whitespace"}\27[K', '{"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/excess_whitespace","Output":"=== RUN TestLengthOfLastWord/excess_whitespace\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9319078-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord","Output":"--- PASS: TestLengthOfLastWord (0.00s)\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9324032-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/single_word","Output":" --- PASS: TestLengthOfLastWord/single_word (0.00s)\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/single_word","Elapsed":0}\27[K', '{"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/multiple_words","Output":" --- PASS: TestLengthOfLastWord/multiple_words (0.00s)\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/multiple_words","Elapsed":0}\27[K', '{"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/excess_whitespace","Output":" --- PASS: TestLengthOfLastWord/excess_whitespace (0.00s)\\n"}\27[K', '{"Time":"2024-07-22T10:41:03.9339009-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/excess_whitespace","Elapsed":0}\27[K', '{"Time":"2024-07-22T10:41:03.9348982-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd","Elapsed":0}\27[K', '{"Time":"2024-07-22T10:41:03.9353473-05:00","Action":"output","Package":"leetcode/arraystring","Output":"PASS\\n"} ', '{"Time":"2024-07-22T10:41:04.9386529-05:00","Action":"output","Package":"leetcode/arraystring","Output":"ok \\tleetcode/', 'arraystring\\t1.310s\\n"}\27[K', '{"Time":"2024-07-22T10:41:04.9386529-05:00","Action":"pass","Package":"leetcode/arraystring","Elapsed":1.31}' }
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Table should be stripped from ansi codes { { Action = "start", Package = "leetcode/arraystring", Time = "2024-07-22T10:41:03.6282708-05:00" }, '\27]0;C:\\Program Files\\Go\\bin\\go.EXE?25h{"Time":"2024-07-22T10:41:03.9288903-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '"}', '{"Time":"2024-07-22T10:41:03.9295549-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord","Output":"=== RUN TestLengthOfLastWord\\n"}', '{"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/single_word"}', '{"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/single_word","Output":"=== RUN TestLengthOfLastWord/single_word\\n"}', '{"Time":"2024-07-22T10:41:03.9304063-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/multiple_words"}', '{"Time":"2024-07-22T10:41:03.9308903-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/multiple_words","Output":"=== RUN TestLengthOfLastWord/multiple_words\\n"}', '{"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord', '/excess_whitespace"}', '{"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/excess_whitespace","Output":"=== RUN TestLengthOfLastWord/excess_whitespace\\n"}', '{"Time":"2024-07-22T10:41:03.9319078-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord","Output":"--- PASS: TestLengthOfLastWord (0.00s)\\n"}', '{"Time":"2024-07-22T10:41:03.9324032-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/single_word","Output":" --- PASS: TestLengthOfLastWord/single_word (0.00s)\\n"}', '{"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/single_word","Elapsed":0}', '{"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/multiple_words","Output":" --- PASS: TestLengthOfLastWord/multiple_words (0.00s)\\n"}', '{"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/multiple_words","Elapsed":0}', '{"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW', 'ord/excess_whitespace","Output":" --- PASS: TestLengthOfLastWord/excess_whitespace (0.00s)\\n"}', '{"Time":"2024-07-22T10:41:03.9339009-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd/excess_whitespace","Elapsed":0}', '{"Time":"2024-07-22T10:41:03.9348982-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor', 'd","Elapsed":0}', { Action = "output", Output = "PASS\n", Package = "leetcode/arraystring", Time = "2024-07-22T10:41:03.9353473-05:00" }, '{"Time":"2024-07-22T10:41:04.9386529-05:00","Action":"output","Package":"leetcode/arraystring","Output":"ok \\tleetcode/', 'arraystring\\t1.310s\\n"}', { Action = "pass", Elapsed = 1.31, Package = "leetcode/arraystring", Time = "2024-07-22T10:41:04.9386529-05:00" } }
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9295549-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9298879-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9304063-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9308903-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"run","Package":"leetcode/arraystring","Test":"TestLengthOfLastWord
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9314066-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9319078-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9324032-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9329074-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9333968-05:00","Action":"output","Package":"leetcode/arraystring","Test":"TestLengthOfLastW
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9339009-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:03.9348982-05:00","Action":"pass","Package":"leetcode/arraystring","Test":"TestLengthOfLastWor
WARN | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Failed to decode JSON line: {"Time":"2024-07-22T10:41:04.9386529-05:00","Action":"output","Package":"leetcode/arraystring","Output":"ok  \tleetcode/
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] Table JSON-decoded { { Action = "output", Output = "PASS\n", Package = "leetcode/arraystring", Time = "2024-07-22T10:41:03.9353473-05:00" }, { Action = "pass", Elapsed = 1.31, Package = "leetcode/arraystring", Time = "2024-07-22T10:41:04.9386529-05:00" } }
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] INVALID TEST DATA
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] {
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] INVALID TEST DATA
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] {
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] INVALID TEST DATA
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] {
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] INVALID TEST DATA
DEBUG | 2024-07-22T10:41:05Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] {
WARN | 2024-07-22T10:41:07Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:74 | [neotest-golang] Test(s) not associated (not found/executed):  { 'C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\arraystring\\length_of_last_word_test.go::TestLengthOfLastWord::"single word"', 'C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\arraystring\\length_of_last_word_test.go::TestLengthOfLastWord::"excess whitespace"', 'C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\arraystring\\length_of_last_word_test.go::TestLengthOfLastWord::"multiple words"', "C:\\Users\\santiago.rendong\\dev\\rendxn\\leetcode\\arraystring\\length_of_last_word_test.go::TestLengthOfLastWord" }
DEBUG | 2024-07-22T10:41:07Z-0500 | ...-data/lazy/neotest-golang/lua/neotest-golang/logging.lua:52 | [neotest-golang] {

Oh, I misread. I see you only worked on a single test, my bad.

I'm not familiar with Lua nor building and using local packages in Neovim, but I'll try my best.

I just fixed the remaining stuff. But there's a huge problem with this "Failed to decode JSON" as weird codes are injected at some point and garbles up the JSON output. I'll have a more thorough look a bit later.

Here's a workaround for you, which on my end passes all my tests:
# make gotestsum available on $PATH by installing it
go install gotest.tools/gotestsum@latest

  {
    "nvim-neotest/neotest",
    dependencies = {
      "nvim-neotest/nvim-nio",
      "nvim-lua/plenary.nvim",
      "antoinemadec/FixCursorHold.nvim",
      "nvim-treesitter/nvim-treesitter",
      {
        "fredrikaverpil/neotest-golang",
        branch = "windows", -- set PR branch
      },
    },
    config = function()
      require("neotest").setup({
        adapters = {
          require("neotest-golang")({ runner = "gotestsum" }), -- Registration with config
        },
      })
    end,
  },

Instead of relying on the Neotest/Neovim mechanism of capturing output from stdout/stderr, gotestsum is instead (already implemented) writing to JSON file. This doesn't introduce the ANSI codes which seems to come from the console somehow. Does it work on your end too?

gotestsum does work in Windows 👍
On the other hand with the default test runner, I tried setting NO_COLOR in my $PROFILE and even though pwsh -c '$PSStyle.OutputRendering' printed PlainText, the temporary output file neotest prints to contained both ANSI chars and weird unexpected line breaks, which cause the json decoder to break. Not sure if it's pwsh or nio the one introducing the linebreaks, and running go test in pwsh does not show any line breaks.
I think I'll stick with your suggestion of using gotestsum, since supporting the default runner for Windows would be a lot of work that gotestsum does already.

gotestsum does work in Windows 👍

That's great to hear! 🎉

the temporary output file neotest prints to contained both ANSI chars and weird unexpected line breaks

Yes, I don't fully understand what is going on there either. I suspect that Windows terminals in general delegates processing to its "Console host". If this is true, this means different programs can behave differently. Did you ever try the Windows Terminal instead?
It might behave differently.
Either way, I am going to merge this PR in, more or less as-is, since it enables the rudimental Windows support. But I'm going to hold off on adding docs to gotestsum and how to enable it, as I'm not entirely sure yet on what I want the config/parameters to look like. My plan was to not expose this until I had time to look into output streaming, where gotestsum could play an central part.
But you can keep on setting runner = "gotestsum" and just keep an eye open for a potential change in how you configure it. Feel free to subscribe to #150 for this.


Flutter tool seems slow on building

This issue isn't perse an issue of not being able to run the flutter tool, but it seemed to fit here the best.
Steps to Reproduce

Create flutter app
Run flutter build

It seems that the build process is slower than expected. I am experienced with Kotlin apps for android and am using gradle allot. The build time experienced when running a new flutter build with little to no changes seems to be long and don't rely on gradles buildin caching system.

Hi @Hu1buerger
There are other tasks being performed during a  flutter build such as flutter pub get., downloading tool packages etc and depends on the project, the flutter build process cannot be compared with native build processes
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

I would disagree. This is an issue.
The build for an app usually took more than 5 minutes.
Updated the android studio attached Gradle install from 4.?.? (Maybe 4.0.2) to 7.0.0.
Builds on the same app and commit now take 30-40 seconds. The first build took 2.5min.

The build process can be handled faster, if two android studio instances are opened.
The one is attached to the whole project, the other one to i.e. the android impl.
Run the build via the android impl instance and attach to the dart stuff via the other instances attach function.


Miscellaneous website fixes

Issue to document problems with the new website.

[ ] Fix heading levels e.g:

[ ] Fix broken link in About:

Suggestion: Move Containers to the bottom of the Reference Gallery page, as Elements can be visualized on their own, while containers can only be visualized if they contain Elements.

In general, we should make sure that the experience of someone visiting the site is to click on something that looks cool, and to see how little code was involved in making it.  That's true of all our examples, but it's most true of the Elements bits -- the total code required for any of those is tiny.
The examples in the Gallery are for building more ambitious things, which take correspondingly more code, which is fine, but it's not the first thing people should be clicking on.

Suggestion: remove the footer, at most leaving the copyright bit; it's confusing to have a different, partially overlapping set of links there.
Suggestion: Make the black bar at the top contain only external links: GITHUB, GITTER, TWITTER -- things that launch off to other sites.  The maroon bar will then contain all the internal links for navigating the web site itself.

Not for any time soon!

[ ] Hovering over thumbnails in the reference gallery could result in a hover box showing a list of thumbnails (many element notebooks have multiple visualizations)

Related to Jim's suggestion about moving apps to the bottom:

[ ] : Split gallery examples into 'Examples' and 'Advanced' so the simple examples show at the top so newcomers see the simple code first. We don't need to reflect this distinction in the /examples directory, it can be defined in the gallery building script.

Homepage

Broken conda link

Minor: you recommend conda but pypi badge comes first

Shame that second paragraph is awkward: "For examples, check out the thumbnails below and the other items in the Gallery of demos and apps and the Reference Gallery that shows every HoloViews component." Maybe move Reference Gallery mention down, e.g. near API?

I moved the apps below demos in gallery. Can try to manually fix the issues Chris mentioned I guess...

In the readme, we have:
HoloViews works with  [Python 2.7 and Python 3](https://travis-ci.org/ioam/holoviews)

So I think it was intentional and to show the Python builds we support on travis. I agree it is a bit weird though...

I was referring to the way it appears because of which bit actually forms the link:
Python 2.7 and Python 3
instead of
Python 2.7 and Python 3
Alternatively you could consider changing it to something like
Python 2.7 and 3

hmm odd, it isn't the same as the README.

FAQ

Many broken links, e.g.

#1650 lists the broken links we know about...

I've opened #1662 for fixing links...

I really don't get what is wrong with the definition of the conda link (homepage) in the rst...

Suggestion: Move Containers to the bottom of the Reference Gallery page, as Elements can be visualized on their own, while containers can only be visualized if they contain Elements.

Agreed.

[ ] docs link on homepage goes back to homepage

I don't think it's necessary to have a docs link, and above I propose that the entire region where that link appears should be replaced with only links to external websites (which would eliminate DOCS).

Oops, sorry, missed that!

I really don't get what is wrong with the definition of the conda link (homepage) in the rst...

I assume Jim closed the issue accidentally...

Yup!

Hovering over thumbnails in the reference gallery could result in a hover box showing a list of thumbnails (many element notebooks have multiple visualizations)

That could work and be useful, but I don't think it addresses the underlying problem of discoverability.  The point of a gallery is to show visually the whole range of what is available, so that users can see something they are interested in, and in particular, can see some type of plot that looks something like what they imagine they need to create for their own data.  For many of the notebooks in the reference gallery, there is one main plot that is a good representative of what will be found there.  But for others, the thumbnail fails to convey what will be found on that page.  E.g. the thumbnail for Path:

Does not in any way suggest to me that I'd find something like the following if I click on the page, or even that I should hover over the thumbnail:

For this and many other examples, I'd argue that there should be multiple thumbnails leading to this one notebook, guiding people with different mental images of what they want into something that can solve their problems.  The fact that it's the same notebook repeated does not seem very important to me, just that there are multiple important different outcomes of relevance to the user that will benefit from a visual index.  Same notebook, but very different plots. The same issue applies for the regular Gallery as well, and maybe even for the User Guide and Getting-Started pages, which would be greatly aided by having a little collection of (smaller) thumbnails around each such textual description to help guide people into the section they need.

[] - "Show case" becomes visible once you go into e.g. getting started guide, but isn't something available via the home page. A hidden show case? Or maybe you have moved away from it?

Well spotted!

Or maybe you have moved away from it?

That was the plan...

I think Chris meant, maybe the previous page was the Showcase, somehow, which is why it shows up on this page and not the previous one.  But yes, we are definitely moving away from Showcase overall...

[ ] The Building Composite Objects and Composing Elements have names which are too similar. Former should have been called Nesting Objects.

[ ] The headings 'Apps' and 'Streams' exist in the reference gallery when viewing 'Matplotlib' which does not support these types of example right now. (We could add some non-linked stream examples though...)

[ ] The exporting user guide didn't build properly - seems it failed to find the penguins image.

http://holoviews.org/user_guide/Annotating_Data.html

two instances of 'minimum' misspelled 'minumum'
fix sentence:
" Note that we after supplying the longer labels, you still use"

http://holoviews.org/user_guide/Composing_Elements.html
* "These containers are unliked the dimensioned containers where you cannot mix types"
replace unliked  with unlike, "associated keys." with "associatedkey."
Is it "dimensioned containers" or "dimension containers"? Both appear inthis sentence
* "As you can compose an mix of HoloViews elements"  should read 'a mix'
* The paragraph starting with
"A Layout cannot contain NdLayouts but can otherwise contain" ends with
"The one restriction on what you can put in a Layout". For clarity I suggest removing the restriction in the first sentence.

still in Composing_Elements.html

"First let us see how to index the the above example"   remove one instance of "the"
you might mention that 'print(layout)' will show the group and  level names
*'A Overlay cannot contain any other container type other than NdOverlay ' should read
' can contain any container type other than'?? This sentence needs fixing
*'Overlay shared many of the same concepts as layout."  replace 'shared' with'shares'

Personally, I think minor fixes like the ones above would be a lot easier to do as a PR.  @jlstevens and @philippjfr, is there a reason not to have people submit a PR with a collection of those?

@ea42gh has certainly listed enough suggestions above that a PR would make sense (thanks!). Having an explicit list of fixes is also useful as it lets me see if anything is critical that should be fixed on the live website right away.

[] - left-hand index of user guide does not include all the user guide entries, e.g. installing & configuring guide is missing from the left (I think!).

(I'm sure you've had discussion elsewhere about what should be in the user guide, so I won't comment on that - just that there's a mismatch).

[ ] http://build.holoviews.org/getting_started/Customization.html shows plot before plotting backend is loaded (#1703).

I'd really prefer it grab bag issues like this didn't exist anymore. They're okay when gearing up for a release but after that each item should become its own issue.

It's a mess in its current state, but it seems like if each unticked box here is its own issue, they will get lost in the sea of other issues. Seems cleaner to me to collect remaining small website issues into a new to-do list that can be attacked by someone in one sitting...

Agreed.


Modified makefile for building on macOS (Apple Silicon, homebrew)

To save others some time troubleshooting, here's a slightly modified makefile for building on macOS Monterey (12) or higher and M1 Apple Silicon or newer.
(Assuming that Homebrew has installed sqlite3 in /opt/homebrew)
# Makefile modified for macOS and Apple Silicon
SQLITE_FLAGS=`pkg-config --cflags --silence-errors sqlite3`
SQLITE_INCLUDE=/opt/homebrew/opt/sqlite/include
SQLITE_LIB_PATH=/opt/homebrew/opt/sqlite/lib
SQLITE_BIN_PATH=/opt/homebrew/opt/sqlite/bin

all: libstemmer fts5stemmer.o
	cc -fPIC -shared -o fts5stemmer.so fts5stemmer.o snowball/libstemmer.o -L$(SQLITE_LIB_PATH) -lsqlite3
	@[ "`uname -s`" = "Darwin" ] && mv fts5stemmer.so fts5stemmer.dylib || :

libstemmer:
	@if [ ! -f snowball/GNUmakefile ];then \
		echo -e "\n\nError: snowball is missing! Please put its source code in a directory called 'snowball'"; \
		echo -e "Head to https://github.com/snowballstem/snowball to fetch it\n"; \
		exit 2; \
	fi

	$(MAKE) CFLAGS=-fPIC -C snowball

fts5stemmer.o: src/fts5stemmer.c
	cc -fPIC -Wall -c $(SQLITE_FLAGS) -Isnowball/include -Isqlite -O3 src/fts5stemmer.c -I$(SQLITE_INCLUDE)

clean:
	@rm *.o
	$(MAKE) -C snowball clean

Without these changes gmake produced the following errors:
Undefined symbols for architecture arm64:
  "_sqlite3_bind_pointer", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_column_blob", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_column_bytes", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_finalize", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_free", referenced from:
      _ftsSnowballCreate in fts5stemmer.o
      _ftsSnowballDelete in fts5stemmer.o
  "_sqlite3_libversion_number", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_malloc", referenced from:
      _ftsSnowballCreate in fts5stemmer.o
  "_sqlite3_mprintf", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_prepare", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
  "_sqlite3_step", referenced from:
      _sqlite3_extension_init in fts5stemmer.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:4: all] Error 1

Linking the system sqlite with -lsqlite3 doesn't error out, but the macOS system sqlite has been compiled without the ability to use extensions and attempting to load the extension built this way from the homebrew-installed sqlite with .load fts5stemmer crashes the sqlite CLI.
The above changes made both the compiler and linker use the version of SQLite3 installed by Homebrew.
I'd be happy to make a pull request for the more general case, but I would rather someone who knows more C, makefiles, pattern rules and overrides suggests how to best approach that.

@dajxyz This worked perfectly for me. Thank you so much!


URL not present anymore

Hi there, during a test, I found out that nix --offline build nixpkgs#.legacyPackages.x86_64-darwin.hello doesn't build anymore, because the url https://opensource.apple.com/source/developer_cmds/developer_cmds-63/mkdep/mkdep.sh doesn't seem to exist anymore.
As far as I can tell it's probably referenced from
https://github.com/NixOS/nixpkgs/blob/86e1ad4ec007f4f0e9561886935fe9b278860de8/pkgs/development/tools/xcbuild/toolchains.nix#L16 - but I may be missing something.

Can you reproduce with github:NixOS/nixpkgs/staging-next#legacyPackages.x86_64-darwin.hello? I haven’t checked, but I expect that https://github.com/NixOS/nixpkgs/pull/346043 fixed this.

Not quite sure if that helps, as that build fails because of a different error:
❯ nix --offline build github:NixOS/nixpkgs/staging-next#legacyPackages.x86_64-darwin.hello
error: builder for '/nix/store/qr3dwl1f7bj9al055hj6m2bl82vx2411-source.drv' failed with exit code 1;
       last 12 log lines:
       >
       > trying https://github.com/att/ast/archive/2020.0.0.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       > 100   105  100   105    0     0    229      0 --:--:-- --:--:-- --:--:--   229
       > unpacking source archive /private/tmp/nix-build-source.drv-6/2020.0.0.tar.gz
       > tar: This does not look like a tar archive
       >
       > gzip: stdin: not in gzip format
       > tar: Child returned status 1
       > tar: Error is not recoverable: exiting now
       > do not know how to unpack source archive /private/tmp/nix-build-source.drv-6/2020.0.0.tar.gz
       For full logs, run 'nix log /nix/store/qr3dwl1f7bj9al055hj6m2bl82vx2411-source.drv'.
error: 1 dependencies of derivation '/nix/store/8wkszh6d2qx35jpdchj30yi0km2jhsxk-ksh-2020.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fcy1z485ngcazwy4za3gifkadsrrpax3-ksh-2020.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1a409mb58mv7ai3ximkv627kvy9a47sp-bmake-20240808.drv' failed to build
error: 1 dependencies of derivation '/nix/store/q0m8aqghv59jjbbcsp3zqpdwinyinhjh-bmake-20240808.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0mfx00vhdzv863xrnhg5gq5rxc2z0cha-locale-118.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bqgkgi6i86wv6dwxkxr5j2p7bdlbr9xf-locale-118.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hl20cf2k72nas1nbz12dgf6a9khjs9kx-locale-118.drv' failed to build
error: 1 dependencies of derivation '/nix/store/m052rlfz43c60bpbfgaf0nbgs2hqmvxb-locale-118.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wwmr9hprcnqxkslyy8ff56qiannkqass-locale-118.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5w6jkgyy4wyn7gi4a8jlynwf33dfjzjd-bootstrap-stage-xclang-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dl5dw8ygi7s31629848dd6kdkm7ccb8h-bootstrap-stage-xclang-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nsld8jl4lfblsa9ih9m24ci4n2q364xy-bootstrap-stage-xclang-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yf8l5zird3g9n7ssnvgxfnx3vj8kqjwf-bootstrap-stage-xclang-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3xn49hcj48p73z0vsfr4s690lkzvilcx-bootstrap-stage2-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9y7jv4c5idm3cbv50hf1x87mf91772xf-bootstrap-stage2-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k61l81q15d8709p1r7ag6k4zip0p1nip-bootstrap-stage2-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/z1ypvmqn7za6kadwxgr1vfbgx3rih77x-bootstrap-stage2-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sl5i7f9gp094lp03qbh2iygb36ja01nm-bootstrap-stage3-stdenv-darwin.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-apple-llvm-src.drv-0/unpack/llvm-project-2b5ff47e44b059c03de5779479d01a133ab4d581/clang/test': Directory not empty
error: 1 dependencies of derivation '/nix/store/whq5xbf20zn3hzplr8z3jvz2mc22kll8-bootstrap-stage3-stdenv-darwin.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-macOS-SDK-11.3.drv-0/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/share/man/man3': Directory not empty
error: 1 dependencies of derivation '/nix/store/xrbgfgi6g1kj13l9cqxahzb19w6ryf7m-bootstrap-stage3-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0yc8qwprfsm3kfqk0cbw5bddb9aa3l3x-bootstrap-stage4-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3b30xh9xzd5zqb7pk407jr10dcr6d55s-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bb73f0jdxlyy1k4mw80asd5ywidhp4i4-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5daw7m74irfgsqk66a0dj1zxhbqpbz3x-hello-2.12.1.drv' failed to build

The url in question https://github.com/att/ast/archive/2020.0.0.tar.gz returns:
the given path has multiple possibilities: #<Git::Ref:0x00007f293003ee30>, #<Git::Ref:0x00007f293003e930>

Ah, a classic branch–tag confusion. I’ve opened https://github.com/NixOS/nixpkgs/pull/352641; please try again with github:NixOS/nixpkgs/pull/352641/merge? As you can probably tell we don’t try to do this very often (though we probably should).


bug: The Profile modal is not showing the whole component

Provide environment information
N/A
Describe the bug
After logging in, if I click on Profile in the user menu, the modal hides most of the content.
Link to reproduction
https://acme-corp.jumr.dev/
To reproduce
Go to demo application link above, sign-in, then access the user profile via user menu.
Additional information
I didn't run this locally, so this was just found by experimenting on your demo.

This is known - got clerk people on it ☺

This is fixed by #33 or at least the start of correct sizing


Shuffle by album?

Hi, does musikcube support shuffling by album?  If not this issue is a feature request.

Hi,
I was going to ask the same question but stumbled across this open issue. Has any progress been made? I think it would be a pretty useful feature to rediscover albums in our music library.

Yeah I'm waiting for this too 👀


Price styling

Description
When we add prices to the component, the price of a date is shown on the top of dates beneath that, instead of showing in that date's box. Also, the disabled dates are not working properly. On the first attempt, all the disabled dates are available to select instead of not allowing us to select them.
To Reproduce
Steps to reproduce the behavior:

Go to Sandbox link
Check that the prices of dates are shown on the top of dates beneath them.
21, 22, 23 Jan 2021 dates are disabled, but this functionality is also not working properly

Expected behavior

The price should show in the same slot where the date is.
Disabled dates should not be available to select even on the first attempt.

Sandbox Link
https://codesandbox.io/s/pedantic-wright-qq6d3?file=/src/App.vue
Desktop (please complete the following information):

OS: macOS High Sierra
Browser: Chrome
Version: 88.0.4324.96 (Official Build) (x86_64)

The problem with disabledDates is a known issue.
I will look the problem with the position of the price as soon as I can, but it may take one or two weeks.
An update in the main branch was made in order to be able to change dynamically such prop. See #257.
Is this something that can be solved using CSS?

In v4.2 is now fixed the disabledDates issue.
I will look into this in the following weeks.

Sure, thanks. I will check it out the v4.2

We wanted the price at the bottom of the square too so we added the below css.
.vhd__datepicker__wrapper .vhd__datepicker__month-day-wrapper strong {     position: absolute;     bottom: 0;     left: 50%;     transform: translateX(-50%); }

@nathanjhastings Check the live coding! https://codesandbox.io/live/94w9xvl

@matiasperrone added that code in that example

Hi! Now I am working on solving this issue... it seems a little more complicated than appears to be


lib.trivial: add examples for importJSON and importTOML

Description of changes
Added examples for both lib.trivial.importJSON and lib.trivial.importTOML
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Check out e.g. https://github.com/NixOS/nixpkgs/blob/a1bed629290567ff73afbef2e81bceccd083cb72/lib/trivial.nix#L95 for the conventional example syntax :)

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4082


Blank page problem, all pdf pages are merged into one pdf in blank format.

What were you trying to do?
I investigated why I was seeing a blank white page.
I think I tried all possible things. At first I had a problem with buffers and async functions, I fixed it.
I was trying to enable the user to download the pdf links explained in a certain section on the page as a single pdf.
How did you attempt to do it?
I reviewed the relevant parts of the pdf-lib documentation.
I learned how to use preloadjs and downloaded resources together, but at this stage I think it was in conflict with pdf-lib.
What actually happened?
I haven't received any warnings or errors. Frankly, I don't even understand what's going on.

What did you expect to happen?
What should happen is that the pages of many PDFs are combined and downloaded into a single PDF.
How can we reproduce the issue?
    const handleComplete = async event => {
        console.log(event);
        Loader('title').text("All files downloaded!");

        const items = preload.getItems();

        setTimeout(() => {
            var output = mergeAndDownload(items);
            Loader().fadeOut(200);
        }, 1000);
    }

    const mergeAndDownload = async (items) => {
        try {
            const pdfDoc = await PDFDocument.create();

            await Promise.all(
                items.map(async (item) => {
                    try {
                        const pdfBytes = new Uint8Array(item.result.split('').map(c => c.charCodeAt(0))).buffer;

                        const externalDoc = await PDFDocument.load(pdfBytes);
                        const pages = await pdfDoc.copyPages(externalDoc, externalDoc.getPageIndices());
                        pages.forEach((page) => pdfDoc.addPage(page));
                        console.info(externalDoc);
                    } catch (error) {
                        console.error(`Error processing PDF: ${error.message}`);
                    }
                })
            );

            const mergedPdfBytes = await pdfDoc.save();
            console.log({ pdfDoc, mergedPdfBytes });
            setTimeout(() => {
                downloadPDF(mergedPdfBytes, "merged.pdf");
            }, 1000);
        } catch (error) {
            console.error(`Error creating merged PDF: ${error.message}`);
        }
    }

    const downloadPDF = (pdfBytes, fileName) => {
        try {
            const blob = new Blob([pdfBytes], { type: "application/pdf" });

            const link = document.createElement("a");
            link.href = URL.createObjectURL(blob);
            link.download = fileName;

            document.body.appendChild(link);
            link.click();

            document.body.removeChild(link);
        } catch (error) {
            console.error(`Error downloading PDF: ${error.message}`);
        }
    }
...
    function getAllOfFiles() {
        const list = []
        $(`PRIV`).each((i, e) => {
            const onclickValue = $(e).attr("onclick")

            if (onclickValue) {
                const match = onclickValue.match(/PRIV\('([^']+)'/)

                if (match) {
                    const pdfLink = match[1]
                    list.push({name:e.text.trim(), file:pdfLink})
                }
            }
        });
        manifest = list
        loadAll()
        Loader().show()
    }

Version
1.17.1
What environment are you running pdf-lib in?
Browser
Checklist

[X] My report includes a Short, Self Contained, Correct (Compilable) Example.
[X] I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes
These codes are part of the user script that allows the pdf links of a particular page to be downloaded as a single pdf.
The user script contains active jquery, pdf-lib, createjs and progressbar libraries.

Hello, from Argentina!
I'm experimenting a similar issue while trying to merge pdf files into a single file by copying pages. But the issue seems to take place only when input files are PDF version 1.4 (Acrobat 5.x). It works fine on PDF version 1.7.
I'm trying to find a solution, but still can't.

Thank you for the information, obviously a few days ago I somehow managed to fix this problem, but I encountered printing errors on some files.
For example, a scenario such as printing only 2 of 30 pages.
The solution I found is as follows:
The user script downloads the pdfs on the page sequentially using preloadjs, and then they come to the relevant function to be downloaded through an array. Here, I was using the rawResult or result values of the files (items) previously loaded with preloadjs, it did not work, in the last case, I used preloadjs to find the solution using fetch. We can directly retrieve the files loaded into the cache. Since I had little time, I did not take into account issues such as optimization, efficiency, data usage, after all, I had to use it as soon as possible. Large files that cannot be cached are downloaded a second time.

There is definitely a solution to this, but for now I'm getting what I need :).

   const mergeAndDownload = async items => {
        try {
            const pdfDoc = await PDFDocument.create();
            for (const cached of items) {
                try {
                    const pdfBytes = await fetch(cached.item.src).then(res => res.arrayBuffer());

                    const externalDoc = await PDFDocument.load(pdfBytes);
                    const pages = await pdfDoc.copyPages(externalDoc, externalDoc.getPageIndices());
                    pages.forEach((page) => pdfDoc.addPage(page));
                } catch (error) {
                    console.error(`Error processing PDF: ${error.message}`);
                }
            }

            const mergedPdfBytes = await pdfDoc.save();
            setTimeout(() => {
                let filename = prompt("Enter merged filename:") ?? "merged"
                downloadPDF(mergedPdfBytes, `${filename}.pdf`)
            }, 1000);
        } catch (error) {
            console.error(`Error creating merged PDF: ${error.message}`);
        }
    }

    const downloadPDF = (pdfBytes, fileName) => {
        try {
            const blob = new Blob([pdfBytes], { type: "application/pdf" });

            const link = document.createElement("a");
            link.href = URL.createObjectURL(blob);
            link.download = fileName;

            document.body.appendChild(link);
            link.click();

            document.body.removeChild(link);
        } catch (error) {
            console.error(`Error downloading PDF: ${error.message}`);
        }
    };

    function handleComplete(event) {
        const items = queue.getItems();

        setTimeout(() => {
            var output = mergeAndDownload(items);
            Loader().fadeOut(200);
        }, 1000);
    }

If we adjust the cache limit, we can ensure that it uses only the files in the cache with the fetch cache property.
const pdfBytes = await fetch(cached.item.src,  { cache: "force-cache" }).then(res => res.arrayBuffer());

Thanks! I undestand the problem you were dealing with was caused by large input files...


Add *.bbl-SAVE-ERROR TeX.gitignore

This PR is proposing to add *.bbl-SAVE-ERROR to TeX.gitignore for BibLaTeX.
Reasons for making this change:

Recently I found that *.bbl-SAVE-ERROR files are generated in my LaTeX working directory, and I would like to exclude them from my git repository.
Links to documentation supporting these rule changes:
I do not recall when such files first appeared, but they appear in my working directory.
If this is a new template:

Link to application or project’s homepage: Not a new template.

@zhiyuanzhai would you be able to provide references to external documentation explaining what these files are? Otherwise I'm not comfortable pulling these changes in.

Hello @wirecat,
although I found no external reference about this file. But in the *.bbl-SAVE-ERROR file generated in my work directory, it says:
% $ biblatex auxiliary file $
% $ biblatex bbl format version 3.3 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
...

Thank you for the clarification and contributing!

https://github.com/github/gitignore.git


CSS files cannot be treeshaken with side effects

Describe the bug

vue-cli(webpack) VS vite

Reproduction
https://github.com/BuptStEve/vite-css-treeshake

npm start to run vue-cli

npm run vite to run vite

npm run build to run vue-cli

npm run vite:build to run vite

System Info
System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 2.44 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 92.0.4515.107
    Safari: 14.1.1
  npmPackages:
    vite: ^2.4.3 => 2.4.3

Used Package Manager
yarn
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

I'm confused, if the package.json marked CSS files as side-effectful, shouldn't Webpack include the CSS that would result in what Vite produces? Vite currently treats all CSS as side-effectful, and side-effect modules aren't treeshaken out because they aren't pure. So from my point of view, Vite is doing the right thing here. Can you shed some light on the issue here?

I'm confused, if the package.json marked CSS files as side-effectful, shouldn't Webpack include the CSS that would result in what Vite produces? Vite currently treats all CSS as side-effectful, and side-effect modules aren't treeshaken out because they aren't pure. So from my point of view, Vite is doing the right thing here. Can you shed some light on the issue here?

But I just import the component A, so the codes of B(including the CSS) should be treeshaken out.

Ah okay. Found the webpack documentation for it, it's weird that the project's package.json's sideEffects determine which module is side-effect-free (or pure), the inverse of its implication. But that may be me not understanding the docs well yet.
Vite currently doesn't support sideEffects in the project's package.json AFAIK, so this makes it a feature request.

But I just import the component A, so the codes of B(including the CSS) should be treeshaken out.

Vite treats all CSS files as side-effectful by default, that means even if we didn't used B, we still imported B, and B contains an import to a CSS file, that CSS file "effects" the state of the application (which makes sense because you add global styles), so that CSS is included in the final bundle, or else your application state could be inconsistent.
If you remove the sideEffects in package.json, you can see that's webpack's default behaviour too.

Yeah, this feature is useful for UI library to auto import component's own style by default.
And when you build app, it also helps treeshake unused ones(with style).

@bluwy I think your first understanding about sideEffects field is correct.
According to the webpack docs here, it shows "sideEffects": [ "**/*.css" ], means **/*.css has side-effectful. (Not side-effect-free)
When this was changed like this, webpack did not output any css.
  "sideEffects": [
-    "*.css",
    "src/components/a/index.js",
    "src/components/b/index.js"
  ],

So in conclusion I think when there is sideEffects field, Vite should respect the field for css files (and others).
For example, if sideEffects field exists and does not include something like *.css, vite should stop treating css files as side-effect-ful.

@mayank99 I don't think there's a workaround today, but I agree there should be a way around this, like the sideEffects field discussed above. I'll put this on the team board to confirm if this is the design we want, or if there's an alternate API design.

I've needed something like this as well - I'm currently working on a UI component library that is optimized for server-side rendering, and the challenge I'm facing is that the app doesn't need the CSS for every component in the library, but only the components that it is actually using.
I can think of several approaches - one would be a build configuration parameter telling it to treat files with the "module.css" extension differently than other imports.
The other would be a doc-comment such as @localdep or @pure that would be associated with the CSS module import statement, letting Vite know that the CSS import is a local dependency of the exported symbols in that module - meaning that if all of those exported symbols are tree-shaken out, then the CSS can be removed as well. (I say "exported symbols" because tree-shaking, as I understand it, does not eliminate modules, but rather exports. So the removal of the CSS module would be contingent on the module contents, not the module itself.)

I have a Vuetify 3 + Vite project and was hoping get rid of the unnecessary 20K lines of css from my final bundle.

My team has a component library using different technologies for building components, like Lit and Quasar/Vue. This would be useful to help strip out unused Quasar styles.

I'm currently looking into this as it'll benefit UI frameworks with scoped CSS. Especially for component libraries or barrel files, as today, all the scoped CSS will get bundled even if the related component is not bundled.
However marking CSS are side-effect-free is technically not the solution. For example, if you have import "./global.css" in your entrypoint JS, "side-effect-free" means that the import can be removed completely (and its related CSS asset) because you're not really using anything from the module anyway, which is incorrect.
I'm currently trying to figure an API to say "this CSS import is related to this default/named export. if the export is treeshaken, also treeshake the CSS". I'm not sure if it's possible to do it automatically. Also, this issue affects CSS modules today.

This is a tricky problem. The ideal way would be something like: "If nothing else from this module is imported, then tree-shake its CSS imports too". But I understand that's not how JS works, especially when using barrel files.
I'm not sure that a new API would be useful for component library authors, because it wouldn't work with other bundlers (esbuild, webpack, etc). It would be nice if there was some consensus across different bundlers, to ease the burden from library authors.
(To get around this problem today, I've resorted to removing all side-effect imports, and provide explicit CSS exports for applications to consume, which is obviously not ideal.)

Yeah it seems like the respective issue on Webpack side is https://github.com/webpack-contrib/css-loader/issues/506

The ideal way would be something like: "If nothing else from this module is imported, then tree-shake its CSS imports too".

This is a little risky I think. If you have a library that export my-lib/styles.js that only imports CSS, and export nothing (or export something but you don't necessarily have to import), then we can't treeshake the CSS away. It's technically still being used.
Also, I think we should look at CSS treeshaking as an optimization standpoint. In dev where no treeshaking is happening, you'd load all the styles from a barrel file, but in prod, suddenly some may be missing which causes inconsistencies.
The main usecase I'm looking into so far are for scoped CSS and CSS modules only, as in dev, the styles shouldn't bleed so extraneously-loaded styles are fine. In prod, we can then optimize and remove them.

So from that, I think we need some sort of opt-in API and likely Vite plugins could automate it. And if it comes to that, it'll be tricky to make it bundler-agnostic.

Yeah it seems like the respective issue on Webpack side is webpack-contrib/css-loader#506

I think that issue is about a more granular tree shaking at selector level. The OP is writing about the same problem with us but the discussion is mainly focused on a more granular one.

The ideal way would be something like: "If nothing else from this module is imported, then tree-shake its CSS imports too".

I guess Webpack handles like this. I found this example (https://github.com/pp3nd3x/webpack-treeshaking-css-modules) and it looks like doing like that. (I found it at https://github.com/webpack-contrib/css-loader/issues/769#issuecomment-427634591)

Yeah the linked issue seems to diverge to a different treeshaking topic, but that's the best I've found 😅
The repo you linked seems to be about "CSS modules", which I also want to cover. But my main concern of the approach proposed by Mayank was for general global CSS imports, which I don't think is safe to treeshake that way.

The repo you linked seems to be about "CSS modules"

Ah, I overlooked it and assumed it's the normal global CSS imports 🤦. Webpack does recommend adding *.css to sideEffects field.

I took another look at the repro and understand the issue better now. It isn't related to CSS at all. Webpack has a unique optimization where if you mark a barrel file as side-effect free, then any re-exports will redirect to the re-exported module directly. Specifically optimization.sideEffects and optimization.providedExports are at play here, which is also enabled in dev. For example:
// src/barrel/index.js
export { a } from './a.js'
export { b } from './b.js'

// src/index.js
import { a } from './barrel'
// webpack rewrites this to
// import { a } from './barrel/a.js'
// because the barrel file is marked side effect free

console.log(a)

Vite intentionally doesn't have these optimizations in dev because they have perf penalties. If there's interest for it, I think https://github.com/vitejs/vite/issues/8237 is the right issue to follow. As even if we respect sideEffects in user project today, it will only work in build which can cause unintended inconsistencies.
For this issue, I'll focus on CSS treeshaking only and will close this once it's resolved. To get the repro resolved, https://github.com/vitejs/vite/issues/8237 should be followed instead.

It seems rollup treats each export statements as side-effect free if the barrel file is marked as side effect free.
https://stackblitz.com/edit/rollup-repro-jgfcu7?file=package.json,rollup.config.js
Also it seems the repro now works: https://stackblitz.com/edit/github-sqz9ee?file=package.json
With Vite 2.x, the CSS file is .a{color:#00f}.a,.b{color:#ff0}.
With Vite 3.x, the CSS file doesn't exist at all.
With Vite 4.x, the CSS file is .a{color:#00f}.
Interesting that the behavior changes 🤔

Oh interesting. I thought the behaviour would be the same so I didn't bother to check that. So I guess on the build side it is already fixed (sideEffects works in user files from the repro), however it doesn't work in dev yet. So now it has the inconsistency. That's an interesting reason to work towards https://github.com/vitejs/vite/issues/8237 perhaps.


Adds implementation of path wildcard and path unpivot expressions

Implements path wildcard (e.g. foo[*].a[*].b) and path unpivot expressions (e.g. bar.*.c.*.d). Also

adds lowering of IN expressions
updates partiql-tests git submodule

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Converting to draft to see if I can reduce the cloning for non-PathWildCard and non-PathUnpivot expressions.


APIGOV-19054 - update event mapper eventTime miliseconds

UI is expecting event time as milliseconds.  Updating to milliseconds.
eventTime := time.Now().UnixNano() / int64(time.Millisecond)

was
time.Now().Unix()
now
time.Now().UnixNano() / int64(time.Millisecond)
in eventmapper.go