Wiring in Generalized Identifiers

In the Lexical grammar, under heading Identifiers, there's a definition for generalized-identifier. However, this rule name does not seem to be directly or indirectly referenced by that grammar's root rule (lexical-unit). That is, there is no path from rule lexical-unit to generalized-identifier.
I think generalized-identifier needs to be wired in under the identifier non-terminal. However, since generalized-identifier can only be used in certain contexts, my suspicion is that it can’t simply be added as an alternative option under identifier, but instead needs some qualifier rule added to it.
The first commit in this PR adds generalized-identifier as an option under identifier—but does not include the needed? qualifier rule. I haven't figured out exactly what that rule should be. Can someone help?
Thanks!

/CC: @ehrenMSFT

In the Lexical grammar, under heading Identifiers, there's a definition for generalized-identifier. However, this rule name does not seem to be directly or indirectly referenced by that grammar's root rule (lexical-unit). That is, there is no path from rule lexical-unit to generalized-identifier.
I think generalized-identifier needs to be wired in under the identifier non-terminal. However, since generalized-identifier can only be used in certain contexts, my suspicion is that it can’t simply be added as an alternative option under identifier, but instead needs some qualifier rule added to it.
The first commit in this PR adds generalized-identifier as an option under identifier—but does not include the needed? qualifier rule. I haven't figured out exactly what that rule should be. Can someone help?
Thanks!

Generalized identifiers are used in the context of record fields, either when declaring them or referencing them. See https://learn.microsoft.com/en-us/powerquery-m/m-spec-lexical-structure#generalized-identifiers, as well as the references to generalized-identifier in the page you changed.
I don't think the change you're proposing is correct.

Thanks, @ehrenMSFT.
Doesn't the entire lexical structure of a valid M file need to be matchable/reachable from the root lexical rule? :-) That is, shouldn't a lexer be able to start with the root rule and work down through/follow its alternatives until the entire file's contents have been lexed?
The catch with generalized-identifier is that it is defined as part of the lexical grammar, but is not reachable from its root rule (lexical-unit)—so if a lexer follows the lexical grammar as written, it will never match any generalized-identifiers. If it never matches that rule, it will never generate any generalized identifier tokens.
The fact that the syntactical grammar allows generalized identifiers to be used in certain record field contexts then becomes a moot point, as those parser rules will never match because no generalized identifier tokens will ever be handed to the parser from the lexer.
This makes me think that (like all the other lexical rules defined by the spec) lexical rule generalized-identifier should somehow be reachable from lexical-unit.
But maybe I am missing something here?? :-)

Thanks, @ehrenMSFT.
Doesn't the entire lexical structure of a valid M file need to be matchable/reachable from the root lexical rule? :-) That is, shouldn't a lexer be able to start with the root rule and work down through/follow its alternatives until the entire file's contents have been lexed?
The catch with generalized-identifier is that it is defined as part of the lexical grammar, but is not reachable from its root rule (lexical-unit)—so if a lexer follows the lexical grammar as written, it will never match any generalized-identifiers. If it never matches that rule, it will never generate any generalized identifier tokens.
The fact that the syntactical grammar allows generalized identifiers to be used in certain record field contexts then becomes a moot point, as those parser rules will never match because no generalized identifier tokens will ever be handed to the parser from the lexer.
This makes me think that (like all the other lexical rules defined by the spec) lexical rule generalized-identifier should somehow be reachable from lexical-unit.
But maybe I am missing something here?? :-)
Or maybe generalized-identifier really isn't a lexical rule, so should be refactored to live in the syntactic grammar?

Unfortunately the people on the team with the domain knowledge to review this are all tied up with other things right now. The published grammar just isn't a high priority at the moment.

Thanks, @ehrenMSFT. Do you think there is a chance a review sometime in the next couple months might happen? :-)

Thanks, @ehrenMSFT. Do you think there is a chance a review sometime in the next couple months might happen? :-)

I can't say for certain, but based on internal discussion it sounds like someone may be able to do that.

Thanks, @ehrenMSFT. I understand that is not a promise, but it is still helpful.
Maybe this issue should be left open as a placeholder?

Yes, please leave this PR open for now.

@bgribaudo I believe it is accurate to say that generalized-identifier is not actually part of lexical analysis in practice, despite its documentation being under that section. It is currently referenced by the syntactic grammar, for example by records.

@bgribaudo It looks to me that the only change needed is that generalized-identifier should not be part of the definition for identifier. Otherwise, generalized-identifier shows up as part of field-name in every instance, which seems accurate to how it actually works.

Thanks, @egorelik93.
If I'm following, you're suggesting to remove generalized-identifier from the identifiers section of the lexical grammar, right? If this were done, how would field-name in the semantic grammar ever match generalized-identifier as no generalized-identifier tokens would ever be handed to it from the lexer.
I think generalized-identifier can't be removed altogether but must either be defined somewhere in the lexical or syntactic grammars.
Hmm...should generalized-identifier's definition be moved from the lexical grammar to the syntactic grammar and there be defined as something sort of like "(any tokens)* where the spanned text complies with the generalized identifier format rules"?

@DougKlopfenstein @ehrenMSFT

IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@bgribaudo Yes it's weird. As far as I can tell, generalized-identifier only uses tokens to identify a range of text and then it just grabs all the text in that range completely ignoring any tokenization. I don't think this can be described in a traditional grammar.

I don't think this can be described in a traditional grammar.

@egorelik93, what do you think of something like how the PR looks now? It's not traditional, but maybe something like it would work?
(Note: PR is in draft form.)

@bgribaudo I'm not a fan of this. I think both the explanation and the placement with the other identifiers obscures the fact that this 'lexical rule' really only activates when the syntax rules for field names says it does. Anything else that matches this lexical rule isn't just going to get classified as a generalized identifier.
I think what makes most sense to me at least, would be to either stick the explanation of generalized-identifier into the record expression section next to field name, or just make it its own section in the lexical part disjoint from everything else. The 'range of text' explanation is almost accurate, but also needs Comma as one of the excluded characters.

@egorelik93, thanks for the feedback. Is something like the latest more along the lines of what you're thinking?

@bgribaudo That's the right location but it lost the correct information when you took out 'generalized-identifier'. 'generalized-identifier' is the intended syntactic rule under field name (I don't remember if we finished verifying generalized-identifier-syntax, but let's ignore that for a moment). The stuff about a range of text is sort of like a retokenization that fires when we apply the generalized-identifier syntactic rule, but it still feeds into the latter.

Thanks, @egorelik93! Is now closer to what you're thinking?

Hi @egorelik93! Hope you are doing well! Did you have a chance to look at this? :-)

@bgribaudo No, this doesn't really address my concern that you're describing the lexical rule for generalized identifier as if it were the syntactic rule. I understand the lexical rule needs to go somewhere, but it is not correct to equate the two.

Thanks for the feedback, @egorelik93! Can you give me an example of what you think the lexical rule should be?

@bgribaudo I thought what you were writing out now is the lexical rule? The syntactic rule is what I remember we were discussing earlier when we were trying to figure out a correct regex. That (once corrected) is the actual syntactic rule, which runs on top of the lexical rule that more or less matches what you currently have written there (possibly with corrections). The weird bit is that said lexical rule is not part of the actual tokenization phase at all, but basically gets run at syntax time when at a generalized-identifier node but right before the corresponding syntactic rule. Or, let me put this a different way - if the syntax phase reaches the generalized-identifier rule, it will throw away the existing tokenization and run a new lexical rule to identify a range of text, and then feed that range to the syntactic rule.

@bgribaudo On further reflection, I think the least confusing thing to do is to not refer to this range identification as a lexical rule at all. Let's just say we have a weird syntactic rule that, rather than just being fed tokens, uses those tokens to identify a range of text and then applies the syntactic rule to that range of text rather than the token stream.

@egorelik93, thanks! So kind of, sort of, what is in the PR now?

@bgribaudo, @egorelik93 - has this pull request reached a conclusion?

No. :-) Waiting on feedback from @egorelik93.

No, it's the other way around.
This is the tokenization rule:
      The range of text spanned by a sequence of one or more tokens, other than =, , or ],
whereas what you described as the generalized identifier grammar is the true syntactic rule (though I forget if we verified that the regex was correct already).


FYI

https://github.com/yarnpkg/yarn/issues/3459
https://yarnpkg.com/blog/2017/05/12/introducing-yarn/

@jhabdas i got you dawg. https://github.com/jaredpalmer/razzle/pull/267


What is a bottle Id???

Hi Jon! Thanks so much for your efforts in building a baby brezza integration. I am trying to get this working but it's unfortunately very unclear to me what the appropriate values are for "bottle Id". The readme says the bottle Ids are found in the sensor attributes, but when I output the attributes in HA I don't see any references to bottle Id.
I also spent some time looking over the sensor code in the repo and the underlying Fpa() implementation and I still can't find anything that even hints at a list of proper values.
I saw a video on Reddit of a guy using this interface/HA to get voice controls via Alexa. In the video he asks Alexa to "make a 2oz bottle" and then it dispenses. Is this integration really capable of changing attribute values? If so, please help me understand how to get it working! Or just where to find a list of valid bottle Ids would be great too.
Thanks again!

In the baby brezza app you can add custom bottle definitions with size, temperature, etc. These get a unique id on their cloud service. Once you define some they'll show up as attributes in home assistant and you can use the id in the start bottle service.

Thank you so much! I didn't even think to check in the brezza app for additional setup because all I wanted was a cool HA automation 🤣
Thanks Jon you rock.


C# Language Mode is no longer an option

Hello,
When I open a .cs file I don't see any syntax highlight for C# anymore.
The Language Mode is set by VSCode to "Plain Text".
When I try to change it, the csharp language mode (and also C and C++) is no longer an option, it just disappeared (I think it happened after I installed and the uninstalled some extensions). Even uninstalling of VSCode from Windows and installing again did not help because Windows stores parts of VSCode configuration somewhere.
I've checked older issues and it already happened here:
https://stackoverflow.com/questions/49755241/php-language-mode-is-no-longer-an-option
https://github.com/Microsoft/vscode/issues/47110
but apparently an update of VSCode solved the issue.
(Sidenote: after uninstalling VSCode again and installing the Insiders version (1.52.0-insider) the issue was gone. But that does not solve the original issue, of course.)
Visual Studio Code version 1.51.0
Windows_NT x64 10.0.19041
Enabled extensions:
csharp | ms- | 1.23.5
(the issue remains also without any extensions)
Thanks,
Jan

@Amarok24 Can you open the extensions viewlet and search for @builtin @disabled ?
I suspect the C# and c++ extensions are disabled.

@Amarok24 Can you open the extensions viewlet and search for @builtin @disabled ?
I suspect the C# and c++ extensions are disabled.

A search for @builtin @disabled didn't show any extensions, but I've then searched just for @builtin and indeed - C/C++ Language Basics and C# Language Basics were in grey color and disabled, so I enabled it and it works now!
I really don't know how that could happen because it used to be enabled.
Thanks for help, much appreciated. I'm closing the issue now.


All the injection of values into the task fields

Can inject parameterised values into any field from the parent WI
In this PR only two parameters are implemented

@WIT the parent work item type
@ID the ID of the parent item

These are using in the form
Set Title  to
Do development for @WIT @ID

If you accept this PR, not sure what you wanted to do over documentation


fix(npm2yarn): use forked npm-to-yarn; fix a few conversion bugs

Motivation
I decided to fork npm-to-yarn package and add support for missing commands,

yarn create name -> npm init name and yarn init name -> npm create name
npm run x -- --args -> yarn x --args or yarn run x --args
npm ls abc bcd -> yarn list --pattern "abc|bcd"
npm test/start/stop  -> yarn test/start/stop

see:

https://typescript-eslint.io/docs/linting/troubleshooting#how-do-i-check-to-see-what-versions-are-installed
https://www.electronjs.org/docs/latest/tutorial/quick-start#create-your-application

fixes #5861
Note
There is pr for original package at https://github.com/nebrelbug/npm-to-yarn/pull/22
i did more small fixes at https://github.com/armano2/npm-to-yarn/commits/main, mainly https://github.com/armano2/npm-to-yarn/commit/2b9198390fec46dcb56c9c8f92ac5f81358d5437
Test plans
https://deploy-preview-6005--docusaurus-2.netlify.app/docs/next/i18n/tutorial
https://deploy-preview-6005--docusaurus-2.netlify.app/docs/i18n/crowdin
https://deploy-preview-6005--docusaurus-2.netlify.app/docs/i18n/git/#initialize-the-i18n-folder

any updates on this?

@armano2 Could you rebase first? We are in a pretty awkward situation right now because the @docusaurus organization is there but neither @slorber nor I have member access to it. Maybe we need to wait a bit more. No idea what FB politics is going on, but accepting forked code into our repo

I don't forget, but waiting for @zpao to give me member access.
Will figure out if we should take temporary actions immediately (ie use a fork) until the org is set up properly

Is this something that we could just rewrite internally rather than forking externally?
If @armano2 has ideas for how the package can be rewritten entirely - it would save having to go through any hoops at all and could just be integrated into the plugin directly.

I don't know what's all the business around it, but I think we basically can't do anything meaningful about it😅

We can't copy the code to our own repo (although we used to do that a lot)
We can fork the package under @slorber's account but he'd rather not at this stage

@bradzacher If TS-ESLint is open to fork the npm2yarn remark plugin, I can help facilitate that.

@armano2 Could you rebase first?

rebased

Thanks @armano2 Sorry for stalling this PR longer than it should have😞 Not in my will

suppressed by #8650


add configuration to not fail if dockerFile absent

our project is gradually rolling docker container build and release.
We do it one project at a time. I tried to add plugin declaration (actual plugin, not plugin management) to all projects and expected docker build to only trigger for the projects actually having a dockerFile.
But the plugin fails when docker file is absent.
It would be nice if we could configure something like dockerFailIfDockerFileAbsent=false (default value would be true).

@paskos Do you have a way to repro and a stacktrace?

Hi @paskos , I think the property <skipDockerBuild>true</skipDockerBuild> would achieve the same result for you.
This is something we've done internally for multi-module Maven projects where the docker-maven-plugin configuration is applied globally (from <pluginManagement> or a parent POM) where only one or some of the modules should have a Docker image built.

It's not an issue anymore because we switch from dockerFile to docker properties in the plugin.


Huge overhaul

Basically I updated, changed, or improved everything. Not enough for it to change the goal of the project or push it in a new direction or anything, just take the functionality it had and make it way better.
First, I updated all the libraries to the latest version. That alone fixed many problems with various web browsers and improved performance.
Second, I optimized all the libraries by using the minified versions, then removing any unnecessary fluff. This improved performance as well.
Thirdly, I updated the HTML to be fully HTML5 compliant, and also made some optimizations to the HTML. This improved performance and compatibility with older browsers.
Fourthly (are these even real words?), I made some cosmetic and visual improvements to the readme, and the HTML as well.
Fifthly (they aren't), I updated the wording of some things for clarification and also fixed some grammatical errors.
Lastly, I localized the JavaScript and gave it its own folder. This might seem like an issue, but it will better in the long term due to the fact that it will make upgrading libraries easier, as well as making it impossible for the site to be down if one of the libraries' websites goes down or is under maintenance. This will insure the project can have an uninterrupted BIOS verification system for users and developers.
I hope you like all the changes. I use this tool pretty frequently, actually. About time we had something like it!
I plan on adding all the rest of the Sega Dreamcast BIOS hashes and files to the code soon as well.
Here are the other hashes in case you are interested:

Any questions or comments are welcome.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Is this still relevant?

@baka0815 Not really, I don't think, at this point, I think it would all need to be updated again and reformatted.


Add compact version of icons

[x] Design

[ ] React

[ ] Documentation

In todays backlog meeting we decided to a compact version of a subset of the most relevant icons at first. We will inform our users about which icons we prioritize, and welcome input for other icons that also should be offered in a compact version.
We will create a list of prioritized icons.

Main icon for first release:

[ ] placeholder icon
[ ] chevron
[ ] arrows
[ ] subdirectory
[ ] fullscreen
[ ] alert
[ ] accessibility
[ ] check circle outline
[ ] close
[ ] calendar
[ ] search
[ ] checkbox
[ ] clock
[ ] error filled
[ ] warning filled
[ ] thumbs up
[ ] placeholder icon

I have made a small icon version of the first subset as a variant of the component. The property is called  "Density" with values Default (24px) and Small (18px).
Pls review @lucasveil @benteljones @vnys

Looking good to me @BirteThornquist
I have updated description for all the icons.

I updated the lines to 2 px where this can be done. Design is now done and ready for review @benteljones @lucasveil

LGTM! 😊 @BirteThornquist

I updated the lines to 2 px where this can be done. Design is now done and ready for review @benteljones @lucasveil

I guess this means we need to export the icons again?

Looking very good @BirteThornquist :)

Depending on #1976

Documentation is ready to review here @BeckyBrekke
Just added  "When using compact mode the size of icons are 18px"

Reviewed and added to the latest release so it is visible to users now.


Added in first pass at variables

Consolidated variables from Figma to make naming consistent and start to establish our design system for future features.
What is the purpose of this pull request?

[X] New feature
[ ] Documentation update
[ ] Bug fix
[ ] Refactor
[ ] Other

Look ok to me. Be sure to test these out or lmk to test a few before marking this ready. I'll do a final pass once you're ready

This is to address this issue https://github.com/onlook-dev/studio/issues/68

I updated the variables a little. You can see how they're used from the latest changes @drfarrell
One nitpicky thing (nit): Tailwind variables generally go from lightest 100 to darkest 1000. What do you think about following this pattern with our design? We're currently doing the opposite.
I would also encourage running the electron app locally when you add variables to make sure it looks alright.

I updated the variables a little. You can see how they're used from the latest changes @drfarrell
One nitpicky thing (nit): Tailwind variables generally go from lightest 100 to darkest 1000. What do you think about following this pattern with our design? We're currently doing the opposite.
I would also encourage running the electron app locally when you add variables to make sure it looks alright.

Sure I'm open to this. The original color flow put 700 as one of the brightest options to match Vercel's approach to high-contrast backgrounds, but I think it'd be too complex to expect people to understand that, so I'll adjust the color spread to be more logical.


[BUG] Property resolution leads to SEGV when POM has no own props

Is there an existing issue for this?

[X] I have searched the existing issues

Konveyor version
How can I get it? I am using Analyzer-LSP directly!
Priority
Blocker
Current Behavior
When analysing a Java POM with a dependency as a property, analyzer tries to resolve the property in the same POM. If the POM contains no properties at all, this leads to a segmentation violation (in line 141 of provider/internal/java/dependeny.go):
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5b3ddc]

Expected Behavior
Try to resolve property via parent POM (hierarchy) or leave unresolved otherwise (which is the default, if the property cannot be found in an existing POM property list).
How Reproducible
Always (Default)
Steps To Reproduce
Prepare a project with POM like this.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>some-project</groupId>
    <artifactId>some-artifact</artifactId>
    <version>does-not-matter</version>

    <dependencies>
        <dependency>
            <groupId>some-dep-group</groupId>
            <artifactId>some-dep-artifact</artifactId>
            <version>${cannot-be-resolved}</version>
        </dependency>
    </dependencies>
</project>

And analyze it.
Environment
Have to provide a minimal example ...

Anything else?
No response

@ascheman thank you for filling this bug! Do you want to give it a shot and fix it? Otherwise I'll pick it up.

Thanks for picking this up, @jmle - I have a workaround in progress (at least to avoid the SEGV) and can contribute it soon.
In general I would be happy to provide a test case to avoid regressions for this in the future, and of course a full solution. But I need some more time to set this up. Therefore I would appreciate some help.

Cool @ascheman, feel free to ask any questions in the #konveyor-dev slack channel

Would be happy to proceed there: https://kubernetes.slack.com/archives/C04QZJFQ0UA/p1698750038252959

It is hard to reproduce this error now - it only occurs during fallback resolution of POM dependencies which is no longer the case when mvn dependency:tree works as expected (cf. #393). I was trying to provide an integration test by making the examples/java project a Multi-Module project with a submodule without properties. However, the respective code is not used during a dependency analysis any longer.
Will try to provide a unit test for this.


[Bug Report] Hide submenu panel when cascader element has no children

Element UI version
2.2.1
OS/Browsers version
Chrome Version 63.0.3239.108 (Official Build) (64-bit)
Vue version
2.5.13
Reproduction Link
https://jsfiddle.net/Alexee/jym5u08f/1/
Steps to reproduce
Data: delete children property or make it an empty array
Interaction:
1.hover on normal menu item,
2.showing submenu panel
3. then hover on the menu item which has no children or children length equals 0
4. submenu panel still exist
What is Expected?
when hover on the menu item which has no children, hide submenu panel
What is actually happening?
showing empty panel

Currently the dynamic loading functionality replies on the item to be loaded having a children length of 0. So we may have to keep it as is for now. You can take care of those empty children list on your end, e.g. removing the children prop from the item. Items having no children actually works fine: https://jsfiddle.net/jym5u08f/2/.
To fully resolve this, we may introduce another prop indicating if the item is a leaf node. This will require the users to add such prop to the items if they're using dynamic loading, making it a breaking change. So we'll not do it before a major version.

When hover on normal menu item, submenu panel shows, after that, when hover on empty menu, I expect the submenu panel to hide. @Leopoldthecoder
Just personal opinion, I am not sure how other people feel.

Perhaps we could add a attribute called 'hide-empty-children' that would not result in significant changes. Convenient for developers without manually removing empty child nodes.


Update form's model if the input is pristine and its value changes; test

This fixes a case where a form initializes with default values loaded
from the server.  If an update comes in from the server and the user has
not touched the field (its pristine) then update the field's value.
This feature will help track if the user has actually made any changes
from the default value that the form was/would have been initialized
with.

And again, thanks! I will pull it in, just verify a couple of things before release, but looks good! :-)


move CHANGES.txt to release notes

Codecov Report

Merging #5105 into master will decrease coverage by 0.13%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #5105      +/-   ##
============================================
- Coverage     82.51%   82.38%   -0.14%
+ Complexity    11004    10991      -13
============================================
  Files          1330     1330
  Lines         45008    45008
  Branches       5654     5654
============================================
- Hits          37139    37079      -60
- Misses         5234     5286      +52
- Partials       2635     2643       +8

Impacted Files
Coverage Δ
Complexity Δ

...rc/main/java/io/crate/analyze/UnboundAnalyzer.java
75% <0%> (-20%)
2% <0%> (ø)

.../main/java/io/crate/metadata/doc/DocTableInfo.java
65.89% <0%> (-16.77%)
52% <0%> (-3%)

...in/java/io/crate/data/CollectingBatchConsumer.java
69.23% <0%> (-15.39%)
4% <0%> (-1%)

...a/io/crate/operation/join/NestedLoopOperation.java
82.85% <0%> (-11.43%)
14% <0%> (-1%)

...src/main/java/io/crate/jobs/UpsertByIdContext.java
77.5% <0%> (-7.5%)
8% <0%> (ø)

...peration/collect/BatchIteratorCollectorBridge.java
65.62% <0%> (-6.25%)
2% <0%> (ø)

.../java/io/crate/blob/TransportDeleteBlobAction.java
75% <0%> (-5%)
5% <0%> (-1%)

...src/main/java/io/crate/jobs/NestedLoopContext.java
57.14% <0%> (-4.77%)
6% <0%> (-1%)

...in/java/io/crate/breaker/RamAccountingContext.java
80% <0%> (-3.34%)
19% <0%> (-2%)

...ration/collect/collectors/LuceneBatchIterator.java
86.81% <0%> (-3.3%)
35% <0%> (-1%)

... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cf8e87...8d92ca5. Read the comment docs.

okay @m-kharbat, this is good to go I think
this branch has been branched from release-notes-restructure
I've tried to organise my changes logically. so you can follow which bits of CHANGES.txt I am moving where and why
if you get this running locally, you should find all release notes going back to the 0.50 release line under the "release note" section in the docs
I agreed with @seut that for now, we'd just link to the old CHANGES.txt for versions earlier than that. and perhaps in the future we will migrate those over too
I discussed the release procedure with @joemoe and @mikethebeer before making these changes. when we talked about it last I mentioned the idea of creating an unreleased.txt file in the docs that would functionally replace how we've been using CHANGES.txt, but it turns out I can't figure out a way to do that without linking to this file in the user facing docs, which we do not want to do
so my solution is to keep CHANGES.txt but truncate it so it's only ever used for the purposes of collecting unreleased changes
in the future, I propose that what we do is: when we make a new release, we create the appropriate new section in the docs (should be self-explanatory how to do that) and move over the corresponding changes from CHANGES.txt
this is similar to how right now, we rename the section title in CHANGES.txt, and create a new one. only now we're moving things between files
once you and others are happy with the changes on this branch, you can squash them and merge them into the story branch (release-notes-restructure). once that is done, you'll need to rebase the nomi/migrate-docs branch against release-notes-restructure story branch, and merge in that pr (as the migration docs depend on the changes on this pr)


File name index

Is there an index or a map that contains the file locations or file names within a built version of chromium? If so where would it be located and how would it be encoded?
I'm not nearly smart enough to sift through chromium's source, but, from what I found in i18n-grit, no such index is contained within the pak file itself. Right now I'm assuming the index is kept within an executable file or some other binary.

With a quick look into chrome/browser/browser_resources.grd#L4, it seems that the ID of each resource is generated on build-time, when headers defining the resource name, like IDR_FIRST_RUN_HTML, to whose generated ID, are also generated.
In sources like chrome/browser/ui/webui/conflicts/conflicts_ui.cc, generated headers are included, and resourced are used by name, compiled to numeric ID.

There has to be some sort of mappings, as within the compiled version of chrome, you're able to access chrome://resources/.
After some looking at grit-i18n there's a "resource_ids" file which references many "grd" files, I haven't looked much at the code, but I'm assuming these "grd" files contain some form of mappings from resource id to resource path, though I am unsure where these files are stored (I'm assuming they are somewhere within the "pak" file or compiled into an executable)
If I find anything else I'll add it to this issue.

As mentioned in docs/webui_in_components.md, web-ui accessible resources are handled specially by classes extending content::WebUIController.
Probably related: tools/grit/grit/format/resource_map.py


Adding ability to view logs and open log directory

#1556 - Adding ability to open logs and view log directory on the help page.
Changes

Made changes to the code to include a new section to giving users the option to open the log file or the directory that contains the log file.
Added some type declarations since eslint and flow checkers were failing on the file that I edited.

Preview

P.S: I have tested this only on macOS Sierra and theoretically should work on other operating systems as well. Let me know if it doesn't!

@amitnndn thanks for the contribution! We'll get this reviewed shortly.
Similar to last time, please see https://lbry.io/faq/tips if you'd like a tip for your contribution :)

Thanks, @tzarebczan! I fixed another very simple bug in the app and included that as a part of this PR. Did not want to go through the trouble of creating another PR for such a simple fix. Let me know if that is alright!


allow jade to render partials

#72

Tests are failing because you made the PR from your fork, it is normal. Next time remember to issue PRs from the opentable remote.

Ok, so I need to resend it from a branch?

It is fine now.


validation error message order

vue & vue-validator version
vue: 1.0.24
vue-validator: 2.1.1
Reproduction Link
https://jsfiddle.net/jv6cos00/1/
What is Expected?
foo is required to be show.
What is actually happening?
bar is required shown. It seems that the error field is ordered by character, while I need it order by index in project.

Thank you for your feedback! 😺
I checked your code.
Why do you use v-validate as duplication fields ?
Sorry, I could not understand your comment.

Fixed
https://jsfiddle.net/jv6cos00/2/

Seems still order by character, not index or configurable？

release v2.1.2
please try it!

Yes, updated. But still shows bar is required.
https://jsfiddle.net/erguotou525/jv6cos00/3/

This is works properly.
$ node
> var arr = ['foo is required', 'bar is required']
undefined
> arr.sort()
[ 'bar is required', 'foo is required' ]

Think about this scene. A login form with username and password input, both are required. The error message shows when users click the submit button. And the error message dom just show one of the first error message, like this:
{{$validation.errors&&$validation.errors[0].message}}

So when users clicked submit button with no username or password typed, the message The password is required. shows. While I think the message The username is required. need to be shown first.
I know there is someway to implement this requirement, but just for the order function, I think this is not good. I don't know if you understand my explanation.

Thanks your explanation!
In current verison,
The top-level validation errors properties ($validation.errors) can not expect validation based on user input order.
If you need to expect it, use the each field errors. e.g.

{{ $validation.username.invalid && $validation.username.errors[0].message}}

{{ $validation.password.invalid && $validation.password.errors[0].message}}

If I just want to show one message, the structure may be
{{ $validation.username.invalid && $validation.username.errors[0].message}}
{{ $validation.username.valid $validation.password.invalid && $validation.password.errors[0].message}}

I seems it's okay as well.


Added: getCountdown, changeCountDownBy blocks

Added two blocks so that users can get the current countdown of their game and also change the countdown by negative or positive seconds. Negative makes it so there is less time left on the countdown, positive makes it so there is more time on the countdown.
Quick Demo:
https://user-images.githubusercontent.com/49178322/194131975-ac438c6c-afd5-4234-a06f-e951f82faf48.mp4
The Blocks (the two new are at the bottom of the screenshot)

Closes https://github.com/microsoft/pxt-arcade/issues/2248
The target: https://arcade.makecode.com/app/bf585e360f8e57bd8312ad0b0ea40b6f706ddba7-421bc06f42#editor

Nice job @srietkerk


Outdated examples

The examples provided in the README and on crates.io are outdated and do not work.
Example
The code snipped
let mut connection = AsyncPgConnection::establish(std::env::var("DATABASE_URL")?).await?;

// use ordinary diesel query dsl to construct your query
let data: Vec<User> = users::table
    .filter(users::id.gt(0))
    .or_filter(users::name.like("%Luke"))
    .select(User::as_select())
    // execute the query via the provided
    // async `diesel_async::RunQueryDsl`
    .load(&mut connection)
    .await?;

Will result in the following error
error[E0277]: the trait bound `User: FromSqlRow<_, Pg>` is not satisfied
   --> src/main.rs:62:15
    |
62  |         .load(&mut connection)
    |          ---- ^^^^^^^^^^^^^^^ the trait `FromSqlRow<_, Pg>` is not implemented for `User`
    |          |
    |          required by a bound introduced by this call

Also the bb8 code snippet
    let config = AsyncDieselConnectionManager::<diesel_async::AsyncPgConnection>::new(std::env::var("DATABASE_URL")?);
    let pool = Pool::builder().build(config).await?;

// checkout a connection from the pool
    let mut conn = pool.get().await?;

// use the connection as ordinary diesel-async connection
    let res = users::table.select(User::as_select()).load::(&mut conn).await?;

Will result in the following error
error: field expressions cannot have generic arguments
  --> src/main.rs:61:54
   |
61 |     let res = users::table.select(User::as_select()).load::(&mut conn).await?;
   |                                                      ^^^^^^^^^^^^^^^^^

And even if we use the turbofish syntax load::<User> the code will still output errors
   --> src/main.rs:61:67
    |
61  |     let res = users::table.select(User::as_select()).load::<User>(&mut conn).await?;
    |                                                      ----         ^^^^^^^^^ the trait `FromSqlRow<_, _>` is not implemented for `User`
    |                                                      |
    |                                                      required by a bound introduced by this call
    |

I've fixed some minor things in the readme in https://github.com/weiznich/diesel_async/commit/9e3d31e5b02108811bd4ff3a538bfa00ce1d8837. I also verified that the code now compiles without errors. None of them should have caused that error, so I'm unsure whatever was going on for you.
I'm closing this issue as cannot reproduce. Feel free to come back with an reproducible example of your problem.

I've fixed some minor things in the readme in 9e3d31e. I also verified that the code now compiles without errors. None of them should have caused that error, so I'm unsure whatever was going on for you.
I'm closing this issue as cannot reproduce. Feel free to come back with an reproducible example of your problem.

Sorry, I wasn't on my computer when I saw your response, it was a problem on my end, the example work fine, sorry

No worries. Thanks for coming back and confirming that the examples work.


permanent setting to listen on specific channel

Hi All,
Where can I set in the code, that the gateway listens on specific chanel instead on channel 0. I managed to set on the WEB GUI but since i have SPIFFS format 1 on every boot i have to change the channel.
Tried to set #define EU863_870 1 to
> #define EU863_870 2
no effect, the gw reports it's still listening on 868.100MHz
Tried to change the first value in freq plan

{ 868100000, 125, 7, 12, 868300000, 125, 7, 12},	// Channel 0, 868.1 MHz/125 primary

no effect neither,
Thanks in advance.

Hi All,
Where can I set in the code, that the gateway listens on specific chanel instead on channel 0. I managed to set on the WEB GUI but since i have SPIFFS format 1 on every boot i have to change the channel.
Tried to set #define EU863_870 1 to
> #define EU863_870 2
no effect, the gw reports it's still listening on 868.100MHz
Tried to change the first value in freq plan

{ 868100000, 125, 7, 12, 868300000, 125, 7, 12},	// Channel 0, 868.1 MHz/125 primary

no effect neither,
Thanks in advance.

Okay partially my fault, forget to change the first value to 868300000, now after compile an upload the gatway starts to listen on chanel 1 by deault.
But is there any other way beyond the GUI to change this?

Unfortunately, channel 0 is considered standard for gateways. If you like to have other frequency for channel 0, you have to change the .h file.
I do not think that changing the channel in the configuration file will help much, and I plan to leave it like this.
Maarten.


chore: increase clone timeout

Current dependencies on/for this PR:

main

PR #111   👈

This comment was auto-generated by Graphite.


PackageImports extension doesn't work....

At present I can not disambiguate between packages for importing certain modules:
-- This doesn't work:   ":ext PackageImports", the kernel hangs
-- This doesn't work:   "{-# LANGUAGE PackageImports #-}", the kernel hangs
import qualified "crypto-api" Crypto.Random                                         as CR

I ended up using the following hack:
 :!rm himports.hs
 :!echo "{-# LANGUAGE PackageImports #-}" >> himports.hs
 :!echo "module MouseBoxImports( module Crypto.Random ) where" >> himports.hs
 :!echo "import  \"crypto-api\" Crypto.Random" >> himports.hs
 :load himports

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27308466-packageimports-extension-doesn-t-work?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github).

I am unable to recreate this. Which version, install method etc. are you using?

I'm using the stack installation method.

There have been some updates relating to how stack is handled. Are you using the latest ihaskell from github master, or the one using stack install ihaskell (which I think installs ihaskell-<IP_ADDRESS>)?
Using the latest IHaskell from github master, here is an example session:

Installed using stack install ihaskell in the repository, and executed as jupyter notebook.

Ok, I installed per your recommendation the last version straight from a repository clone. I can confirm that
 import "base" Prelude

works well,
but
 :ext PackageImports
import  "crypto-api" Crypto.Random

still kills the kernel. Here is what comes in the log:
[I 17:13:42.122 NotebookApp] Saving file at /testyard/RSA.ipynb
ihaskell: Ambiguous interface for ‘Crypto.Random’: it was found in multiple packages: crypto-api-0.13.2 cryptonite-0.7

[I 17:14:53.919 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 4d782d88-1fed-49c1-a847-771e6cff8da5 restarted


Fix: syntax error in 2.0.0 valid-jsdoc (fixes #579)

fixes https://github.com/eslint/eslint.github.io/issues/579
There's currently a Liquid syntax error in docs/2.0.0/rules/valid-jsoc that results in some text in the JSDoc block not rendering. This is caused by the use of double curly brackets in the comment (which Liquid is trying and failing to parse as a tag). I haven't found a way to escape them, but according to this StackOverflow question, it looks like the recommended way to solve this is just to treat it as raw text.
We weren't catching this in local dev because this directory is excluded from the generated site (I'm assuming to speed up incremental build time): https://github.com/eslint/eslint.github.io/blob/master/_config.dev.yml#L23. And since it only outputs a warning and doesn't fail the build, we weren't catching it in master.
Please note that CI is failing because I turned Travis CI on to test https://github.com/eslint/eslint.github.io/pull/578 and this will pass once that is merged (or we turn it off for PRs again).

#578 has been merged and CI is passing now!


[Webpack 5] Modules from internal library cannot be loaded when using mode: development (work in production)

Bug report

What is the current behavior?
Modules from internal library (also built with Webpack) is missing all exports and is missing from __webpack_modules__ when building with mode: development.
The same code works and the page is loading fine when building with mode: production and serving dist.
It seems like the dist bundle file is never "expanded" in __webpack_modules__.
If you look at the image you'll see that the bundle is an entry in __webpack_modules__, but the exported modules from said file is not appearing in the list when checking. The list consists om a bunch of modules from node_modules and the modules from the application using the library.

So when it looks for the module in __webpack_modules__ it will end up with undefined.
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);

That will cause the following error:
Uncaught TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (main.js:2793)
    at eval (index.ts:30)
    at Object../src/index.ts (index.js:2168)
    at __nested_webpack_require_8364606__ (index.js:5397)
    at eval (index.js:5436)
    at eval (index.js:5437)
    at webpackUniversalModuleDefinition (index.js:11)
    at eval (index.js:18)
    at Object.../web-lib-core/dist/index.js (lib.js:87)
    at __webpack_require__ (main.js:2793)

The module is also missing all exports:

The code is present in the dist file (i have removed the contents):
/***/ "./src/metadata/oasbasicmetadataextensions.class.ts":
/*!**********************************************************!*\
  !*** ./src/metadata/oasbasicmetadataextensions.class.ts ***!
  \**********************************************************/
/*! flagged exports */
/*! export OasBasicMetadataTypeExtensionBase [provided] [no usage info] [missing usage info prevents renaming] */
/*! export __esModule [provided] [no usage info] [missing usage info prevents renaming] */
/*! other exports [not provided] [no usage info] */
/*! runtime requirements: __webpack_exports__, __webpack_require__ */
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OasBasicMetadataTypeExtensionBase = void 0;\r\nvar tslib_1 = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\r\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\"); var OasBasicMetadataTypeExtensionBase = /** @class */ (function () {\r\n    function OasBasicMetadataTypeExtensionBase(type, typeRef) {...}\r\nexports.OasBasicMetadataTypeExtensionBase = OasBasicMetadataTypeExtensionBase;//# sourceURL=webpack-internal:///./src/metadata/oasbasicmetadataextensions.class.ts\n");

/***/ })

Config files:
https://gist.github.com/JonWallsten/69c82a3eb7688cae285f9034a8699f5b
If the current behavior is a bug, please provide the steps to reproduce.

I will work on a repro, but we have a large complex monorepo with a lot of sensitive information. Will update issue when I have created a similar repo with minimal code.
What is the expected behavior?
Modules from our internal library, also built with Webpack, should be found in __webpack_modules__ and the site should load just fine like it does with mode: production.

I use webpack serve as per this issue: https://github.com/webpack/webpack-dev-server/issues/2759
But the same issue occur if I build a development build with Webpack and then use a third party package for serving the dist.
"build:dev": "node --max_old_space_size=8192 ../../node_modules/webpack/bin/webpack --config config/webpack.dev.ts --color"

webpack-dev-server doesn't support libraries yet

So I can't import modules from another bundle built with Webpack? Or is library something else in this context?
I'll work on a repro.

So I can't import modules from another bundle built with Webpack? Or is library something else in this context?

No, you can, we should fix it, but maybe it is not related to your problem, yep, will be great to look at repo

No, you can, we should fix it, but maybe it is not related to your problem, yep, will be great to look at repo
Yeah, it's a guessing game without a repro. Was hoping someone had had the same issue and could point in the right direction. But I'll continue with the repro. It might be done tonight or tomorrow morning.

I've created a repo now by removing most of our code but leaving the structure. One thing that differ though is that in my repro the web-lib-core library is completely missing __webpack_require__ for some reason. That is not happening in our app right now. So to get to the real problem I need help with understandning why this is happening.
Close this repo:
https://github.com/JonWallsten/monorepo-new/tree/angular%2Bwebpack-upgrade
I sent you an invite since it's private. Create an issue with any questions about installing/running. I'll answer as fast as I can.

@JonWallsten I think you're running into the same issue we encountered. Another minimal repro and findings here: https://github.com/webpack/webpack/issues/11277.

Sorry for delay, look at this tomorrow

Sorry for delay, look at this tomorrow

No stress at all man!

Yes, duplicate #11277, let's close, we are working on fixing


[Question] The reason for dropping SAML and WSFED ?

I have read through the changelog and have noticed that SAML and WSFED staregies were dropped by this package, been recently tasked to implement SAML2.0 auth protocol against my strong plead to use Oauth2 with PKCE version, I was hoping maybe there is Azure Ad security reason or any other related issues that would help me drop the protocol, and conceive my overloards to use Oauth  ?

have there been any announcements regarding saml ? @jo-arroyo @EmLauber  ? I have a potential customer that is mandating saml and I'm very concerned that saml was removed from the latest version


Community Testing: Non existent file in test description for "Enabling Citadel health checking".

Describe the bug
In the test description of the Istio 1.0 Community Testing for test "Enabling Citadel health checking" a non existent file is referenced.
In Section deploying-citadel-with-health-checking the file install/kubernetes/istio-citadel-with-health-check.yaml should be applied.
However, there is no such file.
Expected behavior
The file needed to configure citadel should be there. If there is an other way to enable Citatdel health checking this should be described.
Steps to reproduce the bug
Follow the instructions in https://preliminary.istio.io/docs/tasks/security/health-check.html.
Version
$ istioctl version
Version: 1.0.0-snapshot.0
GitRevision: cf65e19c6a54df14d3a92de2221cc1e5153825de
User: root@5b39c9818787
Hub: docker.io/istio
GolangVersion: go1.10.1
BuildStatus: Clean

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:08:34Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}

Is Istio Auth enabled or not?
helm template install/kubernetes/helm/istio --name istio --namespace istio-system --set global.tag=1.0.0-snapshot.0 --set global.mtls.enabled=true  > istio.yaml

install/kubernetes/istio-citadel-with-health-check.yaml was generated from install/kubernetes/templates/istio-citadel-with-health-check.yaml.tmpl, which was removed by the PR https://github.com/istio/istio/pull/6585 that has been committed in
https://github.com/istio/istio/commit/beceb07af9bb63b83691bf7df10231a7ac6c0e55#diff-19ad89bc3e3c9d7ef68b89523eff1987.
According to https://github.com/istio/istio/pull/6585: "the old Kubernetes templates have been replaced by Helm charts".
@ymesika, are there instructions for generating istio-citadel-with-health-check.yaml using Helm charts?

I can add a new flag to the values.yaml allowing user to set security.healthCheckEnabled=true for the same result.
However this should be done when installing Istio (using Helm command in "Before You Begin") and therefore the doc should be updated.
Not related to this issue - I believe that the first part of "Before You Begin" isn't updated too because we no longer ship istio.yaml or istio-auth.yaml with our releases.

The PR https://github.com/istio/istio.github.io/pull/1744 is created to fix the non-existent file in the test description of Citadel health checking.

@linsun by default the Citadel don't have healthcheck. To install healthcheck there is a task dedicated for that.
I'm in favour of always having health check for Citadel.

@ymesika thanks!  I would prefer too, it is confusing to enable health check separately via kubectl apply... but the bigger prob is citadel doesn't work with helm based install.


[Bug] Importing requests from a Postman Collection v2 doesn't properly import query string parameters

Insomnia Version: 5.14.7
Operating System: Windows 10

Details
Using the latest standalone version of Postman on Windows: I exported a collection of requests to a Postman Collection v2 JSON file.
I then imported this file in the lastest Insomnia on Windows (by dragging / dropping the file directly in the window): the import were successful, however query strings parameters weren't properly imported. Specifically:

Disabled query string parameters in Postman weren't imported at all in Insomnia
The resulting URL in Insomnia contains the full URL with query string parameters. Query string parameters should have been imported in the Query tab of Insomnia instead of being put in the request URL.

Steps to reproduce

Create a new GET request in the latest Postman pointing to this URL: https://httpbin.org/get
Add a query string parameter in this request: first: test
Add a query string parameter in this request: second: test, then disable this one
Export this request as a Postman Collection v2 JSON file
Import this file in the latest Insomnia

Results:

The URL (the one next to the HTTP method selector) in Insomnia is https://httpbin.org/get?first=test instead of https://httpbin.org/get
No query strings are displayed in the Query tab. There should have been:

first: test
second: test (with disabled status)

Okay, I just saw the Import from Url button at the very bottom of the screen in the Query tab that would have done the job... But still, query string parameters should have been properly imported.

@gschier is absolutely right :smile:


Align plugin and .php names

It would be nice if the plugin named corresponded to the main file's name. So either:
kirby-wrappers and wrappers.php
OR
kirby-wrapper-tags and wrapper-tags.php

Good call, done


chore(main): release 2.0.0

:robot: I have created a release beep boop
2.0.0 (2024-12-09)
⚠ BREAKING CHANGES

rename API buffer.clear_logs to buffer.clear_captured_logs

Features

actions: add action to toggle comment log statements (9d8b973)
add plain log templates and default keymaps (e9d0e54)
buffer: add min width for floating win (877f231)
buffer: allow to configure options for the float buffer (5bf403f)
c#: add C# language support (4662e57)
c: add C language support (8e94434)
core: add clearing log statements action (#5) (a2faec8)
cpp: add C++ language support (0f5d4ab)
handle more log cases (2e56b52)
highlight: add highlight group for log statements line (0584dba)
java: add Java language support (94c98fb)
javascript: stricter call_expression (235062f)
javascript: support log above for if and while statement (797aa81)
python: add Python language support (27ed6ff)
rename API buffer.clear_logs to buffer.clear_captured_logs (0f7aacf)
watcher: display total entries in floating window footer (0970c7d)

Bug Fixes

failing CI (cafacb6)
highlight group regression (9d8514e)
typo (639e23b)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v2.0.0
:sunflower:


How to change theme when it has already been loaded

I was programming a project. I did:
self.tk.call("source", self.path)
self.tk.call("set_theme", "light")

And I made a function like this:
def dark_mode(self, sync = True):
    """Turn Program into Dark Mode"""
    if sync:
	self.tk.call("set_theme", "dark")

    DWMWA_USE_IMMERSIVE_DARK_MODE = 20
    set_self_attribute = windll.dwmapi.DwmSetWindowAttribute
    get_parent = windll.user32.GetParent
    hwnd = get_parent(self.winfo_id())
    rendering_policy = DWMWA_USE_IMMERSIVE_DARK_MODE
    value = c_int(2)
    set_self_attribute(hwnd, rendering_policy, byref(value), sizeof(value))
    self["background"] = "black"

I want to make the program turn into dark mode, and I want theme into dark mode too.
But I get a error, it is:
_tkinter.TclError: unknown option "-troughcolor"

How can I change theme when it has already been loaded?

^
|

What Tcl and Tk version are you using?
print(f"Tcl: {tkinter.TclVersion}")
print(f"Tk: {tkinter.TkVersion}")

Tcl & Tk Both 8.6

This is really strange. I cannot reproduce it, and I have never seen anybody with this error.
Does the issue still persist if you use sv_ttk instead of this old and discouraged .tk.call() method?

okay, i will use sv_ttk

thx

The problem arises again...
And i use sv_ttk...

script is in my github:github.com/sadjok/Editor

It looks like you dont use sv_ttk:

Can you try that?

i just move sv_ttk to my asset folder...

asset folder...:

sv.tcl & theme.py & theme folder

Try installing sv_ttk using pip install sv-ttk in your terminal, and then import sv_ttk in your code, and then sv_ttk.use_light_theme() to start sv_ttk.
Hope this helps.

...It.emm.well.i just want to give up now :(

Or, how to make a function like sv_ttk changing the theme for the window every time when I change the theme in the Settings?(Almost sync?)

Well maybe require a app restart to chage the theme...
sorry, i cant tkink about any other solutuon :(

Thanks for the answer, sorry for my interruption to you......

Hope who can solve it....
However, i am tired of it, i tried too many times too......
Each time, the same wrong shows.....


v1.4.0: submitPoolAttestations errors

Describe the bug
Sometimes we got this error since v1.4.0

ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT (rarely)

Jan-31 16:42:05.628[rest]            ^[[31merror^[[39m: Req req-jcs submitPoolAttestations error  Multiple errors on submitPoolAttestations
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
Error: Multiple errors on submitPoolAttestations
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT
    at Object.submitPoolAttestations (file:///usr/app/packages/beacon-node/src/api/impl/beacon/pool/index.ts:75:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

PublishError.Duplicate (more frequent)

Jan-31 20:19:41.932[rest]            ^[[31merror^[[39m: Req req-mbm submitPoolAttestations error  Multiple errors on submitPoolAttestations
PublishError.Duplicate
PublishError.Duplicate
PublishError.Duplicate
Error: Multiple errors on submitPoolAttestations
PublishError.Duplicate
PublishError.Duplicate
PublishError.Duplicate
    at Object.submitPoolAttestations (file:///usr/app/packages/beacon-node/src/api/impl/beacon/pool/index.ts:75:15)

Expected behavior
No error
Desktop (please complete the following information):

Version: v1.4.0
Network: mainnet

same issue maybe
Feb-03 11:57:19.166[api]             error: Error on publishContributionAndProofs [0] slot=32, subcommitteeIndex=3 PublishError.Duplicate
Error: PublishError.Duplicate
    at Eth2Gossipsub.publish (file:///mnt/block-volume/lodestar/node_modules/@chainsafe/libp2p-gossipsub/src/index.ts:1950:13)
    at Eth2Gossipsub.publishObject (file:///mnt/block-volume/lodestar/packages/beacon-node/src/network/gossip/gossipsub.ts:171:20)
    at Eth2Gossipsub.publishContributionAndProof (file:///mnt/block-volume/lodestar/packages/beacon-node/src/network/gossip/gossipsub.ts:263:5)
    at file:///mnt/block-volume/lodestar/packages/beacon-node/src/api/impl/validator/index.ts:566:13
    at async Promise.all (index 0)
    at Object.publishContributionAndProofs (file:///mnt/block-volume/lodestar/packages/beacon-node/src/api/impl/validator/index.ts:556:7)
    at Object.handler (file:///mnt/block-volume/lodestar/packages/api/src/utils/server/genericJsonServer.ts:41:23)
Feb-03 11:57:19.168[rest]            error: Req req-89 publishContributionAndProofs error  Multiple errors on publishContributionAndProofs
PublishError.Duplicate
PublishError.Duplicate
Error: Multiple errors on publishContributionAndProofs
PublishError.Duplicate
PublishError.Duplicate

ATTESTATION_ERROR_UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT

This is because validator requests attestation data from one node (block at slot comes within 4s) and publish signed attestation to another node (block at slot hasn't come yet)
found this in the log
grep -e "Requesting fallback URL routeId=produceAttestationData" -rn validator*.log | wc -l
296

in this case, the submitPoolAttestations api from validator should not be rejected because the request should be successful for the original node

PublishError.Duplicate

This is because the way we implement HttpClient is to issue multiple requests in parallel, sometimes attestations reach one node then gossip to another node, and the api at the other node would fail with Duplicate error, but overall the api is a success at validator side
perhaps we could ignore duplicate error for the publish api once this is implemented (add a flag to beacon node if needed) https://github.com/ChainSafe/js-libp2p-gossipsub/issues/402

@avenbreaks could you confirm if you configured fallback urls at your validator side? the beaconNodes option is something like beaconNodes:  "http://ip_1:9596,http://ip_2:9596"

PublishError.Duplicate

This is because the way we implement HttpClient is to issue multiple requests in parallel, sometimes attestations reach one node then gossip to another node, and the api at the other node would fail with Duplicate error, but overall the api is a success at validator side
perhaps we could ignore duplicate error for the publish api once this is implemented (add a flag to beacon node if needed) ChainSafe/js-libp2p-gossipsub#402

Seems like a similar issue to https://github.com/ChainSafe/lodestar/pull/4135 perhaps we could allow publishing a the same message for multiple topics?

Seems like a similar issue to https://github.com/ChainSafe/lodestar/pull/4135 perhaps we could allow publishing a the same message for multiple topics?

you're right, right now we just call publish() multiple times for different subnets. We need to ignore the duplicate check in gossipsub publish() api anyway


Add README.md file

Description

[x] I have added a folder(Named it as my GitHub user id)
[x] I have added a Readme.md file inside the folder
[x] I understand the GitHub Forking Concept fully

Pull Request


[Bug] Worker unable to start with a custom Data Converter

What are you really trying to do?
I would like to use a custom data converter that converts all payloads into an encrypted payload.
Describe the bug

I have created my own implementation of DataConverterInterface, which I supply to both the client and the worker. This new converter uses the default DataConverter from the SDK to convert a value into a Payload, then converts this payload into an encrypted payload (see class below).
class MyDataConverter implements DataConverterInterface
{
    public function __construct()
    {
        $this->defaultDataConverter = DataConverter::createDefault();
        $this->encryptedPayloadConverter = new EncryptedPayloadConverter();
    }

    public function toPayload($value): Payload
    {
        $payload = $this->defaultDataConverter->toPayload($value);

        return $this->encryptedPayloadConverter->encrypt($payload);
    }

    public function fromPayload(Payload $payload, $type): mixed
    {
        $payload = $this->encryptedPayloadConverter->decrypt($payload);

        return $this->defaultDataConverter->fromPayload($payload, new Type(TYPE::TYPE_ANY));
    }
}

class EncryptedPayloadConverter
{
    public function encrypt(Payload $payload): Payload
    {
        $encrypted = new Payload();
        $encrypted->setMetadata([EncodingKeys::METADATA_ENCODING_KEY => 'binary/encrypted']);
        $encrypted->setData($this->encryptString($payload->serializeToString()));

        return $encrypted;
    }

    public function decrypt(Payload $payload): Payload
    {
        $decrypted = new Payload();
        $decrypted->mergeFromString($this->decryptString($payload->getData()));

        return $decrypted;
    }
}

When using the client to start a workflow, I can see that the workflow execution can be successfully started, with the input arguments encoded in binary/encrypted, as I intended. But, when I start RoadRunner for the worker (./rr serve), I get the error below and my worker is unable to start.
2023-01-09T09:38:40.002Z        INFO    temporal        connected to temporal server    {"address": "temporal:7233"}
2023-01-09T09:38:40.367Z        DEBUG   server          worker is allocated     {"pid": 23, "internal_event_name": "EventWorkerConstruct"}
2023-01-09T09:38:40.742Z        DEBUG   server          worker is allocated     {"pid": 27, "internal_event_name": "EventWorkerConstruct"}
2023-01-09T09:38:40.742Z        DEBUG   temporal        outgoing message        {"id": 0, "data": "", "context": ""}
2023-01-09T09:38:40.816Z        DEBUG   temporal        received message        {"command": null, "id": 0, "data": "\n\ufffd\u0007*\ufffd\u0007\n\ufffd\u0006\n\u001c\n\u0008encoding\u0012\u0010binary/encrypted\u0012\ufffd\u0006sIHh0C5aq1zf0KD7+z1OEv5kpwdKu2KPDsn5E8YRvxuo/uM0CsXqOFBnWwbgZc7GoioM0aLiqxBdBO+VdtGzeNziooMpIHkAUVqR4QgsB8Ge1IarnIJl7BfEF8Pet2Ov9EMrmdGEamznpDULv1UwYe/qFRhQhTgP9YwLr+SzH0KycxodQ2+/Q2BXCKnt/b7wmNyQUD1v8vdSlp7gE3EpQBY9J/BBhoAx/URGj8ruGibJ5NiFSsLS40njvvxwsw1kpgODqjh7KhgxhuyYgMm6rdNVcpauAmV3RXSSHUKkyRoelh1jQbkxeDPvnp+Om6DWBh0CQPREOH/UbG2GXtwxrfsYdrBz+kZsWSQ7MsJExe0BfyyuoJD1XIAU8tMEqjejRLfHNKohwv8rcQzPGT9B1PETWREOdbj87uFzRDjQ1cgQD9F1BThjgluj6eOtRwGlaSGykSw2KVlUOp4VubCJOvCFIhbI4zUfPLmKp4woQoDEsBNoqdZNn3sTnVwyODdcejBNXGzyKfQEVV2gwGh+yqIbH8uBn27RAfYR5n4SUDv+FsYR1za03N19G1Ph5J32MSLoHzDkpgHJRvb9LkQf4a9m2VnntmPd9qa1Etl5LvCZRCM/3zkKvsHgjtJgypjbQHyKOJjI6nBe3ah0skuJgTApig3dPESGAmPT0J4NsnU79E/XIfJHtX8za/NwIyfehzpWqPoMWkYKJiKNejQybwCt8WdBjd6tyDnRMSDiGy/kRyTNkMNMMTreQI/0BawGHlRGZl7QVpjmyG+fpCMx62hgQz63xv6jSRxPVAAuruVz8Hdh34r4AnOb6TMMaAwG83n5NP9NGxC8uHHVR6uI0+Rgkg=="}
2023-01-09T09:38:40.830Z        DEBUG   server          worker destroyed        {"pid": 23, "internal_event_name": "EventWorkerDestruct"}
2023-01-09T09:38:40.841Z        DEBUG   server          worker destroyed        {"pid": 27, "internal_event_name": "EventWorkerDestruct"}
handle_serve_command: Serve error:
        endure_start:
        endure_serve_internal: Function call error:
        endure_call_serve_fn: got initial serve error from the Vertex roadrunner_temporal.Plugin, stopping execution, error: temporal_plugin_serve:
        workflow_definition_init:
        workflow_fetch_wf_info: encoding binary/encrypted: payload encoding is not supported

If I don't supply my custom data converter, my worker successfully starts with the following logs.
2023-01-09T09:37:11.500Z        INFO    temporal        connected to temporal server    {"address": "temporal:7233"}
2023-01-09T09:37:12.244Z        DEBUG   server          worker is allocated     {"pid": 23, "internal_event_name": "EventWorkerConstruct"}
2023-01-09T09:37:12.723Z        DEBUG   server          worker is allocated     {"pid": 27, "internal_event_name": "EventWorkerConstruct"}
2023-01-09T09:37:12.723Z        DEBUG   temporal        outgoing message        {"id": 0, "data": "", "context": ""}
2023-01-09T09:37:12.873Z        DEBUG   temporal        received message        {"command": null, "id": 0, "data": "\n\ufffd\u0004*\ufffd\u0004\n\ufffd\u0004\n\u0016\n\u0008encoding\u0012\njson/plain\u0012\ufffd\u0004{\"TaskQueue\":\"default\",\"Options\":{\"MaxConcurrentActivityExecutionSize\":0,\"WorkerActivitiesPerSecond\":0.0,\"MaxConcurrentLocalActivityExecutionSize\":0,\"WorkerLocalActivitiesPerSecond\":0.0,\"TaskQueueActivitiesPerSecond\":0.0,\"MaxConcurrentActivityTaskPollers\":0,\"MaxConcurrentWorkflowTaskExecutionSize\":0,\"MaxConcurrentWorkflowTaskPollers\":0,\"StickyScheduleToStartTimeout\":null,\"WorkerStopTimeout\":null,\"EnableSessionWorker\":false,\"SessionResourceID\":null,\"MaxConcurrentSessionExecutionSize\":1000},\"Workflows\":[{\"Name\":\"HealthWorkflow\",\"Queries\":[],\"Signals\":[]}],\"Activities\":[]}"}
2023-01-09T09:37:12.873Z        DEBUG   temporal        worker info     {"taskqueue": "default", "optionsError": "json: unsupported type: func(error)"}
2023-01-09T09:37:12.873Z        DEBUG   temporal        workflow registered     {"taskqueue": "default", "workflow name": "HealthWorkflow"}
2023-01-09T09:37:12.873Z        DEBUG   temporal        workers initialized     {"num_workers": 1}
2023-01-09T09:37:12.942Z        INFO    temporal        Started Worker  {"Namespace": "default", "TaskQueue": "default", "WorkerID": "default:709d473a-d9e1-40c7-8ceb-371f2dd1c17c"}
2023-01-09T09:37:12.942Z        DEBUG   rpc             plugin was started      {"address": "tcp://<IP_ADDRESS>:6001", "list of the plugins with RPC methods:": ["informer", "resetter", "temporal"]}

To try to at least start the worker, I decided to see if skipping conversion on the first received message would help. But to skip the message, I cannot just simply skip converting all JSON payloads because workflow input and result payloads are in the JSON format, and these are the most important for me to encrypt. So instead, I added the following to my payload converter.
class EncryptedPayloadConverter
{
    public function encrypt(Payload $payload): Payload
    {
        $json = json_decode($payload->getData(), associative: true);

        if ($json && is_array($json) &&
            array_key_exists('TaskQueue', $json) &&
            array_key_exists('Options', $json) &&
            array_key_exists('Workflows', $json) &&
            array_key_exists('Activities', $json)
        ) {
            return $payload;
        }

        $encrypted = new Payload();
        $encrypted->setMetadata([EncodingKeys::METADATA_ENCODING_KEY => 'binary/encrypted']);
        $encrypted->setData($this->encryptString($payload->serializeToString()));

        return $encrypted;
    }
}

With this added, I can see that my worker can successfully start, and my workflow tasks are picked up and my workflow execution is completed, with the results payload encoded with binary/encrypted. Based on this, I suspect that the issue is that one of the underlying systems (perhaps RoadRunner, Goridge, etc) do not support the custom encoding.
While this works, this is kind of a hacky solution, and there's no way of knowing if there is any other internal messages that cannot be converted with a custom encoding which could cause the worker to error out and stop. Is there any other way to solve this problem?
Minimal Reproduction

Follow the steps above.
Environment/Versions

OS and processor: macOS Ventura (Intel)
Temporal Version: 1.18.4, and SDK version: 2.3.1
Docker

Additional context

Can you provide logs about a worker annihilation?
Please add that section in your rr.yaml
logs:
    mode: development
    level: debug
    file_logger_options:
        log_output: "log.log"

@sdellarosa You are going to introduce new data converter type binary/encrypted which is not supported by Temporal GO-SDK (Roadrunner use GO-SDK under the hood).
Take a look here:
https://github.com/temporalio/sdk-go/blob/6580cbe0aa41a8b515791f95c2c15bb37db1dab1/converter/default_data_converter.go#L28
https://github.com/temporalio/sdk-go/blob/6580cbe0aa41a8b515791f95c2c15bb37db1dab1/converter/composite_data_converter.go#L125
You need to check if Temporal itself supports own data converter.

@sdellarosa there is example in Go - https://github.com/temporalio/samples-go/tree/main/encryption
I think it's not simple with roadrunner since you need create your own data converter and it needs to be compiled with Roadrunner. And ofc if you want to have a support of new converter in UI, you need to expose converter via server.
Velox could be answer here. Maybe @rustatian can jump here?

Hey @cv65kr @sdellarosa 👋🏻
RR doesn't support the binary/encrypted payloads atm. But, that's easy to support that case. I need some repo to reproduce this case... 😃 @sdellarosa @cv65kr Could you guys create a test-case repo?

@rustatian do we actually need to unpack all the payloads on RR end? Can't we just passthough payloads with undefined type to the server, I assume we only have to work with our internal commands.

Yeah, I know, thanks, I need to verify with the test-repo, why we can't just redirect that payload to the custom data-converter in the PHP. Why that case leads to error. I know the particular line which throws an error, but I need to double-check.

@rustatian do we actually need to unpack all the payloads on RR end? Can't we just passthough payloads with undefined type to the server, I assume we only have to work with our internal commands.

That is because I need a test-repo to check that case. We do not touch the user's payload in any way (except, you know, marshal-unmarshal, encode-decode).

In a month, I hope we will implement interceptors.
Using interceptors you could encrypt all payloads easily.

@roxblnfk cool, looking forward!

@rustatian in case when you still need test repo https://github.com/cv65kr/temporal-sdk-leaks/tree/data-converter
Error is caused because as a fallback RR using default converters from GO-SDK - https://github.com/temporalio/roadrunner-temporal/blob/master/data_converter/converter.go#L28

Yeah, I know where it fails 😄 I just needed some test-case for that. Moreover, I don't think the interceptor is a good (and natural) place to decode the payload (since this is a data-convertor task).

Hm, so, the issue is here:
// FromPayload converts single value from payload.
func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr any) error {
	return r.dc.FromPayload(payload, valuePtr) <-----
}

Since we're converting the payload like this err = c.dc.FromPayload(payloads[i], tmp).
And later, in the CompositeDataConverter (temporal default), temporal tries to take a payload converter for the binary/encrypted, and, obviously, there are no such converters.
And it fails to the error from the Bug.
Might be we need to implement the CompositeDataConverter (to support all std payloads), but with a slightly different behavior -> paththrough all payloads with an unknown encoder to the PHP.

In only-Go, this is an expected error because, for sure, you should create a data converter for your own encoder...
But here, since we don't touch the user payload, we may decode/encode well-known data types, but for the user-defined encoders, we should not return an error and pass this data to the PHP worker with the hope that PHP knows how to handle it.

It looks like an easy task 😄
Since we don't actually need to decode the encrypted payload, we may easily detect the underlying data type with the reflection and use the standard decoder's approach for such payloads. Since, for example, binary/encrypted is binary first and then encrypted ⚡

As is typical, upon delving into this task, it has become somewhat more complex 😄
When the user sends data with an unknown converter, such as binary/encrypted, it is not possible to decrypt it in order to allocate workers. Specifically, we have a "payload" and a valuePtr pointer, which points us to the actual type that should be filled with the data in the payload. This is a standard method for converting data from a payload to its true type, also known as unmarshalling.
In the event that the payload is encrypted or encoded with an unknown converter, it cannot be decoded to the "real" type. For example, we have a valuePtr pointing to a structure with an arbitrary number of fields. We have two scenarios with two different converters:

json/plain: all we need to do is unmarshal the "[]byte" into the schema (our structure). The process is successful and the structure (schema) is now filled with the data.
binary/encrypted (or any unknown converter): Without knowing how to unmarshal, for example, this: "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEtkEeyJUYXNrUXVldWUiOiJk" into our real type, it is not possible to fill our valuePtr with the data.

The good news is that this task can be solved by allowing users to implement RR's plugin-data-converters in Go, similar to middleware for HTTP.

@rustatian If I good understand correctly payload = data + metadata, maybe we could prepare fallback data converter in GO with just plain []byte conversion, so every time when type in not recognised - we just forward it (it forces PHP to returns always byte[] structure).
Logic responsible e.g. for encrypting should be done in PHP.

My point that logic is kinda duplicated, because in Go we have converters and in PHP we have converters.

Yeah, correct. I wouldn't say I like this solution, but this is the only one acceptable.
We can't just forward the data, because we have to unmarshal it to the valuePtr (pointer to the real data). We can't transform the []byte into the structure if the data is encrypted.

Ok 😄 We discussed with @wolfy-j and found a better solution.
The main problem is in the commands between the RR and PHP workers. In the case of the custom converter, we can't decode this info. We don't care about the user's data (in a good sense) because we just path through it to the Temporal (activity, workflow, etc).
The proposed solution:
For internal communication, use the plain/json (or binary/proto) converter (one of the well-known). Having that, we will always be capable of decoding our internal messages w/o touching the user's data. And, we don't need to duplicate the data-converter in Go and PHP.

Would be nice to see some example in samples-php 😄

Hi all, thanks a lot for looking into this! 😄
Just to be clear, the final proposed solution, would be implemented in this SDK and not on RoadRunner, correct? And if so, when can I expect to see the changes shipped?

Hey @sdellarosa 👋🏻

Just to be clear, the final proposed solution, would be implemented in this SDK and not on RoadRunner, correct?

Yeah, it seems that the SDK would be updated.

And if so, when can I expect to see the changes shipped?

Hard to say, personally, as I'm not a PHP dev, we have to wait for @roxblnfk or someone from the community 😢

@rustatian big disadvantage of this solution when you are using well-known converters you are loosing possibility e.g. to decrypt payload in Temporal UI.

@sdellarosa as a temporary solution you could something like that:
<?php

declare(strict_types=1);

namespace App;

use Temporal\DataConverter\DataConverterInterface;
use Temporal\DataConverter\DataConverter;
use Temporal\Api\Common\V1\Payload;
use Temporal\DataConverter\EncodingKeys;

class Converter implements DataConverterInterface
{
    private DataConverterInterface $dataConverter;

    public function __construct()
    {
        $this->dataConverter = DataConverter::createDefault();
    }

    public function toPayload($value): Payload
    {
        $payload = $this->dataConverter->toPayload($value);

        // It's example object which need to be encoded
        if ($value instanceof Example) {
            $encrypted = new Payload();
            $encrypted->setMetadata([
                EncodingKeys::METADATA_ENCODING_KEY => 'json/plain',
                'encrypted' => 'true'
            ]);
            $encrypted->setData(
                base64_encode($payload->getData())
            );

            return $encrypted;
        }

        return $payload;
    }

    public function fromPayload(Payload $payload, $type): mixed
    {
        if ($payload->getMetadata()->offsetGet('encrypted') === 'true') {
            $decrypted = new Payload();
            $decrypted->setMetadata([EncodingKeys::METADATA_ENCODING_KEY => 'json/plain']);
            $decrypted->setData(base64_decode($payload->getData()));
            return $this->dataConverter->fromPayload($decrypted, $type);

        }

        return $this->dataConverter->fromPayload($payload, $type);
    }
}

In this case concrete object Example is encrypted in both direction via base64.
Need to be aware about my previous comment.

@rustatian big disadvantage of this solution when you are using well-known converters you are loosing possibility e.g. to decrypt payload in Temporal UI.

Possibly, but personally, I don't think that this is a disadvantage since data is encrypted (no one, even accidentally would see it).
Unfortunately, we have to choose the best from the worst solutions, since we can't decode payload unknown to the RR converter 😢

@sdellarosa Hey 👋🏻
Have you tried the prev answer? Did that help you?


Simplify usage of mapIds

Issue description
Introduce convenience API that simplifies the usage of map ids.
Most applications use a single map id for every component. It is inconvenient to repeat it all the time.
Validations

[X] Read and follow our code of conduct
[X] Read the contributing guidelines
[X] Check that there isn't already a similar issue

See PR #349


feat: Context support for multi-tenancy usage

Signed-off-by: Andrii Soluk<EMAIL_ADDRESS>

Codecov Report

Merging #46 (f1478a0) into main (eca8d26) will decrease coverage by 0.75%.
The diff coverage is 70.49%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   85.09%   84.33%   -0.76%
==========================================
  Files          13       13
  Lines        1731     1762      +31
==========================================
+ Hits         1473     1486      +13
- Misses        147      157      +10
- Partials      111      119       +8

Impacted Files
Coverage Δ

pkg/controller/command/models.go
100.00% <ø> (ø)

pkg/controller/rest/operation.go
82.70% <53.84%> (-3.25%)
:arrow_down:

pkg/controller/command/command.go
79.88% <73.33%> (-2.05%)
:arrow_down:

pkg/client/vct/client.go
90.16% <100.00%> (-0.61%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eca8d26...f1478a0. Read the comment docs.


Support integrating foreign loggers

Some libraries (e.g. Qt) offer the ability to install hooks that are invoked when the library logs something. It would be nice to be able to redirect these foreign log messages to the Rust logger, and this is already somewhat doable, if one is willing to give up on the original location information or stuff it in the message text. The issue is that Location's __module_path and __file are of type &'static str. Foreign libraries may have non-static location strings or even if they are static, they may not be in UTF-8 and thus require a dynamic conversion.
I think changing the definition of Location to the following would be a more versatile solution:
pub struct Location {
    pub __module_path: Cow<'static, str>,
    pub __file: Cow<'static, str>,
    pub __line: u32,
}

This allows to generate dynamic location strings, but does not require a dynamic allocation when the location strings are 'static.
Since #200 has not been merged yet and thus LocationBuilder has not been released, the only breakage is that Location is not Copy anymore. But isn't it acceptable considering that there is already a breakage with the name change from LogLocation to Location?
What do you think? Do you have other suggestions to integrate foreign loggers? If the idea I described is considered good, I can work on it, once PRs like #200 are merged.
Thank you.
Note: Such integration also requires some kind of LogBuilder like what @alexcrichton suggested.

Using Cow would cause problems in no_std crates - we should be able to change the &'static strs to &'a strs though. That will mean that the location etc will no longer have a 'static lifetime but that's usually not a problem, and you can always make your own OwnedLocation and reconstruct a Location from that when necessary.

Thank you for explaining. Is there already somebody working on the approach you outlined? If not, I can look into it, but I guess it is probably better to wait for #200 to be merged as it would no longer build otherwise. What do you think?

I wrote a library intended to address exactly this issue: https://github.com/m-labs/rust-managed#usage

Wouldn't &'a fmt::Display do?

@alexcrichton the encoding conversion case is an interesting one wrt our discussion on #rust-libs yesterday.

Interesting and good point! We may need to go to 'a sooner than we thought...

@alexcrichton @sfackler @dpc How about using Cow<'static, str>-like module_path and file? Current solution with 'a str does not allow slog + slog-async + slog-stdlog work correctly, because slog::RecordLocation must be static.
https://github.com/slog-rs/stdlog/pull/9
https://github.com/slog-rs/stdlog/pull/5

Why would the design of log::Record matter for slog's internal APIs? It can store them however it wants and then just translate to a borrowed log::Record right when it transfers over to log, right?

@sfackler For async logging, we need to transfer Record-data to another thread, so we can use owned data or 'static borrowed data. In fact, in most cases module_path and file are initialy &'static str, but the log::Record always reduces theirs lifetimes to 'a. So it forces us to allocate memory for these strings every time when logging :(
Getting static module_path and file:
macro_rules! log {
    (target: $target:expr, $lvl:expr, $($arg:tt)+) => ({
        let lvl = $lvl;
        if lvl <= $crate::STATIC_MAX_LEVEL && lvl <= $crate::max_level() {
            $crate::__private_api_log(
                __log_format_args!($($arg)+),
                lvl,
                &($target, __log_module_path!(), __log_file!(), __log_line!()),
            );
        }
    });
    ($lvl:expr, $($arg:tt)+) => (log!(target: __log_module_path!(), $lvl, $($arg)+))
}

Pass module_path and file with a reduced lifetime to logger:
pub fn __private_api_log(
    args: fmt::Arguments,
    level: Level,
    &(target, module_path, file, line): &(&str, &str, &str, u32),
) {
    logger().log(
        &Record::builder()
            .args(args)
            .level(level)
            .target(target)
            .module_path(Some(module_path))
            .file(Some(file))
            .line(Some(line))
            .build(),
    );
}

Ah, that makes sense. Rather than changing to Cow<'static, str> (static str vs owned string), we could go to an enum of static str vs borrowed str. We could support that by adding a couple of new setters in the builder type for target_static, module_path_static, etc, and accessors on Record that return Option<&'static str>. That would maintain back compat but let you avoid allocating in the common case.

@sfackler Yes, I think this is a good solution.

As of log 0.4.8 you can now call Record::module_path_static and Record::file_static to attempt to get a &'static str out of them. Records created using the log! macros will have static strings.


V1 go tuf update

Summary
Per the latest https://github.com/sigstore/root-signing/pull/1164 in Sigstore Public Good instance, the key type is changing for the TUF keys, to keep cosign v1 continue to work I've updated to the latest go-tuf version.
This is the same PR as https://github.com/sigstore/cosign/pull/3597 but against release-1.13 branch. We should probably push it to a new branch instead, but opening to get all the tests to run.
Release Note

Updated go-tuf version to v0.7.0
Updated sigstore/sigstore to v1.8.0

Documentation
N/A

@haydentherapper nothing, will be similar from the previous one.
but this will be the last for the branch? or how long will we maintain this?

I would hope this would be the last update for v1, i.e we won't continue to maintain it anymore. But of course, I'm not the authoritative person to make such a decision :)

Do we have any data on how many people are still downloading or using cosign v1?

I’m still skeptical that we need this. Kyverno was the only major customer I was aware of but they’ve upgraded to v2. We could hold off on merging until after the root is upgraded and see if there’s any complaints from v1 users?

Only kyverno was asking in the past.
I think we can hold this for a while

We've had a request for it, so moving forward it this.


Pure dotnet build

This Pull Request replaces all local dependencies with ones from nuget, and cleans up some minor things to make LLL build using a simple dotnet build. No need to even have LC installed. The goal being, to be able to eventually run an automated build in a gitlab workflow.
Points possibly worthy of further discussion:

I dropped the UnityEditor.dll dependency. This is no problem for the mod build, as only ExtendedScriptableObjectDrawer would use it. IAmBatby told me on discord the general workflow (as of this PR) is to dump this code into a Custom Content project, so it should build there without issue? I haven't tested this yet.
The GameLibs dependency currently needs Publicize only due to GenerateScenesInBuild_Hook, which accesses the internal Hash() function. This isn't a problem per se, but I feel it might help avoid bugs if at LLL development time we could see which LC fields are private. Publicise hides this from our view.
The NetcodePatcher docs say the SDK usage (instead of using the cli tool) might break the build in Visual Studio. I haven't verified this. It works fine in VS Code obviously.

I have verified this builds and doesn't change any functionality when used in LC.

Used in my branch works perfect, thanks a lot.

Used in #101 but build didnt come out netcode patched:
<Exec Command="netcode-patch "$(TargetPath)" @(ReferencePathWithRefAssemblies->'"%(Identity)"', ' ')" />

So it turns out I may have skimmed the NetcodePatcher docs a little too fast. 😅 With the current changes it tries to NetcodePatch at least, but on my end I'm still getting errors while patching, which may be contingent upon EvaisaDev/UnityNetcodePatcher#40 and require a new release from them.
So hold off on merging this for now, I may need to bump a version still before everything works.

In the light of v55 approaching I wanted to get this moved along. This is now the state where it works using dotnet build but not in Visual Studio. I have a solution which makes it work for both, but that necessitates another change in NetcodePatcher unfortunately. I thought I would have gotten around to it by now, sorry. If you can live with dotnet building for now, feel free to merge.


ios login "Error Domain=ru.ok.sdk Code=1 "(null)"

hello, thanks for the contribution to the plugin. I'm trying to login with ios, however, I got this error:
"Error Domain=ru.ok.sdk Code=1 \"(null)\""

I already initialized the SocialOk correctly and works fine with android, only ios get this error, any suggestions? thanks!

i think i make it working,i need to initialize the plugin first, for some reason, the initialization doesn't work, but i change the place. thanks


Key Error when decoding DER signatures on P521 curve

Hello,
There is a key error when decoding the encoded signature using the P521-curve.
'''
    Generating Keys
'''

from fastecdsa import keys, curve, ecdsa

priv_key,pub_key = keys.gen_keypair(curve.P521)

'''
    Signing and verifyng
'''
m = "Hello World"

r,s = ecdsa.sign(m,priv_key,curve=curve.P521)
valid = ecdsa.verify((r,s),m,pub_key,curve=curve.P521)

'''
    Encoding signatures
'''

from fastecdsa.encoding.der import DEREncoder

encoded = DEREncoder.encode_signature(r,s)
decoded_r, decoded_s = DEREncoder.decode_signature(encoded)

print(decoded_r)

Could you provide the error output associated with the code snippet above? Thanks.

Could you provide the error output associated with the code snippet above? Thanks.

`---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
 in ()
22
23 encoded = DEREncoder.encode_signature(r,s)
---> 24 decoded_r, decoded_s = DEREncoder.decode_signature(encoded)
25
26 print(decoded_r)
/home//.local/lib/python3.6/site-packages/fastecdsa/encoding/der.py in decode_signature(sig)
55
56         try:
---> 57             seqlen, sequence, leftover = parse_asn1_length(sig[1:])
58         except ASN1EncodingError as asn1_error:
59             raise InvalidDerSignature(asn1_error)
/home//.local/lib/python3.6/site-packages/fastecdsa/encoding/asn1.py in parse_asn1_length(data)
96         fmt = {1: '=B', 2: '=H', 4: '=L'}
97
---> 98         (length,) = unpack(fmt[count], data[:count])
99         data = data[count:]
100
KeyError: 7`

Hi all,
I struggled a little bit also on this point also, but discovered that the problem is on the DEREncoding structure.
As far as I know this coding is false. For instance, I got the following r,s values :
r = 0152a036cd84ccf8caada25deb6bad215b33908bba22cf9aa335257b55ab72004061303ea0a8681a3d8545f25fbc45ec66d7364585ac55a6b1ada1ff38215249deb1
s = 01883a2eeb0948c1d972704721b884c613aa334b050110f2bfe92130c8ff8d246c36879ca7af86a650bc53b3ca448b6464fe3eaf1c79db9744bdefc26639ad30f87e
And receive the following DerEncodigValues =<PHONE_NUMBER>52a036cd84ccf8caada25deb6bad215b33908bba22cf9aa335257b55ab72004061303ea0a8681a3d8545f25fbc45ec66d7364585ac55a6b1ada1ff38215249deb1024201883a2eeb0948c1d972704721b884c613aa334b050110f2bfe92130c8ff8d246c36879ca7af86a650bc53b3ca448b6464fe3eaf1c79db9744bdefc26639ad30f87e
But the length is false. It shouldn't be 88 but 81.
You could use this to correct :
`from asn1crypto import csr, core
class eccSignatureClass(core.Sequence):
_fields = [
('r', core.Integer),
('s', core.Integer)
]
signature = eccSignatureClass()
signature['r'] = r
signature['s'] = s

byteValues = signature.dump()
And to check
eccSignature = eccSignatureClass().load(byteValues)
`
I hope it will help

I forgot to stress that I have tested the signature computation ECDSA NIST-P521 SHA2-512 with FIPS-186-4 test vectors and everything was OK.
So thank you very much for this great library and this great work.

Just getting to this now, been a busy year 😓 . Breaking down the example above I see -
30 88 (SEQUENCE LEN 0x88)
    02 42 (INTEGER LEN 0x42)
        0152a036cd84ccf8 caada25deb6bad21 5b33908bba22cf9a a335257b55ab7200
        4061303ea0a8681a 3d8545f25fbc45ec 66d7364585ac55a6 b1ada1ff38215249
        deb1 (INTEGER R)
    02 42 (INTEGER LEN 0x42)
        01883a2eeb0948c1 d972704721b884c6 13aa334b050110f2 bfe92130c8ff8d24
        6c36879ca7af86a6 50bc53b3ca448b64 64fe3eaf1c79db97 44bdefc26639ad30
        f87e (INTEGER S)

That looks right to me, the sequence is 0x88=136 octets long, 0x42=66 octets per integer, plus 2 octets to encode the type and length per integer, so 2 * (68) = 136 octets.

I think the issue is actually the decoder here, something is too long to get unpacked into the available sizes (1, 2, 4), probably only happening curves with a big enough field size.

Fixed in 7fd41568eacc745811801396157b5672eb5789a4, will be in release v2.1.1.
   ...: '''
   ...:     Signing and verifyng
   ...: '''
   ...: m = "Hello World"
   ...:
   ...: r,s = ecdsa.sign(m,priv_key,curve=curve.P521)
   ...: valid = ecdsa.verify((r,s),m,pub_key,curve=curve.P521)
   ...:
   ...: '''
   ...:     Encoding signatures
   ...: '''
   ...:
   ...: from fastecdsa.encoding.der import DEREncoder
   ...:
   ...: encoded = DEREncoder.encode_signature(r,s)
   ...: decoded_r, decoded_s = DEREncoder.decode_signature(encoded)
   ...:
   ...: print(r == decoded_r, s == decoded_s)
True True


Arrange dummy app to support multiple sub-apps living side-by-side

This PR is about arranging the "Dummy" app in a way that will allow multiple sub-apps to live together in parallel.
The main change is to namespace all the classes in “main” sub-app. This will prevent any constant or container registration namespace collisions if a second sub-app were added alongside it. Adding the Dummy::Application also demonstrates how multiple sub-apps could be explicitly mounted within an overall top-level application.
Though everything was technically still working before this change, I figured it would be helpful for the dummy app to demonstrate an arrangement that is slightly closer to what you might need in a larger working app.

Makes sense, thanks :)


Spectral library search in wizard

Adds import of libraries
spectral library search for LC-MS2
improves layout

Creates this batch

On large display

On smaller display


Fix identifiers

I forgot that the identifiers actually don't need to be added to the underlying component but to the actual component:
const Test = styled.div``;
Test.identifier = 1;

What I do right now (which is wrong) is this:
const Test = function() {
  const c = styled.div``;
  c.identifier = 1;
}();

Switching to the first one will be a bit harder, and since we're still exploring possible other syntaxes I'm going to invest a large amount of time into fixing this, since we probably won't keep it around anyway. /cc @geelen

I don't quite understand the difference...

The second one has more code, but I guess it doesn't really matter. Closing for now.


Anchor Persistence

Building Gadgets Version
1.0.5
Describe the bug
Once Anchored the Copy Paste Tool should preserve the Anchor point after pasting in the event of subsequent pastes over the same structure to build more or complete build if more blocks or energy are needed.
To Reproduce
Anchor a build, Paste it, See that Anchor point was not preserved.
Expected behavior
Once Anchored the Copy Paste Tool should preserve the Anchor point.

Gave this a try and decided I liked it :)


Implement iOS Text Component

Should match React Native API.

Prior Work:
https://github.com/software-mansion-labs/react-native-swiftui/blob/master/packages/react-native-swiftui/native/Views/RSUITextView.swift

Added basic support for nested text components