Allow to replace a snackbar by another one without transition

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
I would like to show a first snackbar with transition (growing) and then replace it by other snackbars without transition.
Note: I currently use the key attribute. Without it, snackars replace themself without transition, but they don't delete transition out correctly.
Motivation 🔦
Currently, replacing a snackbar by another means transition out the snackbar, then transition in the new snackbar. This is visually heavy.

Tip: check the appear prop.

Thank you for the answer but I can't any appear prop.
It is not described in any of these pages:

https://material-ui.com/api/snackbar/
https://material-ui.com/components/snackbars/
https://material-ui.com/api/grow/
https://material-ui.com/components/transitions/

I'm sorry, I can't help more.

@oliviertassinari I am asking for a feature. You are saying it already exists. I am saying I can't find any description about it in the main 4 documentation pages for snackbars.
So either, this feature exists but is not well documented and this issue should be opened to track documentation, or this feature doesn't exist and this issue should also be opened.
In any case, I don't think "I'm sorry, I can't help more." is related to the issue.

After looking at the source code, I found that Grow is using the Transition component from the react-transition-group package, and that @oliviertassinari is talking about its appear prop documented here.
But, yet, the feature I am describing (replacing without transition) is non trivial to implement and is, I think, something a lot of people would like. Hence, at least an example in the documentation would be very helpful.

I had this use case once in the past, when displaying a notification on a Next.js based website. The page was remounted for each navigation. We only wanted the display animation to run on the initial page. We used the appear prop to solve the problem.

Something is off, we are supposed to have a link toward the react-transition-group API in the Snackbar API page.

I would propose something like this (to be applied to the others):
diff --git a/packages/material-ui/src/Dialog/Dialog.js b/packages/material-ui/src/Dialog/Dialog.js
index aaa7c022c..4ea87ba5b 100644
--- a/packages/material-ui/src/Dialog/Dialog.js
+++ b/packages/material-ui/src/Dialog/Dialog.js
@@ -371,6 +371,8 @@ Dialog.propTypes = {
   scroll: PropTypes.oneOf(['body', 'paper']),
   /**
    * The component used for the transition.
+   * The component should implement [react-transition-group](https://reactcommunity.org/react-transition-group/transition#Transition-props)'s API:
+   * See the [documentation for more details](/components/modal/#transitions).
    */
   TransitionComponent: PropTypes.elementType,
   /**
@@ -383,6 +385,7 @@ Dialog.propTypes = {
   ]),
   /**
    * Props applied to the `Transition` element.
+   * The component is based on [react-transition-group](https://reactcommunity.org/react-transition-group/transition#Transition-props).
    */
   TransitionProps: PropTypes.object,

@lcswillems Thanks for raising.
Note that you are within the highest percentile of our users that raise issues, which could be fine with a good noise/signal ratio, or value/time investment. I'm not sure it has been the case so far https://github.com/mui-org/material-ui/issues?utf8=✓&q=is%3Aissue+author%3Alcswillems. Please stick to the most important ones :).

If I open a feature issue, it is because, after searches, I found nothing about it in the documentation. So 3 cases:

It is not implemented and you don't want to implement it. Therefore, opening the issue and you closing it because you won't implement is very helpful for other people who want this feature too, because it informs them they won't get it and that they can stop searching and start implement it by themselves.

It is not implemented and you might want to implement it. Therefore, opening the issue is helpful for other people who want this feature too, because it informs them they won't get it and that they can stop searching and start implement it by themselves. They can also give feedback on the issue and help you, the maintainers, to get a better implementation but also many people want it.

It is implemented and I didn't find it by searching the docs. Therefore, it may mean there is an issue in the documentation (and that other people will have troubles too). Because, when I open, it is always after having searched a lot the documentation.

In all cases, I think opening an issue is valuable for Material-UI. I don't force you to take time to answer me. So I don't see why I should pay for it. Rather, I think I do a valuable job for other people who encounter the same issues than me, and therefore, a valuable job for Material-UI.
Moreover, on the 20 issues I opened, 5 was marked as a question. But they are not from my point of view. I never ask you to do something for me. I am just raising an issue.
Anyway, thank you for your great work :)

And I think the change you propose is a nice addition!

Thanks for the feedback 🤗. My only point would be, we have limited resources, we try to dedicate that the problems that seems to have the most impact.


#441: Don't create next leg if unbeatable

Resolves #441

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 94.869%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
6375

Relevant Lines:
6488

💛  - Coveralls


Third Person Arms Bow without Third Person Arms Bow Aim w/ AGO

first person arms will flicker into view every couple seconds, making it unplayable
haven't tested it without Archery Gameplay Overhaul's meshes since I'd never play without 'em tbh
seems to work fine with the 3rdpersonBowAim enabled at the same time as BowArms but the former is too silly to aim with

Possibly a setting with AGO needs disabling or enabling.


Viewer for custom tiles

We need to create simple viewer for new custom metadata implementation. MapTiler now generates new metadata for custom tiles with tilematrix (since 0.6.4). Specified in: https://github.com/klokan/maptiler/issues/268#issuecomment-188742237
Custom projection metadata rendered with tiles:
http://labs.klokantech.com/tileserver/cr/metadata.json
http://labs.klokantech.com/tileserver/swiss/metadata.json
http://labs.klokantech.com/tileserver/usa/metadata.json
http://labs.klokantech.com/tileserver/france/metadata.json
...
You can see it directly in labs ftp or render with new maptiler PRO
All layes on server accessible through tileserver-php:
http://labs.klokantech.com/tileserver/
We can add it as tilejson to OL3 or load it clearly in viewer. We will use this as viewer for maptiler's exports

Spec draft in: https://github.com/klokantech/tilejson-spec/tree/custom-projection/2.2.0

First adhoc version of the viewer (against latest stable ol3):
http://jsfiddle.net/L4psrp92/2/
The labs are missing CORS, so the CORS extension needs to be enabled for this to work.
I don't think it makes sense to try to PR this into stable ol3 unless we try to make this format more standardized.
To be discussed at the meeting (BTW the jsons linked above do not conform to the linked spec draft).

We need to be sure to test against official data sources:

OSGB: https://github.com/klokan/maptiler/issues/569
Swiss: https://github.com/klokan/maptiler/issues/570
Baidu: https://github.com/klokan/maptiler/issues/459

@petrsloup - Baidu map example is available now check https://github.com/klokan/maptiler/issues/459#issuecomment-215452633
This is pretty non-standard.
On OSGB/Swiss services are varying tile sizes and resolutions on different zoom levels - I can try to simulate this with multiple runs of maptiler and manual copying of rendered tiles and metadata.xml together. Is this required for the first implementation?

Implemented in https://github.com/klokantech/tilejson-ol3. Additional tickets to be created there.


ISPN-7741 Restore POM comments removed by the release script

https://issues.jboss.org/browse/ISPN-7741

Pushed to master, thanks


[icons] Fix generated index.d.ts

Fixes #16138

[x] I have followed (at least) the PR section of the contributing guide.

SvgIconComponent may be a better name than SvgIconType (but not very important anyway as I doubt this type will be visible anywhere to a user)

@MayhemYDG Much appreciated. Thanks.

@oliviertassinari Any chance of cutting a 4.1.1 with this fix? It breaks using the icons package from TypeScript completely, and there's no way to depend on the git repo directly for the time being given the package is in a subdirectory.

Can you rely on<EMAIL_ADDRESS>I want to fix the HMR regression before releasing v4.1.1.


CMake: fix RapidJSON package search. Fixes #597

find_package_handle_standard_args() could not be used without include of FindPackageHandleStandardArgs. See #597

Codecov Report

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

@@            Coverage Diff             @@
##           master     #598      +/-   ##
==========================================
- Coverage   70.58%   70.55%   -0.03%
==========================================
  Files          49       49
  Lines        6970     6970
==========================================
- Hits         4920     4918       -2
- Misses       2050     2052       +2

Impacted Files
Coverage Δ

src/common/os.cc
55.84% <0%> (-0.65%)
:arrow_down:

src/common/reactor.cc
80.24% <0%> (-0.41%)
:arrow_down:

src/client/client.cc
78.81% <0%> (ø)
:arrow_up:

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 2ef937c...906e983. Read the comment docs.


builder - can't have two separate families in one outputDir

I have two separate families in a repo with different design spaces, and need them to export into one fonts folder.  I have two config files for each. When I build a config file builder removes everything from the fonts folder. So I can't export both families in one folder simultaneously.  Is there a way to have builder not clean the fonts folder before generating fonts?
Of course, I can specify different sub-folders for each family and avoid this conflict.

I think this is fixed now that "cleanup" is gone away and we just use temporary directories and move things into place instead.


make order of headers deterministic

Currently the test fails most of the time due to dict.items() having no determined ordering.
This change makes the list of headers appear in alphabetical order, so the output is always the same, for a given input.

@tomviner thanks for your patch!


[BUG] Some Category Descriptions isn't visible even after hovering

Description
There are several subcategories for which tooltip is not visible even when hovering over the icon.
Even for deployed link, Online code editors description isn't visible on hover.
I checked it locally, and it is working properly.
Screenshots

Any additional information?
It is running fine locally, but there seems to be problems in the deployed link I wonder what's causing the issue.
@CBID2 @rupali-codes
You noticed it right.
What browser are you seeing the problem on?
Chrome
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[ ] I am willing to work on this issue (optional)
[ ] I am participating in Hacktoberfest 2023

Yeah I noticed this too @Anmol-Baranwal.

@Anmol-Baranwal there's a bug actually, when scroll to bottom and then click on the i button, then it shows the desc not when you're on the top.

@rupali-codes
Check for articles under open source. The bug doesn't follow this pattern.

@Anmol-Baranwal  & @CBID2 are you still facing this issue?

@Anmol-Baranwal  & @CBID2 are you still facing this issue?

Hold on

@Anmol-Baranwal  & @CBID2 are you still facing this issue?

Yes @rupali-codes. I think Aftan's PR solves this problem

@Anmol-Baranwal  & @CBID2 are you still facing this issue?

Yes @rupali-codes. I think Aftan's PR solves this problem

oh, alright then, please link this issue to that PR :)

@Anmol-Baranwal  & @CBID2 are you still facing this issue?

Yes @rupali-codes. I think Aftan's PR solves this problem

oh, alright then, please link this issue to that PR :)

Done


wazevo(ssa): load memory bounds directly when shared

is this an optimization or a fix for a bug?

I think fix for possible bug, it's the wazevo version of the PR with this discussion
https://github.com/tetratelabs/wazero/pull/1927#issuecomment-1898583351


Fix #581 once min/max intensities in 3D V3.1.1

Fix #581 [Tests] 3.1.1 and master -> once min/max intensities in 3D, it's kept
For 3.1.x

Same as 4.0 one, merging


fix: add generic info for methods with thisArg of built-in classes

Here's a checklist you might find useful.

[x] There is an associated issue that is labelled
'Bug' or 'Accepting PRs' or is in the Community milestone
[x] Code is up-to-date with the master branch
[x] You've successfully run jake runtests locally
[x] You've signed the CLA
[x] There are new or updated unit tests validating the change

Fixes #12548
Note: need guide to write tests

Hi @e-cloud, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@DanielRosenwasser @mhegazy can you have a review and give some guide on how to write correspond tests?

Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience!

Hi @e-cloud, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

@mhegazy can you take a review?

The change looks good. To write tests, add a file named something like thisTypeInLib.ts in the directory tests/cases/compiler. In the file, put code from the bug you reported in #12548.
Run gulp runtests-parallel then look in tests/baselines/local to make sure that no .errors.txt file exists and also that the .types file is correct. Then run gulp baseline-accept to put the baselines in the reference directory, ready to commit.
After you get that workflow going, you should add tests for all the functions you improved too.
These instructions are explained better in CONTRIBUTING.md; I'm just summarising from memory.

@sandersn, new test is added. And i find out the new version of tslint breaks down the linting task.

should not this be two overloads:
find(predicate: (this: undefined, value: T, index: number, obj: Array<T>) => boolean): T | undefined;
find<U>(predicate: (this: U, value: T, index: number, obj: Array<T>) => boolean, thisArg : U): T | undefined;

the spec seems to indicate that, here is what MDN has to say: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find

Also there are other find functions for TypedArrays that should be updated as well.. e.g. Int32Array

@mhegazy what do you mean by:

should not this be two overloads:
find(predicate: (this: undefined, value: T, index: number, obj: Array<T>) => boolean): T | undefined;
find<U>(predicate: (this: U, value: T, index: number, obj: Array<T>) => boolean, thisArg : U): T | >undefined;

the spec seems to indicate that, here is what MDN has to say: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find

Can you describe it more clearly?

From MDN:

If a thisArg parameter is provided to find, it will be used as the this for each invocation of the callback. If it is not provided, then undefined is used.

if this is not defined on a function it is inferred to be any. but the behavior at runtime is that if thisArg is not specified as parameter, the this for the callback is undefined.

@mhegazy I see what you mean now.
I have some tries and find out some problems.
TL;DR
Use the forEach of Array<T> in the testfile as example.
with the test code:
class A {
    options: string[];

    addOptions(options: string[]) {
        if (!this.options) {
            this.options = [];
        }
        options.forEach(function (item) {
            this.options.push(item);
        }, this);
        return this;
    }

    testUndefined(options: string[]) {
        options.forEach(function (item) {
            this.options.push(item);
        }); // case1
        options.forEach(function (item) {
            this.options.push(item);
        }, undefined); // case2
        options.forEach(function (item) {
            this.options.push(item);
        }, null); // case3
    }
}

in lib/es5.d.ts

version 1

forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void): void;
forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;

erros from thisTypeInNativeThisAssignableMethods.errors.txt:
        testUndefined(options: string[]) {
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'undefined'.
            }); // case1
            options.forEach(function (item) {
                this.options.push(item);
            }, undefined); // case2
            options.forEach(function (item) {
                this.options.push(item);
            }, null); // case3
        }

only case1 will be recognized as error, others are legal rather than error.

version 2

    forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void): void;
    forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void, thisArg: undefined): void;
    forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;

erros from thisTypeInNativeThisAssignableMethods.errors.txt:
        testUndefined(options: string[]) {
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'undefined'.
            }); // case1
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'undefined'.
            }, undefined); // case2
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'undefined'.
            }, null); // case3
        }

now all are recognized as undefined, even case3's this should be null.

version 3

    forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void): void;
    forEach(callbackfn: (this: null, value: T, index: number, array: T[]) => void, thisArg: null): void;
    forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void, thisArg: undefined): void;
    forEach<Z>(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void;

erros from thisTypeInNativeThisAssignableMethods.errors.txt:
        testUndefined(options: string[]) {
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'undefined'.
            }); // case1
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'null'.
            }, undefined); // case2
            options.forEach(function (item) {
                this.options.push(item);
                     ~~~~~~~
!!! error TS2339: Property 'options' does not exist on type 'null'.
            }, null); // case3
        }

It seems the nulled-this interface takes precedence. And if the undefined version is placed before null version, the errors are same as version 2

In short, undefined and null is recognized as same. And when undefined is assigned as generic type, it's inferred as any.
Personally, I'm ok with version 2 for temporary solution. @mhegazy do you agree to make three interfaces for all involved methods?

Another thing worths mentioning is that the from static method of all array constructor. They should support iterable parameter and the generic info of Array like is not proper. I just find it accidentally just because from's mapfn also supports thisArg.

Another thing worths mentioning is that the from static method of all array constructor. They should support iterable parameter and the generic info of Array like is not proper. I just find it accidentally just because from's mapfn also supports thisArg.

@mhegazy @sandersn I've rewrite the PR to accomplish the solution commented above.
Note: I use several regexps to globally update the interfaces. Manually updating per interface would be nightmare.

Note that option 1 works correctly with // strictNullChecks: true. However, option 2 is OK with me since it provides better errors with strict null checks off. @mhegazy, are you OK with this solution as well?

@sandersn It seems to fail many tests. Should I update the other baseline files? It would be a lot of files.

Yes, the baseline changes are expected: when you add overloads, it changes the symbols and types to reflect those additional overloads, even if the types resulting from the call doesn't change.

@mhegazy @sandersn hey, guys. All checks have passed now. How about have a review again?

@mhegazy  request for review

You have a yarn.lock file checked in. Should it be there?

Yes, accidence. :sob:

@sandersn ，I've rebased on master just now. Can you guys give some review and feedback? Coz it's been a while since starting the PR.
The tests failed because of the latest problematic @types/node module. The tests passed locally when i switch @types/node to v6.x.

I have a fix in master now for the build break. can you give it another try.

tests pass now.

Thanks @e-cloud!


fix alot address book completion regex

The brackets [ and ] weren't escaped properly in the nix string, so every
time you tried to use it it gave
Traceback (most recent call last):
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/bin/.alot-wrapped", line 11, in <module>
    sys.exit(main())
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/__main__.py", line 137, in main
    UI(dbman, cmdstring)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/ui.py", line 141, in __init__
    self.mainloop.run()
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 278, in run
    self._run()
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 376, in _run
    self.event_loop.run()
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 1186, in run
    raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 1200, in wrapper
    rval = f(*args,**kargs)
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/raw_display.py", line 393, in <lambda>
    event_loop, callback, self.get_available_raw_input())
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/raw_display.py", line 493, in parse_input
    callback(processed, processed_codes)
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 403, in _update
    self.process_input(keys)
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/main_loop.py", line 503, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/container.py", line 592, in keypress
    *self.calculate_padding_filler(size, True)), key)
  File "/nix/store/7c7ykw5jr2574d5xcr4v35zzygg7i88g-python3.7-urwid-1.3.1/lib/python3.7/site-packages/urwid/container.py", line 2269, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/widgets/globals.py", line 145, in keypress
    self.edit_pos)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/completion.py", line 118, in complete
      for c, _ in self._completer.complete(mypart, mypos):
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/completion.py", line 243, in complete
    res = res + abook.lookup(prefix)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/addressbook/external.py", line 49, in lookup
    return AddressBook.lookup(self, prefix)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/addressbook/__init__.py", line 36, in lookup
    for name, email in self.get_contacts():
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/addressbook/external.py", line 43, in get_contacts
    return self._call_and_parse(self.commandline)
  File "/nix/store/xg6m9cr8qvbsgp9zhkqhfwqd0qa8g6zi-python3.7-alot-0.8/lib/python3.7/site-packages/alot/addressbook/external.py", line 66, in _call_and_parse
    m = re.match(self.regex, l, self.reflags)
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/re.py", line 286, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/sre_parse.py", line 930, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/sre_parse.py", line 426, in _parse_sub
    not nested and not items))
  File "/nix/store/gbwx5sc4w0i0ipnmsa0nsk88svs983vl-python3-3.7.2/lib/python3.7/sre_parse.py", line 580, in _parse
    raise source.error(msg, len(this) + 1 + len(that))
re.error: bad character range e-a at position 59

This escapes the regex properly.

Thanks! Rebased to master in 6cd5c8fca5ed00099060317a9fa99c1ceed72a83.


Import of password protected WMS

After setting credentials the available layers of a WMS won't be shown

False positive


Locate providers via Kademlia DHT

Finding providers (peers) for multihashes (since go-ipfs 0.5) or the client DHT (at least as far as koivunej understands the feature), connecting to the peers and fulfilling the wants through the found peers. We could start with a (very) slow implementation which always finds providers for the blocks, while it's likely that the first provider(s) will have the all related successive blocks and later on add a way to "tag" or "correlate" nested Cids to the single root Cid to get away by finding the root providers, maybe refreshing them later on, then only go find providers for successive blocks if all of the root Cid providers fail to send us the successive blocks.

To visualize the "cid correlation" mentioned in the latest edit, think of cat operation on a $root. In the case of multiblock files, it'll find N links and proceed to get_block the first range-matching links[c]. Now there is a high likelyhood of any provider of $root to also have $links[c] but a decreasing likelyhood of anyone having just the subtree starting at $links[c]. This decreasing likelyhood is related to at minimum the current setting of go-ipfs which allows only creating provider records for the roots (or even just the pinned roots).


[ST] Linea routers not bidding

Describe the bug
There's enough USDT liquidity on Linea side, however none of them bidding for the low-value tx (20 usdt)
Additional context
https://connextscan.io/tx/0x41a10e2c615a4170652d40aea08548c95dc409fef0c7776d41f8360b030a3b62
@oncall

Dublicate


Spring cleaning for tests and operations

This PR is better reviewed one commit at the time!
This contains multiple small improvements to:

operations parameter names
tests readability
porting some tests to pytest

This also fix #175 as a side effect

I can split the PR in one PR per commit if you prefer!

:books: Documentation preview :books:: https://equistore--252.org.readthedocs.build/en/252/

Now with four more commits!

Remove unnecessary noqa in operations/init.py
Remove "here is an example for this function" from the docstrings
Rename "parameters"=>"gradients" in XXX_like (and port their tests to pytest)
Add links to Python constants in docstrings


Option -l create broken symlink (in the parent/project folder)

bingo version output:
❯ bingo version
v0.5.1

go version output:
❯ go version
go version go1.15.9 linux/amd64

What happened: installation of a module created a broken symlink in the parent/project folder
What you expected to happen: installation of a module to create a valid symlink in the .bingo folder
How to reproduce it (as minimally and precisely as possible):
❯ (cd $(mktemp -d) && pwd && bingo get -v -l github.com/BurntSushi/toml/cmd/tomlv && ls -alh)
/tmp/tmp.SuLUJFGIXr
Bingo not used before here, creating directory for pinned modules for you at .bingo
getting target github.com/BurntSushi/toml/cmd/tomlv (module  )
exec 'go mod init -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv-e.tmp.mod _'
exec 'go get -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv-e.tmp.mod -d github.com/BurntSushi/toml/cmd/tomlv'
exec 'go env GOPATH'
exec 'go mod init -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod _'
exec 'go list -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod -mod=mod -f={{.Name}} github.com/BurntSushi/toml/cmd/tomlv'
exec 'go build -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod -o=tomlv-v0.4.1 github.com/BurntSushi/toml/cmd/tomlv'
total 4,0K
drwx------ 1 michael michael   22 12 nov.  12:20 .
drwxrwxrwt 1 root    root    2,4K 12 nov.  12:20 ..
drwxr-xr-x 1 michael michael  142 12 nov.  12:20 .bingo
lrwxrwxrwx 1 michael michael   12 12 nov.  12:20 tomlv -> tomlv-v0.4.1

Without colors it is hard to figure out, but the last line is a broken symlink in the wrong folder.
Anything else we need to know:
It might just requires to add in the source code the absolute path to the symlink destination (not the target).
Thank you again for the software.

Same issue over here.
bingo v0.6
go go version go1.19 darwin/arm64


Expected refresh token not returned with offline_access scope?

Documentation - https://dev.onedrive.com/auth/graph_oauth.htm
Scopes 'offline_access files.read.all'
EndPoint 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize'
I'm passing the above scope however I am not being returned a refresh token only an access token in the oAuth Callback URL.
I'm not sure what I'm missing - I've checked the application has Microsoft Graph Permissions
'offline_access'

As part of a repository clean up effort we are closing older issues. If this issue remains, please: open a new issue, reference this issue, and provide any additional details that may help in resolution. Thank you for your understanding as we work to improve our responsiveness.


Connection to server got closed. Server will restart.

I'm trying this server with coc-lsp-wl but I'm only getting "Connection to server got closed. Server will restart." in :CocInfo.
Output: https://gist.github.com/oblitum/4e8489a0205ec49650046a005c9f9c7f

Often I also simply get
## Output channel: lsp-wl

[Error  - 5:41:20 PM] Connection to server is erroring. Shutting down server.
[Trace - 5:41:20 PM] Sending request 'shutdown - (1)'.
[Error  - 5:41:20 PM] Connection to server is erroring. Shutting down server.
[Error  - 5:41:20 PM] Connection to server is erroring. Shutting down server.
[Error  - 5:41:20 PM] Connection to server is erroring. Shutting down server.
[Error  - 5:41:20 PM] Connection to server is erroring. Shutting down server.

I'm on Linux.

Hmm, I think maybe this one is better reported on coc-lsp-wl first.

If you have any idea of a fix, I'm all ears.

OK, my advice is to look at the log file and see what error it will detect.
The method to expose the log file is to uncomment the following line: https://github.com/kenkangxgwe/lsp-wl/blob/7adcf02f324c0c16f7afe81e6c3234416c2574b7/init.wls#L181
to
OpenWrite[WolframLanguageServer`RootDirectory <> "wlserver.log"]

and run the coc-lsp-wl again. After it restarts for 5 times, open the log file located in the lsp-wl directory and copy it here

I only always get this in the log:
[INFO  2019-07-30T15:22:03] Initializing Wolfram Language Server
[INFO  2019-07-30T15:22:04] Language server is connecting the client through
socket.
[INFO  2019-07-30T15:22:04] Server listening from port 6536...

The file get this when I start the editor.

OK, change the following log-level to debug to see whether you get more information.
https://github.com/kenkangxgwe/lsp-wl/blob/7adcf02f324c0c16f7afe81e6c3234416c2574b7/init.wls#L175

I got this:
``
[DEBUG 2019-07-30T16:10:11] Logging level: DEBUG
[INFO  2019-07-30T16:10:11] Initializing Wolfram Language Server
[DEBUG 2019-07-30T16:10:11] Cache: /home/francisco/Projects/lsp-wl/wlServerCache
[INFO  2019-07-30T16:10:11] Language server is connecting the client through
socket.
[INFO  2019-07-30T16:10:11] Server listening from port 6536...
[DEBUG 2019-07-30T16:10:12]
WolframLanguageServerServerPrivateIconize[<|jsonrpc -> 2.0, id -> 0, method -> initialize, params -> <|processId -> 15539, rootPath -> /home/francisco/Projects/samples/mathematica, rootUri -> file:///home/francisco/Projects/samples/mathematica, capabilities -> <|workspace -> <|applyEdit -> True, workspaceEdit -> <|documentChanges -> True, resourceOperations -> {create, rename, delete}, failureHandling -> textOnlyTransactional|>, didChangeConfiguration -> <|dynamicRegistration -> True|>, didChangeWatchedFiles -> <|dynamicRegistration -> True|>, symbol -> <|dynamicRegistration -> True, symbolKind -> <|valueSet -> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}|>|>, executeCommand -> <|dynamicRegistration -> True|>, configuration -> True, workspaceFolders -> True|>, textDocument -> <|publishDiagnostics -> <|relatedInformation -> True|>, synchronization -> <|dynamicRegistration -> True, willSave -> True, willSaveWaitUntil -> True, didSave -> True|>, completion -> <|dynamicRegistration -> True, contextSupport -> True, completionItem -> <|snippetSupport -> True, commitCharactersSupport -> True, documentationFormat -> {markdown, plaintext}, deprecatedSupport -> True, preselectSupport -> True|>, completionItemKind -> <|valueSet -> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}|>|>, hover -> [DEBUG 2019-07-30T16:10:12] handle/initialize [DEBUG 2019-07-30T16:10:12] <|jsonrpc -> 2.0, id -> 0, result -> <|capabilities -> <|textDocumentSync -> 2, hoverProvider -> True, completionProvider -> <|resolveProvider -> True, triggerCharacters -> \|>, documentSymbolProvider -> True|>|>|> [DEBUG 2019-07-30T16:10:12] WolframLanguageServerServerPrivateIconize[<|jsonrpc -> 2.0, method ->
initialized, params -> <||>|>, initialized]
[DEBUG 2019-07-30T16:10:12]
WolframLanguageServerServerPrivateTcpSocketHandler[WolframLanguageServerServ
erPrivatehandleMessage[<|jsonrpc -> 2.0, method -> textDocument/didOpen,
params -> <|textDocument -> <|uri ->
file:///home/francisco/Projects/samples/mathematica/sample.wl, languageId ->
mma, version -> 1, text -> |>|>|>,
WolframLanguageServerServerPrivateCurry[WolframLanguageServerServerPrivate
addScheduledTask][WolframLanguageServerServerPrivateServerTask[<|type -> CheckUpgrades, scheduledTime -> DateObject[{2019, 7, 30, 16, 10, 12.402914}, Instant, Gregorian, -3.]|>]][WolframLanguageServerServerPrivateWorkState[<|openedDocs -> <||>,
config -> WolframLanguageServerServerPrivate`loadConfig[], scheduledTasks ->
{}, client -> SocketObject[5c0501f2-268c-4cb4-b2e7-4bbc7932e52e],
clientCapabilities -> <|workspace -> <|applyEdit -> True, workspaceEdit ->
<|documentChanges -> True, resourceOperations -> {create, rename, delete},
failureHandling -> textOnlyTransactional|>, didChangeConfiguration ->
<|dynamicRegistration -> True|>, didChangeWatchedFiles -> <|dynamicRegistration
-> True|>, symbol -> <|dynamicRegistration -> True, symbolKind -> <|valueSet ->
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26}|>|>, executeCommand -> <|dynamicRegistration -> True|>,

It  also shows up on :CocInfo. After that last output I got server closed from its side:
[snip]
23, 24, 25, 26}|>|>, executeCommand -> <|dynamicRegistration -> True|>,
[Error  - 4:10:12 PM] Connection to server got closed. Server will not be restarted.

Aha, that is the problem. Curry is not introduced until 11.3, so I will fix it shortly. Thanks for the feedback. I will let you know once I commit the fix.

OK thanks!

Hi, if you still have 11.2 in your hand, could you please check if e27ed8d resolves the problem?

Hi. I got server closed again, this is the log:
[DEBUG 2019-08-02T23:22:47] Logging level: DEBUG
[INFO  2019-08-02T23:22:47] Initializing Wolfram Language Server
[DEBUG 2019-08-02T23:22:48] Cache: /home/francisco/Projects/lsp-wl/wlServerCache
[INFO  2019-08-02T23:22:48] Language server is connecting the client through
socket.
[INFO  2019-08-02T23:22:48] Server listening from port 6536...
[DEBUG 2019-08-02T23:22:49]
WolframLanguageServer`Server`Private`Iconize[<|jsonrpc -> 2.0, id -> 0, method
-> initialize, params -> <|processId -> 24095, rootPath ->
/home/francisco/Projects/samples/mathematica, rootUri ->
file:///home/francisco/Projects/samples/mathematica, capabilities -> <|workspace
-> <|applyEdit -> True, workspaceEdit -> <|documentChanges -> True,
resourceOperations -> {create, rename, delete}, failureHandling ->
textOnlyTransactional|>, didChangeConfiguration -> <|dynamicRegistration ->
True|>, didChangeWatchedFiles -> <|dynamicRegistration -> True|>, symbol ->
<|dynamicRegistration -> True, symbolKind -> <|valueSet -> {1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}|>|>,
executeCommand -> <|dynamicRegistration -> True|>, configuration -> True,
workspaceFolders -> True|>, textDocument -> <|publishDiagnostics ->
<|relatedInformation -> True|>, synchronization -> <|dynamicRegistration ->
True, willSave -> True, willSaveWaitUntil -> True, didSave -> True|>, completion
-> <|dynamicRegistration -> True, contextSupport -> True, completionItem ->
<|snippetSupport -> True, commitCharactersSupport -> True, documentationFormat
-> {markdown, plaintext}, deprecatedSupport -> True, preselectSupport -> True|>,
completionItemKind -> <|valueSet -> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}|>|>, hover ->
[DEBUG 2019-08-02T23:22:49] handle/initialize
[DEBUG 2019-08-02T23:22:49] <|jsonrpc -> 2.0, id -> 0, result -> <|capabilities
-> <|textDocumentSync -> 2, hoverProvider -> True, completionProvider ->
<|resolveProvider -> True, triggerCharacters -> \|>, documentSymbolProvider ->
True|>|>|>
[DEBUG 2019-08-02T23:22:49]
WolframLanguageServer`Server`Private`Iconize[<|jsonrpc -> 2.0, method ->
initialized, params -> <||>|>, initialized]
[DEBUG 2019-08-02T23:22:49]
WolframLanguageServer`Server`Private`TcpSocketHandler[WolframLanguageServer`Serv
er`Private`Curry[WolframLanguageServer`Server`Private`addScheduledTask][WolframL
anguageServer`Server`Private`ServerTask[<|type -> CheckUpgrades, scheduledTime
-> DateObject[{2019, 8, 2, 23, 22, 49.434808}, Instant, Gregorian,
-3.]|>]][WolframLanguageServer`Server`Private`WorkState[<|openedDocs -> <||>,
config -> WolframLanguageServer`Server`Private`loadConfig[], scheduledTasks ->
{}, client -> SocketObject[b7db0c2c-0eec-416a-a1b2-da1a1eca0080],
clientCapabilities -> <|workspace -> <|applyEdit -> True, workspaceEdit ->
<|documentChanges -> True, resourceOperations -> {create, rename, delete},
failureHandling -> textOnlyTransactional|>, didChangeConfiguration ->
<|dynamicRegistration -> True|>, didChangeWatchedFiles -> <|dynamicRegistration
-> True|>, symbol -> <|dynamicRegistration -> True, symbolKind -> <|valueSet ->
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26}|>|>, executeCommand -> <|dynamicRegistration -> True|>,
configuration -> True, workspaceFolders -> True|>, textDocument ->
<|publishDiagnostics -> <|relatedInformation -> True|>, synchronization ->
<|dynamicRegistration -> True, willSave -> True, willSaveWaitUntil -> True,
didSave -> True|>, completion -> <|dynamicRegistration -> True, contextSupport
-> True, completionItem -> <|snippetSupport -> True, commitCharactersSupport ->

I also got this message on :CocInfo before the log:
MyCurry::shdw: Symbol MyCurry appears in multiple contexts {MyCurry`, Global`}; definitions in context MyCurry` may shadow or be shadowed by other definitions.
[DEBUG 2019-08-02T23:24:49] Logging level: DEBUG

Could you try edit https://github.com/kenkangxgwe/lsp-wl/blob/e27ed8d8baede47c207eb899248eecd5ae7b5b19/init.wls#L149 to
    System`Curry = MyCurry

to see whether it helps.

No, sorry, it didn't help.

I had the same issue. Running wolframscript -f /path/to/lsp-wl/init.wls cannot solve the problem (I am already on develop branch).
$ wolframscript -f init.wls
[INFO  2019-10-29T03:35:52] Initializing Wolfram Language Server

[INFO  2019-10-29T03:35:53] Language server is connecting the client through
socket.

SocketConnect::zmqexception:
   A ZeroMQLink exception was thrown - Connection refused (code 61)
[ERROR 2019-10-29T03:35:53] Cannot connect to client via socket.

But running
initfile = "/path/to/lsp-wl/init.wls";
args = {};
Block[{$ScriptCommandLine = Prepend[args, initfile], Quit = Function[{}, Throw[Null]]},
    Catch[<< (initfile)]
];

inside Mathematica fixes this issue. I am on macOS 10.15 Catalina, with Mathematica 12.0.0 installed. Just for your information for those who met the same problem as I.

Hi @singularitti , if you run the server outside the editor (vscode in your case), you will need to manually start a socket server. The connection refused error is simply because it couldn't find a socket server.
If you encounter this error inside the vscode, please follow the https://github.com/kenkangxgwe/lsp-wl/issues/9#issuecomment-516427865 and paste the debug log. Thanks.


Use trusted publishing to push to PyPI

I've added the appropriate knobs to PyPI to trust this workflow.

Review from mobile, can you cleanup the credentials as well in this github repo to reduce risk of confusion?
Oh btw i realize now this wont work. You need explicit permissions declared also, see the release.yaml in jupyterhub-python-repo-template.

Fixed in https://github.com/jupyterhub/jupyter-remote-desktop-proxy/pull/48, @consideRatio

@consideRatio but you're on vacation! Go vacate!


Making statemachines observable?

First time I've come across Umple and really liking it so far, however I've encountered one issue that I could not find a way around. Consider the following example:
class GarageDoor
{
  isA Observable;
   status {
      Open { buttonOrObstacle -> Closing;  }
      Closing {
          buttonOrObstacle -> Opening;
          reachBottom -> Closed;
      }
      Closed { buttonOrObstacle -> Opening; }
      Opening {
          buttonOrObstacle -> HalfOpen;
          reachTop -> Open;
      }
      HalfOpen { buttonOrObstacle -> Opening; }
  }
}

class Observable{
 StateObserver[] observers;

  void notifyObservers(Status newState){
    for (StateObserver observer : observers){
      observer.onStateChanged(newState);
    }
  }
}

interface StateObserver{
  void onStateChanged(Status newState);
}

Here I'm trying to make the Status StateMachine observable however I need to have a way to override the generated SetStatus method but I can't seem to find a way to change the visibility of setStatus from private to protected, so that I can call notify - is there a way to do so? Or alternative way of achieving this?

I hope I understood your question correctly.
As long as I know, the method setStatus is generated automatically and its visibility is fixed. One way you can deal with that is to create a new protected method that calls setStatus (something like a wrapper). Then, you can get the required flexibility through that.
Another approach:
use aspect-oriented features of Umple (before and after).
for example,
  after setStatus {
    //do what you want.
  }

@TimLethbridge  and others might have others solution as well.

Thanks! The after-keyword was exactly what I was looking for. And using the before-keyword I was able to extend the functionality so that I can observe the old state and new state. If anyone else comes across this, here is a working example:
class GarageDoor
{
  isA Observable;
   status {
      Open { buttonOrObstacle -> Closing;  }
      Closing {
          buttonOrObstacle -> Opening;
          reachBottom -> Closed;
      }
      Closed { buttonOrObstacle -> Opening; }
      Opening {
          buttonOrObstacle -> HalfOpen;
          reachTop -> Open;
      }
      HalfOpen { buttonOrObstacle -> Opening; }
  }
  before setStatus{
    Status oldState = status;
  }
  after setStatus{
    notifyObservers(oldState, status);
  }
}

class Observable{
 StateObserver[] observers;

  void notifyObservers(GarageDoor.Status oldState, GarageDoor.Status newState){
    for (StateObserver observer : observers){
      observer.onStateChanged(oldState, newState);
    }
  }
}

interface StateObserver{
  void onStateChanged(GarageDoor.Status oldState, GarageDoor.Status newState);
}


Reduce probability of horizontal scrolling on resource lists

The following changes are implemented
TODO: Summary
Changes in the user interface:
TODO: Add screenshots, recordings or remove this section
Checklist when submitting a final (!draft) PR

[ ] Commits are tidied up, squashed if needed and follow guidelines in CONTRIBUTING.md
[ ] Code builds
[ ] All existing tests pass
[ ] All new critical code is covered by tests
[ ] PR is linked to the relevant issue(s)
[ ] Rebased with the target branch

Issue found after QC:

compose -> module list: can't access related pages and 3 dots

https://github.com/cortezaproject/corteza/assets/85161724/69473e65-1278-4ee7-be0e-d9365811026d

admin -> integration gwt -> routes: style issue on 3 dots menu open

https://github.com/cortezaproject/corteza/assets/85161724/69b7bbff-5967-478f-b1d4-26bc87009015

Final batch 🤞:

3 dots/related pages btns not visible from mobile device in all webapps
wf list and admin wf list: the permission to delete a wf enables/disables the permission to undelete a wf. For example, if I set canDelete to true I'm able to delete and undelete a wf but if I set it to true I cannot delete and undelete a wf


How do I change the local port?

@ryanj How do I change the local port? Documentation couldn't be any less clear :)
I looked in the other two linked projects, and tried following the examples there, with the below code:
var port    = config.get('PORT', 7666),
    address = config.get('IP', 'localhost');

server = app.listen(
  port,
  address,
  function () {
    console.log('Application worker ' + process.pid + ' started...');
    console.log( "Listening on " + address + ", port " + port )
});

However, the server's still listening on port 8080.
Thanks in advance.

Hi @stereokai:
From your example, I'm not sure how you are initializing the config object.

Did you try passing your config overrides into the constructor (as shown README.md#setup)?
Did you try passing your default config values into the resulting config object's add() function (also in README.md#setup)?
Did you try reading the config-chain docs? config-multipaas is an instance of config-chain, which can help you merge multiple layers of config data...  If you don't need a full-blown configuration management solution (but you still want cloud defaults) see cloud-env.

Since cloud-env does not attempt to merge multiple layers of configuration (or maintain compatibility with the config-chain interface), it provides a get accessor function that allows you to supply a different fallback value each time.  You might want to try that module instead.
Hope this helps.

Sorry for not responding earlier, was rather preoccupied.
It's a pretty simple server script for a simple PoC. All I needed to do was change the port the server listened when run locally, because the default (8080) is already used on my laptop.
Apparently multipaas knows to use port 80 on Openshift, so what I ended up doing is simply overriding the port if it equals 8080:
let config  = require('config-multipaas')();

let port    = config.get('PORT'),
    address = config.get('IP');

if (port == 8080) port = 7666;

server = app.listen(
  port,
  address,
  function () {
    console.log('Application worker ' + process.pid + ' started...');
    console.log( "Listening on " + address + ", port " + port )
});

It seems to work, but it feels hackish. What would be the correct way to do that?
Thanks

var cc = require('config-multipaas')
var config = cc().add({ PORT: 7666 })
var port = config.get('PORT')


Readonly vs. litteral type breaking change?

TypeScript Version:  2.1.1
Code
class A {
    readonly n = 0;
    constructor() {
        this.n = 1;  // Type '1' is not assignable to type '0'
    }
}

class B {
    constructor(readonly n = 0) {}
}

class C extends B {
    constructor() {
        super(1);  // Argument of type '1' is not assignable to parameter of type '0 | undefined'.
    }
}

Expected behavior:
Is this behavior expected (breaking change vs 2.0.8)?
To me this should be valid, particularly the 2nd case.
Actual behavior:
Errors displayed in comments.

#11409

All parameter initializes should be widened to their base (e.g. class B), property initializes (e.g. class A) are intentional breaking change.

Fix is up at #12312


YG Answer Forms Submit Post Request

Fixed my answer form so it now submits post requests when the fields are filled in properly!
Had to add state and isolate the image urls from the image uploads to use as a parameter in the request.
I didn't really add much visual functionality but here's a gif in case it helps. Let me know if theres anything to fix!
https://user-images.githubusercontent.com/84756768/141264258-de762076-d0af-4abc-8cad-e96ddabc3347.mp4

 Add an Answer Modal_ Post request on submit

@ygroener It looks like there are merge conflicts that will need to be resolved. Other than that this looks good to me.


[ci] Support for EO agent pools

Related work item: VS #1488096
Follow up to https://github.com/xamarin/XamarinComponents/pull/1330.  This PR helps ensure that the windowsImageOverride setting is only applied to windows jobs.  Plus ensures that the windows job will execute when windowsImageOverride is set and windowsImage is not. Finally, allows for targeting Windows pools by name and not just by the image name.
Per Executive Order (EO) builds must target secured agent pools such as the AzurePipelines-EO pool.  To target such a pool you need to specify the ImageOverride demand as in the following example:
pool:
  name: 'AzurePipelines-EO'
  demands:
  - ImageOverride -equals AzurePipelinesWindows2022compliant

I guess I was wrong, drilling down further it's not actually using AzurePipelinesWindows2022compliant:
1ES Hosted Pool
SKU: Standard_D2ds_v4
Image: AzurePipelinesUbuntu18.04compliant
Image Version: 9.0.0
Interactive Mode: False

Do I need to make changes to the AndroidX yaml for this?
https://github.com/xamarin/AndroidX/blob/main/azure-pipelines.yml#L40-L41


Remove explicit Update on instance

The unbound controller did a separate client.Update after
it added the self finalizer and then continued the reconciliation
However the client.Update only wrote the
main resource and ignored the status subresource. However it refreshed
the whole instance with the result of the Update meaning it reset the in
memory status updates. We don't need two separate update so this PR
removes the standalone Update and return immediately to rely on the
deferred PatchInstance call to do all the updates. Similar logic is
applied to the delete code path.

{  "designate-operator-build-deploy-kuttl" test steps failed: "designate-operator-build-deploy-kuttl" pod "designate-operator-build-deploy-kuttl-openstack-k8s-operators-deploy" failed: could not watch pod: the pod ci-op-2mjq3897/designate-operator-build-deploy-kuttl-openstack-k8s-

/test designate-operator-build-deploy-kuttl


File Nesting Quick Switch

Using the File Nesting made me realize that it could really help with project setup and navigation in a clean way.
Angular Component level nesting:
  "explorer.fileNesting.patterns": {
    "*.component.ts": "${capture}.component.spec.ts,${capture}.component.less,${capture}.component.html",
    "*.module.ts": "${capture}-*.module.ts"
  }

In Angular, with the extension, there's a "go to template" option in the context menu and command pallet, but it, unfortunately, only lets you jump between the component and template files, and not the testing or style files.

React Component level nesting:
  "explorer.fileNesting.patterns": {
    "*.jsx": "${capture}.js,${capture}.*.js,${capture}.*.jsx,${capture}.css,${capture}.*.css,${capture}.scss,${capture}.less",
    "*.tsx": "${capture}.ts,${capture}.*.ts,${capture}.*.tsx,${capture}.css,${capture}.*.css,${capture}.scss,${capture}.less",
  },

I'd like a generic switch to next/previous file in folder/nesting group. That way you have a way to quick switch between related files that is easily definable and helps with organization.
My thoughts are either a right click context menu -> next/previous file in folder/group and accompanying command pallet command, or an assignable hotkey for that.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

Just wanted to stay, it's really too bad that this is not getting enough votes; I'm so surprised this feature does not already exist. Is there some reddit/slack channel where people post feature requests to beg for votes?

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Cummulative option is missing in torque category maps

is not possible to do this with torque format, we removed it some months ago


Sensu API wedges occasionally

I've noticed with 0.13.1 that the API process gets stuck occasionally such that it refuses to answer requests, like so:
# curl -vis http://localhost:4567/info
* About to connect() to localhost port 4567 (#0)
*   Trying ::1... Connection refused
*   Trying <IP_ADDRESS>... connected
* Connected to localhost (<IP_ADDRESS>) port 4567 (#0)
> GET /info HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/<IP_ADDRESS> zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:4567
> Accept: */*
>
* Empty reply from server
* Connection #0 to host localhost left intact
* Closing connection #0

The log file doesn't contain any sort of warning, error or crash, just the various HTTP accesses being made, (including my curl test). If I bounce the API process then it starts working again:
# curl -vis http://localhost:4567/info
* About to connect() to localhost port 4567 (#0)
*   Trying ::1... Connection refused
*   Trying <IP_ADDRESS>... connected
* Connected to localhost (<IP_ADDRESS>) port 4567 (#0)
> GET /info HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/<IP_ADDRESS> zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:4567
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: application/json;charset=utf-8
Content-Type: application/json;charset=utf-8
< Content-Length: 169
Content-Length: 169
< Connection: keep-alive
Connection: keep-alive
< Server: thin 1.5.0 codename Knife
Server: thin 1.5.0 codename Knife

<
* Connection #0 to host localhost left intact
* Closing connection #0
{"sensu":{"version":"0.13.1"},"transport":{"keepalives":{"messages":0,"consumers":1},"results":{"messages":0,"consumers":1},"connected":true},"redis":{"connected":true}}

Anything I can enable to see what might be causing this?

Closing due to inactivity (mostly on our part), but also because this is reference what is now a super old version of Sensu. Please feel free to create a new issue if this matter is not resolved. #monitoringlove


1.28.17: build fails with gcc 13.x

Looks like current stable 1.28.17 build fails with gcc 13.x
[tkloczko@pers-jacek cups-filters-1.28.17]$ make V=1
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cups-filters-1.28.17'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cups-filters-1.28.17'
/usr/bin/g++ -DHAVE_CONFIG_H -I.    -std=c++0x  -D_PPD_DEPRECATED=""    -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wall  -D_GNU_SOURCE -c -o filter/pdftopdf/pdftopdf-pdftopdf_processor.o `test -f 'filter/pdftopdf/pdftopdf_processor.cc' || echo './'`filter/pdftopdf/pdftopdf_processor.cc
In file included from /usr/include/qpdf/Buffer.hh:26,
                 from /usr/include/qpdf/QPDF.hh:38,
                 from filter/pdftopdf/qpdf_pdftopdf_processor.h:5,
                 from filter/pdftopdf/pdftopdf_processor.cc:2:
/usr/include/qpdf/PointerHolder.hh:31:3: warning: #warning "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh" [-Wcpp]
   31 | # warning "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh"
      |   ^~~~~~~
/usr/include/qpdf/QPDF.hh:1569:36: error: ‘std::string_view’ has not been declared
 1569 |     void linearizationWarning(std::string_view);
      |                                    ^~~~~~~~~~~
make[2]: *** [Makefile:4214: filter/pdftopdf/pdftopdf-pdftopdf_processor.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cups-filters-1.28.17'
make[1]: *** [Makefile:4825: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cups-filters-1.28.17'
make: *** [Makefile:2079: all] Error 2

IIRC std::string_view is part at leasrt c++17 .

Just tested quick hack wit CXXFLAGS=-std=c++17 ./configure <params> and it solved the build issue.
IMO cups-filters autoconf should have C++ standard check.

Could you try pull request #505, for example by cloning the contributor's fork and see whether that one builds?
https://github.com/kraj/cups-filters/tree/1.x


switch non-SMB users over to oref0-pump-loop

Not yet tested.

Anyone trying to use their 0.4.x runagain files on 0.5.0 will need to update those, regardless of this PR.

worked for me

@wharper11 also tested this and said in Gitter that it looks good.


Enhance Code2Parquet module to handle non-code text as well

Search before asking

[X] I searched the issues and found no similar issues.

Component
Other
Feature
The current version of Code2Parquet takes zip files made of text files that are all code. We need the ability to handle plain text (non-code) files as input as well.
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

What extensions are you proposing be handled as text?  Can we be more specific about requirements?

I do not think it matters. All the files inside zip are handled as text

@daw3rd The requirement to "handle" general text (code and non-code) came from Nirmit last Friday when I was showing him the new root README files. He said in addition to code, pdf and html ingestion, we should have text too. So, when I discussed this with Boris, he convinced me that the best way to do this is to generalize code2parquet to handle arbitrary text and not just code text.

That does not provide any more detail on the requirements.

Do you want to import .txt files from zips similarly to how we do .pdf contained in zip?
Are there other extensions?
In the case of code2parquet, we know it is code (.py, .java, .c, etc.). how do we know which we're importing?

Why not merge all html, text, pdf into the same module.  Probably because of the varying requirements, but to not have text2parquet, when we already have pdf2parquet and html2parquet, breaks the pattern.  I'm not convinced adapting code2parquet is the right way to go.

Answers and comments to your questions:

Yes
No
I don't think Boris has changed anything that the original code2parquet was doing when the code_data parameter is by default true, so the ext column has the file extension extracted from the file path (.py, .java, ...) I assume with the new code, when code_data is false, the ext column says .txt? (@blublinsky to confirm).

When I discussed this with Boris, he mentioned the alternative option of creating an independent text2parquet, but he convinced himself (and me) that it meant duplicating almost everything that the code2parquet was doing, whereas adding a new flag to that code was much more efficient.


cli: require typed confirmation for cluster delete

Closes #3020, although this still might require some test changes...
Signed-off-by: Nick Sandford<EMAIL_ADDRESS>

@slurms That issue is actually about deletion of a provisioned cluster in the Web UI available from flynn install. The flynn cluster remove command just deletes a cluster config from ~/.flynnrc which is not a dangerous operation.

Oh... :laughing:

🏆


bug in source code

https://github.com/zemasoft/wildcards/blob/5662507f01f5d0a4ec22f45749214276ed366d1b/single_include/wildcards.hpp#L1199
the above line should be:
throw throw_logic_error(

I also face this problem when I using C++14, is there any fork project contain this fix?
In file included from /home/i538531/code/app-mesh/src/daemon/Label.cpp:4:0:
/usr/local/include/wildcards/wildcards.hpp: In instantiation of ‘constexpr bool wildcards::detail::is_alt(PatternIterator, PatternIterator, const wildcards::cards<typename wildcards::iterated_item<It>::type>&, wildcards::detail::is_alt_state, int) [with PatternIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename wildcards::iterated_item<It>::type = char]’:
/usr/local/include/wildcards/wildcards.hpp:1548:48:   required from ‘constexpr wildcards::detail::match_result<SequenceIterator, PatternIterator> wildcards::detail::match(SequenceIterator, SequenceIterator, PatternIterator, PatternIterator, const wildcards::cards<typename wildcards::iterated_item<PatternIterator>::type>&, const EqualTo&, bool, bool) [with SequenceIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; PatternIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; EqualTo = cx::equal_to<void>; typename wildcards::iterated_item<PatternIterator>::type = char]’
/usr/local/include/wildcards/wildcards.hpp:1785:14:   required from ‘constexpr wildcards::full_match_result<typename wildcards::const_iterator<Sequence>::type, typename wildcards::const_iterator<C>::type> wildcards::matcher<Pattern, EqualTo>::matches(Sequence&&) const [with Sequence = const std::__cxx11::basic_string<char>&; Pattern = const std::__cxx11::basic_string<char>&; EqualTo = cx::equal_to<void>; typename wildcards::const_iterator<C>::type = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename wildcards::const_iterator<Sequence>::type = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]’
/home/i538531/code/app-mesh/src/daemon/Label.cpp:77:133:   required from here
/usr/local/include/wildcards/wildcards.hpp:1200:76: error: cannot convert ‘__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >’ to ‘bool’ in return
 p, "The program execution should never end up here throwing this exception");
                                                                            ^
make[2]: *** [src/daemon/CMakeFiles/appsvc.dir/build.make:118: src/daemon/CMakeFiles/appsvc.dir/Label.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:591: src/daemon/CMakeFiles/appsvc.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

This fix is simple, remove the check to clang here:
https://github.com/zemasoft/wildcards/blame/master/single_include/wildcards.hpp#L570


Allow Common Labels and Common Annotations Transformers on Kustomization Apply

Currently, there doesn't seem to be a way to append a given label to all Kubernetes objects that my Kustomization applies. If I want to leverage the .spec.patches property in Kustomization to achieve this, I either have to be willing to completely overwrite my /metadata/labels field or I have to already have the label field available in each metadata section of all objects in my git repo as described here
Proposal
Enable a spec.commonLabels and spec.commonAnnotations similar to the CommonLabel and CommonAnnotation transformers available natively with Kustomize

The major issue with the common labels and annotations is that they are applied to pod selectors which are immutable thus breaking the sync.

@stefanprodan This is not an issue with spec.commonAnnotations since it only updates the metadata and not the selectors for any resources. Feasibly, we could alter the behavior of the CommonLabel transformer slightly so we don't update the selectors of resources, though this obviously deviates slightly from Kustomize

@stefanprodan I'm a little confused about the explanation above.  In what way does it break the sync?  Do you mean that we would have to destroy the pods to apply new common labels if they are added to the flux kustomization?

@JamWils that's how Kubernetes works, pod labels are immutable, so you need to delete the Deployments/StatefulSets/DaemonSets to change them. See the docs here https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates

I 100% agree with that.  However, if I change the label on a pod manually and then push then the kustomization controller will replace the pod with the new label.  If we had a commonLabels on the flux kustomization wouldn't we expect the same behavior?  I.e. I add a common label test: this and then I would see that common label applied to the resources kustomize is working with.

@stefanprodan https://github.com/kubernetes-sigs/kustomize/issues/1009#issuecomment-801460003 shows how you  would be able to work around the problem, but more importantly I think, is that in later versions of Kustomize, https://github.com/kubernetes-sigs/kustomize/pull/3743 has been merged into the project, allowing to set a labels field. It seems that the documentation hasn't been updated yet (https://github.com/kubernetes-sigs/kustomize/issues/3756), but something like this should work (pulled from the tests):
resources:
- deployment.yaml
labels:
- pairs:
    foo: bar
- pairs:
    a: b
  includeSelectors: true
- pairs:
    c: d
  fields:
  - path: spec/selector
    group: example.dev
    version: v1
    kind: MyCRD
    create: true

From go.mod#L188 it seems that the Kustomize-controller uses Kustomize v4.4.1, and already from v4.1.0 you get the labels field, so theoretically, it should be possible to solve this issue :smile:

@AndersBennedsgaard yes I'm aware of the labels field but this issue is about the CommonLabels transform which includes selectors. I'm not for adding a CommonLabels field to Flux that diverges in behaviour from kustomize, this will confuse users.
@jonathan-innis Flux runs all transforms found in a kustomization.yaml, why do we need to add these fields to Flux CRD? Users can add labels and annotations in the various ways that kustomize supports inside their kustomization.yaml.

I agree, creating a commonLabels field with a different behavior from the one with Kustomize would get confusing for people who are actually aware of the behavior of Kustomize, but, as stated several times in the original issue, the commonLabels field are likely to be removed or changed in future versions of Kustomize due to the confusing name.
My guess is that creating some field in Kustomization that adds labels to all the resources, could be done by adding to https://github.com/fluxcd/kustomize-controller/blob/main/controllers/kustomization_generator.go#L110:
if kg.kustomization.Spec.CommonUnpropagatedLabels != "" {
    kus.Labels[0].Pairs = kg.kustomization.Spec.CommonUnpropagatedLabels
}

(I am not a Go developer, if that wasn't clear :wink: )
Obviously, CommonUnpropagatedLabels, is not a name that is set in stone, but what I could come up with on the spot.
This could also be made more generic, allowing users to specifically input pairs.includeSelectors and pairs.fields[].

Just to expand on my reason for adding the fields to the Kustomization: I help run a multi-tenant setup, where some of the tenants does not care much for Kubernetes. They just want to write as little YAML as possible, and using the very simple Helm chart we have written for them is enough. We therefore make much use of the autodetection and recursiveness of the Kustomization, in order to automate the deployments.
This means that placing a kustomization.yaml with the transformers at the root of the project, we would require our tenants to write and manage one for each of their subdirectories - removing the nice autodetection of Flux.

I've got the same multi-tenant use-case, where it would be nice to apply labels to all resources for a tenant for them instead of relying on the tenants to add their own labels or add a LabelTransformer in their own kustomization.yaml.
Supporting LabelTransformation would also work, without breaking changes since you specify the labels, object types, and full paths to apply the labels. It would also not cause confusion like having unique commonLabels for flux with a different operation than kustomize.


Failed test db resources all - warm up for threads and async resource fetch

First attempt to improve all_resources:

changed let subject_bin = subject.as_bytes() - same encoding (bincode zeropad prefix), that allows to use scan_prefix for sled::Tree which logically fit
Added cache_capacity(1000 * 1024 * 1024) to see if it improves benchmarks, I think it shall be in the config with a threshold value for the percentage of available memory
turned for into map if you want all_resources to be iterator we can remove the last collect call.
Welcome for feedback, I plan to try various multi-thread and async runtimes to see if it improves performance.
I also think we shall make include_external part of config and global variable.

Apologies, I forgot to squash commit.

As discussed I will create two new from the master branch.

https://github.com/joepio/atomic-data-rust/pull/382
@AlexMikhalev i think it may be better to use this instead of master


Rounadbout and high prioirt road options are a mess

One problem is inconsistency as you can see in the image above.
1- Pedestrians shall not cross the roads approaching roundabout :

on : disabled crossings
off : does not touch anything. (explained in tooltip)

2- Allow pedestrian crossings on main road:

on : does not touch anything. (explained in tooltip)
off : disables crossings

In case (2) the verb is allow but what happens when you activate it is that it leaves alone so that's a bit wierd.
In case (1) the problem is the option is using negative verb.
Its kind of hard to organize these options only with two state toggles. All the possible states are:

ON
Off
Reset to default
leave alone

but that might be too much information to provide to user.

I am not sure if we should fix this considering that we want to move these options to in game panel #711

I think wait until we create in-game panel before changing them. Let's get the existing UI of all tools updated to new UI system first though.

We should start discussing this though.

First thing to do would be ensure no negative options, because enabling a negative is confusing ("I turn this on to turn that off" vs. "I turn this on") for many users.
So instead of "Pedestrians shall not cross..." the options would be "Allow pedestrians to cross..." (and the default state inverted).

Roundabouts

[ ] Allow pedestrian crossings to center of roundabout
[x] Allow pedestrian crossings on roads connected to roundabout
[x] Add priority signs where roads connect to roundabout
[x] Allocate dedicated exit lanes if possible
[x] Vehicles must stay in lane within roundabout
[x] Vehicles must stay in lane when approaching roundabout

Priority Roads

[ ] Allow pedestrian crossings over main road
[ ] Allow vehiceles to cut across oncoming traffic
[ ] Allow vehicles at yield signs to enter blocked junctions (this is another reason I think we need to reconsider how blocked junctions work)
[ ] Vehicles must stop before entering main road

[ ]  Allow pedestrian crossings to center of roundabout

but as I said before now we have a new problem. Activating the option means the code changes nothing. Deactivating the option means that the code changes pedestrian crossing to now allow. What do you thin about that @aubergine10 ? Do you see my dilemma?
how about :

[x] Ban pedestrian crossings to the center of roundabout.

what do you thin about that?

I think the solution would be to have more states. do we have a ticket for tri-state buttons? I remember there was something but I can't find it.
Allow entering blocked roundabout.

disabled =  do nothing
off =  ban them all
on = allow them all

Another alternative would be to have two columns of buttons:
enabled/disabled    on/off
     O                  O | allow entering blocked roundabout .
or
 O allow entering blocked roundabout.
        O allow(on)/ban(off)


Modify msg of certificate

Coverage remained the same at 51.196% when pulling 74e2984f9cf1c22ba3a9f62cb9a7cb21b7a8392c on ywk253100:161117_ova_2 into 05e9a17d5a7819751b70849817dba2959d78b3a1 on vmware:dev.

LGTM.


Add examples for eight more frameworks

Almost all the files in this PR are auto-generated by the various frameworks, but are necessary to test the actual example code. The following files linked to in the README.md are the new ngrok pieces:

Fastify - examples/ngrok-fastify.js
Hapi - examples/ngrok-hapi.js
Koa - examples/ngrok-koa.js
Nest.js - examples/nestjs/src/main.ts
Next.js - examples/next.config.js
Remix - examples/remix/remix.config.js
Svelte - examples/svelte/svelte.config.js
Vue - examples/vue/vite.config.ts

Current dependencies on/for this PR:

main

PR #36   👈

This comment was auto-generated by Graphite.

Few pieces of feedback:

Each example should be self-contained project in it's own folder similar to Prisma examples.

Since we don't have a library for templates we could point users to use degit for cloning and running an example: npx degit github:user/repo/directory/sub-directory#branch-name <folder-name> then npm i

Framework Specific:

Express

What local port is this running on?
How do I run multiple servers?
How does this work with something like nodemon?

Fastify

I would expect to start the server listener then point ngrok to that rather than the reverse. This is how I handle express listeners today using the ngrok library
I would also expect to use async/await and methods not builder pattern

Example of listening then attaching ngrok with async/await:
// Listen to server
server.listen(port, async function () {
  // Start ngrok process
  if (process.env.NGROK_TOKEN) {
    await ngrok.authtoken(process.env.NGROK_TOKEN);
    url = await ngrok.connect(port);
  }
  console.log(`Server is listening on ${port}!`)
  console.log(`Server available at ${url}`)
})

Hapi

Similar feedback to fastly, start server then connect ngrok

Koa

Odd to have the require next to the listen statement, would move to the top of the file

Nest

Similar to Hapi / Fastly, do server listen then connect ngrok

Nextjs

Make tunnel is weird, should probably be based on ENV variable -- see express example above
Port and host could be parseInt(process.env.PORT, 10) || 3000 as per this example since they get established as env variables.

Remix / Nextjs / Svelte

Would suggest putting ngrok logic into it's own file and requiring it inside the config file to keep things clean.

@nijikokun Thanks for all the feedback! I've pushed a commit that hopefully addresses everything.

Each example should be self-contained project in it's own folder similar to Prisma and NextJS examples.

Migrated to this layout.

Point users to use degit for cloning and running an example: npx degit github:user/repo/directory/sub-directory#branch-name  then npm i

Added info to Examples section of README.md.

Express: What local port is this running on?

Added logging of socket address.

Express: How do I run multiple express servers with this?

Can call listen(app) with multiple app's and each will forward on a separate generated pipe/tcp socket.

Express: How does this work with something like nodemon?

Looks like nodemon restarts the entire node process, so would want to use tunnel with domain to have a deterministic domain to iterate on.

Start the server listener then point ngrok.

Have reordered the setup calls in Fastify, Hapi, and Nest.

Fastify: I would also expect to use async/await.

Moved ngrok setup into async block to use await rather than promise methods.

Koa: require...would move to the top of the file

Moved.

Next: Make tunnel is weird, should probably be based on ENV variable.

Unfortunately Next first runs a child process to build, then the parent does its setup, so an environment variable can't maintain a single tunnel. I've added a comment around this non-intuitive behavior.

Next: Port and host...as env variables.

Caught PORT in Remix but missed in Next, have added. There doesn't appear to be Next support for host via env.

Would suggest putting ngrok logic into it's own file and requiring it inside the config file to keep things clean.

Moved logic to ngrok.config files in Next.js, Remix, Svelt, and Vue examples and updated README.

The changes look great! Nice work!
Just looks like there are some leftover files in the examples directory (node modules and package.json)?


Feature: handle both the API requests and serving web pages on single server

Features

Run the api service and web pages on a single server for deploying the game to Heroku later
Add deploy and start script for webapp production build

one more commit for webapp start script is added, please review again 🙏 🙏 🙏 thanks


Fix blog post grammar and consistency

This commit adds a missing word to a sentence to correct the grammar and adds a the before Gateway API for consistency.
Signed-off-by: Lucas Servén Marín<EMAIL_ADDRESS>

/kind cleanup

Page preview:
https://deploy-preview-28086--kubernetes-io-master-staging.netlify.app/blog/2021/04/22/evolving-kubernetes-networking-with-the-gateway-api/#role-oriented-design
/lgtm

/approve
/kind cleanup


Add version: Perforce.P4V version 242.43.4

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

No, I don't think there's any need for a package upgrade

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest

No, since I needed to remove another manifest - see explanation below

[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

This adds a manifest for the latest version of P4V, 242.43.4.
Note that for the last few releases of P4V, including at least one version already available in winget-pkgs<PHONE_NUMBER>), the version number format has changed - that's the cause of this issue: #174555
I figure it's best to use the real version number, to avoid the package always being detected as needing an upgrade - but the problem is, the existing version "242.263.4463" which is older, has a higher version number! I found #3061 and a bunch of linked issues, which suggest that fixing this 'properly' isn't doable yet. So what I've done is just delete the manifest of the previous version (which git has detected as just renaming the old manifest to the new one and editing it a little). I hope this is ok - I can't see any other way to handle this.
Microsoft Reviewers: Open in CodeFlow

I just checked history of this package, and it looks like the last couple of new versions were actually authored by removing old versions whilst adding the new ones, which I don't think was necessary, but hopefully that means removing the old version in this case is acceptable!
See commits 863f5d3a1b5783e1ae86875fb96bbf5ea2e98dde and 6c8c8b18688338052818061a2d2377a94444fb50


Fix recent changes error for incomplete data week comparisons

closing this in favour of https://github.com/Energy-Sparks/energy-sparks/pull/2707


Cache Param For get_json() Leading to Contradictory Behavior

The location of interest:
https://github.com/pallets/werkzeug/blob/0bf2e3eb13ebbe08e3591e3fde58fa52284f421c/src/werkzeug/wrappers/json.py#L47
Example:
from flask import Response
r = Response(response=’{“detail”:”Bad Gateway”}’, status=502, content_type=’application/json’)

# Initial
assert r.data === b’{“detail”:”Bad Gateway”}’
assert r.get_data() === b’{“detail”:”Bad Gateway”}’
assert r.json == {‘detail’: ‘Bad Gateway’}
assert r.get_json() == {‘detail’: ‘Bad Gateway’}

# Set
r.set_data(‘{“a”:”b”}’)

# Data field updated
assert r.data == b‘{“a”:”b”}’
assert r.get_data() == b'{“a”:”b”}’

# JSON field non-cached is correct
assert r.get_json(cache=False) == {‘a’: ‘b’}

# Cache not refreshed (Fails)
assert r.get_json() == {'a': 'b'}

In the above example, due to the set_data, the data changes. Using get_json(cache=False) works because it'll re-parses the data. However, since cache = False, this value will not be placed into the cache for the future. If I hadn't used get_json(cache=False), it would've just returned the cached value (which is wrong).
Therefore, it seems that performing set_data, makes it so that every subsequent call would require get_json(cache=False). My how would be something like get_json(reparse=True) and then all subsequently calls can just be from the cache.
Now, what the cache parameter represents becomes important, does it mean "cache the current value" or "return the currently cached value". The issue I see is that it's playing both roles (See: https://github.com/pallets/werkzeug/blob/0bf2e3eb13ebbe08e3591e3fde58fa52284f421c/src/werkzeug/wrappers/json.py#L110 and https://github.com/pallets/werkzeug/blob/0bf2e3eb13ebbe08e3591e3fde58fa52284f421c/src/werkzeug/wrappers/json.py#L134)
Consequently, should the data change, if you used cache = True, you'll just return the currently cached value, but if you use cache = False, you wont set the cache to the new value because of line:
https://github.com/pallets/werkzeug/blob/0bf2e3eb13ebbe08e3591e3fde58fa52284f421c/src/werkzeug/wrappers/json.py#L134
Therefore, I recommend separating out the use cache and set cache functionalities (i.e. two different kwargs), or, have cache=True solely be used for obtaining the value from the cache, not for setting it. I.e. it is performing get_json(cache=False) that perform the set (I.e. remove if cache check here: https://github.com/pallets/werkzeug/blob/0bf2e3eb13ebbe08e3591e3fde58fa52284f421c/src/werkzeug/wrappers/json.py#L134

I'd recommend not mixing cache in the first place. Under what real circumstances is this an issue?

@davidism Wouldn't it be any time you perform set_data and then perform get_json()? E.g. suppose you modify a response in a flask after_request and then have a further manipulation on it as a dictionary, thus requiring you to perform get_json(). This would fail.

But why are you performing that set/get on a response object multiple times? Response.get_json is pretty much intended for use during testing.

If it's purely for testing, then it makes more sense. Although, for behavior to change based off of whether something was called or not seems a bit weird. And, if it's going to cache (as it does) one would hope it'd update along with the underlying data. That's why I put the word contradictory in the title.
As for why I'm performing the multiple gets with a set in between, it's actually a single get in the actual code, a single set in the actual code, but then a third get in the unit test.
I.e. the code performs
@app.after_request
def custom_response(response):
    a = response.get_json()
    new_a = {"something": a['b'], "another": a['c']}
    response.set_data(json.dumps(new_a))
    return response

However, it's then my unit test which will perform a get_json() on the response of this function (to assert the change did indeed occur), but will fail.

So, from a purist perspective, that JSONMixin (which houses the caching version of get_json) shouldn't be a parent of Response? Although, then, if you still wanted JSON operations on the response, you'd have to have two versions of JSONMixin, i.e. one for requests and one for responses.

This will be fixed as part of #1963, I'll move the JSON behavior into the Request and Response classes and remove the caching for Response.

This will be fixed as part of #1963, I'll move the JSON behavior into the Request and Response classes and remove the caching for Response.


Error starting MCedit. (Application Breaking Bug) (Please Help)

Getting a error in the command prompt when starting mcedit. running windows 7 64bit. I'm running Minecraft 1.7.10
Running in fixed mode. Support files are in your Documents folder.
Splash load...
Minecraft_Server.jar storage initialized.
Each server is stored in a subdirectory of C:\Users\House\Documents\MCEdit\Serve
rJarStorage named with the server's version number
Cached servers:  []
mcedit.main MCEdit exited with errors.
[   ERROR][                   root.py:791]:MCEdit version Unified v<IP_ADDRESS> for M
inecraft 1.8/1.9
[   ERROR][                   root.py:794]:Attempt to call an undefined function
glWindowPos2d, check for bool(glWindowPos2d) before calling
Traceback (most recent call last):
File "", line 788, in main
File "", line 516, in main
File "C:\build\bin64\build\mcedit\out00-PYZ.pyz\utilities.gl_display_context",
line 21, in init
File "C:\build\bin64\build\mcedit\out00-PYZ.pyz\utilities.gl_display_context",
line 55, in reset
File "C:\build\bin64\build\mcedit\out00-PYZ.pyz\OpenGL.platform.baseplatform",
line 407, in call
NullFunctionError: Attempt to call an undefined function glWindowPos2d, check fo
r bool(glWindowPos2d) before calling
Press RETURN or close this window to dismiss.

Is this one of those places where you never get help unless your some popular user on the site? I would sure appreciate a tiny bit of help at least. I know absolutely nothing about this code and it always shows when I run the application.

It's kinda sad I can see people getting help on here as I speak... And they want help with translations but I have a legit problem and it gets looked over. I've googled my issue and I've found threads with the same problem but nobody has ever helped those people either. MCedit has always worked for me until they started using the installer instead of letting you unzip the files yourself.

Calm down, it's only been 17 hours, we're not on all the time and this isn't an instant messanger. Anyway we need your system specs to really diagnose this, mainly CPU and Video card.

And let us know if any older versions work as well.

I apologize. Anyways. How exactly would I get the specs? I'm not that good with that stuff. Is there a program or something that would be able to tell me.?  All I know is that I have 4 gb of ram. And a nvdia graphics card.

I tried 5 other older versions and I keep getting the same error. Also this kinda happened out of the blue. I use mcedit all the time and after using it and leaving it alone for a few days I came back and this error kept reoccurring.

Five older version also crash...
Looking at the log you posted, I would say you have a problem with your video drivers, especially the OpenGL part.
Concerning you system, uploading the file mcedit.log (alongside the program itself), can also help us to diagnose.

If you press the windows key plus R it'll bring up the run menu, type dxdiag in that window and press enter to bring up the direct x diagnostic tool, press save report and upload it somewhere if you want to make it easier.

If you're still around/having the problem let us know with your specs, otherwise I'll assume you figured it out and close this soonish.

Closing, feel free to reopen if you get the requested information.


[editor]: Support patt in preview

Please add support for .patt files to the editor preview.
Generated by adamraichu.zip-viewer

https://fileinfo.com/ doesn't have any info on .patt files. Could you link me some documentation about what those are?

Closing due to lack of response.


NO JSON object could be decoded.

Hi, After many tries with your codes I encountered this issue.
From the GAE Logs:
No JSON object could be decoded
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in call
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in call
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in call
return handler.dispatch()
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, kwargs)
**  File "/base/data/home/apps/s~fango-bot/1.390834458736047060/main.py", line 168, in post
resp1 = json.load(urllib2.urlopen('http://www.simsimi.com/requestChat?lc=en&ft=1.0&req=' + urllib.quote_plus(text.encode('utf-8'))))
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
I thought it could depend from Simsimi no more responding, so I tried with a Trial Key but It doesnt work.
Any idea how to fix it?
Thank you in advance.

We do not use simsimi.com any more.


:robot: Add microsoft-windows-terminal.vm

Automated PR from https://github.com/mandiant/VM-Packages/issues/875 :rocket:

@Ana06
Interesting...This package does not seem to create a shim in chocolatey/bin like other packages do so it fails at: executablePath = Join-Path ${Env:ChocolateyInstall} $shimPath -Resolve
I can adjust it so that we remove the check, but I wanted you to know for awareness.

More notes:
I attempted to install via their Github Release: https://github.com/microsoft/terminal/releases/download/v1.18.3181.0/Microsoft.WindowsTerminal_1.18.3181.0_x64.zip
But this install kept leading to a font issue, which is noted here (for an older version), although their fix does not work: https://github.com/microsoft/terminal/issues/9375
I also attempted to check and resolve the path that the executable is normally installed to, but it seems that this wasn't the case for the test_upload (windows-XXXX) versions. The path was %LocalAppData%\Microsoft\WindowsApps\wt.exe
Maybe I'm incorrect in when this path is actually created vs when to check.

@emtuls

This package does not seem to create a shim in chocolatey/bin like other packages do so it fails at: $executablePath = Join-Path ${Env:ChocolateyInstall} $shimPath -Resolve

We have other packages where the metapackage dependency doesn't create a shim such as:

hxd.vm
openvpn.vm

Is this case different? Or am I understanding something wrong?
@emtuls

Also to note, Windows Terminal requires at least Windows 10 version 1903/OS build 18362.x, which is why test_upload (windows-2019) is failing.
Not sure if we want to add any disclaimers or checks to mitigate this or what your preferred way to do that might be.

I think it is the first time we have this problem. I suggest:

checking the Windows version in the package and failing the package if it is lower than the required one
excluding this package from testing in https://github.com/mandiant/VM-Packages/blob/main/.github/workflows/ci.yml#L43 if matrix.os == 'windows-2019'. We also need to push packages with matrix.os == 'windows-2022' because otherwise this package won't be pushed.

@vm-packages any concerns with this approach?

@emtuls

Interesting...This package does not seem to create a shim in chocolatey/bin like other packages do so it fails at: $executablePath = Join-Path ${Env:ChocolateyInstall} $shimPath -Resolve

We have other packages where the metapackage dependency doesn't create a shim such as:

hxd.vm
openvpn.vm

Is this case different? Or am I understanding something wrong?
@emtuls

Also to note, Windows Terminal requires at least Windows 10 version 1903/OS build 18362.x, which is why test_upload (windows-2019) is failing.
Not sure if we want to add any disclaimers or checks to mitigate this or what your preferred way to do that might be.

I think it is the first time we have this problem. I suggest:

checking the Windows version in the package and failing the package if it is lower than the required one
excluding this package from testing in https://github.com/mandiant/VM-Packages/blob/main/.github/workflows/ci.yml#L43 if matrix.os == 'windows-2019'. We also need to push packages with matrix.os == 'windows-2022' because otherwise this package won't be pushed.

@vm-packages any concerns with this approach?

It looks like the package fail out might already be occurring from the dependency side via microsoft-windows-terminal, which already performs this check. I'm not sure if that's enough or if you want me to also add this check inside of our own microsoft-windows-terminal.vm package.

excluding this package from testing in https://github.com/mandiant/VM-Packages/blob/main/.github/workflows/ci.yml#L43 if matrix.os == 'windows-2019'. We also need to push packages with matrix.os == 'windows-2022' because otherwise this package won't be pushed.

@vm-packages any concerns with this approach?

After many tries, I think I will need to try a slightly different approach. This is the error I keep receiving:

$os = "windows-2019"
$packages = "packages/microsoft-windows-terminal.vm/microsoft-windows-terminal.vm.nuspec".Split(" ") | Foreach-Object { (Get-Item $).Directory.Name }
if ($os -eq 'windows-2019') {
$packages = $packages | Where-Object { $ -ne 'microsoft-windows-terminal.vm' }
}

scripts/test/test_install.ps1 "common.vm $packages"
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
Packages to be tested:
Chocolatey v2.2.2
Attempting to build package from 'common.vm.nuspec'.
Successfully created package 'D:\a\VM-Packages\VM-Packages\built_pkgs\common.vm.<IP_ADDRESS>40123.nupkg'
Chocolatey v2.2.2
No .nuspec files (or more than 1) were found to build in 'D:\a\VM-Packages\VM-Packages\packages'. Please specify the .nuspec file or try in a different directory.
Error: Process completed with exit code 1.

I believe that this command is not allowing this to process properly: scripts/test/test_install.ps1 "common.vm $packages" due to expecting at least 1 package to be in $packages.
I can either make the code in the Github Action a little bit more complex and try to determine that if there are no other packages, than to simply pass just common.vm or, I can look into modifying this script to see if we can make a new path for if there are no extra packages passed in, to simply return success.

@emtuls 👀


Make somefields in persons noneditable

So that the default AddView won't let users edit some fields directly (like having a checkbox to enable deleted)

Well, I forgot to make migration to alter those fields that have been changed the editable from True to False.