No folding except for manual

Neovim version (nvim -v | head -n1)
NVIM v0.10.2
Operating system/version
macOS 14.7
How to reproduce the issue

Install nvim-ufo via lazy.nvim with this lua file

return {
  "kevinhwang91/nvim-ufo",
  dependencies = "kevinhwang91/promise-async",
  config = function()
    vim.o.foldmethod = "indent"
    vim.o.foldcolumn = "1" -- '0' is not bad
    vim.o.foldlevel = 99 -- Using ufo provider needs a large value
    vim.o.foldlevelstart = 99
    vim.o.foldenable = true

    vim.keymap.set("n", "zO", require("ufo").openAllFolds, { desc = "Open all folds" })
    vim.keymap.set("n", "zC", require("ufo").closeAllFolds, { desc = "Close all folds" })
    vim.keymap.set("n", "zK", function()
      local winid = require("ufo").peekFoldedLinesUnderCursor()
      if not winid then
        vim.lsp.buf.hover()
      end
    end, { desc = "Peek Fold" })

    require("ufo").setup({
      provider_selector = function(bufnr, filetype, buftype)
        return { "lsp", "indent" }
      end,
    })
  end,
}

Open any C source code file.
No folding is shown
Use command :set foldmethod to ensure that the method is set to indent
Still no folding shown at any level

Expected behavior
With the foldmethod set to indent, when I open this C file:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
  int i = 0;
  int j = 1;
  return 0;
}

I expect to see everything within the main function folded.
If I issue the command :checkhealth I expect to see an entry for nvim-ufo.
Actual behavior
When I open this C file, there is no code folding at all.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
  int i = 0;
  int j = 1;
  return 0;
}

With this file still open, I checked with :set foldmethod and it is set to indent.
I checked shiftwidth :set shiftwidth and it is set to 2. I checked foldminlines with :set foldminlines and it is set to 1.  Finally, I checked foldlevel with :set foldlevel and it is set to 99.
When I issue the command :checkhealth the nvim-ufo does not show up at all.

Also I just checked in ~/.local/share/nvim/lazy and there is a folder for nvim-ufo, so I assume it is being installed.

I set lazy to false inside nvim-ufo.lua, and it still doesn't work.  Is this what you meant?
return {
  "kevinhwang91/nvim-ufo",
  lazy = false,
  dependencies = "kevinhwang91/promise-async",
  config = function()
    vim.o.foldmethod = "indent"
    vim.o.foldcolumn = "1" -- '0' is not bad
    vim.o.foldlevel = 99 -- Using ufo provider needs a large value
    vim.o.foldlevelstart = 99
    vim.o.foldenable = true

    vim.keymap.set("n", "zO", require("ufo").openAllFolds, { desc = "Open all folds" })
    vim.keymap.set("n", "zC", require("ufo").closeAllFolds, { desc = "Close all folds" })
    vim.keymap.set("n", "zK", function()
      local winid = require("ufo").peekFoldedLinesUnderCursor()
      if not winid then
        vim.lsp.buf.hover()
      end
    end, { desc = "Peek Fold" })

    require("ufo").setup({
      provider_selector = function(bufnr, filetype, buftype)
        return { "lsp", "indent" }
      end,
    })
  end,
}

vim.o.foldmethod = "manual"

Sorry, that had no effect whatsoever.  Here is my new nvim-ufo.lua:
return {
  "kevinhwang91/nvim-ufo",
  lazy = false,
  dependencies = "kevinhwang91/promise-async",
  config = function()
    vim.o.foldmethod = "manual"
    vim.o.foldcolumn = "1" -- '0' is not bad
    vim.o.foldlevel = 99 -- Using ufo provider needs a large value
    vim.o.foldlevelstart = 99
    vim.o.foldenable = true

    vim.keymap.set("n", "zO", require("ufo").openAllFolds, { desc = "Open all folds" })
    vim.keymap.set("n", "zC", require("ufo").closeAllFolds, { desc = "Close all folds" })
    vim.keymap.set("n", "zK", function()
      local winid = require("ufo").peekFoldedLinesUnderCursor()
      if not winid then
        vim.lsp.buf.hover()
      end
    end, { desc = "Peek Fold" })

    require("ufo").setup({
      provider_selector = function(bufnr, filetype, buftype)
        return { "lsp", "indent" }
      end,
    })
  end,
}

Also, when I run :checkhealth there is nothing showing for nvim-ufo.  No entries, no errors, nothing.  However, the nvim-ufo keymaps do work, like zC for closing all folds.
The main issue seems to be that setting the foldmethod to indent does nothing at all.  Maybe that is not a problem with nvim-ufo but with nvim cold folding in general, but I'm not sure how to check that.

Run UfoInspect command to check out whether the buffer is attached by ufo.

Thank you. Here is the output:
Buffer: 1
Fold Status: start
Main provider: lsp
Fallback provider: indent
Selected provider: lsp
Fold kinds: region

ufo only apply fold if the foldmethod is manual, some scripts change its value.

I see.  As a test, I uninstalled nvim-ufo from my setup and the indent method now works perfectly.  I suppose I need to learn more about how nvim-ufo is supposed to work.  I will study it more.  Thank you for your help.


Refactor remove and init apis to check if running

The fluo commands for init and remove check if an application is running.  However the API calls for init and remove do not do these checks.  These checks should be removed from the command and into the API calls.  There is a discussion about this on #999

Is @alanblueshift working on this? If not I'd like to take this issue.


Allow S2 keys in OZW format for migration from networkKey

This allows for migrations from "networkKey", which are allowed to be in OZW format, to "S0_Legacy" without requiring a change in key format. Client applications can choose to migrate key formats on their own.
First reported at https://community.home-assistant.io/t/zwave-js-fails-to-load/342679. Based on the error, I am assuming the user had a previously working addon, so the key must have originally been entered in the OZW format, and after upgrading the addon it migrated it to the S0_Legacy option name, which doesn't allow OZW format keys.

Some rudimentary testing:
❯ cat opt1.js && ts-node src/bin/server.ts --config opt1.js --mock-driver
module.exports = {
  networkKey: "0x2e, 0xcc, 0xab, 0x1c, 0xa3, 0x7f, 0x0e, 0xb5, 0x70, 0x71, 0x2d, 0x98, 0x25, 0x43, 0xee, 0x0c"
};
The `networkKey` option is deprecated in favor of `securityKeys` option. To eliminate this warning, move your networkKey into the securityKeys.S0_Legacy option. Refer to the Z-Wave JS docs for more information
Starting server on port 3000
ZwaveJS server listening on port 3000
Server listening on port 3000
^CShutting down
Closing server...
Server closed

❯ cat opt2.js && ts-node src/bin/server.ts --config opt2.js --mock-driver
module.exports = {
  securityKeys: {
    S0_Legacy: "0x2e, 0xcc, 0xab, 0x1c, 0xa3, 0x7f, 0x0e, 0xb5, 0x70, 0x71, 0x2d, 0x98, 0x25, 0x43, 0xee, 0x0c",
    S2_Authenticated: "0x2e, 0xcc, 0xab, 0x1c, 0xa3, 0x7f, 0x0e, 0xb5, 0x70, 0x71, 0x2d, 0x98, 0x25, 0x43, 0xee, 0x0c",
    S2_AccessControl:  "0x2e, 0xcc, 0xab, 0x1c, 0xa3, 0x7f, 0x0e, 0xb5, 0x70, 0x71, 0x2d, 0x98, 0x25, 0x43, 0xee, 0x0c",
    S2_Unauthenticated: "0x2e, 0xcc, 0xab, 0x1c, 0xa3, 0x7f, 0x0e, 0xb5, 0x70, 0x71, 0x2d, 0x98, 0x25, 0x43, 0xee, 0x0c",
  },
};
Starting server on port 3000
ZwaveJS server listening on port 3000
Server listening on port 3000
^CShutting down
Closing server...
Server closed

❯ cat opt3.js && ts-node src/bin/server.ts --config opt3.js --mock-driver
module.exports = {
  securityKeys: {
    S2_Authenticated: "asdfasdfasdf",
  },
};
Error: failed loading config file /home/keith/src/zwave-js/zwave-js-server/opt3.js
Error: Invalid key format for securityKeys.S2_Authenticated option
    at normalizeKey (/home/keith/src/zwave-js/zwave-js-server/src/bin/server.ts:17:11)
    at /home/keith/src/zwave-js/zwave-js-server/src/bin/server.ts:60:53
    at Object.<anonymous> (/home/keith/src/zwave-js/zwave-js-server/src/bin/server.ts:119:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Module.m._compile (/home/keith/src/zwave-js/zwave-js-server/node_modules/ts-node/src/index.ts:1310:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (/home/keith/src/zwave-js/zwave-js-server/node_modules/ts-node/src/index.ts:1313:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)

❯ cat opt4.js && ts-node src/bin/server.ts --config opt4.js --mock-driver
module.exports = {
  networkKey: "2eccab1ca37f0eb570712d982543ee0c"
};
The `networkKey` option is deprecated in favor of `securityKeys` option. To eliminate this warning, move your networkKey into the securityKeys.S0_Legacy option. Refer to the Z-Wave JS docs for more information
Starting server on port 3000
ZwaveJS server listening on port 3000
Server listening on port 3000
^CShutting down
Closing server...
Server closed

❯ cat opt5.js && ts-node src/bin/server.ts --config opt5.js --mock-driver
module.exports = {
  securityKeys: {
    S0_Legacy: "2eccab1ca37f0eb570712d982543ee0c",
    S2_Authenticated: "2eccab1ca37f0eb570712d982543ee0c",
    S2_AccessControl: "2eccab1ca37f0eb570712d982543ee0c",
    S2_Unauthenticated: "2eccab1ca37f0eb570712d982543ee0c",
  },
};
Starting server on port 3000
ZwaveJS server listening on port 3000
Server listening on port 3000
^CShutting down
Closing server...
Server closed


fix: github-script usage after upgrade to v6

Following https://github.com/BrightspaceUI/core/pull/3222, I checked this repo for any usages of third-party-actions@actions/github-script that might be affected by yesterday's move to v6 and the resulting Octokit API change.
It looks like the Backport action is affected, so I've fixed it here. I don't have an easy way of testing this, but the changes should be correct. I could put a post on #web-platform for consumers to watch out next time they backport for any issues...

@Scy-D2L I also noticed on Line 31, it looks like the uses: Brightspace/third-party-actions@actions/github-script isn't necessary - does that sound right? Doesn't look like it's using the Octokit SDK in that code snippet.

@Scy-D2L I also noticed on Line 31, it looks like the uses: Brightspace/third-party-actions@actions/github-script isn't necessary - does that sound right? Doesn't look like it's using the Octokit SDK in that code snippet.

It is still a nodejs script though, which there isn't any default support for as a "shell script". So, it could be rewritten as say, bash, but still perfectly valid as-is

Gotcha, thanks @omsmith!


Websocket channel queue does not fire if new queue is subqueue

OS:
Windows 10
Issue Descriptions:
If you have a queue that is currently playing let us say that it has songs 1,2,3,4,5 in that order and you switch to a new queue that has songs 1,2,3 in that order the queue payload for any connected websockets will not fire. Going from 1,2,3 -> 1,2,3,4,5 will cause it to fire.
Steps to Reproduce:
Have 2 playlists one with two songs and one with just one song that is the same as the first song from the playlist with two songs.
Have a websocket connection active.
Play playlist with 2 songs.
Play playlist with 1 song.
Most recent queue payload is now not the current payload.

Haha, great issue 😆
https://github.com/gmusic-utils/gmusic-ui.js/blob/master/src/QueueNamespace.js#L40
Looks like we just compare the new queue elements against the matching indexed elements in the old queue, if they match we claim no change.  We ignore the fact the old queue could have been longer 👍
Will fix for the next release, out of interested what are you using the websocket for? 😄

I write a plugin for rainmeter that allows skins to use it to control and get info from GPMDP. While I have you here is there anyway I can get the id or even better yet index of the currently playing song? Right now I am having too string compare the title artist and album of every location in the queue since getCurrentTrack gives a null id and an index of 1.

@tjhrulz Unfortunately no, there isn't an easy way to get the ID of the current playing song.  In the companion app we also do string comparisons on the queue to determine the ID 👍


Added more of the sklearn regressors to the presets

Added the large majority of the more popular regressors of sklearn. I am aware that a few may be missing. Also, I tidied the code slightly and split the regressors and classifiers into two sections.

Looks good so far! Just made a few comments that should be addressed first.

Think it looks good! Am a bit scared of pulling these without adequate unit tests, but I guess it's my fault for not writing them in the first place. I really need to get to doing those.
Thanks a lot!

no problem :) if you'd like, I can start having a look at writing these tests?

@enisnazif That would be very helpful! :)


[explorer] Typing custom URL crashes the explorer

Steps to Reproduce Issue
Start typing "http" in the "Choose a Network"->"Custom RPC URL" field (you can still paste the full address and it will work, but when you start typing it, it will not). It was reported on Discord and confirmed by @longbowlu and myself.
Expected Result
Connect explorer to custom RPC server.
Actual Result
Explorer UI crashes
System Information
Tested on a Mac in Chrome

@Jordan-Mysten, this is still a problem. Could you please look into it?


Battery Status Tracker using Vanilla JS

WebMasterLog Repository (Proposing new issue)
:red_circle: Project Title : Battery Status Tracker
:red_circle: Aim : Build a website which can showing the current status of the battery of your device like 90% Charged with animations of battery filled.
:red_circle: Tech Stack Used : HTML, CSS, JS
:red_circle: Category :  Vanilla-JS

📍 Follow the Guidelines to Contribute in the Project :

You need to create a separate folder named as the Project Title.
Inside that folder, there will be all the main components.

Cover image of the application, if project will be deployed in future, with the name of the folder in Kebab-Case (hypen-separated).
Main files in formatted state so that code will be readable.
Other Images - In seprate folder named Images used to form the application.

Inside the Project folder, the README.md file must be filled up properly, with proper visualizations and descriptions.

:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
"Issue Title" and "PR Title should be the same. Include issue number along with it.
Follow Contributing Guidelines & Code of Conduct before start Contributing.

:white_check_mark: To be Mentioned while taking the issue :

Full name :
GitHub Profile Link :
What is your participant role? (Mention the Open Source Program name. Eg. GSOC, GSSOC, SSOC, JWOC, etc.)

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Assign this to me under JWOC 2024

@Surajit0573 Assigned to you. Follow the contributing guidelines carefully.


Radarcode seosu vs seosd

Similar to #1 and #3: For our flyway analyses we used the code seosu for the Swedish radar Östersund . Data are uploaded to the ENRAM repository under that name: http://enram.github.io/data-repository/?prefix=se/osu/
I noticed however that OPERA calls this radar seosd (same radar coordinates) and that from 2017 onwards data are uploaded as such: http://enram.github.io/data-repository/?prefix=se/osd/
@CeciliaNilsson709 @leijnse which code is correct? Can we move the data to a directory with the new name seosd?

OSU-> OSD is listed in https://github.com/enram/globam-dmp/issues/5#issuecomment-484941213, closing here.


geolocation query

is it possible to make a geolocation query from this Android api ? i couldn't see query params for it but wanted to check.
for example can this be achieved ?
SELECT f.id
FROM f
WHERE ST_DISTANCE(f.location, {'type': 'Point', 'coordinates':[151.2357330322266, -33.77001515278013]}) < 30000

@SogoGolf added native support for geo objects Point, LineString, and Polygon + query support for distance, intersection, and within functions.  Available in 0.2.4.


Long range query support

Hello, everybody,
I want to make range queries that correctly work with long type. So, I have added support of long range query.
Small test to demonstrate trouble that I want to solve .
We want to work with timestamps that are long type:
q.Range(c => c
	.Name("named_query")
	.Boost(1.1)
	.Field(p => p.Description)
	.GreaterThan(636634079999999999)
	.GreaterThanOrEquals(636634080000000000)
	.LessThan(636634080000000000)
	.LessThanOrEquals(636634079999999999)
	.Relation(RangeRelation.Within))

converts numbers to double type:
   query = new {
          range = new {
            description = new {
              _name = "named_query",
              boost = 1.1,
              gt = 6.3663408E+17,
              gte = 6.3663408E+17,
              lt = 6.3663408E+17,
              lte = 6.3663408E+17,
              relation = "within"
            }
          }
        }

and loses precision.
Elasticsearch himself is able to make such requests, but in NEST this functionality is missed.
I will be grateful if you merge my pull request and I'm ready to discuss my decision.

Hi @annashlyak, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile?

Hi @karmi, I have added email to my profile

Thanks for the PR @annashlyak 😄 this LGTM.

would you like me to take another look at the PR @annashlyak - is it ready to review again?

@russcam  yes, you can watch review again

This looks great, @annashlyak! Thank you for your effort 👍


Correct port gha bug

/backport SKIP release/v3.0

/backport SKIP release/v3.0

/backport SKIP release/v4.0

/backport SKIP release/v4.0

/backport SKIP release/v4.0


Italics missing from one parameter in Syntax section

In the Syntax section, the word 'role' should be in italics.

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

ID: 416c8b0e-11c0-dea7-fcbf-8b893a1bf41c
Version Independent ID: 613a1373-016f-ece2-0843-2acc80d48d4c
Content: sp_helpdbfixedrole (Transact-SQL) - SQL Server
Content Source: docs/relational-databases/system-stored-procedures/sp-helpdbfixedrole-transact-sql.md
Product: sql
Technology: system-objects
GitHub Login: @stevestein
Microsoft Alias: sstein

@tom-boardman -- Tom, thank you for your feedback.  The italicization in that article is the same as its sibling articles, so I'm going to leave it as-is.


X11 user session is not initialized correctly using lightdm

Issue description
The user session (systemd-logind) is often not initialized correctly. I don't understand exactly what's broken but the results are:

audio doesn't work as the user lacks permission to access the mixer (alsa)
systemd user services are not working
some application are not working because $XDG_RUNTIME_DIR is not set
$XDG_SESSION_ID is not set

More info:
$ loginctl show-session 5
Id=5
User=1000
Name=my-user
Timestamp=Mon 2019-06-03 21:44:56 CEST
TimestampMonotonic=5898518836
VTNr=7
Seat=seat0
Display=:0
Remote=no
Service=lightdm
Desktop=none+bspwm
Scope=session-5.scope
Leader=17083
Audit=5
Type=x11
Class=user
Active=yes
State=opening
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no

$ systemctl --user status
Failed to read server status: Process org.freedesktop.systemd1 exited with status 1

Steps to reproduce
The session is none+bspwm, affects both slim and lightdm.
Technical details

system: "x86_64-linux"
host os: Linux 5.1.4, NixOS, 19.03.172725.a59b6608f97 (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2.2
channels(root): "nixos-19.03.172786.606306e0eaa, unstable-19.09pre181629.ae71c13a92f"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

#33451 may be related

Could you try with sddm?

So, I have been trying sddm for a while and it seems to have stopped. I guess it could be something in the way sddm starts X.

i've been having this issue for quite a while with lightdm. possibly relatedly, lightdm also does not pre-fill the login prompt with my user anymore.

@ashkitten can you check wether the environment variables I mentioned are unset?

@rnhmjoj correct, and setting them manually lets me use systemctl --user

It's our PAM settings that are wrong:
$ grep systemd /etc/pam.d/{lightdm,sddm}
/etc/pam.d/sddm:session optional /nix/store/wzrglgf7i2zajmm5k53hypgnv3n0z3v6-systemd-242/lib/security/pam_systemd.so

We need to load pam_systemd.so for the proper session variables to be set.

@peterhoeg I'm not familiar with PAM: can you tell me what to try exactly?
Note: the issue is present with slim also.

I've recently rewritten lightdm's PAM config, and committed a better nixos global pam config.
Is this issue reproducable on nixos-unstable?

I think I was having the same issue, swapped over to nixos-unstable and it is not happening.

It seems it's no longer an issue. Closing.


Refactor instance-scheduler to make the code DRY

User Story
The instance scheduler supports RDS instances scheduling now, but there is a lot of code repetition.
See if you can introduce a Instance interface type that will serve both EC2 and RDS clients and replace the common functions with methods.
Note there is an equal amount of repetition in tests too. This will also need updating as we change the main code.

User Type(s)

Value

Assumptions / Hypothesis / Questions / Unknowns

Definition of done

Reference
How to write good user stories

Blocked until https://github.com/ministryofjustice/modernisation-platform/issues/4673 is resloved


Goodbye, Submodules(?)

This PR sends the ghu_web and ghu_toolkits submodules to meet the good Lord. Here's my argument why I currently think we should end submodules:

Merely having pieces of our application in different repositories does not make our application more modular. Whether ghu_main and ghu_toolkits happen to live in separate repositories or not, they are separate Django applications, and Django applications already provide modularity.
Even if Point 1 was a lie, both applications depend heavily on shared CSS/js/templates/models/etc. in this repository, and this repository relies on them. They're not truly independent; they are strongly coupled right now to one another (but in manageable ways imo).
They're intimidating to newcomers. Understanding why you currently have to periodically run git submodule update --remote (because git trees store commits identified by SHA-1s and get out of date) is a burden for team members and others to get involved — something we don't want considering only Schuyler and I have worked on this so far
They create a lot of questions about releases: does each repository have its own version? If not, does that mean we have to keep them in sync? If so, that sounds clumsy to maintain
They make deployment seriously painful. Not only do they complicate the deployment scripts I'm writing in unforeseen ways; they mean you need three different SHA-1s to identify the version in prod: the commit of ghu, ghu_toolkits, and ghu_main. Worse, say I make mutually dependents changes in, say, ghu_toolkits and ghu. How do I deploy that atomically? At the very least, this complicates our deploy-on-master-push idea.
It means we hand off 3 github-dependent repositories to Neil instead of 1 self-contained repository.  Seeing them every time I run git status is aggravating, and knowing they're always out of date bothers me
I got to do a really cool 3-way merge of 3 repos with completely independent histories at 5b3af948a64506d68bfc8f719f0100fcd9a3f6b1 and it was exciting. Yeah ok, this isn't really an argument but it's cool ok

Discussssssssssss

Okay.  The reason I made the project into submodules in the first place was to make it so individuals could use the TagFlow process on each one.  However, if code reviews and QAs are thorough, there shouldn't be too many conflicts having all the pull-requests for all the different pages and portions on one development tree.  Submodules are known to be outdated anyway, so I think I will approve of this.

Okay. The reason I made the project into submodules in the first place

I just wanna point out that I was 100% on board with this, so this isn't directed at you if that makes sense. Basically working on the deployment script changed my mind about submodules bc I realized it makes life harder

was to make it so individuals could use the TagFlow process on each one.

Which I think would be worth it if they were huge codebases, y'know? Like if they had (out of necessity) to act as separate projects, like as an example you gave iirc, T-Square and OSCAR. This PR is reversible — if we ever get to that point, we can split the project again.

However, if code reviews and QAs are thorough, there shouldn't be too many conflicts having all the pull-requests for all the different pages and portions on one development tree.

If I understand what you mean, I'm thinking so too

Yeah idk what it's talking about, I thought this would be a fast-forward. I'll try and figure it out

It's actually pretty incredible how this changed the development tree. Visually it is quite interesting, and I don't think you can rebase it.

Yeah, just don't rebase it and you'll be fine. Trust me, you can't

As soon as you change the option to merge on github, it says there aren't any conflicts.

I mean, it might work, you can try, but you are merging three lines of development at once, and I do not think it is doable.

I went ahead and pushed directly to master for this, I think this confused github


fix(operator): cleanup for unused backup jobs and deleted crds in crd-mode

imports https://github.com/caos/orbos/pull/632

Please import latest ORBOS code

@stebenz, can we close this, now that v2 is released?

not needed anymore, as v2 is released


Cannot compile TypeScript app created with CRA because of parsing errors

Describe the bug
create-react-app seems to have issues compiling valid TypeScript code.
Did you try recovering your dependencies?
Yes, in a number of ways. I cannot manage to fix this, despite spending hours on researching it.
I've tried:

Googling (finding semi-similar issues reported, but no answers or solutions)
Removing node_modules and doing npm install and npm ci
Removing package-lock.json and npm install and npm ci
Reconstructing the entire package.json file by doing npm install <package-name> for every single dependency.

Which terms did you search for in User Guide?
parsing error, unexpected token, syntax error, create-react-app, private access modifier, failed to compile, typescript syntax error and tons of permutations of these.
Environment

Windows 10 x64
node v12.19.0
npm 6.14.8

Steps to reproduce

npx create-react-app my-app --typescript
Edit App.tsx and add the following code under the import statements and above the function App() ... line:

class Foo {
  private bar: number;

  constructor() {
    this.bar = 1;
  }
}

Full content of App.tsx:
import React from 'react';
import logo from './logo.svg';
import './App.css';

class Foo {
  private bar: number;

  constructor() {
    this.bar = 1;
  }
}

function App() {
  return (

          Edit src/App.tsx and save to reload.

          Learn React

  );
}

export default App;

Run npm run build

NOTE: There are other syntaxes which do not work, such as readonly and more.
Expected behavior
The app is compiled successfully.
Actual behavior
λ npm run build

><EMAIL_ADDRESS>build C:\Users\...\my-app
> react-scripts build

Creating an optimized production build...
Failed to compile.

C:/Users/.../my-app/src/App.tsx
  Line 6:11:  Parsing error: Unexpected token

  4 |
  5 | class Foo {
> 6 |   private bar: number;
    |           ^
  7 |
  8 |   constructor() {
  9 |     this.bar = 1;

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\...\npm-cache\_logs\2020-10-13T05_11_20_782Z-debug.log

Interestingly, I just tried this on Ubuntu 18.04 with the exact same node/npm versions. It's compiling there:
Creating an optimized production build...
Compiled with warnings.

./src/App.tsx
  Line 5:7:  'Foo' is defined but never used  @typescript-eslint/no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  39.44 KB (+50 B)  build/static/js/2.983335a4.chunk.js
  772 B             build/static/js/runtime-main.83c3e0c4.js
  649 B (+2 B)      build/static/js/main.1b78e738.chunk.js
  547 B             build/static/css/main.5f361e03.chunk.css

I also just tried it on another (complete fresh) install of Windows 10 x64 on another computer (with node 12.16.3 and npm 6.14.4). That machine fails exactly like in the bug report above.
Please help - we're unable to build or product on any new Windows machines right now!

This is no longer reproducible (but still occurs in another project of ours), so something bad had been published. Unsure how to fix in other project. npm upgrade dit not solve the issue.

I'm having the same problem and have been having it since once of the pre-releases. I've gathered that it may be an issue with typescript-eslint but it's making me pull my hair out because CRA doesn't tell me what exactly fails (i.e. no stack trace or even "this is eslint complaining") other than pointing out those nonsense parsing errors on almost every TS and TSX file. I suspect this may have something to do with this being in a monorepo.

Okay, scratch that. After comparing the output of a fresh yarn create react-app with my existing package.json it seems that the file now contains the following section:
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },

This was missing in the app I upgraded. Presumably this was added to the generator output at some point in the past but inferred if missing and that logic got canned at some point in the 4.0.0 pre-releases, breaking old apps that were missing this bit.
Adding this to my package.json fixed the problem, monorepo or not.

@pluma Thank god! I was dealing with this all day... I even tried to migrate to snowpack, but that is even more pain...
Thanks again.

Okay, scratch that. After comparing the output of a fresh yarn create react-app with my existing package.json it seems that the file now contains the following section:
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },

This was missing in the app I upgraded. Presumably this was added to the generator output at some point in the past but inferred if missing and that logic got canned at some point in the 4.0.0 pre-releases, breaking old apps that were missing this bit.
Adding this to my package.json fixed the problem, monorepo or not.

This doesn't work for me.
I already had this in my package.json file:
  "eslintConfig": {
    "extends": "react-app"
  },

I changed it to this:
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },

I'm having the same problem -- the project still fails to build on syntax like private or readonly. I can only build the project on Linux machines right now (or with WSL). Neither deleting the package file and doing npm install nor doing npm ci works.

Not sure why yet, but the thing that has solved this problem for me was deleting an .eslintrc file I had in the root folder

Not sure why yet, but the thing that has solved this problem for me was deleting an .eslintrc file I had in the root folder

Thanks. Doesn't work for me - I don't even have that file.

I did some digging and it seems like this was introduced by the changes to ESLint config handling in v4.0 (see https://github.com/facebook/create-react-app/pull/9587/files#diff-8e25c4f6f592c1fcfc38f0d43d62cbd68399f44f494c1b60f0cf9ccd7344d697L372 and then https://github.com/facebook/create-react-app/pull/9640/files#diff-8e25c4f6f592c1fcfc38f0d43d62cbd68399f44f494c1b60f0cf9ccd7344d697R366).
In particular, the default lint config is now using eslint-config-react-app/base instead of eslint-config-react-app/index: this matters because only the latter configures a TS-aware lint parser (https://github.com/facebook/create-react-app/blob/d9eb05ff3c52238c59a97ffae940f35a22c8e891/packages/eslint-config-react-app/index.js#L33).
Likely solution is to move TS-aware parser config to the base file?

I did some digging and it seems like this was introduced by the changes to ESLint config handling in v4.0 (see https://github.com/facebook/create-react-app/pull/9587/files#diff-8e25c4f6f592c1fcfc38f0d43d62cbd68399f44f494c1b60f0cf9ccd7344d697L372 and then https://github.com/facebook/create-react-app/pull/9640/files#diff-8e25c4f6f592c1fcfc38f0d43d62cbd68399f44f494c1b60f0cf9ccd7344d697R366).
In particular, the default lint config is now using eslint-config-react-app/base instead of eslint-config-react-app/index: this matters because only the latter configures a TS-aware lint parser.
https://github.com/facebook/create-react-app/blob/d9eb05ff3c52238c59a97ffae940f35a22c8e891/packages/eslint-config-react-app/index.js#L33
Likely solution is to move TS-aware parser config to the base file?

Thanks. Unsure how to test your solution - could you provide a short step-by-step? I'll test it out because I still can't build the project on Windows.

Sorry @philiparvidsson, I meant that as a suggestion for a general fix in the CRA source code.
In your particular situation it does sound like there is something interfering with your lint config, maybe there is a way to get eslint to dump configuration for further debugging? The workarounds from other commenters worked ok for me.

Sorry @philiparvidsson, I meant that as a suggestion for a general fix in the CRA source code.
In your particular situation it does sound like there is something interfering with your lint config, maybe there is a way to get eslint to dump configuration for further debugging? The workarounds from other commenters worked ok for me.

Thanks. Yes, something is indeed interfering. The project was untouched but just stopped building after a while (after removing node_modules and doing npm install), and I haven't been able to build it on Windows since.

Hi @philiparvidsson, I have just suddenly begun receiving the exact same error out of nowhere, for no reason. Also running Windows. It just broke from one moment to the next.

Failed to compile.
../shared/src/lib/Sanity.ts 4:30
Module parse failed: Unexpected token (4:30)
File was processed with these loaders:

<EMAIL_ADDRESS>You may need an additional loader to handle the result of these loaders.
| $RefreshSetup$(module.id);

|

export const objectHasProps = <T extends Record<string, unknown>>(
|   x: Partial,
|   props: Extract<keyof T, string>[],

The problem is that "4:30" literally does not exist. There is no line 4 which has 30 positions, and the pinpointed code snippet is actually line 1. And it is completely harmless, regular code, which has worked the entire time. Position 30 is a space.
If I add a comment in the file, the error jumps to another file. If I keep adding comments, eventually it comes back to /Sanity.ts, but 5:30 instead of 4:30.
Have you been able to fix the problem for yourself?

Hi @philiparvidsson, I have just suddenly begun receiving the exact same error out of nowhere, for no reason. Also running Windows. It just broke from one moment to the next.

Failed to compile.
../shared/src/lib/Sanity.ts 4:30
Module parse failed: Unexpected token (4:30)
File was processed with these loaders:

<EMAIL_ADDRESS>You may need an additional loader to handle the result of these loaders.
| $RefreshSetup$(module.id);

|

export const objectHasProps = <T extends Record<string, unknown>>(
|   x: Partial,
|   props: Extract<keyof T, string>[],

The problem is that "4:30" literally does not exist. There is no line 4 which has 30 positions, and the pinpointed code snippet is actually line 1. And it is completely harmless, regular code, which has worked the entire time. Position 30 is a space.
If I add a comment in the file, the error jumps to another file. If I keep adding comments, eventually it comes back to /Sanity.ts, but 5:30 instead of 4:30.
Have you been able to fix the problem for yourself?

Hi @philiparvidsson, I have just suddenly begun receiving the exact same error out of nowhere, for no reason. Also running Windows. It just broke from one moment to the next.

Failed to compile.
../shared/src/lib/Sanity.ts 4:30
Module parse failed: Unexpected token (4:30)
File was processed with these loaders:

<EMAIL_ADDRESS>You may need an additional loader to handle the result of these loaders.
| $RefreshSetup$(module.id);

|

export const objectHasProps = <T extends Record<string, unknown>>(
|   x: Partial,
|   props: Extract<keyof T, string>[],

The problem is that "4:30" literally does not exist. There is no line 4 which has 30 positions, and the pinpointed code snippet is actually line 1. And it is completely harmless, regular code, which has worked the entire time. Position 30 is a space.
If I add a comment in the file, the error jumps to another file. If I keep adding comments, eventually it comes back to /Sanity.ts, but 5:30 instead of 4:30.
Have you been able to fix the problem for yourself?

In the line you pasted (export const...) column 30 is the < character, which is in line with what this bug is descripting. Basically it seems to be a lint configuration error that causes anything other than plain-old JavaScript to give syntax errors.
I haven't built the project in a long time on Windows (our build system is Linux and it's working there). Just to give you an answer, I pulled everything to yet another Windows machine (pretty clean install) and ran the CI build scripts which works on Linux (basically all it does is npm ci and react-scripts build.
Just to inform you: It's still broken. Just before I reported this bug, I could build fine on Windows. But since the report, the build is entirely broken on Windows. We've tried recreating the project, recreating package.json (by manually reinstalling every package with npm i ..., deleting package-lock.json, etc. but nothing fixes it.
So no, I'm not able to fix it. The best suggestion I can give you is to run your builds in Docker, WSL or on a Linux-machine.

Hi @philiparvidsson, I have just suddenly begun receiving the exact same error out of nowhere, for no reason. Also running Windows. It just broke from one moment to the next.

Failed to compile.
../shared/src/lib/Sanity.ts 4:30
Module parse failed: Unexpected token (4:30)
File was processed with these loaders:

<EMAIL_ADDRESS>You may need an additional loader to handle the result of these loaders.
| $RefreshSetup$(module.id);

|

export const objectHasProps = <T extends Record<string, unknown>>(
|   x: Partial,
|   props: Extract<keyof T, string>[],

The problem is that "4:30" literally does not exist. There is no line 4 which has 30 positions, and the pinpointed code snippet is actually line 1. And it is completely harmless, regular code, which has worked the entire time. Position 30 is a space.
If I add a comment in the file, the error jumps to another file. If I keep adding comments, eventually it comes back to /Sanity.ts, but 5:30 instead of 4:30.
Have you been able to fix the problem for yourself?

In the line you pasted (export const...) column 30 is the < character, which is in line with what this bug is descripting. Basically it seems to be a lint configuration error that causes anything other than plain-old JavaScript to give syntax errors.
I haven't built the project in a long time on Windows (our build system is Linux and it's working there). Just to give you an answer, I pulled everything to yet another Windows machine (pretty clean install) and ran the CI build scripts which works on Linux (basically all it does is npm ci and react-scripts build.
Just to inform you: It's still broken. Just before I reported this bug, I could build fine on Windows. But since the report, the build is entirely broken on Windows. We've tried recreating the project, recreating package.json (by manually reinstalling every package with npm i ..., deleting package-lock.json, etc. but nothing fixes it.
So no, I'm not able to fix it. The best suggestion I can give you is to run your builds in Docker, WSL or on a Linux-machine.

To give an update on my comment yesterday, I was able to resolve my personal problem, which probably ended up unrelated to this topic after all.
My issue was that my project is split into different modules - "client", "shared" and "server", and I was including the "shared" module in my "client" without transpiling the TS first. (Via npm link or npm install ../local/path/to/the/module)
The baffling part is that I have been using the shared package for weeks without the error appearing, and then it suddenly popped up out of nowhere.
The correct solution is probably to just transpile the shared package before using it, but what I did instead was to install CRACO and change the CRA webpack config to add an additional rule:
npm install -D @craco/craco ts-loader
craco.config.js:
const path = require("path");

module.exports = {
  webpack: {
    configure: webpackConfig => {

      // ts-loader is required to reference external typescript projects/files (non-transpiled)
      webpackConfig.module.rules.push({
        test: /\.ts(x)?$/,
        loader: 'ts-loader',
        include: [
          path.resolve(__dirname, '../shared'),
          path.resolve(__dirname, '/node_modules/@misthaven'),
        ],
        options: {
          transpileOnly: true,
          configFile: 'tsconfig.json',
        },
      })

      return webpackConfig;
    }
  }
};

and then replace react-scripts start calls in the package.json scripts segment with craco start (and same for build). That resolved my problem.
The problem also happened in WSL2, which tipped me off to the thought that it might not be Windows-related after all.
While my woes ended up not directly related, I hope that the context may provide some ideas for solving this particular case.

To give an update on my comment yesterday, I was able to resolve my personal problem, which probably ended up unrelated to this topic after all.
My issue was that my project is split into different modules - "client", "shared" and "server", and I was including the "shared" module in my "client" without transpiling the TS first. (Via npm link or npm install ../local/path/to/the/module)
The baffling part is that I have been using the shared package for weeks without the error appearing, and then it suddenly popped up out of nowhere.
The correct solution is probably to just transpile the shared package before using it, but what I did instead was to install CRACO and change the CRA webpack config to add an additional rule:
npm install -D @craco/craco ts-loader
craco.config.js:
const path = require("path");

module.exports = {
  webpack: {
    configure: webpackConfig => {

      // ts-loader is required to reference external typescript projects/files (non-transpiled)
      webpackConfig.module.rules.push({
        test: /\.ts(x)?$/,
        loader: 'ts-loader',
        include: [
          path.resolve(__dirname, '../shared'),
          path.resolve(__dirname, '/node_modules/@misthaven'),
        ],
        options: {
          transpileOnly: true,
          configFile: 'tsconfig.json',
        },
      })

      return webpackConfig;
    }
  }
};

and then replace react-scripts start calls in the package.json scripts segment with craco start (and same for build). That resolved my problem.
The problem also happened in WSL2, which tipped me off to the thought that it might not be Windows-related after all.
While my woes ended up not directly related, I hope that the context may provide some ideas for solving this particular case.

Something I don't understand is why would react-scripts build fail ts compilation because of an incorrect eslint config. I ran into the issue and had difficulties understanding that this was an issue coming from a missing eslint config.
I was building inside a Docker image, where I had not copied my .eslintrc.json, it was hard to troubleshoot.

My issue was that my project is split into different modules - "client", "shared" and "server", and I was including the "shared" module in my "client" without transpiling the TS first. (Via npm link or npm install ../local/path/to/the/module)

Thanks for this, helped diagnose something similar happening for me.
I've had this issue with a .ts file soft-symlinked in from outside of the CRA created folders.
Any time it hits TS syntax in that file, I get the same error:
Module parse failed: Unexpected token (<line:char numbers>)
File was processed with these loaders:

<EMAIL_ADDRESS>You may need an additional loader to handle the result of these loaders.

If I copy the code into a "proper" file in the same place, it works without issue. It also works if there's no Typescript-specific syntax in the file.
With the symlink it seems to be skipping TS transpilation entirely.

deleting the eslintrc file helped me

Okay, scratch that. After comparing the output of a fresh yarn create react-app with my existing package.json it seems that the file now contains the following section:
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },

This was missing in the app I upgraded. Presumably this was added to the generator output at some point in the past but inferred if missing and that logic got canned at some point in the 4.0.0 pre-releases, breaking old apps that were missing this bit.
Adding this to my package.json fixed the problem, monorepo or not.

This fixed for me as well. I just saw that this code is in basic CRA too. I might have deleted it at some point.

for me, react-scripts build was succeeding locally but failing in a docker container. The solution was to copy my .eslintrc.js into the container before doing the build.
I do not have an eslintConfig section in my package.json.
Bizarre issue.

for me, adding
 "eslintConfig": {
    "extends": "react-app"
  },

was throwing an error, so I had to yarn add eslint-config-react-app -D. This fixed my problem.

I have the same situation as @tetchel . I have a client (cra) and server (fastify) setup, and its much better to have one eslint config, kept in the root folder of both apps. So i deleted esling from client package. And now when i put my client part into docker, without eslint config, it cannot compile ts. WHY? :D

for me, react-scripts build was succeeding locally but failing in a docker container. The solution was to copy my .eslintrc.js into the container before doing the build.
My eslintrc does not use react-app or react-app/jest, so it does not seem to be those configs specifically that prevent this issue.
I do not have an eslintConfig section in my package.json.
Bizarre issue.

Oh god, had same issue, another gotcha is .prettierrc.js and other if eslint use them.

For anyone else landing here, and not thinking that linting has anything to do with the error you are having. I just found out that CRA always adds ESLint so it will run even if you remove all your ESLint config. And then it will crash because ESLint without config cannot handle TypeScript.
The fix is to add back:
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  }

to your package.json

TSC_COMPILE_ON_ERROR=true use this flag in .env


Serve nostr relay info

According to NIP 11: https://github.com/nostr-protocol/nips/blob/master/11.md
Some nostr clients do not use the URL path for relay info (only the domain name):

If the relay WS is:

wss://lnbits.link/nostrrelay/client

Then the relay info should be served at

https://lnbits.link/nostrrelay/client

However, some clients only check https://lnbits.link

This PR serves generic relay info at https://lnbits.link

Codecov Report

Merging #1474 (cc7834c) into main (9467a8d) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main    #1474      +/-   ##
==========================================
- Coverage   47.85%   47.84%   -0.01%
==========================================
  Files         264      264
  Lines       16158    16162       +4
==========================================
+ Hits         7732     7733       +1
- Misses       8426     8429       +3

Impacted Files
Coverage Δ

lnbits/core/views/generic.py
48.02% <50.00%> (+0.02%)
:arrow_up:

lnbits/settings.py
86.73% <100.00%> (+0.13%)
:arrow_up:

lnbits/utils/exchange_rates.py
86.44% <0.00%> (-3.39%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

LGTM

It still seems out of place and it's very specific to a single extension (nostr relay).
Have you considered using a middleware for patching /?

Have you considered using a middleware for patching /?

the middleware would still go in core
the condition would be evaluated for each request (not only for GET "/")

the middleware would still go in core

The middleware could be imported from an extension.

So this is just if they pass application/nostr+json? It seems like more an issue on the protocol side. I don't see an issue in adding for now and then we lobby nostr to not have such tight spec.

Changed my mind. Clients are wrong. They MUST use the path part.
Closing.


Add addEventListener options argument support

jsom does not support the addEventListener options argument https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
It would be great to see at least the support for the once flag

@domenic are you already working on it? Otherwise I will be glad to help making a pull request

A pull request would definitely be welcome.

@domenic you got it ;) https://github.com/tmpvar/jsdom/pull/1618

After https://github.com/tmpvar/jsdom/pull/1618, the remaining work is to add the passive flag. \o/!


nix-env and nixpkgs/config.nix matches no derivations

Issue description
$ cat .config/nixpkgs/config.nix
# nix-env -i all

with import <nixpkgs> {};

{
    allowUnfree = true;

    all = with pkgs; buildEnv {
        name = "all";
        paths = [
            vlc
        ];
    };
}

Steps to reproduce
$ nix-env -i all
error: selector â€˜allâ€™ matches no derivations

$ nix-env -Q -iA nixos.all
error: attribute â€˜allâ€™ in selection path â€˜nixos.allâ€™ not found

$ nix-env -Q -iA all
error: attribute â€˜allâ€™ in selection path â€˜allâ€™ not found

$ nix-env -Q -iA nixpkgs.all
error: attribute â€˜nixpkgsâ€™ in selection path â€˜nixpkgs.allâ€™ not found

Technical details

System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
Nix version: (run nix-env --version)
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

$ nixos-version
17.03.1082.4aab5c5798 (Gorilla)

$ nix-env --version
nix-env (Nix) 1.11.8

$ nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
"17.03.1082.4aab5c5798"

You want packageOverrides; see http://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides. I consider it bad that we don't check the schema of config.nix, but you could set all = throw "haha"; and it would never fail because nothing refers to it.

Doesn't work... To recap: I'm trying to create a user profile of programs to install.
$ cat ~/.config/nixpkgs/config.nix
# nix-env -i all

with import <nixpkgs> {};

{
    allowUnfree = true;

    packageOverrides = pkgs: rec {
        foo = pkgs.foo.override {
            packages = [
                vlc
            ];
        };
    };
}

$ nix-env -i pkgs.foo
error: attribute â€˜fooâ€™ missing, at /home/nawal/.config/nixpkgs/config.nix:9:15

In this this case I think an overlay would handle the problem quite well.
Closing as this kind of questions would be better-located on the discourse, feel free to open a thread there if this answer doesn't work for you!

Found this issue Googling whilst trying to figure out the same issue.  If someone finds a solution, please link it here.

The config.nix contents here seems to work:
https://nixos.org/nixpkgs/manual/#sec-building-environment


template: add the method RemoveKeys to KV

KV.Remove is not callable inside a template because it needs a slice of string which can't be created in a template.
Introduce the KV.RemoveKeys method which takes a vararg of strings and then calls KV.Remove.
I came across this problem because I was trying to do this in my Slack template:
{{ define "__subject" }}{{ if .GroupLabels.type }}{{ .GroupLabels.type }} {{ end }} {{with .GroupLabels}}{{.Remove "type"}}{{ .SortedPairs.Values | join " / " }}{{end}}{{end}}

except this doesn't work because of this error:
template: default.tmpl:6:223: executing \"__subject\" at <\"type\">: can't handle \"type\" for arg of type []string

As far as I can tell there's no way to create a slice/array in a Go template so right now Remove is completely unusable inside a template.
This PR adds a method RemoveKeys which takes a vararg string and simply calls Remove itself.

It looks to me like you could handle this with a loop and an if to remove
the label.
On Wed 6 Nov 2019, 20:24 Vincent Rischmann<EMAIL_ADDRESS>wrote:

KV.Remove is not callable inside a template because it needs a slice of
string which can't be created in a template.
Introduce the KV.RemoveKeys method which takes a vararg of strings and
then calls KV.Remove.
I came across this problem because I was trying to do this in my Slack
template:
{{ define "__subject" }}{{ if .GroupLabels.type }}{{ .GroupLabels.type }} {{ end }} {{with .GroupLabels}}{{.Remove "type"}}{{ .SortedPairs.Values | join " / " }}{{end}}{{end}}
except this doesn't work because of this error:
template: default.tmpl:6:223: executing "__subject" at <"type">: can't handle "type" for arg of type []string
As far as I can tell there's no way to create a slice/array in a Go
template so right now Remove is completely unusable inside a template.
This PR adds a method RemoveKeys which takes a vararg string and simply
calls Remove itself.
You can view, comment on, or merge this pull request online at:
https://github.com/prometheus/alertmanager/pull/2094
Commit Summary

template: add the method RemoveKeys to KV

File Changes

M template/template.go
https://github.com/prometheus/alertmanager/pull/2094/files#diff-0
(5)
M template/template_test.go
https://github.com/prometheus/alertmanager/pull/2094/files#diff-1
(27)

Patch Links:

https://github.com/prometheus/alertmanager/pull/2094.patch
https://github.com/prometheus/alertmanager/pull/2094.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/prometheus/alertmanager/pull/2094?email_source=notifications&email_token=ABWJG5VL3WFK23ZKHIXAMCDQSMKXLA5CNFSM4JJ3K6NKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXKPMUQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWJG5TG4XIXNJJQ7OHZKJTQSMKXLANCNFSM4JJ3K6NA
.

For my real use case I need to pipe join " / " to the result, how would I do that using a loop ?
Also, from some limited testing using a loop/if to filter keys is really cumbersome and unclear, I'd much rather have access to the Remove method.

how would I do that using a loop ?

Only output the / on 2nd and subsequent iterations.

True but that makes it even worse than the simple loop/if which is already a mess compared to simply having the ability to call Remove.
Am I right in saying Remove was/is intended to be used in the template ?

Am I right in saying Remove was/is intended to be used in the template ?

Yes, but that it's in a template isn't your issue here. You need to pass a slice of strings, and there's no way to construct that.

I don't really understand. If Remove is intended to be used in a template but there's just no way to use it, to me it sounds like it's broken, which is why I suggested to add another method making it usable.

It is usable in a template, if you use one of the places that there's already a slice of strings. See https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl#L4

ok, my mistake, I missed that.
So you were right, the problem is that I can't create a slice of strings in a template. Is there any reason to not add this RemoveKeys method which would work around this problem ?

I'd prefer to handle it more generally by allowing creation of slices of strings, rather than having to add functions for two different types everywhere.

Understood. Would this be a function in the DefaultFuncs ?
if that's all that's needed I can make a PR.

Yes, it would be.


update accessibility shortcuts

@xiaoharper : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi @xiaoharper - This pull request was opened in the public repo. PMs should work in the private repo, per the Microsoft Docs contributor guide. We can keep this PR open for review and merge, but would you make future content updates in the private repo? Thank you!

Thank you, will do future updates in private repo.
From: Kristine Toliver @.>
Sent: Saturday, February 19, 2022 1:09 AM
To: MicrosoftDocs/azure-docs @.>
Cc: Harper Zhang @.>; Mention @.>
Subject: Re: [MicrosoftDocs/azure-docs] update accessibility shortcuts (PR #88329)
Hi @xiaoharperhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fxiaoharper&data=04|01|Xiao.Zhang%40microsoft.com|0824a4c0ac524793f3a408d9f3015a3b|72f988bf86f141af91ab2d7cd011db47|0|0|637808009429067773|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=OlpHGcXv%2FNMEuqeH8%2Bq5Ft4QHAS686OlRjUgc0oacPU%3D&reserved=0 - This pull request was opened in the public repo. PMs should work in the private repo, per the Microsoft Docs contributor guide. We can keep this PR open for review and merge, but would you make future content updates in the private repo? Thank you!
—
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fpull%2F88329%23issuecomment-1044856208&data=04|01|Xiao.Zhang%40microsoft.com|0824a4c0ac524793f3a408d9f3015a3b|72f988bf86f141af91ab2d7cd011db47|0|0|637808009429067773|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=fZdGHVLY%2F4Do%2BgvPnLluMdsqzOD2QTK%2F5QHzZpvrMH4%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALIDYKKYB7YCQHVRVO53NF3U3Z4KTANCNFSM5OW7UPXQ&data=04|01|Xiao.Zhang%40microsoft.com|0824a4c0ac524793f3a408d9f3015a3b|72f988bf86f141af91ab2d7cd011db47|0|0|637808009429117765|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=cBuHL6%2FPclGfzXXQ7QN8IPoagf9wj%2BO386%2BKWG8lj6s%3D&reserved=0.
Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01|Xiao.Zhang%40microsoft.com|0824a4c0ac524793f3a408d9f3015a3b|72f988bf86f141af91ab2d7cd011db47|0|0|637808009429267757|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=MkV8NfmMu9EGLMX7UX4tW0G1Ak8aFh2VTrk9QrT03xk%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04|01|Xiao.Zhang%40microsoft.com|0824a4c0ac524793f3a408d9f3015a3b|72f988bf86f141af91ab2d7cd011db47|0|0|637808009429267757|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=9eYCtcn4ODR3n6YDqwY3NVP0GccIXJX6SrmRGjUmlts%3D&reserved=0.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

@xiaoharper : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@xiaoharper : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ktoliver I'm a member of the AzureML content team and approve these changes. Please proceed with merging them.
#sign-off

@nibaccam: I'm sorry - only the author of this article, @lgayhardt, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

@ktoliver : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Random Crash & Android Not Responding Errors

Steps to reproduce
It will happen randomly. I will get  Android not responding force quit errors or the app will crash
Expected behavior
Not crash
Actual behavior
Crashes
Crash logs
mihon_crash_logs.txt
Mihon version
App version: 0.16.5-6710 (standard, 8632ba85e, 7, 2024-06-01T21:18:31Z) Android version: 14 (SDK 34; build AP31.240426.023.B4) Device brand: google Device manufacturer: Google Device name: husky (husky_beta) Device model: Pixel 8 Pro WebView: Android System WebView 126.0.6478.26
Android version
Android 15 Beta 2
Device
Google Pixel 8 Pro
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have gone through the FAQ and troubleshooting guide.
[X] I have updated the app to version 0.16.5.
[X] I have updated all installed extensions.
[X] I will fill out all of the requested information in this form.

how often are you using the app and how often are you updating your library, making backup and stuff

HI I make backups every six hours.
Update library every 12 hours, with the occasional manual update pushes.
I use the app a lot, so is it a memory issue?
On 7/7/24 11:42 PM, AntsyLich @.***> wrote:

how often are you using the app and how often are you updating your
library, making backup and stuff
—
Reply to this email directly, view it on GitHub <https://github.com/
mihonapp/mihon/issues/865#issuecomment-2212937043>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/
ACMH7H526MFHED32PR3TC43ZLIDDXAVCNFSM6AAAAABIZPATSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJSHEZTOMBUGM>.
You are receiving this because you authored the thread.Message ID:
@.***>

it's a restriction thing starting from android 15. judging from your response it should not. wondering if it is because we are not targeting android 15 or cause there's a bug on the beta build. regardless until android 15 stable is released i won't look into fixing this.

Yes I'm on Android 15. I guess it'll be live soon.
On Mon, Jul 8, 2024, 4:22 PM AntsyLich @.***> wrote:

it's a restriction thing starting from android 15. judging from your
response it should not. wondering if it is because we are not targeting
android 15 or cause there's a bug on the beta build. regardless until
android 15 stable is released i won't look into fixing this.
—
Reply to this email directly, view it on GitHub
https://github.com/mihonapp/mihon/issues/865#issuecomment-2215205403,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACMH7HZYQ2FDPXFCN4PYIQDZLLYJPAVCNFSM6AAAAABIZPATSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJVGIYDKNBQGM
.
You are receiving this because you authored the thread.Message ID:
@.***>


Basic parsing of events

This patch brings in basic parsing of events into objects. So far we are only separating an event's tag from its data though. This is already very helpful in order to filter the event stream for interesting events. Apart from that there is two small commits affecting the event stream tests. Please have a look, @lucidd, thank you!

Besides the lines i commented on LGTM :+1:


FI-1634: Multi version validation

This branch updates the validation tests to include the profile version in their validation calls. This lets us get rid of the separate validators for US Core 3 & 4 and just use a single validator.
This will address https://github.com/onc-healthit/onc-certification-g10-test-kit/issues/165.

We'd have to make sure that all the Bulk Data tests in g10 get updated to include version.

Yup, that will need to be done under a separate ticket.


feat: add on pull request and on push workflows

closes #16
NOTE this PR's CI will fail until all rockcraft projects in this repo have the following:
An up to date rockcraft file with the latest supported format (i.e. base and version must be valid)
Each rockcraft project directory must have a tox.ini file with envlist = pack, export-to-docker, sanity, integration. Example here.
Each rockcraft project directory must have a tests/ directory with sanity tests inside. Example here.

thanks @ca-scribner
I made that clear in the PR descirption


Sketch background image

Drag/drop from image tool (same as geometry)
Background image appears behind all other objects
Subsequent drops replace earlier images (only one image at a time)
Note: this is an initial implementation using the current (firebase storage) image storage implementation. It will need to be reworked a bit (along with the geometry tool) to support the upcoming image storage rearchitecture.

Reviewed synchronously with @ekosmin . @sfentress I didn't get this submitted in time for you to look at it today. I merged it so we could get it into a build but your review is still welcome.


devfile volume component size bug

/kind bug

What versions of software are you using?
 Expected: object, given: null

Expected behavior
I should be able to define a vol component without a size since its not mandatory. But how is this possible with the new devfile schema where name is on the same level as volume? 🤔
components:
  - name: tools
    container:
      image: quay.io/eclipse/che-java11-maven:nightly
      memoryLimit: 768Mi
      mountSources: true
      endpoints:
      - name: '8080-tcp'
        targetPort: 8080
      volumeMounts:
        - name: m2
          path: /home/user/.m2
  - name: m2
    volume:
      # size: 3Gi

Any logs, error output, etc?

I can skip the size with an empty string, not sure how I feel about that. But probably thats the only option?
components:
  - name: tools
    container:
      image: quay.io/eclipse/che-java11-maven:nightly
      memoryLimit: 768Mi
      mountSources: true
      endpoints:
      - name: '8080-tcp'
        targetPort: 8080
      volumeMounts:
        - name: m2
          path: /home/user/.m2
  - name: m2
    volume:
      size: ""

You can also skip with empty {} e.g.:
components:
  - name: tools
    container:
      image: quay.io/eclipse/che-java11-maven:nightly
      memoryLimit: 768Mi
      mountSources: true
      endpoints:
      - name: '8080-tcp'
        targetPort: 8080
      volumeMounts:
        - name: m2
          path: /home/user/.m2
  - name: m2
    volume: {}


Re-introduce the different between Field and a SingleValueField

When in the latest changes to AbstractField we effectively remove the difference between Field and SingleValueField, effectively making all fields a SingleValueField. This means that we cannot effectively make a difference between time series and single values. In addition, we have included an AttributeMatcher and and Attribute in the AbstractField which should not be there since not all fields have an attribute associated to them.
In sum:

We need to remove the SingleValueField implementation of the AbstractField and introduce an AbstractSingleValueField if needed.
We need to move the AttributeMatcher and Attribute variables to a suitable abstract class so that it is used only in fields where an attribute variable makes sense.

@arya-hemanshu I think this issue can be closed, right?


🔤Allow the font size to be adjustable

This could be controlled by doing ctrl + and ctrl - and added to the right click menu.

When added, this should work with #4

Reopening since support for this has been removed with the move to the Electron frontend.


"this" inside of a method returns an unexpected Object

Take the following:
methods: {
  login: () => {
    console.log(this)
  }
}

returns and Object holding: __esModule: true, default: Object
I am not able to retrieve the Vue instance and cannot figure out why.
Thanks in advance.

login: function () {}
Arrow function changes scope of this
Got it!


Convert userDisplayName into a Maybe value

Because some users don‘t set a display_name
Fixes #30

Thanks!


iOS version

I would like to port this library to iOS (using web tokens) using this library: https://github.com/fjcaetano/ReCaptcha
This library accomplish this with WebViews so the user will need to apply for two keys, one for Android and one for iOS (actually, web).
If I would to submit a PR, will you merge it or is it not a goal for this project?

I would love to merge a pull request enabling iOS support, thank you for considering spending your time on this!
Given that reCaptcha doesn't natively support iOS, making the user acquire two keys (as a bit of a hack) seems reasonable.

Any updates on this ? Flutter IOS recaptcha would be very helpful. Currently there are none available.

I think this request is very reasonable

Is anyone even working on this?


enable tracing and add tracing types and func

this enables tracing define (default in their CMake since 0.99)
adds the callback type and sys function for this

in terms of adding a safe interface for this I will followup in a separate issue/PR since this probably requires adding lazy static as a dependency to safely store a safe callback globally.
closes #696

Thanks!


Is it possible in Kivi to create widgets on the desktop, such as RSS feeds?

Description
Is it possible in Kivi to create widgets on the desktop, such as RSS feeds?

No, not currently anyway, see https://github.com/kivy/python-for-android/issues/46


Transaction isolation levels

Hello! I need to run a Serializable Transaction.
How I can achieve it with Mikro-ORM?

Depends on the driver, knex does not support this unfortunately. Afaik with postgres it is possible to just fire a query inside explicit transaction to set the isolation level, but it wont work with mysql.

Related issue in knex repository:
https://github.com/knex/knex/issues/581
For postgres, this should be the way:
await em.transactional(em2 => {
  await em2.execute('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
  // ...
})

as this is finally unblocked by knex, v5 will allow doing this:
await orm.em.transactional(async em => {
  // ...
}, { isolationLevel: IsolationLevel.READ_UNCOMMITTED });


build: Check for patch and bc for kvm flavor

We use patch to patch the kernel and kvmtool. bc is used somewhere
during kernel build.

LGTM


USER_EXPIRED dispatch after renew token

First of all, thanks for the amazing work you are doing with the library.
So, I am getting a frame timeout when trying to do the silent renew, but I managed it just redirecting the provider to the callback url and with that, I am getting the new access token from my provider. Please note I just mentioned this in order to give more context about the issue, because I don't think is directly related with the library as I am getting the same error using the provider's SDK.
Now, the real issue I am concerned is after renew the token several times (we are doing this in order to manage an idle users), the EXPIRING_USER and EXPIRED_USER are still being dispatched for the first token the user get when log in the application. I am updating the store every time I get a new token and this dispatch effectively the USER_FOUND action but still the user will be log out and the session time is not being dragged on.
My userManagerConfig:
const userManagerConfig = {client_id: envConfig.AUTH0_CLIENT_ID,
    redirect_uri: `${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ""}/callback`,
    response_type: "code token id_token",
    scope: "openid profile read",
    authority: envConfig.AUTH0_URI,
    silent_redirect_uri: `${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ""}/callback`,
    automaticSilentRenew: false,
    filterProtocolClaims: true,
    loadUserInfo: true,
    extraQueryParams: {
        audience: "http://etl-dev.onroute.xyz/v1",
    }
};

I am calling the silent renew one time per minute await userManager.signinSilent();
And dispatching an action to update the store in the callbackSuccess method.
successCallback(user) {
        this.props.updateUser(user);
}

You don't need to call silent renew manually, you can set automaticSilentRenew to true and it will automatically renew your token 1min before the token expires. Have you configure your reducer properly? it seems like the store is not being updated on time.

Thanks @Rasfuranku for the compliments and @aenciso for the reply. In addition to @aenciso 's suggestion, the silent renewal of tokens happens in an iframe which is loaded into the page. You also don't need to call signinSilent, the userManager will take care of renewal automatically five minutes before token expiration.
There might be an issue with the iframe loading in. Also if you could share your store setup (where you initially set up the loadUser helper) & the root of your app (where you register the OidcProvider), I can possibly help you further.

Thanks @maxmantz and @aenciso for your reply.
I know that userManager will renew the token before it expires, but in this case, we do need to renew it the token manually.
Now, I think indeed the store is not being updated, I am being debugging and on every request I always have the first token stored even after several successful renews.
My store:
import { createStore, combineReducers, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import promise from "redux-promise-middleware";
import modalReducer from "./reducers/modalReducer";
import { loadUser, reducer as oidcReducer } from "redux-oidc";

let middleware = [thunk, promise()];

const store = createStore(
    combineReducers({
        modalReducer,
        oidcReducer,
    }),
    {},
    applyMiddleware(...middleware)
);
loadUser(store, userManager);

export default store;

And my root:
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";

import Routes from "./redux/routes";
import store from "./redux/store";
import { OidcProvider } from "redux-oidc";
import { userManager } from "./redux/userManager";

ReactDOM.render(
    <Provider store={store}>
      <OidcProvider store={store} userManager={userManager}>
        <Routes />
      </OidcProvider>
    </Provider>,
    document.getElementById("root")
);

I noticed the store is being overwritten, that means that for some request I have the current token but for others I will get the first one.
Thanks.

From the config I cannot see why this would happen. Maybe something in your request API gets the incorrect token? What you've shown here looks fine.

@Rasfuranku I know this is a very old post, but do you remember if you were able to figure out what was going wrong ? I too am facing similar issue where the token is not updated in redux after silent renewal.  I can see the latest token in localStorage and stale/old token in redux state under redux-oidc/USER_FOUND


Add list_spaces to HfApi

First try; fixes #881.  :-)
Reused the SpaceInfo class, but not sure that was the way to go because of unused fields:
SpaceInfo: {
	id: BigSalmon/Streamlit_Headline_Writer
	sha: None
	lastModified: None
	siblings: None
	private: None
	author: None
	sdk: streamlit
}

cc @osanseviero @LysandreJik

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Should I be defining a new SpacesFilter class like this one: https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/endpoint_helpers.py#L67 ?

@osanseviero @LysandreJik can chime in but i don't think so

It's useful, but definitely not necessary. Having list_spaces is already a very nice first step!

datasets=True and models=True doesn't seem to work (returns an empty list). Not sure if that's an implementation error on my side or an endpoint issue. Passing a dataset id or a model id works fine.

hmm so @osanseviero made me realize i was mistaken, datasets (boolean) or models (boolean) are not supported
I only meant that if you pass models or datasets in your query (as string or array of string), then they will also be returned as fields in the API output.
Sorry about the incorrect information!

Thank you @cakiki for the contribution!! :fire: :fire:

Yay it's very cool!! thanks


Don't drop original exception when throwing MojoFailureException from routes and templates compilation

Pass first exception (there can be multiple) to MojoFailureException constructor as cause parameter.
It will be very important when running Play! in development mode with hot reloading (issue #6).

New 1.0.0-beta6-SNAPSHOT snapshot deployed.


Adding non-root user to dockerfiles of litmus portal

Signed-off-by: Raj Babu Das<EMAIL_ADDRESS>
Proposed changes
Adding non-root user to dockerfiles of litmus portal
Types of changes
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

[ ] New feature (non-breaking change which adds functionality)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices applies)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[ ] I have read the CONTRIBUTING doc
[ ] I have signed the commit for DCO to be passed.
[ ] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Dependency

Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Tested in local. Working fine.


Fixed dashboard weird label Issue

Do not approve PRs without an issue filed for the PR, issues are required for release logs

Github Issue for this PR : -
https://github.com/Tendrl/dashboard/issues/444


Sprite composition in ram, from flash.

The base images would be stored in flash and composed into ram on demand. The display would work from RAM then...
I understand that the packed images might be rle encoded and some work will be needed to compose them if this code is not already there somewhere else in the project.
What do you think?
Thank you.

Probably best to ask this sort of question on the forums, more people there who will be able to give an answer, perhaps even people who have already done it.
forums.raspberrypi.com


Add splice

ThinVec currently lacks the splice method. In https://github.com/rust-lang/rust/pull/104754 I converted a bunch of Vec instances in rustc to ThinVec for some performance wins. I had to change one use of splice like this:
-                alternatives.splice(idx..=idx, inner);
+
+                // Equivalent to `alternatives.splice(idx..=idx, inner);`.
+                alternatives.remove(idx);
+                for p in inner.into_iter().rev() {
+                    alternatives.insert(idx, p);
+                }

which could cause quadratic behaviour.

There is even a TODO: implement splice? comment in the code.

https://github.com/Gankra/thin-vec/pull/41

Hey :wave:, should this be closed due to #41?


Dependabot not detecting outdated packages on Ruby

Package ecosystem
bundler
Package manager version
bundler 2.3.8
Language version
Ruby MRI 3.1.2 (altough this is not defined in the Gemfile)
Manifest location and content before the Dependabot update
/Gemfile (https://github.com/anero/dependabot-issue-repro/blob/master/Gemfile)
/Gemfile.lock (https://github.com/anero/dependabot-issue-repro/blob/master/Gemfile.lock)
dependabot.yml content
https://github.com/anero/dependabot-issue-repro/blob/master/.github/dependabot.yml
Updated dependency
What you expected to see, versus what you actually saw
Ascii85 should be updated from 1.0.3 to 1.1.0
dalli should be updated from 3.2.1 to 3.2.2
Native package manager behavior
Running bundler outdated --strict returns:
Gem      Current  Latest  Requested  Groups
Ascii85  1.0.3    1.1.0
dalli    3.2.1    3.2.2

Manually updating the dependencies locally works correctly:
~ bundle update
Fetching gem metadata from https://rubygems.org/....
Resolving dependencies...
Using Ascii85 1.1.0 (was 1.0.3)
Using afm 0.2.2
Using bundler 2.3.7
Using dalli 3.2.2 (was 3.2.1)
Using ruby-rc4 0.1.5
Using ttfunk 1.7.0
Using hashery 2.1.2
Using dalli-elasticache 1.0.1
Using pdf-reader 2.10.0
Using pdf-inspector 1.3.0
Bundle updated!

Images of the diff or a link to the PR, issue, or logs
proxy | time="2022-07-27T17:47:27Z" level=info msg="proxy starting" commit=d1feaa99254076b1f2be38bedebf2e3fe49ef1c6
  proxy | 2022/07/27 17:47:27 Listening (:1080)
updater | 2022-07-27T17:47:27.770392936 [anonymous-instance:main:WARN:src/firecracker/src/main.rs:370] You are using a deprecated parameter: --seccomp-level 2, that will be removed in a future version.
updater | 2022-07-27T17:47:27.798226514 [429086095:main:WARN:src/devices/src/legacy/serial.rs:432] Detached the serial input due to peer close/error.
updater | time="2022-07-27T17:47:29Z" level=info msg="guest starting" commit=e6ea1502de9cf87268e6ae739a957a791ffca244
updater | time="2022-07-27T17:47:29Z" level=info msg="starting job..." fetcher_timeout=5m0s job_id=429086095 updater_timeout=45m0s updater_version=0.202.0-c94588db7a01818c5330be63a5d47b8e2e3d9138
updater | I, [2022-07-27T17:47:30.699341 #7]  INFO -- sentry: ** [Raven] Raven 3.1.2 ready to catch errors
updater | INFO <job_429086095> Starting job processing
  proxy | 2022/07/27 17:47:32 [002] GET https://api.github.com:443/repos/anero/dependabot-issue-repro
  proxy | 2022/07/27 17:47:32 [002] * authenticating github api request
  proxy | 2022/07/27 17:47:33 [002] 200 https://api.github.com:443/repos/anero/dependabot-issue-repro
  proxy | 2022/07/27 17:47:33 [004] GET https://api.github.com:443/repos/anero/dependabot-issue-repro/git/refs/heads/master
  proxy | 2022/07/27 17:47:33 [004] * authenticating github api request
  proxy | 2022/07/27 17:47:33 [004] 200 https://api.github.com:443/repos/anero/dependabot-issue-repro/git/refs/heads/master
  proxy | 2022/07/27 17:47:33 [006] GET https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/?ref=c8679845638c621361e4d94b0e980dffa614c7f7
  proxy | 2022/07/27 17:47:33 [006] * authenticating github api request
  proxy | 2022/07/27 17:47:33 [006] 200 https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/?ref=c8679845638c621361e4d94b0e980dffa614c7f7
  proxy | 2022/07/27 17:47:33 [008] GET https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/Gemfile?ref=c8679845638c621361e4d94b0e980dffa614c7f7
  proxy | 2022/07/27 17:47:33 [008] * authenticating github api request
  proxy | 2022/07/27 17:47:33 [008] 200 https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/Gemfile?ref=c8679845638c621361e4d94b0e980dffa614c7f7
  proxy | 2022/07/27 17:47:33 [010] GET https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/Gemfile.lock?ref=c8679845638c621361e4d94b0e980dffa614c7f7
  proxy | 2022/07/27 17:47:33 [010] * authenticating github api request
  proxy | 2022/07/27 17:47:33 [010] 200 https://api.github.com:443/repos/anero/dependabot-issue-repro/contents/Gemfile.lock?ref=c8679845638c621361e4d94b0e980dffa614c7f7
updater | INFO <job_429086095> Finished job processing
updater | time="2022-07-27T17:47:33Z" level=info msg="task complete" container_id=job-429086095-file-fetcher exit_code=0 job_id=429086095 step=fetcher
updater | I, [2022-07-27T17:47:34.447233 #6]  INFO -- sentry: ** [Raven] Raven 3.1.2 ready to catch errors
updater | INFO <job_429086095> Starting job processing
updater | INFO <job_429086095> Starting update job for anero/dependabot-issue-repro
updater | INFO <job_429086095> Checking if pdf-inspector 1.3.0 needs updating
  proxy | 2022/07/27 17:47:37 [016] GET https://rubygems.org:443/api/v1/versions/pdf-inspector.json
  proxy | 2022/07/27 17:47:37 [016] 200 https://rubygems.org:443/api/v1/versions/pdf-inspector.json
updater | INFO <job_429086095> Latest version is 1.3.0
updater | INFO <job_429086095> No update needed for pdf-inspector 1.3.0
updater | INFO <job_429086095> Checking if dalli-elasticache 1.0.1 needs updating
  proxy | 2022/07/27 17:47:37 [018] GET https://rubygems.org:443/api/v1/versions/dalli-elasticache.json
  proxy | 2022/07/27 17:47:38 [018] 200 https://rubygems.org:443/api/v1/versions/dalli-elasticache.json
updater | INFO <job_429086095> Latest version is 1.0.1
updater | INFO <job_429086095> No update needed for dalli-elasticache 1.0.1
updater | INFO <job_429086095> Finished job processing
updater | time="2022-07-27T17:47:38Z" level=info msg="task complete" container_id=job-429086095-updater exit_code=0 job_id=429086095 step=updater

I also tesed this with the dependabot-core's dry-run.rb script and got this output:
[dependabot-core-dev] ~/dependabot-core $ bin/dry-run.rb bundler anero/dependabot-issue-repro
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
=> fetching dependency files
=> dumping fetched dependency files: ./dry-run/anero/dependabot-issue-repro/
=> parsing dependency files
=> updating 2 dependencies: pdf-inspector, dalli-elasticache

=== pdf-inspector (1.3.0)
 => checking for updates 1/2
🌍 https//rubygems.org:443/api/v1/versions/pdf-inspector.json
 => latest available version is 1.3.0
 => latest allowed version is 1.3.0
    (no update needed as it's already up-to-date)

=== dalli-elasticache (1.0.1)
 => checking for updates 2/2
🌍 https//rubygems.org:443/api/v1/versions/dalli-elasticache.json
 => latest available version is 1.0.1
 => latest allowed version is 1.0.1
    (no update needed as it's already up-to-date)
🌍 Total requests made: '2'
🎈 Package manager version log: {:ecosystem=>"bundler", :package_managers=>{"bundler"=>"2"}}

The indirect dependencies are correctly listed in the Depencencies tab:

🕹 Bonus points: Smallest manifest that reproduces the issue
I created this reproduction case: https://github.com/anero/dependabot-issue-repro.

Hi!
As per https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow, I think you need to explicitly configure dependabot to update indirect dependencies (dependencies of your Gemfile dependencies) if that's what you want. Dependabot only updates Gemfile dependencies (direct dependencies) by default, except for security issues.

Thanks @deivid-rodriguez, I missed that detail in the documentation. It would be good if the default behavior was explicitly described somewhere else.
Closing this issue.

Any suggestions on where else this should be documented?

Oh! I noticed that Dependabot didn't update indirect dependencies in my Cargo.lock but it never crossed my mind that an option for that could be off-by-default.
@deivid-rodriguez Would it be possible to document that here? A short paragraph like there is about open-pull-requests-limit would help a lot.
(Personally, I'd change the default from direct to all, but changing defaults is rarely easy.)

Yes, it makes sense to me to document this where you mention! Care to open a PR? There's a "Make a contribution" button at the bottom of the page! :)

Ah, nice, PRs are an option. Will have a look tomorrow.


Modifiers not working

I was going through the tutorial and there's an issue with anything that involves using the modifiers, i.e. strain, defects, magnetic field. The process simply doesn't terminate.
For instance, from section 7.5 Defects and Strain, we have the following example:
"""Strain a triangular system by pulling on its vertices"""
import pybinding as pb
import numpy as np
import matplotlib.pyplot as plt
from pybinding.repository import graphene
from math import pi
pb.pltutils.use_style()
def triaxial_strain(c):
"""Strain-induced displacement and hopping energy modification"""
@pb.site_position_modifier
def displacement(x, y, z):
ux = 2c * xy
uy = c * (x2 - y2)
return x + ux, y + uy, z
@pb.hopping_energy_modifier
def strained_hopping(energy, x1, y1, z1, x2, y2, z2):
    l = np.sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)
    w = l / graphene.a_cc - 1
    return energy * np.exp(-3.37 * w)

return displacement, strained_hopping

model = pb.Model(
graphene.monolayer(),
pb.regular_polygon(num_sides=3, radius=2, angle=pi),
triaxial_strain(c=0.1)
)
model.plot()
plt.show()
This will not terminate. If I comment out model.plot(), it will terminate. However, if I then type in model.system.x, or model.hamiltonian that doesn't terminate either. This suggests that model is not being set up correctly when there is a modifier in the argument. Any ideas what might be going on?
I have numpy 1.15.4, scipy 1.2.0, python 3.7, and I'm using Spyder 3.3.3

Can confirm. This is the first time I am setting up modifier and had the same problem.

I can confirm too!

Version 0.9.5 that was just released should fix this issue (compatibility with Python 3.7 and 3.8).


Less dense mode

This adds less dense mode, which can be enabled by deselecting "Dense mode" in Display settings. Less dense mode has larger fonts and bigger spacing, and affects the left and right sidebars, the center messages column, and the compose box.
Less dense mode:

Dense (normal) mode:

Less dense mode currently has no effect on other parts of the app like dropdown menus and the settings windows.
This also includes a commit changing the hover state for items in the topic and private message lists
from an underline to a background highlight, which eliminates the dead spots (areas where there was no visible hover state even though the list item actually was being hovered over). It also makes the hover state of unselected items consistent with that of selected items, which were already using a background highlight.
Before (cursor is hovering over dropbox)

After (cursor is hovering over Verona1)

This looks great :)

This also includes a commit changing the hover state for items in the topic and private message lists
from an underline to a background highlight, which eliminates the dead spots (areas where there was no visible hover state even though the list item actually was being hovered over). It also makes the hover state of unselected items consistent with that of selected items, which were already using a background highlight.

I would love to see this in a normal mode also.

@akashnimare should have clarified - that change isn't limited to less dense mode, it affects dense mode too!

should have clarified - that change isn't limited to less dense mode, it affects dense mode too!

That's awesome.
Since this less dense mode thing is pretty early we should make the naming clear. I feel like the less dense mode and dense mode is a bit confusing. Other apps use following terminology -

Default mode (less dense) VS compact mode (dense)
Clean VS compact mode

I think the confusion arises since our default mode is densed. @rishig do you feel the same or it's only me 🤔

One alternative could be dense mode and comfortable mode. (Comfortable is what Gmail uses for their default spacing.)

Yeah, that sounds good. Also, are we planning to change the default mode to less dense mode (i.e by default it will be less dense?) or it  will be same as the current one (i.e. default mode = dense mode)?

Let's move the naming discussion to czo, since it's sort of an orthogonal question.

I assume the open status means this was never merged/implemented?

Correct, work is ongoing towards supporting this as part of our current redesign, but not via this PR. Closing.


Allowed properties overloading for CoreNLPParser tag, Authors.md

This is a fix to #2112
Added the overloading properties in code as per the standards
before fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111\xa01111\xa01111', 'O')]
after fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111', 'DATE'), ('1111', 'DATE'), ('1111', 'DATE')]

For those interested in the reasoning behind the changes in this PR, feel free to have a look at #2112 itself, where all the changes are already described and laid out.

before fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111\xa01111\xa01111', 'O')]
after fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111', 'DATE'), ('1111', 'DATE'), ('1111', 'DATE')]
would it be possible to make a test out of this example?

before fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111\xa01111\xa01111', 'O')]
after fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111', 'DATE'), ('1111', 'DATE'), ('1111', 'DATE')]

would it be possible to make a test out of this example?

Sure , bit busy, will add over weekend

before fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111\xa01111\xa01111', 'O')]
after fix : [('my', 'O'), ('phone', 'O'), ('number', 'O'), ('is', 'O'), ('1111', 'DATE'), ('1111', 'DATE'), ('1111', 'DATE')]

would it be possible to make a test out of this example?

@tomaarsen @dimazest
any idea how to create 'api_return_value' dictionary for a sample?? like in:
https://github.com/nltk/nltk/blob/develop/nltk/test/unit/test_corenlp.py#L261

you should be able to manually use CoreNLP Rest API and intercept returned result

Keep in mind that the CoreNLP tests are being skipped, because our GitHub Actions CI doesn't currently support downloading third party tools such as the Stanford models. Preferably we would still have tests for this PR though, as we likely want to support third party tools eventually.

The actual call to corenlp should be mock, then tests won't need corenlp running.


Bump minimum version

Supersede loicteixeira/gj-unity-api#83
So far, the minimum version to use the API is Unity 5.0.1 (as of v2.1.0) which means the package has to be generated with Unity 5.0.1.
It's probably not necessary to support that far back and could probably be bumped to something more recent. Unity 2017 maybe?

Bumping the minimum version is a good idea, but I'm not sure if we should jump directly to Unity 2017.
Unity 2017 is awesome, but I think there are still many users in the Unity 5 cycle.
I don't have fresh numbers of the usage distribution, but in June it kinda looked like this:
Unity 5.6 and 2017: 65% (unfortunately I don't have separate numbers for them)
Unity 5.5: 18%
Unity 5.4: 8%
Unity 5.3: 5%
Unity 5.2: 1%
<Unity 5.2: ~3%
So we could savely ignore all versions below 5.3 and still cover 95%.
We could even go up to 5.5 (covering 83%), but I think we should not bump the minimum version above that (at least for now)

I can't really believe it, but as it seems the version usage has shifted drastically:
2017.3: ~47%
2017.2: ~9%
2017.1: ~7%
5.6: 20%
5.5: ~5%
5.4: ~3%
5.3: ~4%
others: ~5%

2018.x: ~29%
2017.x: ~48%
5.6: ~14%
5.5: ~3%
5.4: ~2%
5.3: ~2%
others: ~2%

Minimum Version is now 5.5.
Sorry to those 6% that are using an older version 😕


Drag&Drop scenario broken because InvalidCastException

Describe the bug
This is a frequent and basic drag & drop scenario. In a WinUI 3 Desktop app, when dragging an element that contains DataPackage, there is a InvalidCastException because it was no possible to cast DataPackage to DataPackageView. This was working in UWP with .NET Native before.
Here is the exception:
System.InvalidCastException: Unable to cast object of type 'Windows.ApplicationModel.DataTransfer.DataPackage' to type 'Windows.ApplicationModel.DataTransfer.DataPackageView'.
at WinRT.ComWrappersSupport.CreateRcwForComObject[T](IntPtr ptr)
at WinRT.MarshalInspectable`1.FromAbi(IntPtr ptr)
at Windows.ApplicationModel.DataTransfer.DataPackageView.FromAbi(IntPtr thisPtr)
at ABI.Microsoft.UI.Xaml.IDragEventArgs.global::Microsoft.UI.Xaml.IDragEventArgs.get_DataView()
at Microsoft.UI.Xaml.DragEventArgs.get_DataView()

To Reproduce

Clone this repository.

Run the app and you will see something like this:

Try to drag the First Label element or the Another Label element into the TreeView.

You will observe the Exception in the Output window. Feel free to place some breakpoints when capturing the exception.

Expected behavior
Work nicely and beautiful showing up even the pictures (a rendered text of First Label or Another Label)
Version Info
<PackageReference Include="Microsoft.ProjectReunion" Version="0.5.5" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" Version="0.5.5" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.5.5" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.2.2" />

Can we get an update on how things are going with this bug?

We were expecting this to have been fixed based on the milestone. Drag and drop still cannot be implemented properly in our WinUI app. And as said in the first post:

This is a frequent and basic drag & drop scenario.

So when can we expect this to be fixed? Is someone working on it, or is it going to keep getting moved to later milestones?

@Marv51 @rick-palmsens We are working on root causing this bug currently and trying out some potential fixes. You can expect a fix in upcoming milestone.


Issue #1104 Adding communication channel information to the README

Signed-off-by: Lalatendu Mohanty<EMAIL_ADDRESS>

@marun Addressed your comments.

Thank you!
/approve
/lgtm