Not compatible with Angular4

Hi Ad Reijngoudt,
I'm to use this smart solution together with your swagger-ts-generator in a serious project. Now it seems not compatible with the latest angular-cli and Angular4.
Can you please give it an update?
The compilation output as following:
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/angular-swagger-form-field/src/swagger-form-field.module.ts, resolving symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/angular-swagger-form-field/src/swagger-form-field.module.ts
Thanks,
Jack Wang

Hi Jack,
Working on it...
Ad
2017-09-04 8:32 GMT+02:00 百宝门<EMAIL_ADDRESS>
Hi Ad Reijngoudt,
I'm to use this smart solution together with your swagger-ts-generator in
a serious project. Now it seems not compatible with the latest angular-cli
and Angular4.
Can you please give it an update?
The compilation output as following:
ERROR in Error encountered resolving symbol values statically. Calling
function 'makeDecorator', function calls are not supported. Consider
replacing the function or lambda with a reference to an exported function,
resolving symbol NgModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/node_modules//src/metadata/ng_module.d.ts,
resolving symbol NgModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/node_modules//src/metadata.d.ts, resolving
symbol NgModule in D:/_Study/s2t/node_modules/angular-swagger-form-field/
node_modules//src/core.d.ts, resolving symbol NgModule in
D:/_Study/s2t/node_modules/angular-swagger-form-field/node_modules//index.d.ts,
resolving symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/src/swagger-form-field.module.ts, resolving
symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/src/swagger-form-field.module.ts
Thanks,
Jack Wang
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/areijngoudt/angular-swagger-form-field/issues/1, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACOL8y7OQjrgpMhSxsiAxohIWNXtGKLvks5se5l4gaJpZM4PLgaL
.

fixed
2017-09-04 8:32 GMT+02:00 百宝门<EMAIL_ADDRESS>
Hi Ad Reijngoudt,
I'm to use this smart solution together with your swagger-ts-generator in
a serious project. Now it seems not compatible with the latest angular-cli
and Angular4.
Can you please give it an update?
The compilation output as following:
ERROR in Error encountered resolving symbol values statically. Calling
function 'makeDecorator', function calls are not supported. Consider
replacing the function or lambda with a reference to an exported function,
resolving symbol NgModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/node_modules//src/metadata/ng_module.d.ts,
resolving symbol NgModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/node_modules//src/metadata.d.ts, resolving
symbol NgModule in D:/_Study/s2t/node_modules/angular-swagger-form-field/
node_modules//src/core.d.ts, resolving symbol NgModule in
D:/_Study/s2t/node_modules/angular-swagger-form-field/node_modules//index.d.ts,
resolving symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/src/swagger-form-field.module.ts, resolving
symbol SwaggerFormFieldModule in D:/_Study/s2t/node_modules/
angular-swagger-form-field/src/swagger-form-field.module.ts
Thanks,
Jack Wang
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/areijngoudt/angular-swagger-form-field/issues/1, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACOL8y7OQjrgpMhSxsiAxohIWNXtGKLvks5se5l4gaJpZM4PLgaL
.

Thanks Ad!
It works with a minor fix on my Windows environtment:
the fsevents package needs to be configured as optional dependency in package.json:
"optionalDependencies": {
"fsevents": "^1.0.14"
}


Doesn't seem to support domain-specific rules

As far as I can tell it seems that this library doesn't allow you to add transformation rules for specific domains.
For example if you wanted to transform all youtube links to embedded videos. Or twitter links to embedded components.
Any thoughts, should I try my hand at it?

This is out of this package scope.
See https://github.com/nodeca/embedza or similar things.


Feature/schema

Please make sure that you've checked the following before submitting your pull request. Thanks!

[x] Check that you pass the basic style checks and unit tests by running mvn clean install

Coverage decreased (-1.1%) to 71.711% when pulling ce2d58aa438136f2e9b7ed90f31b228df9bba3fd on feature/schema into 7d1b5875a5d0f1c885c3e7473028fd255bde791e on develop.

Coverage increased (+0.2%) to 73.097% when pulling e4735fc24112b2f689f6478adb6ce930f196d8fe on feature/schema into 7d1b5875a5d0f1c885c3e7473028fd255bde791e on develop.

@k-cao  FYI, it looks like the yaml2json method in the main application class was missed

Coverage increased (+0.2%) to 73.057% when pulling 10e481d100a196012e267bc4bf09242b780fbff1 on feature/schema into d4882573f6d0e7a24a4cb4645335d8f6d2d5c85b on develop.


run robot with multi thread has error: [ ERROR ] Reading XML source 'D:\result\output.xml' failed: Incompatible child element 'statistics' for 'kw'.

robotframework: 6.1.1
python: 3.7.9
hello, when I run robot with multi thread has error: [ ERROR ] Reading XML source 'D:\result\output.xml' failed: Incompatible child element 'statistics' for 'kw'.
I start 4 threads to execute run(robot_file_path, outputdir=result_path) at the same time, i get a error message: [ ERROR ] Reading XML source 'D:\result\output.xml' failed: Incompatible child element 'statistics' for 'kw'.

below is my code script:
import threading
from robot import run
class MultiThreadings(object):
def __init__(self):
    self.thread = threading

def run(self, robot_file_path, result_path):
    run(robot_file_path, outputdir=result_path)
    threading_id_str = "thread" + str(self.thread.get_ident())

def multi(self, robot_file_path, result_path):
    threads = []
    for i in range(0, 4):
        t = self.thread.Thread(target=self.run, args=(robot_file_path, result_path + "-" + str(i)))
        threads.append(t)
    for t in threads:
        t.start()

robot_file_path = "./01.robot"
result_path = "./result"
multi = MultiThreadings()
multi.multi(robot_file_path, result_path)
print("ok")

I've had the same problem many times. The robot.api.logger is not thread-safe, you should not call it from different threads, only the MainThread. I'm considering creating a monkeypatch to add a mutex over it.

This is a tricky topic, for all who are interested, there is a workshop on robocon 2025 [https://robocon.io/program#live-managing-concurrency-with-robot-framework] where solutions to this problem will be discussed and presented.
If you can sign up and come there, this will be a good opportunity to share our pains, and distribute our solutions.

I won't attend the in-person conference, but this workshop looks very interesting ! How does the keyword for concurrent logging work ? By checking the current thread, if it is not the MainThread then send the log to a Queue, else (in the MainThread) then pop all the logs from the queue ?

Hi @Lenormju ,
in addition to Franz's proposal you can try
RobotFramework AIO (http://robotframework-aio.org).
This uses a 6.02 robot framework core fork with a threading extension which we use at Bosch.
In case you have issues you would get support from us (RobotFramework AIO team).
Regards,
Thomas

Yes I agree. We also investigate in direction of running multiple processes instead of threads and are quite happy with this in one of our current projects.
For this we sync our Robot Framework processes with a RabbitMQ based event bus. The event bus even allows to integrate components with other programming languages.
Most likely we will provide a keyword library for such use-cases in future.
Use-cases which are not covered with this are e,g.:
You are connected to a device (e.g. serial port) and wait for a special message while the a test runs (e.g. a reset-message). If you don't poll you will still need threads for this. It's also possible to implement this with processes, but that's lot of overhead. Even serial interface is special because you can connect only once if you don't use other tools. A listener thread which deploys to other (waiting) threads is really smart for this. We do this since a decade like this with our own tools and would like to do with Robot Framework instead, too.

amendment:
maybe if you have a little time you can look into this pull-request for RobotFramework AIO: https://github.com/test-fullautomation/robotframework/pull/29/files
This is our idea how to realize threading in Robot Framework Core. There are many pull-requests related to threading following, but it shows the base idea.
Would be really nice to get a feedback or idea about this from you.
It's not yet stable enough that we would make a proposal based on 7.1, but If you would be interested we could increase our efforts. Of course we would also consider your findings/proposals.
I have resources where I can assign tasks.


updated to akka 2.3.9, scala 2.11.5 and rxscala 0.23.1

Minor version updates

Thanks ! Much appreciated :)

My pleasure. Thanks for contributing
Regards
Ian
zenAptix (Pty) Ltd
176 Dorp Street. Stellenbosch,
South Africa
Work: +27 21 887 3110
Mobile: +27 82 887 0926
web: http://www.zenaptix.com http://www.zenaptix.com/

On 27 Feb 2015, at 17:30, Lloyd<EMAIL_ADDRESS>wrote:
Thanks ! Much appreciated :)
—
Reply to this email directly or view it on GitHub https://github.com/lloydmeta/schwatcher/pull/46#issuecomment-76412272.


Are double percent scripts of Jupytext compatible with that of Spyder?

I see that Spyder has the practice of identifying cells based on lines starting with `# %%'. As this seems to be a common practice (among Spyder, Hydrogen, VScode) I have just implemented, in Jupytext, a Jupyter notebook converter to double percent scripts, cf. https://github.com/mwouts/jupytext/issues/59.
Could you please provide feedback on the format specifications? I found no mention of how markdown cells should be represented (or even cell metadata), so I had to made a few choices on my own, and I would like to make sure that these choices are fine with Spyder's practice as well.
If you also want to test the converter, then install jupytext RC with
pip install jupytext==0.7.0rc0

and use the command line converter
jupytext --to py:percent notebook.ipynb            # create a notebook.py file in the double percent format
jupytext --to ipynb notebook.py                    # create a notebook.ipynb from a double percent script that has at least two cells
jupytext --from py:percent --to ipynb notebook.py  # create a notebook.ipynb from a double percent script with only one cell

@mwouts  Jupytext looks like a great way to integrate the spyder text editor with the notebook plugin! I haven't really used the jupyter notebook that much but I'll try to be helpful there, but I have spent a couple of hours writing and thinking about this so I hope it's helpful
I might be missing some functionality that already exists in Spyder(@ccordoba12 ?)but it would be pretty cool to execute a text file and the output goes to the notebook plugin. Then running a cell in the text editor and have it only update that notebook cell.
I my not sure what your plan is here with # %% cell separators. I've looked at your current plain text files and while they are quite compact and read well, if I were to write one from scratch I would have to be careful about my commenting in the code so I wouldn't accidentally make a markdown cell. In the spirit of "Explicit is better than implicit" specifying each cell with # %% would be a good way to go.

Do you think the format is sustainable? For instance, having a special meaning for the first word after # %% (when it's either raw or markdown) may be questionable... But I like the relative simplicity of how to create a markdown cell!

Again it would better to be explicit here as well. My take on the format would look like this:
# %% cell name [cell type] {JSON format metadata}

I looked at your examples in the issue you linked and it seems like [] aren't part of the syntax. Here you would need to enclose the cell type in [] so there is no ambiguity between the name and the type. The order wouldn't actually matter, everything could be optional, and it dosen't rely on special words. This way one day you could have a crazy file with [R], [julia], [python], [html], and [latex] blocks or some craziness. If you just want a markdown block its still just # %% [markdown] not too long or complicated.
Even though the order wouldn't matter, I'm suggesting name first for compatibility with existing editors that use the labels like Spyder does in the outline explorer. The editors will still likely take the whole line as the name but at least it will start with something user defined rather then seeing a bunch of [markdowns].
As for the non-code cells I would suggest wrapping them in """ strings this would be similar to the php heredoc style.  This could allow for an editor to change the syntax highlighting to markdown like many do for html in php scripts. Perhaps more excitingly it would also allow f-stings and sting formatting in markdown. But this might be challenging to get back from the notebook to a text file.
Spyder recently implemented grouped code cells with the # %% as the top cell and # %%% as a subgroup.  You could use this to label code cells with the appropriate heading styles.

Thanks @bcolsen , there are so many useful suggestions in your comments!

Default jupytext format was designed a few months back, when I was not aware of the # %% cells. At some point we may consider changing the default to the percent cell format. One thing that I like from the light format is that it can read any script as a notebook (and split it into natural cells).
Sample percent representations of Jupyter notebook are available at https://github.com/mwouts/jupytext/tree/v0.7.0/tests/notebooks/mirror/ipynb_to_percent
Now for the double percent format: I agree that cell type should go to the end, and was also thinking of using [] - granted for the next RC!
I will take care to implement support for subgroup cells - do you expect that they are rendered as independent cells in the notebook, or should they belong to the same Jupyter notebook cell?
I like very much the suggestion of f-strings. I am aware of, but I never tried, a Jupyter notebook extension named Python Markdown which does display Python variables in markdown cells - using however pairs of curly brackets rather than simple curly brackets...
I guess that updating the notebook outputs from Spyder is doable, but that requires using Jupyter kernels for executing code. The output of Jupyter kernels is quite similar to the outputs found in notebooks. But... there are no plans to do that within Jupytext!

Another side remark... I just saw that Jupyter requires that name in cell metadata is unique (see also https://github.com/nteract/papermill/issues/30), so I plan to store the cell name into another field of Jupyter notebook cell metadata, possibly description.

@mwouts

I will take care to implement support for subgroup cells - do you expect that they are rendered as independent cells in the notebook, or should they belong to the same Jupyter notebook cell?

I think each one should be a cell.  They are really just there to help code organization, but it would be sweet if notebook actually had code cell groups. The only thing for Jupytext to worry about is to catch any number of  %'s without spaces before the name. like # %%%%%%% name would be named name not %%%%% name.

I like very much the suggestion of f-strings. I am aware of, but I never tried, a Jupyter notebook extension named Python Markdown which does display Python variables in markdown cells - using however pairs of curly brackets rather than simple curly brackets...

They likely do that so {}'s you want in the text don't need to be escaped. It would be pretty simple just to use {{}} to have a string that would be directly compatible with an existing plugin. I'm still for using the """ strings in the markdown cells for the possibility of doing markdown syntax highlighting for markdown cells in Spyder.

I guess that updating the notebook outputs from Spyder is doable, but that requires using Jupyter kernels for executing code. The output of Jupyter kernels is quite similar to the outputs found in notebooks. But... there are no plans to do that within Jupytext!

Yeah this would be a Spyder thing. I think with the current syntax we are taking about we could actually get something similar to R markdown files for python files.

Thanks @bcolsen for the useful comments. I have included a few of your suggestions above for the next format update at https://github.com/mwouts/jupytext/issues/89 !
I'm not sure I would recomment to work on an alternative to R markdown for python files. I've seen a few previous attemps (pystich, knitpy), and I think a very hard work is required to achieve the same functionality as R markdown. Why not using either jupyter nbconvert, or even R's rmarkdown::render directly (which also works well for Python code, and can even render matplotlib plots)?

I'm not sure I would recommend to work on an alternative to R markdown for python files.
Why not using either jupyter nbconvert?

Exactly what i was thinking (and didn't say). Use jupytext to make a notebook from python, execute the notebook to get the results(this should be possible) and use nbconvert go from there to PDF or HTML. I would just make an export as button in Spyder call the commands and that's it!

@bcolsen, @ccordoba12, do you think I could map the Spyder cell title to the cell content in the Jupyter representation? Currently I map that to the 'title' cell metadata, but that's not very useful. Precisely, what would you think of converting
%% cell title [cell type] {JSON metadata}
1 + 1

to
# cell title
1 + 1

in the Jupyter notebook ? (and reversely, map the first comment of code cells to the cell title)

I don't have a problem with that.

By
# cell title
1 + 1

You mean the title would be heading1 above the cell.  That would be good.
Also:
# %%% cell title {JSON metadata}
1 + 1

could be
## cell title
1 + 1

with heading2:
Basically:
# %%  = Heading1(#)
# %%%  = Heading2(##)
# %%%%  = Heading3(###)
# %%%%%  = Heading4(####)
# %%%%%%  = Heading5(#####)
# %%%%%%%...  = Heading5(#####)

I don't think there is more than 5 headings.

Thanks @bcolsen , @ccordoba12 for your quick replies. Well, @bcolsen , the case of sub cells is interesting. In Python I think a line starting with two # would not be pep8-compliant, and will be modified by most editors when the user 'reformats' the code... We could either insert that space between the two hash signs, or keep the third percent sign and write the sub cell as
# % sub cell title
1 + 1

Which one do you prefer?
Also, more generally, I think there a subject, of defining the specifications for that format. Nteract has done an interesting job on making the format language agnostic in Hydrogen, and it looks very plausible that they will have to implement another parser (in javascript -  they're not python based). I am afraid that, if we don't have clear and well accepted specs, we may end up with incompatible implementations, and that would be a pity, right? Do you have an idea on how we should proceed for that? Is there a natural autority for this (Python board? Jupyter?)

@mwouts
I think I miss read your comment. I though you were talking about a markdown/html formatted header in the notebook above the cell not as a comment in the cell.
For a comment in the actual code your suggestion would work but it would loose the sub cell information.  I think actually leaving the cell name comment as is with the meta data and cell type striped would be the safest thing to do:
# %% cell title {JSON metadata}
1 + 1

to
# %% cell title
1 + 1

This way users can use whatever cell separators they want (as long as you have it in Jupytext) and it won't be lost.

Just wondering what is the state of this @ccordoba12  :-p

We don't have plans to implement this.
@bcolsen, what do you think about it?

I would say that this conversation has filled it purpose in that jupytext now supports Spyder style "percent" cells.
The only other interesting idea in this thread would be integrating jupytext with the spyder-notebook plugin so a file in the Spyder editor could be opened in the notebook or a notebook could be opened in the editor. I don't use the notebook at all currently, but maybe @jitseniesen or a notebook user might be interested. It looks like jupytext does most of the heavy lifting and it's mostly a user interface thing. All that being said, maybe if we had this feature I might use the notebook more :-)

Nice idea, I opened an issue in the notebook plugin.

I would say that this conversation has filled it purpose in that jupytext now supports Spyder style "percent" cells.

I do agree 100%. I think we're done with this question and that now, the Spyder format and the py:percent format in Jupytext do match well (so I'll close this issue, thanks again for your feedback).

Nice idea, I opened an issue in the notebook plugin.

Thank you @jitseniesen !
Indeed, it would be great to offer integration directly in Spyder, like is done in VIM with the jupytext.vim plugin: when the users open an .ipynb file in the editor, they get the .py form, and when they save it, the .ipynb file is updated (re. the other way around, i.e. opening .py files as notebooks in Jupyter, this does come with Jupytext and its custom contents manager).


[Feature Request] Add Bazel support.

You can see in my PR where I needed to quite a bit of work to add this via bazel https://github.com/fzakaria/elf2sql/pull/1
It was surprisingly hard even with the foreign_rules library ....


[PuhuTv] Add new extractor

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[x] Searched the bugtracker for similar pull requests

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[ ] Improvement
[x] New extractor
[ ] New feature

Description of your pull request and other information
Added new extractor for free Turkish soap opera website PuhuTv.com

Read

adding new extractor tutorial and youtube-dl coding conventions sections

and fix all issues.

It looks like failed with the DL tests, but it locally it downloads fine. Possibly because of geo-restrictions? Already applied necessary conventions. Is there any way to tell the tester to include geo-restriction-bypassing options?

Looks like it fails DL tests while passing core ones. But works fine locally. Maybe geo-restrictions? Already followed conventions. Is there any way to make testers apply geo-restriction-bypassing options maybe?

Superseded by #16269.


Sync to installer charts

@ostromart: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

mandiff_operator_release-1.4
e7b48ce6de7cd86f4c7e8e31543525e31d600437
link
/test mandiff_operator_release-1.4

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ostromart: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

test_operator_release-1.4
ff6a7e44ba690e5bf4aeb34e9d046c409d4eaf52
link
/test test_operator_release-1.4

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


add internal wrapper for the the comparator by types;

Add new method to the ClassUtils, so all super classes can be retrieved
@joel-costigliola This is just my first iteration of the fix. I am not entirely sure about the change of modifier and the new method in the ClassUtils. Maybe we need to do this a bit differently.

Fixes #758

Integrated, thanks @filiphr !


automated tests exist and are run by a Jenkins build job

To demonstrate that the code functions as expected, and to prevent future regressions, there should be a suite of automated test for the plugin. src/test/java/org/conjur/jenkins/configuration/ConjurConfigurationTest.java exists, but the body of the test method is commented out.
As part of writing the test suite, a Jenkinsfile should be added that runs the suite and builds the .hpi when the tests all pass.

We do have E2E tests within a separate private repo.
However I do agree that more effort regarding unit tests will most likely improve quality.
I think this issue should be remain open.


Siad crash while trying to copy in-use files on Windows

Using siad v1.2.2
I have online backup running in background. I'm excluding .log/.json as a workaround, but it's typically best to retry a few times after failure (with a delay between) on Windows for critical file operations.
goroutine 102570 [running]:
runtime/debug.Stack(0x4442be, 0x0, 0xc04221fdc8)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x80
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
github.com/NebulousLabs/Sia/build.Severe(0xc04221ff20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:29 +0x99
github.com/NebulousLabs/Sia/persist.(*Logger).Severe(0xc042175de0, 0xc04221ff20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xe7
github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources.func1(0xc042350720, 0xc042070668)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:49 +0x4f1
created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:51 +0x9a
Severe error: ERROR: unable to atomically copy the contract manager settings: rename host\contractmanager\contractmanager.json_temp host\contractmanager\contractmanager.json: Access is denied.
goroutine 107789 [running]:
runtime/debug.Stack(0x4442be, 0x0, 0xc0468b1dc8)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x80
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
github.com/NebulousLabs/Sia/build.Severe(0xc0468b1f20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:29 +0x99
github.com/NebulousLabs/Sia/persist.(*Logger).Severe(0xc042175de0, 0xc0468b1f20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xe7
github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources.func1(0xc0454b3b70, 0xc042070668)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:49 +0x4f1
created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:51 +0x9a
Severe error: ERROR: unable to atomically copy the contract manager settings: rename host\contractmanager\contractmanager.json_temp host\contractmanager\contractmanager.json: Access is denied.
goroutine 112435 [running]:
runtime/debug.Stack(0x4442be, 0x0, 0xc046be5dc8)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x80
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
github.com/NebulousLabs/Sia/build.Severe(0xc046be5f20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:29 +0x99
github.com/NebulousLabs/Sia/persist.(*Logger).Severe(0xc042175de0, 0xc046be5f20, 0x2, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xe7
github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources.func1(0xc042225510, 0xc042070668)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:49 +0x4f1
created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).syncResources
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:51 +0x9a
Severe error: ERROR: unable to atomically copy the contract manager settings: rename host\contractmanager\contractmanager.json_temp host\contractmanager\contractmanager.json: Access is denied.

This is a known bug. It's not a crash unless you are running the debugging build, the general releases will print this info but keep running like normal.
I'm working on an update to the contract manager to address this. It's pretty far down the pipeline though, right now we're entirely focused on:

fixing the wallet
enabling the auto-repair stuff in the renter.

Thanks. Should close this or leave for tracking? I skimmed through issues but didn't find a duplicate. Sounds like it's covered either way.

Recommendation to devs: Close


Customization documentation out of date?

Recently, my posh-git prompt customizations broke. I'm thinking scripts were probably updated automatically somehow, because the day before it worked fine.
I'm using a line in my PS profile to set the prompt color to green, and I was using this, as mentioned in the docs:
$GitPromptSettings.DefaultPromptPath.ForegroundColor = [ConsoleColor]::Green

This doesn't work, and throws an error telling me: "The property 'ForegroundColor' cannot be found on this object. Verify that the property exists and can be set."
This does work however:
$GitPromptSettings.DefaultForegroundColor = [ConsoleColor]::Green

Is the documentation out of date, or is something else at play here?

Something weird with your config. With posh-git > 1.0 you definitely can do:
$GitPromptSettings.DefaultPromptPath.ForegroundColor = [ConsoleColor]::Green
# or
$GitPromptSettings.DefaultPromptPath.ForegroundColor = "LightGreen"

Somehow, on my work laptop, my posh-git version was set to an old 0.7 version, which broke the configuration in my PS profile.
I apparently had two versions of posh-git sitting around, so I removed all of them manually and reinstalled. Now it's back at 1.1.0, and I can use the config as mentioned above.
Thanks for your time!


Error do not change above the line

Challenge Waypoint: Storing Values with the Equal Operator has an issue.
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
// Setup
var a = 7;
var b = a;

// Only change code below this line

This is not a bug. Variables can be changed after instantiation, so you can do what the instructions ask below the comment.

OK thanks "change code below the line.

// Setup
var a;
var b = 2;
// Only change code below this line
var a=7;
b=a;

// Example
var ourVar = 19;
// Only change code below this line
var a = 9; // This is equal to 9

// Initialize these three variables
var a;
var b;
var c;
// Do not change code below this line
a = a + 1;
b = b + 5;
c = c + " String!";
a = 6;
b = 15;
c = "I am a String!"

@VSatyavani Please use the forum to ask questions concerning trouble with a challenge.  Thank you.


update contributor tables

a tool for contributor table generating may effective since we don't need to edit every readme doc

@racaljk sorry yeah you don't need to manually enter it. you can just run yarn contrib:add and then your user name /: Sorry I didn't tell you that sooner.


Impossible to distinguish sandboxing errors from build errors

See original issue on GitLab
In GitLab by [Gitlab user @tristanvb] on Mar 8, 2018, 08:11
When building, or when running bst shell, it is impossible for BuildStream to distinguish and coherently report whether:

there was an error with the actual build or command run in the shell
there was an error setting up the sandbox

This requires support from bubblewrap, I've filed an issue upstream which seems relatively easy to fix, I like the approach Colin suggests by using the --info-fd option and extending the out-of-band machine readable data which bwrap can already return.
We should upstream a patch for this and then conditionally start using the feature in BuildStream on sites which have a recent enough version of bwrap.

In GitLab by [Gitlab user @dominicbrown] on May 11, 2018, 15:07
Hey [Gitlab user @tristanvb], how does this look?https://github.com/domabrown/bubblewrap/commit/c189eeedcd5cdaa9ae14dad43282249af7bb841c
I managed to extend the info-fd command to also print exit codes

In GitLab by [Gitlab user @dominicbrown] on May 31, 2018, 11:19
assigned to [Gitlab user @dominicbrown]

In GitLab by [Gitlab user @dominicbrown] on May 31, 2018, 11:55
Have made a PR for bwrap here: https://github.com/projectatomic/bubblewrap/pull/268
Just waiting on a response, looking into how tests for this should be implemented with bwrap, Then I'll continue working on getting BuildStream to read the newly printed exit codes

In GitLab by [Gitlab user @dominicbrown] on Jun 19, 2018, 10:05
Update: the PR for bwrap has been approved, just needs to be merged. Now working on the buildstream changes, hopefully with have a WIP MR soon.

In GitLab by [Gitlab user @dominicbrown] on Jun 28, 2018, 15:31
New update, hit a snag with file descriptors closing earlier than I expected. I have something working just needs cleaning up and testing

In GitLab by [Gitlab user @LaurenceUrhegyi] on Jul 3, 2018, 15:10
Update: chased for a review upstream - https://github.com/projectatomic/bubblewrap/pull/268
[Gitlab user @dominicbrown] are you currently working on this? If not then please comment and move it into the 'Todo' column, and un-assign.

In GitLab by [Gitlab user @LaurenceUrhegyi] on Jul 4, 2018, 09:39
Update: some response from upstream, the patch there now needs to be re-worked:
https://github.com/projectatomic/bubblewrap/pull/268#issuecomment-402339852
Since Dominic says he'll pick it up after his holiday, I am moving this into 'ToDo' for now.

In GitLab by [Gitlab user @LaurenceUrhegyi] on Aug 16, 2018, 10:43
unassigned [Gitlab user @dominicbrown]

In GitLab by [Gitlab user @aijekuh] on Aug 22, 2018, 16:15
Update: I am following up this issue, re-worked the bubblewrap patch and created pull request to upstream at https://github.com/projectatomic/bubblewrap/pull/286. Now waiting for their response

In GitLab by [Gitlab user @richardmaw-codethink] on Sep 24, 2018, 10:15
assigned to [Gitlab user @richardmaw-codethink]

In GitLab by [Gitlab user @richardmaw-codethink] on Sep 25, 2018, 10:04
A version of https://github.com/projectatomic/bubblewrap/pull/286 with suggested amendments from upstream won't be sufficient on its own.
Just reporting the exit code of the child process is not on its own sufficient, since there's more set-up that happens in it before the command is run.
Some form of synchronisation may be required to know whether the subprocess exited before it started the command.

In GitLab by [Gitlab user @richardmaw-codethink] on Oct 9, 2018, 17:11
mentioned in commit d9b87399c6129c2c4fe7d7a6394870f99a39e86c

In GitLab by [Gitlab user @richardmaw-codethink] on Oct 9, 2018, 17:24
mentioned in commit 0e11a8d00428351a9ffeef05a8e56d59ee826c70

In GitLab by [Gitlab user @richardmaw-codethink] on Oct 9, 2018, 17:25
mentioned in merge request !868

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 5, 2018, 13:21
mentioned in commit 3a5f4e5e88cc743ad484e7e369230569f6386cdb

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 8, 2018, 14:30
mentioned in commit c5ff9684405434582c6a4d05effdbc0a9a426de8

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 8, 2018, 17:03
mentioned in commit c612b851771abd5ae1bf2468945ded792c427153

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 8, 2018, 17:35
mentioned in commit a4d032a39bdc2296c945e8f7465824148dec3c7a

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 14, 2018, 13:31
mentioned in commit e7633500995376be9d727c902408f03180d56169

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 14, 2018, 13:59
mentioned in commit 327b19dde3c9c52c9a1d4dc6feb085467ede14ac

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 14, 2018, 13:59
closed via merge request !868

In GitLab by [Gitlab user @richardmaw-codethink] on Nov 14, 2018, 13:59
closed via commit e7633500995376be9d727c902408f03180d56169


WebXR Hands Example - AR/VR modes

https://github.com/playcanvas/engine/assets/636263/a50483ba-b8ed-4d5a-aab5-bbbe31c76f7f
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Looks good the html and css file injection is something that needs to be changed - You shouldnt need to have to inject it yourself.

Looks good the html and css file injection is something that needs to be changed - You shouldnt need to have to inject it yourself.

That would be great, I was looking at other examples, and haven't seen that pattern, so came up with that. If there would be a generic way to do it - that would be great!


Add better partial args/aux handling in symbol optimize_for

Description
Symbol's optimize_for was failing when some parameters are missing in args or aux due to:

enforcing both in the Python front-end and back-end
no way to specify attributes of input
partial shape inference failing (also related to #18378 and  #18348 fixes)

Changes

Add skip_infer option to symbol.optimize_for, which skips the pre-partition attributes inference. Can be used for backends that does not need this (e.g. TensorRT).
Add optional shape_dict, type_dict and stype_dict to optimize_for to specify input data attributes for the pre-partition attributes inference passes. These can be used when some input and/or parameters are missing in args, e.g. input data (similarly to what is done in the bind functions).
Changes both Python and C++ functions to allow partial inference.

CC @samskalicky

@mseth10 will you please review as original author of the shape inference in optimize_for?

@mxnet-bot run ci [centos-cpu]

I believe it is safe to ignore the codecov failure (see #18497 which disables codecov for reasoning, we could rebase on top of current master and rerun, but I don't think it makes sense to rerun CI just for that).


fix(connected-overlay): better handling of dynamic content

Refactors the ConnectedPositionStrategy to be able to use right and bottom to position the panel. This will allow the element to keep its position automatically, even if the element's size changes.
Removes the uses of the FakeViewportRuler in some of the unit tests since it doesn't work very well when the element is positioned relatively to the right edge of the screen.
Rounds down the values when testing positioning. This is necessary, because some browsers (particularly Chrome on Windows) can have some subpixel deviations.

Fixes #4155.

This one's ready to go now @jelbourn.

Needs rebase

Rebased @andrewseguin.


[Undertow 1702] SameSiteCookieHandler can throw NPE if request doesn't contain user-agent header

https://issues.redhat.com/browse/UNDERTOW-1702

Sorry that I forgot to add a null check in SameSiteNoneIncompatibleClientChecker.
This PR looks good, but it could be better to add a null check in SameSiteNoneIncompatibleClientChecker. As the root cause exists there.
diff --git a/core/src/main/java/io/undertow/util/SameSiteNoneIncompatibleClientChecker.java b/core/src/main/java/io/undertow/util/SameSiteNoneIncompatibleClientChecker.java
index 6bcf775..8c91f07 100644
--- a/core/src/main/java/io/undertow/util/SameSiteNoneIncompatibleClientChecker.java
+++ b/core/src/main/java/io/undertow/util/SameSiteNoneIncompatibleClientChecker.java
@@ -65,6 +65,9 @@ public final class SameSiteNoneIncompatibleClientChecker {

     // browsers known to be incompatible.
     public static boolean isSameSiteNoneIncompatible(String useragent) {
+        if (useragent == null || useragent.isEmpty()) {
+            return false;
+        }
         return hasWebKitSameSiteBug(useragent) ||
             dropsUnrecognizedSameSiteCookies(useragent);
     }

Hi @msfm, thanks for review.
Looking at the code and tests in SameSiteNoneIncompatibleClientCheckerTestCase, there are also hasWebKitSameSiteBug and dropsUnrecognizedSameSiteCookies methods tested separately. This would mean to put null check into these two methods to make tests happy.
I'm thinking of removing two tests for those two methods and also make all methods in the SameSiteNoneIncompatibleClientChecker private except the two that are marked as public alreday. Currently there is package-scope used for rest of the methods... I think it is not necessary. What do you think?

Hi @jstourac. Sorry to late response.

I'm thinking of removing two tests for those two methods and also make all methods in the SameSiteNoneIncompatibleClientChecker private except the two that are marked as public already. Currently there is package-scope used for rest of the methods... I think it is not necessary. What do you think?

I agree with your thought. We can test just public methods only and can change other package-scope methods to private.

@msfm thank you, I've just updated this one

CI test failures don't seem to be related to changes in this MR.


replacedBy not affecting static methods

Working on a change in flutter/flutter, I deprecated a static method in favor of a new method.
I've tried this a couple of ways now, but the transform has never worked:
I deprecated
@Deprecated('Use preferredSizeFor...')
static double preferredHeightFor(BuildContext context, Size preferredSize) {...}

/// Replacement
Size preferredSizeFor(BuildContext context) {...}

with this transform
  # Changes made in TBD
  - title: "Migrate to 'preferredSizeFor'"
    date: 2022-12-12
    element:
      uris: [' material.dart' ]
      method: 'preferredHeightFor'
      inClass: 'AppBar'
    changes:
    - kind: 'replacedBy'
      newElement:
        uris: ['material.dart']
        method: 'preferredSizeFor'
        inClass: 'AppBar'
    - kind: 'removeParameter'
      index: 1

And I guess I expected this change:
// Before
AppBar.preferredHeightFor(context, preferredSize);

// After
preferredSizeFor(context);

But nothing happened.
The new method is not static, so I know this is not a complete transformation, I was hoping that I could at least get users in the right direction. Is this possible? Or is there another way?
Related: https://github.com/dart-lang/sdk/issues/50699

According to the documentation, replacedBy doesn't currently support replacing a static method with an instance method:

There isn’t currently any way for the tool to detect whether a method, getter, or setter is static, so it’s possible to specify an instance member. As a result, specifying an instance member (as either the replaced or replacing element) might produce invalid changes for your users.

I suspect that there are two reasons for that. The first is completely pragmatic: we didn't have a use case for that kind of transform, so we didn't implement it. Now we have a use case.
The second is that we hadn't really considered supporting partial replacements. I'm of two minds about that. It can sometimes be helpful to make the parts of the change that we're able to make in order to reduce the work left for the user. But what we need to be careful of is that the remaining set of changes are easier to understand and make than the original set of changes would have been.
For example, in this case would it be easier for users to be told that preferredHeightFor is deprecated with the ability to find the deprecation notice that explains how to convert their code, or to be told that preferredSizeFor isn't defined, with no way to figure out that they need to add a target (and presumably a .height after the invocation)? After preferredHeightFor is removed, then the user won't be able to navigate to the deprecation message, so some of the advantage is gone, but it still might be easier to search for AppBar.preferredHeightFor than preferredSizeFor in order to figure out what to do about it.

I gave this a low priority because it's still under discussion, not because supporting Flutter isn't important.

I gave this a low priority because it's still under discussion, not because supporting Flutter isn't important.

Oh no worries at all. :)
I agree, partial fixes are a murky area. I don't know if it is worth pursuing support for a partial fix like this, I was mainly curious if any existing conventions could help. I am ok with closing this issue, or waiitng to see if another use case comes along.

For example, in this case would it be easier for users to be told that preferredHeightFor is deprecated with the ability to find the deprecation notice that explains how to convert their code, or to be told that preferredSizeFor isn't defined, with no way to figure out that they need to add a target (and presumably a .height after the invocation)?

I totally agree. The partial fix in this scenario seems like it would cause more harm than help.

I guess the analyzer can know if the method/getter is static or not (ExecutableElement.isStatic).
As a user, I would expect an instance method to be replaced by a static one, since it is straight-forward.
Replacing a static method with an instance one, is mainly about the instance variable to add, in which case there could be a possibility to specify that variable (which must be existing in the caller code, and can also be this).
Changing the parameters or return type of the method is another type of change I guess.

I guess the analyzer can know if the method/getter is static or not ...

That information isn't currently available after the old member has been removed.

As a user, I would expect an instance method to be replaced by a static one, since it is straight-forward.

Given expression.instanceMethod(arguments), we could produce ClassName.staticMethod(arguments), but what do we do with expression? Some expressions have side-effects, others don't, but we can't do enough analysis to know which case we're in with any certainty. We shouldn't delete it if it has a side-effect, and shouldn't leave it if it doesn't.

.... there could be a possibility to specify that variable ...

Do you mean "specify it in the data file", or "allow the user to specify it" (or something else)? I'm not sure either is a viable option, but I'm curious.

Another option is to have any string which could possibly be an expression, but the validation is lost in this case.

Can you provide an example? I don't know what you're thinking of here.

Here is a concrete use case link for replacing static methods. One more example.
Some more details on this use case
if context available
   if accessing functionality from platformDispatcher
      replace WidgetsBinding.instance.window with View.of(context).platformDispatcher
   else
      replace WidgetsBinding.instance.window with View.of(context)
else no context available
   if accessing functionality from platformDispatcher
      replace window with platformDispatcher

//cc @goderbauer


add Interaction Object for Messages

Pull Request Etiquette

[x] I have checked the PRs for upcoming features/bug fixes.
[x] I have read the contributing guidelines.

Changes

[x] Internal code
[x] Library interface (affecting end-user code)
[ ] Documentation
[ ] Other: _____

Closes Issue: #1746
Description
This pr implements the message interaction object https://discord.com/developers/docs/interactions/slash-commands#message-interaction-object
I'll do docs once the implementation is fine

this should be all changes needed and I'll do docs once the implementation is fine

This PR needs docs to be merged. Looks okay otherwise.


Migrate Druid HttpClient from Netty 3 to 4

HttpResponse no longer includes request content, this changes some
HttpReponseHandler implementations to no longer assume content is
generated as part of the handleResponse call, and instead expect all
request content as part of the handleChunk

HttpResponseHandler changes uncovered a long-standing bug in
AppendableByteArrayInputStream where calling exceptionCaught before
appending any bytes would not throw the exception to the reader

Netty HTTP decoder now stores decoder errors in the message instead of
triggering exceptionCaught, so we need to check the status of the
decoder.

Netty Messages and underlying buffers are reference counted, so they
need to be explicitly released after handling. As part of this
ChannelBuffer became ByteBuf and are reference counted instead of
garbage collected.

To support back-pressure, Channels need to disable AUTO_READ and call
read() explicitly when needed instead of using setReadable(true/false)

ClientBootstrap no longer uses separate bosspool and workerpool sizes,
instead relying on the workerpool.

Netty HTTP codec now supports resuming handling of HTTP messages after
handling CONNECT, removing the need to manually add the codec back to
the pipeline.

Remove deprecated Netty method calls and rename classes to align with
Netty class name changes

Remove deprecated use of ExpectedException in favor of
Assert.assertThrows for all tests that had to be touched.

@xvrl I see the router and the coordinator are using jetty as http client. Do you know why we need two http client libraries? Is there any special consideration?

it looks like a handful of integration tests perhaps have legitimate failures, though they all look similar-ish: exceptions that occur from some underlying network failure, so hopefully it isn't something very involved and just missing a catch or some form of exception handling somewhere
examples:
[ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 897.106 s <<< FAILURE! - in TestSuite
[ERROR] testKafkaIndexDataWithStartStopSupervisor(org.apache.druid.tests.parallelized.ITKafkaIndexingServiceNonTransactionalParallelizedTest)  Time elapsed: 176.157 s
[ERROR] testKafkaIndexDataWithKafkaReshardSplit(org.apache.druid.tests.parallelized.ITKafkaIndexingServiceNonTransactionalParallelizedTest)  Time elapsed: 1.738 s
[ERROR] testKafkaTerminatedSupervisorAutoCleanup(org.apache.druid.tests.parallelized.ITKafkaIndexingServiceNonTransactionalParallelizedTest)  Time elapsed: 158.769 s
[ERROR] testKafkaIndexDataWithWithAutoscaler(org.apache.druid.tests.parallelized.ITKafkaIndexingServiceNonTransactionalParallelizedTest)  Time elapsed: 602.337 s  <<< FAILURE!
java.lang.RuntimeException:
org.apache.druid.java.util.common.ISE: Error while querying[https://<IP_ADDRESS>:8282/druid/v2?pretty] status[500 Internal Server Error] content[{
  "error" : "Unknown exception",
  "errorMessage" : "Channel disconnected",
  "errorClass" : "io.netty.channel.ChannelException",
  "host" : "druid-middlemanager:8103"
}]

and
[ERROR] testIndexData(org.apache.druid.tests.indexer.ITNestedQueryPushDownTest)  Time elapsed: 30.879 s  <<< FAILURE!
java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException: Connection reset by peer
	at org.apache.druid.tests.indexer.ITNestedQueryPushDownTest.testIndexData(ITNestedQueryPushDownTest.java:96)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException: Connection reset by peer
	at org.apache.druid.tests.indexer.ITNestedQueryPushDownTest.testIndexData(ITNestedQueryPushDownTest.java:92)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Connection reset by peer
	at org.apache.druid.tests.indexer.ITNestedQueryPushDownTest.testIndexData(ITNestedQueryPushDownTest.java:92)
Caused by: java.io.IOException: Connection reset by peer

i haven't had a chance to dig in yet, so not sure the exact issue

@xvrl I'm wondering if you have run this code in production or a production-like environment?

I made that change locally. I'm also building a local copy and going to try it out on a cluster — will report back with how that goes.

Just did this and everything worked great. My test involved doing queries with large intermediate resultsets.

@xvrl I'm wondering if you have run this code in production or a production-like environment?
no, I'm hoping we can get the integration tests pass first, and I haven't had much time to figure out where things are failing. My hunch is that something is amiss when channels fail and then make it back into the connection pool, but that's just a supposition.

no, I'm hoping we can get the integration tests pass first, and I haven't had much time to figure out where things are failing. My hunch is that something is amiss when channels fail and then make it back into the connection pool, but that's just a supposition.

Ah I see. Which were the integration tests you were having trouble with?

Ah I see. Which were the integration tests you were having trouble with?

The remaining ones consistently failing are [kafka index integration test slow](https://app.travis-ci.com/github/apache/druid/jobs/578824821) and query integration test

The gist I posted was missing a processing/pom.xml update. That's here now: https://github.com/xvrl/druid/pull/2

@xvrl @gianm
What's left to be done here?  Anything I could do to help this along?

@liam-verta I think we're pretty close – barring merging changes from master – but one thing we're trying to understand is the change in memory requirements. It seems they are significantly higher with Netty 4. I was able to get the the failing query tests to pass by using -Dio.netty.allocator.type=unpooled. So far I have not seen any evidence of a leak: using -Dio.netty.leakDetection.level=paranoid doesn't seem to turn up anything so far. So it is possible the netty memory pooling algorithm requires significantly more memory, but I would like to make sure we understand why.

@xvrl I took this change and backported it v0.23.0 and it is looking good. Thanks for all your hard work on this.
If this hasn't gone in by the time we upgrade to 24.0.x, I'll do the same again and report back.

@liam-verta if you get a chance to take it for a spin on a test cluster, let me know. I haven't had a chance to deploy this myself. I'm seeing some new unit test failures after merging master, so I'll have to investigate what is going on before we merge this into mainline.

@xvrl We are are using the version of this change that I back ported to 0.23.0 in production. It appears to be working perfectly.  Really hope we can get this final version of this merged soon.  If there's anything more i can do, just say so.

@liam-verta glad to hear this is working! Very brave of you to try this in production :) By any chance do you have any data that would indicate an increate in heap or direct memory consumption after merging this patch?

@xvrl

By any chance do you have any data that would indicate an increate in heap or direct memory consumption after merging this patch?

We do not have comparison data at this time.

@xvrl - are you working on this PR? the PR was approved but now has a bunch of conflicts.

@abhishekagarwal87 I've been updating it once in a while to keep it in sync, but there are still some integration test failures that I haven't had time to elucidate. If someone else has time to look into this that would be great, since I don't anticipate to be ale to spend much time on it in the near future.


Geniushub integration issue

Home Assistant release with the issue:

0.94.3
Last working Home Assistant release (if known):
N/A
Operating environment (Hass.io/Docker/Windows/etc.):

Component/platform:

/components/geniushub
Description of problem:
Error in log at startup
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):
Fri Jun 14 2019 10:31:19 GMT+0100 (British Summer Time)
_convert_zone(): Failed to convert Timer schedule for Zone 12
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/geniushubclient/__init__.py", line 259, in _convert_zone
    elif setpoint_temp != default_temp:                          # noqa: disable=F821; pylint: disable=used-before-assignment
UnboundLocalError: local variable 'setpoint_temp' referenced before assignment

Additional information:

@persil1971 This is potentially the most embarrassing piece of code I've ever written.
The good new is that I know exactly what is going on, and that there is a fix, which will be made available in the next few days, after some more testing.

Many thanks for looking into this for me - it's much appreciated.
Would you also be able to look at this or should I open a separate issue?
Log Details (ERROR)
Mon Jun 17 2019 10:10:21 GMT+0100 (British Summer Time)
Device 3: Type 'Single Channel Receiver', doesn't match Fingerprint
'Dual Channel Receiver'
On Fri, 14 Jun 2019 at 22:00, David Bonnes<EMAIL_ADDRESS>wrote:

@persil1971 https://github.com/persil1971 This is potentially the most
embarrassing piece of code I've ever written.
The good new is that I know exactly what is going on, and that there is a
fix, which will be made available in the next few days, after some more
testing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/24530?email_source=notifications&email_token=AL5WCTXGV2QDA4FZXLVM66TP2QBFXA5CNFSM4HYGGFGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXX6MPA#issuecomment-502261308,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL5WCTW6LR6RHFQFKLA323LP2QBFXANCNFSM4HYGGFGA
.

Many thanks for looking into this for me - it's much appreciated. Would you also be able to look at this or should I open a separate issue? Log Details
(ERROR) Mon Jun 17 2019 10:10:21 GMT+0100 (British Summer Time) Device 3: Type 'Single Channel Receiver', doesn't match Fingerprint 'Dual Channel Receiver'

OK, the issue is that I never had a SCR to test against.  I will need a copy of your JSON, see:
https://github.com/zxdavb/geniushub-client
... and execute the following:
python ghclient.py ${HUB_ADDRESS} -u ${USERNAME} -p ${PASSWORD} devices -vvv

...and PM me the results at:
https://forum.geniushub.co.uk/t/home-automation-python-cli-client-library-now-available/292/18

@persil1971 Could you do the above and, yes, please also open an issue in HA.

I will do. I need to set up an environment I can install your python
library into before I can run the query against my hub.
On Tue, 18 Jun 2019 at 21:17, David Bonnes<EMAIL_ADDRESS>wrote:

@persil1971 https://github.com/persil1971 Could you do the above and,
yes, please also open an issue in HA.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/24530?email_source=notifications&email_token=AL5WCTUS54BFTXILWGWRJRDP3E7FDA5CNFSM4HYGGFGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX72UIA#issuecomment-503294496,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL5WCTSJ4SBIKYKFVB6KXYLP3E7FDANCNFSM4HYGGFGA
.


wp serve

Start a server instance with PHP built-in server for runs WordPress installation., on http://localhost:8888
wp serve

Added.


Initial JS player signature function name

Tried downloading %video came with this error. Tried download %video2 and it didn't have the error
[youtube] Setting language
[youtube] 1k8qfBdTz2E: Downloading webpage
[youtube] 1k8qfBdTz2E: Downloading video info webpage
[youtube] 1k8qfBdTz2E: Extracting video information
[youtube] 1k8qfBdTz2E: Encrypted signatures detected.
[youtube] 1k8qfBdTz2E: Downloading js player vfljL8ofl
ERROR: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 479, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 383, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 454, in _parse_sig_js
u'Initial JS player signature function name')
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 391, in _search_regex
raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
bbq@notarchlinux:~$ youtube-dl --verbose https://www.youtube.com/watch?v=1k8qfBdTz2E
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=1k8qfBdTz2E']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.1
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 1k8qfBdTz2E: Downloading webpage
[youtube] 1k8qfBdTz2E: Downloading video info webpage
[youtube] 1k8qfBdTz2E: Extracting video information
[youtube] 1k8qfBdTz2E: Encrypted signatures detected.
[youtube] {22} signature length 40.41, html5 player en_US-vfljL8ofl
[youtube] 1k8qfBdTz2E: Downloading js player vfljL8ofl
ERROR: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 479, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 383, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 454, in _parse_sig_js
u'Initial JS player signature function name')
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 391, in _search_regex
raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 479, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 383, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 454, in _parse_sig_js
u'Initial JS player signature function name')
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 391, in _search_regex
raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 516, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 170, in extract
return self._real_extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 860, in _real_extract
encrypted_sig, video_id, player_url, age_gate)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 489, in _decrypt_signature
u'Signature extraction failed: ' + tb, cause=e)
ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 479, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 383, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 454, in _parse_sig_js
u'Initial JS player signature function name')
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 391, in _search_regex
raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.


Unauth pages: technical documentation content

Work with Skylight and Mo to develop.

What have partners most wanted to learn about?
What have partners most needed help with?
What has been most confusing during onboarding/setup?
What has been most helpful when onboarding/setting up partners/

1st pass on this documentation deployed on 5/7/21.


Logitech Harmony no longer able to find emulated_hue

Home Assistant release (hass --version):
0.62.1
Python release (python3 --version):
Python 3.6.2
Component/platform:
emulated_hue and Logitech Harmony Hub
Description of problem:
The Logitech Harmony Hub is no longer able to find the emulated hue hub
Expected:
The Harmony Hub to find the emulated hue hub.
Problem-relevant configuration.yaml entries and steps to reproduce:
emulated_hue:

The ´emulated_hue´ component is running on port 8300 as standard
I've also setup a nginx proxy on port 80 => 8300, since I thought that might be the issue
Still, my Logitech Harmony is not finding any Hue hubs.

Additional info:
Home Assistant is running on macOS High Sierra. Both the Mac Mini running HA and the Logitech Harmony Hub is connected to the same Google Wifi access point.

interesting I do not have this issue and my emulated_hue component works just fine with harmony.   Hass is running on Ubuntu Server 17.10 in a venv.  No reverse proxy setup for emulated_hue.  Did you try to downgrade and see if its related to the latest update?


Add action to search selection in the profile that is currently active in Dash

RIght now using this action is annoying because by default searching JS in Dash will search over many useless things like Gulp, jQuery and more

I would like to instead it to search over my currently active profile:

Which I change often.
Is this possible to do or it's something VS Code doesn't allow?

Hi @nikitavoloboev,
I'm truly sorry for that. Is your active profile the Default one?

For your case, we have some workarounds:

If it is Default profile, you can trigger search in all docsets, default shortcut is ctrl + alt + h.

Override the settings for javascript to search only for some specific docsets.

NOTE: this key settings is in vscode-dash 2.0.0
"dash.languageIdToDocsetMap": {
  ...,
  "javascript": [
    "javascript",
    "react",
    "typescript
  ]
  ...
}

This may not be a robust solution because you said that you changed the docset in active profile often.

Is your active profile the Default one?

It isn't. I have many profiles.

Will try your solution now. Thank you.

@nikitavoloboev gotcha.
Please try solution (1) by using ctrl + alt + h.  Hope it can solve your issue.

Thank you. That hotkey does what I needed. 🎊


How to define polymorphic Association ownerid as uniqid?

如何自定义多态的关联OwnerId ，为  Uniqid	  ？
How to define polymorphic Association ownerid as uniqid?
What version of Go are you using (go version)?
go 1.13
Which database and its version are you using?
mysql 5.7
Please provide a complete runnable program to reproduce your issue. IMPORTANT
package main
type Production struct {
	Id        uint `gorm:"primary_key"`
	Uniqid	  string //index
	Item I `gorm:"polymorphic:Owner"`
}
type Workspace struct {
	Id        uint `gorm:"primary_key"`
	Uniqid	  string //index
	Item Item `gorm:"polymorphic:Owner;"`
}
type Item struct {
	Id        uint `gorm:"primary_key"`
	Uniqid	  string //index
	//OwnerId   int
	OwnerType string
}

I have the same question

use foreignkey:Uniqid;association_foreignkey:Uniqid in Item struct


WIP-3554 Collection resource performance improvements

Pull Request Checklist:

[ ] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

[Enter positive test case here]

METRIC
VALUE

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4616


Create user updates

Summary
Restrict a user being created in certain cases.
Details
Don't create a user if we already have a user created with the new users provided email. Only one user per email should exist. If this instance occurs, return an error saying the user with the provided email already exists.
Also when creating a user, generate a new unique MongoDB ObjectID for the user before adding them to our data file.

the computer reads the function create user
the function checks to see if the user email already exists with another account
if the user already exists it sends a message to console saying "users account already exits"
if else the user dousnt exists it continues with the steps to create a new one


Send invalid token data as stringified JSON

Android fixed in https://github.com/pace/cloud-sdk-capacitor-plugin/pull/51

iOS and Android fixed in https://github.com/pace/cloud-sdk-capacitor-plugin/pull/50


Drop Python 3.7 support

Closes #165

Thanks @kushaangupta! We should also:

add 3.10 to the list
update the test builds in .github/workflows to not build 3.7 and build 3.10.

Weirdly, the workflow job is interpreting 3.10 as 3.1 leading to the failures.

Ah yes this was a common error, you need to write "3.10" in quotes so that it is interpreted as a string rather than a float.

Thank you! :blush:


feature: disable fetching subs for audio files

Hi @davidde !
First of all, thanks for a great script. Given mpv is my go to player for music and video, i've noticed autosub acts funny while playing lossless or lossy audio — it downloads unrelated subtitles (ofc only when auto is true).
To mitigate the annoyance a check of file type was added so autosub  skips known audio formats.  b and n keys would still trigger subtitle download.
Let me know what you think.

Thank you for taking the time to file such a complete PR. However, there are still a few problems with this:

In general, audio files would be shorter than 15 minutes, so that check would eliminate most audio files. Did you alter the script in any way that got rid of that check, or are you just working with really long audio files?
Since MPV does not distinguish between mp4/m4a/mov and some others, this would not work for all listed file formats.

I really appreciate you're aiming to fix a problem in the general case, making it useful for everyone, but could you share your specific case (e.g. file format, length, etc.)?

* In general, audio files would be shorter than 15 minutes, so that check would eliminate most audio files. Did you alter the script in any way that got rid of that check, or are you just working with really long audio files?

Not necessarily. Lots of live records, classical music, opera ship as a single file. I'm not  even talking about bootlegs here.

* Since MPV does not distinguish between mp4/m4a/mov and some others, this would not work for all listed file formats.

Wasn't aware. Thanks for letting me know. Sure my PR needs to resemble that.

but could you share your specific case (e.g. file format, length, etc.)?
Sure. I own a lot of CD-rips performed with EAC that are in fact a single flac/ape/wv file with a cue sheet metadata. cue files are supported by mpv, directing it to navigate lossless audio file with chapters. But with autosub on,  the 15 minute check is bypassed as mpv buffers a single file surpassing the limit.

Check out the logfile.  The catch is at line 45 [timeline] Total duration: 3063.333333
log.txt

Great, sounds good to me.
Just a couple more questions since I don't have such audio. Is cue an audio only format? Could it be listed a single time for all types instead of separately for each audio format? Does mp.msg.warn('active_format = ' .. active_format) return cue or cue/flac?

Cue is a text file containing metadata. It holds an index of the tracks contained in the audio file.
The reason to have those pairs is because cue actually points to a file on disk denoted by a specific format.
Great Wikipedia example

Does mp.msg.warn('active_format = ' .. active_format) return cue or cue/flac?

It returns cue/flac when a cue is used to launch playback. But if someone wants to listen to the whole file w/o jumping tracks (and for that reason starts a .flac) then active_format property returns plain flac.

Thanks, that makes it a lot clearer.
This gives me excellent opportunity to refactor some stuff that would be better off bundled with this function. I'll leave this open until then, so you can check if I haven't killed off some of your functionality. I'll let you know when it's up, and thanks for the help.

@gdmka Feel free to check if it still works for you.

@davidde looks good from here
But i see an opportunity for a little tweak.

It sounds valid to me to check file format type right before the script hits rescan_external_files so that redundant call and a warning just go away not polluting the shell output.

I see what you mean. The reason I put it behind the rescan, is because the rescan is still useful when auto is false; in that case it can still enable the right subtitles that might be off by default.
So this means the function would indeed need to be cut in half again; those that never need subs (like audio and web streaming) and all the rest.

In the long term, I will probably move setting sub-auto and slang to mpv.conf, obsoleting the rescan. Meaning it's probably not worth obsessing over this now.


Support Oracle driver 4.0.0

Currently tests are failing when latest Oracle driver is used.

I should take a look what causes it. Previously there has been bugs in new versions of oracle drivers.

Maybe we should write down the errors which are happening? That would help to find this issue.
I have now the following one popping up: Error: ORA-12519: TNS:no appropriate service handler found. That seems to create a timeout my Ava test can not handle properly.

@PeterMerkert Are you using blob functionality? I think that's the part that is failing.

@kibertoad Nope, I am not using any blob functionality. I use select, several joins join, update, delete and raw statements.

Was this fixed by #3480 ?

Should have been, yes.
@PeterMerkert Could you please try using 0.20.0 and report back?

I got the upgrade and for me all my features are still working. The new version is in my code.
But remember, I have reported before that I did maybe not use the functionality which was broken in the first place.
Thanks a lot for the new version though anyways!

@PeterMerkert Awesome, I was wondering if we broke something while fixing something :D


Tasks options not working when call client.tasks().list(options)

I have tried to set options as the following code but limit always 1,000 and offset always 0
const tasks = await apifyClient.tasks().list({ limit: 1, offset: 1, desc: true });

console.log(tasks) is look like this
{
  total: 4,
  count: 4,
  offset: 0,
  limit: 1000,
  desc: true,
  items: [
    {
       ...
    },
    ...
  ]
}

Am I missing something?

Opps. it was my fault


Firefox

Hi,
Demo is not fully functional on firefox.
Examples:

Regards

I get an error in Firefox:
TypeError: doc is null: webcomponents.js:6488:8

All the paper-input element sizes are 0x19, and they look like they haven’t been initialized at all (just the empty host element in the DOM).

import of script webcomponents for polyfill should be before the script gwt.

Fixed in <IP_ADDRESS>-apha2


New wallet connect journey cannot connect to testnet on correct CLI wallet version

Description
Testnet currently requires CLI wallet 0.57.0.
With the correct wallet installed, I see the following error trying to connect:

Steps to Reproduce

Download the cli wallet from the vega repo with the required tag, i.e. git checkout v0.57.0 and install (go install -v ./cmd/vega)
Start the wallet vega wallet service run -n fairground
Attempt to connect vega wallet on local testnet token or token.fairground
See error

Expected behaviour
Wallet should connect

Could it be because of chain ID not being broadcast correctly ?


Sending message from popup to background crashed (Cannot read properties of undefined reading fingerprint)

Case:
In background script create multiple popup  with url to popup extension url
const url = chrome.runtime.getURL('popup.html') + '/say-hello';

await chrome.windows.create({
    type: 'popup',
    url,
    focused: true,
    top: 100,
    left: 100,
    width: 400,
    height: 400,
  });

await chrome.windows.create({
    type: 'popup',
    url,
    focused: true,
    top: 100,
    left: 100,
    width: 400,
    height: 400,
  });

onMessage('hello', ({data}) => {
  console.log(data);
});

In the popup window there is a button, when this button clicked it will send message to background.
await sendMessage('hello', { name: 'Bob' }, 'background');

Expected result
Since there is 2 windows created, in both windows when the button is clicked, background script should print console log with the data twice.
Problem / Bug
background script only print one console log, the other one crashed when the button inside the popup window is clicked.
The last created window, indeed successfully send the message to background and print log to console. In another window, when the button is clicked  webext will crash.
Error preview

How you are importing sendMessage? You need to import it from 'webext-bridge/backgroundorwebext-bridge/content-script` based on the base you are.

@jnarowski You need to specify a destination
@devnomic Can you try 6.0.1? There are important fixes there like https://github.com/zikaari/webext-bridge/commit/959fb700110defc8c11ecdf3c3d8e2532ce6a78c

@zikaari
+1
version:6.0.1
I have the same problem.

background.js
import { sendMessage } from "webext-bridge/background";

sendMessage("background", {
    id: browser.runtime.id,
    message: "Hello from background!",
});

content-script.js
import { onMessage } from "webext-bridge/content-script";

onMessage("background", (data) => {
    console.log("from background", data);
});

Sorry, i have use another lib, lets just close this issue, maybe already fixed.

I'm having the same problem using v6.0.1, I'm importing from '*/background'. Any help?


perf(reactivity): ports alien-signals

alien-signals(https://github.com/stackblitz/alien-signals) is a research-oriented signal library rewritten based on Vue 3.4's reactivity system. It sets several constraints to ensure the high-performance implementation of a reactivity system. (Currently, it is the fastest implementation among all signal libraries)
This PR ports the https://github.com/stackblitz/alien-signals/blob/master/src/system.ts code to https://github.com/vuejs/core/blob/main/packages/reactivity/src/effect.ts to leverage all the optimizations discovered by alien-signals.
Benefits

Lower memory usage: Memory usage is reduced by ~13% (2.3MB -> 2.0MB) when creating a large number of ref, computed, and effect instances.
Higher performance: Various performance tests now generally yield better results, especially in scenarios where a large number of computeds are read after changing a ref. Vue 3.5 had significant performance drawbacks in this case (a characteristic of pull-model reactivity systems, it can be reproduced in https://github.com/transitive-bullshit/js-reactivity-benchmark), and the current implementation resolves this issue, achieving over 30x performance improvement (proportional to scale).
Better code abstraction: The previous scheduling logic had coupling with external implementations (such as Dep cleanup, debug events, recurse effect handling). The current implementation eliminates these couplings.

 Reaching the lowest memory usage is not the purpose of this PR, so we will not implement it here currently.

/ecosystem-ci run

All Unit tests have passed and there is a bundle error that needs to be resolved.

/ecosystem-ci run

/ecosystem-ci run

/ecosystem-ci run

/ecosystem-ci run

/ecosystem-ci run

/ecosystem-ci run

/ecosystem-ci run

After inlined alien-signals, the benchmark dropped a lot (still much faster than 3.5.12). This should be due to the fact that when alien-signals is used as a dependency, the ESM code is loaded in benchmark, and when it is inlined, the CJS code of system.ts is run in benchmark.

This should be due to the fact that when alien-signals is used as a dependency, the ESM code is loaded in benchmark, and when it is inlined, the CJS code of system.ts is run in benchmark.

I'm not sure if I follow - why would esm vs cjs affect the benchmark? Can you link the benchmark being used?

/ecosystem-ci run

@yyx990803 I just run npm run test-bench on this repo. You can see the performance difference before and after 1518218 (#12349).

Btw, we can use vitest bench to generate comparisons:

On main branch, run vitest bench --project=unit --outputJson=bench.json computed
Then on alien-signals branch, run vitest bench --project unit --compare=bench.json computed

Result on my machine:
   · create computed                                               9,551,718.56  0.0000  0.6461  0.0001  0.0001  0.0001  0.0002  0.0003  ±0.55%  4775861  [1.09x] ⇑
     create computed                                               8,760,933.97  0.0000  0.8172  0.0001  0.0001  0.0002  0.0002  0.0003  ±0.34%  4380468  (baseline)
   · write ref, don't read computed (without effect)               6,421,717.18  0.0000  0.2774  0.0002  0.0002  0.0002  0.0003  0.0003  ±0.16%  3210859  [1.18x] ⇑
     write ref, don't read computed (without effect)               5,454,304.91  0.0001  0.1370  0.0002  0.0002  0.0003  0.0003  0.0003  ±0.10%  2727153  (baseline)
   · write ref, don't read computed (with effect)                  2,428,007.34  0.0003  0.0912  0.0004  0.0004  0.0005  0.0005  0.0006  ±0.04%  1214004  [1.14x] ⇑
     write ref, don't read computed (with effect)                  2,138,169.05  0.0004  0.0445  0.0005  0.0005  0.0006  0.0006  0.0007  ±0.07%  1069085  (baseline)
   · write ref, read computed (without effect)                     3,290,413.89  0.0002  0.1576  0.0003  0.0003  0.0004  0.0004  0.0005  ±0.11%  1645207  [1.14x] ⇑
     write ref, read computed (without effect)                     2,898,259.19  0.0002  0.2029  0.0003  0.0003  0.0004  0.0005  0.0005  ±0.14%  1449130  (baseline)
   · write ref, read computed (with effect)                        2,300,347.25  0.0003  0.1442  0.0004  0.0005  0.0005  0.0005  0.0006  ±0.10%  1150174  [1.15x] ⇑
     write ref, read computed (with effect)                        2,003,630.24  0.0004  0.1502  0.0005  0.0005  0.0006  0.0006  0.0007  ±0.11%  1001816  (baseline)
   · write ref, don't read 1000 computeds (without effect)         6,358,829.33  0.0000  0.1548  0.0002  0.0002  0.0002  0.0003  0.0003  ±0.10%  3179415  [1.32x] ⇑
     write ref, don't read 1000 computeds (without effect)         4,814,202.81  0.0001  0.2967  0.0002  0.0002  0.0003  0.0003  0.0005  ±0.36%  2407102  (baseline)
   · write ref, don't read 1000 computeds (with multiple effects)      4,286.29  0.2175  0.2895  0.2333  0.2357  0.2500  0.2565  0.2690  ±0.10%     2144  [1.18x] ⇑
     write ref, don't read 1000 computeds (with multiple effects)      3,647.03  0.2597  0.3377  0.2742  0.2756  0.2970  0.3101  0.3363  ±0.12%     1824  (baseline)
   · write ref, don't read 1000 computeds (with single effect)         6,259.59  0.1501  0.5288  0.1598  0.1622  0.1893  0.1950  0.2258  ±0.22%     3130  [1.94x] ⇑
     write ref, don't read 1000 computeds (with single effect)         3,220.45  0.2962  0.6412  0.3105  0.3127  0.3296  0.3340  0.4725  ±0.18%     1611  (baseline)
   · write ref, read 1000 computeds (no effect)                        8,149.56  0.1144  0.1753  0.1227  0.1244  0.1348  0.1420  0.1591  ±0.10%     4075  [1.25x] ⇑
     write ref, read 1000 computeds (no effect)                        6,498.06  0.1458  0.2507  0.1539  0.1551  0.1736  0.1785  0.2110  ±0.12%     3250  (baseline)
   · write ref, read 1000 computeds (with multiple effects)            3,888.90  0.2375  0.3324  0.2571  0.2589  0.2782  0.2821  0.3116  ±0.12%     1945  [1.19x] ⇑
     write ref, read 1000 computeds (with multiple effects)            3,270.39  0.2950  0.3746  0.3058  0.3082  0.3285  0.3429  0.3726  ±0.12%     1636  (baseline)
   · write ref, read 1000 computeds (with single effect)               3,368.48  0.2770  0.3577  0.2969  0.2991  0.3173  0.3210  0.3504  ±0.10%     1685  [1.43x] ⇑
     write ref, read 1000 computeds (with single effect)               2,350.73  0.4091  0.4801  0.4254  0.4292  0.4490  0.4549  0.4762  ±0.10%     1176  (baseline)
   · 1000 refs, read 1 computed (without effect)                      33,247.48  0.0283  0.0963  0.0301  0.0298  0.0368  0.0389  0.0450  ±0.08%    16624  [3.84x] ⇑
     1000 refs, read 1 computed (without effect)                       8,650.50  0.1096  0.1734  0.1156  0.1176  0.1452  0.1465  0.1585  ±0.21%     4326  (baseline)
   · 1000 refs, read 1 computed (with effect)                         38,219.70  0.0247  0.0982  0.0262  0.0259  0.0339  0.0357  0.0399  ±0.09%    19110  [4.07x] ⇑
     1000 refs, read 1 computed (with effect)                          9,384.63  0.1012  0.1677  0.1066  0.1077  0.1195  0.1218  0.1320  ±0.10%     4693  (baseline)

Noticed the ref invoking x effects case somehow got slower.

This seems to be a performance regression caused by accessing cross-file variables in Node, it should be fixed by https://github.com/vuejs/core/pull/12349/commits/bc3af9467171a2bed0c4d453aeec3eb0d6aa6cf3.

A GC regression that computed not used in effect/template cannot be released is fixed in 4114a12 (#12349) (Thanks for @JoviDeCroock bringing it up!)

@johnsoncodehk this leak is present in alien-signals itself, might be worth tackling there as well for all other consumers of the package.

@JoviDeCroock Yep! This is the last problem we want to solve in alien-signals.

Removed namespace usage in https://github.com/vuejs/core/pull/12349/commits/571ba051d6e279212627766f90a856146f14211e
Previously namespace was used because it somehow showed better perf in benchmarks, but turns out it's because Vitest benchmark currently has overhead for every access of cross-module import binding due to the way modules are evaluated.
For real-world performance, we should be benching against the bundled reactivity module, where module-root level exports are scope-hoisted into local consts. This should result in better perf than namespace access. It also is more minifier friendly and can reduce bundle size increase.
Comparing the benchmark using bundled reactivity.esm-browser.prod.js, before and after 571ba051d6e279212627766f90a856146f14211e:
· create computed                                               21,076,617.75  0.0000  0.2428  0.0000  0.0000  0.0001  0.0001  0.0002  ±0.16%  10538309  [1.01x] ⇑
     create computed                                               20,871,461.37  0.0000  0.0939  0.0000  0.0000  0.0001  0.0001  0.0002  ±0.14%  10435731  (baseline)
   · write ref, don't read computed (without effect)               21,270,929.83  0.0000  0.2626  0.0000  0.0000  0.0001  0.0001  0.0002  ±0.22%  10635465  [1.00x] ⇓
     write ref, don't read computed (without effect)               21,352,721.02  0.0000  0.3770  0.0000  0.0000  0.0001  0.0001  0.0001  ±0.28%  10676361  (baseline)
   · write ref, don't read computed (with effect)                  10,561,843.24  0.0000  0.4995  0.0001  0.0001  0.0001  0.0001  0.0002  ±0.29%   5280922  [1.03x] ⇑
     write ref, don't read computed (with effect)                  10,295,067.44  0.0000  0.7905  0.0001  0.0001  0.0001  0.0002  0.0002  ±0.44%   5147534  (baseline)
   · write ref, read computed (without effect)                     13,647,038.01  0.0000  0.2687  0.0001  0.0001  0.0001  0.0001  0.0002  ±0.20%   6823520  [1.01x] ⇑
     write ref, read computed (without effect)                     13,446,011.73  0.0000  0.1222  0.0001  0.0001  0.0001  0.0001  0.0002  ±0.13%   6723006  (baseline)
   · write ref, read computed (with effect)                         9,900,825.62  0.0000  0.2127  0.0001  0.0001  0.0002  0.0002  0.0002  ±0.19%   4950413  [0.98x] ⇓
     write ref, read computed (with effect)                        10,072,543.62  0.0000  0.3119  0.0001  0.0001  0.0001  0.0002  0.0002  ±0.26%   5036273  (baseline)
   · write ref, don't read 1000 computeds (without effect)         20,749,339.38  0.0000  0.4546  0.0000  0.0000  0.0001  0.0001  0.0001  ±0.32%  10374670  [1.00x] ⇑
     write ref, don't read 1000 computeds (without effect)         20,652,327.46  0.0000  0.5293  0.0000  0.0000  0.0001  0.0001  0.0002  ±0.43%  10326164  (baseline)
   · write ref, don't read 1000 computeds (with multiple effects)       8,481.89  0.1150  0.1683  0.1179  0.1190  0.1273  0.1297  0.1494  ±0.08%      4241  [1.08x] ⇑
     write ref, don't read 1000 computeds (with multiple effects)       7,889.51  0.1205  0.1841  0.1268  0.1285  0.1488  0.1511  0.1676  ±0.14%      3945  (baseline)
   · write ref, don't read 1000 computeds (with single effect)         30,897.47  0.0312  0.0958  0.0324  0.0322  0.0406  0.0438  0.0481  ±0.08%     15449  [1.05x] ⇑
     write ref, don't read 1000 computeds (with single effect)         29,380.96  0.0329  0.0605  0.0340  0.0343  0.0378  0.0391  0.0428  ±0.04%     14691  (baseline)
   · write ref, read 1000 computeds (no effect)                        43,131.23  0.0224  0.0852  0.0232  0.0231  0.0297  0.0318  0.0360  ±0.08%     21566  [1.05x] ⇑
     write ref, read 1000 computeds (no effect)                        40,964.36  0.0235  0.0829  0.0244  0.0243  0.0318  0.0335  0.0373  ±0.08%     20483  (baseline)
   · write ref, read 1000 computeds (with multiple effects)             8,546.06  0.1138  0.1759  0.1170  0.1184  0.1287  0.1308  0.1385  ±0.08%      4274  [1.11x] ⇑
     write ref, read 1000 computeds (with multiple effects)             7,727.43  0.1265  0.1966  0.1294  0.1310  0.1427  0.1450  0.1506  ±0.09%      3864  (baseline)
   · write ref, read 1000 computeds (with single effect)               15,886.90  0.0589  0.2281  0.0629  0.0621  0.0745  0.0818  0.2199  ±0.30%      7944  [1.02x] ⇑
     write ref, read 1000 computeds (with single effect)               15,539.78  0.0616  0.1318  0.0644  0.0637  0.0760  0.0765  0.0803  ±0.09%      7770  (baseline)
   · 1000 refs, read 1 computed (without effect)                      163,839.85  0.0054  0.1293  0.0061  0.0070  0.0075  0.0086  0.0108  ±0.10%     81920  [1.04x] ⇑
     1000 refs, read 1 computed (without effect)                      157,879.98  0.0055  0.0657  0.0063  0.0073  0.0091  0.0107  0.0163  ±0.11%     78941  (baseline)
   · 1000 refs, read 1 computed (with effect)                         186,830.01  0.0051  0.0250  0.0054  0.0054  0.0060  0.0067  0.0085  ±0.03%     93416  [1.03x] ⇑
     1000 refs, read 1 computed (with effect)                         180,595.90  0.0052  0.0614  0.0055  0.0055  0.0068  0.0093  0.0151  ±0.08%     90298  (baseline)

/ecosystem-ci run

Pretty impressive from my testing thanks to @johnsoncodehk et al 🔥

  (lower times are better)

These results were last updated November 22 2024 on an M3 Macbook Pro using Node.js v22.10.0.

/ecosystem-ci run

/ecosystem-ci run

PR is now based on alien-signals 0.4.4, due to the implementation of some new fast paths (e.g. https://github.com/stackblitz/alien-signals/pull/7), which gets more performance improvements compared to 0.3.2.
Benchmark result (baseline is https://github.com/vuejs/core/pull/12349/commits/f15e9d72c0ebffc2ba3015e1086ba7cebb1f3682):
 ✓ packages/reactivity/__benchmarks__/computed.bench.ts (13) 11622ms
   ✓ computed (13) 11620ms
     name                                                                    hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · create computed                                               1,691,995.02  0.0005  0.0723  0.0006  0.0006  0.0007  0.0007  0.0017  ±0.11%   845998  [1.00x] ⇓
     create computed                                               1,693,497.15  0.0005  0.0472  0.0006  0.0006  0.0007  0.0007  0.0015  ±0.08%   846749  (baseline)
   · write ref, don't read computed (without effect)               1,441,569.95  0.0006  0.0691  0.0007  0.0007  0.0008  0.0008  0.0010  ±0.08%   720785  [1.01x] ⇑
     write ref, don't read computed (without effect)               1,432,267.74  0.0006  2.7299  0.0007  0.0007  0.0008  0.0008  0.0013  ±1.11%   716134  (baseline)
   · write ref, don't read computed (with effect)                    428,069.29  0.0022  0.0495  0.0023  0.0023  0.0025  0.0026  0.0047  ±0.08%   214035  [1.07x] ⇑
     write ref, don't read computed (with effect)                    399,988.18  0.0023  0.1397  0.0025  0.0025  0.0026  0.0028  0.0110  ±0.14%   199997  (baseline)
   · write ref, read computed (without effect)                       677,705.75  0.0013  0.3494  0.0015  0.0015  0.0016  0.0016  0.0026  ±0.18%   338853  [1.01x] ⇑
     write ref, read computed (without effect)                       671,805.41  0.0013  0.0417  0.0015  0.0015  0.0016  0.0016  0.0020  ±0.07%   335903  (baseline)
   · write ref, read computed (with effect)                          414,008.89  0.0022  0.0897  0.0024  0.0024  0.0025  0.0026  0.0035  ±0.09%   207005  [1.07x] ⇑
     write ref, read computed (with effect)                          387,378.44  0.0024  0.0708  0.0026  0.0026  0.0027  0.0029  0.0044  ±0.09%   193690  (baseline)
   · write ref, don't read 1000 computeds (without effect)         1,456,970.47  0.0005  0.0667  0.0007  0.0007  0.0008  0.0008  0.0010  ±0.08%   728486  [1.00x] ⇓
     write ref, don't read 1000 computeds (without effect)         1,458,368.05  0.0005  0.1715  0.0007  0.0007  0.0008  0.0008  0.0010  ±0.11%   729185  (baseline)
   · write ref, don't read 1000 computeds (with multiple effects)        625.20  1.4574  8.1845  1.5995  1.4915  7.4730  7.7244  8.1845  ±5.40%      313  [1.04x] ⇑
     write ref, don't read 1000 computeds (with multiple effects)        602.93  1.6270  2.0599  1.6586  1.6745  1.7688  1.8586  2.0599  ±0.27%      302  (baseline)
   · write ref, don't read 1000 computeds (with single effect)         1,167.11  0.8474  1.3441  0.8568  0.8546  0.9390  1.0556  1.3441  ±0.27%      584  [1.18x] ⇑
     write ref, don't read 1000 computeds (with single effect)           991.43  0.9982  1.1655  1.0086  1.0085  1.0822  1.0847  1.1655  ±0.13%      496  (baseline)
   · write ref, read 1000 computeds (no effect)                        1,478.18  0.6687  0.8053  0.6765  0.6760  0.7366  0.7611  0.8053  ±0.13%      740  [1.00x] ⇑
     write ref, read 1000 computeds (no effect)                        1,475.18  0.6693  0.8739  0.6779  0.6779  0.7200  0.7416  0.8739  ±0.13%      738  (baseline)
   · write ref, read 1000 computeds (with multiple effects)              642.61  1.5419  1.8908  1.5561  1.5530  1.6379  1.7578  1.8908  ±0.19%      322  [1.11x] ⇑
     write ref, read 1000 computeds (with multiple effects)              578.48  1.7140  1.9549  1.7287  1.7275  1.8278  1.9380  1.9549  ±0.15%      290  (baseline)
   · write ref, read 1000 computeds (with single effect)                 540.03  1.8353  2.0489  1.8517  1.8492  1.9534  2.0330  2.0489  ±0.15%      271  [1.05x] ⇑
     write ref, read 1000 computeds (with single effect)                 512.67  1.9348  2.1053  1.9506  1.9493  2.0503  2.0616  2.1053  ±0.13%      257  (baseline)
   · 1000 refs, read 1 computed (without effect)                       5,721.89  0.1720  0.2880  0.1748  0.1740  0.1958  0.2115  0.2745  ±0.13%     2861  [1.08x] ⇑
     1000 refs, read 1 computed (without effect)                       5,320.37  0.1717  7.7792  0.1880  0.1757  0.2818  0.7700  3.1639  ±4.05%     2661  (baseline)
   · 1000 refs, read 1 computed (with effect)                          5,784.17  0.1703  0.3046  0.1729  0.1722  0.1941  0.2040  0.2431  ±0.12%     2893  [1.01x] ⇑
     1000 refs, read 1 computed (with effect)                          5,743.96  0.1690  0.2600  0.1741  0.1738  0.1952  0.2024  0.2405  ±0.10%     2872  (baseline)

Guys, you are doing it wrong.  As a result, you are sharpening your implementations for benchmarks, which in real applications leads to performance degradation. In particular, both the
this implementation and your previous one cannot cut off equivalent changes, and this leads to a cascade update of states with equivalent results. And this is not just long. It is unpredictably long! I wrote about this in detail here: https://dev.to/ninjin/preventing-equivalent-reactive-computing-4hk5
I added this library to Big State Managers Benchmark and, as expected, when emulating a complex application, the "fastest library" turned out to be very slow.

A detailed explanation of this benchmark is here: https://page.hyoo.ru/#!=3ia3ll_rcpl7b

Hi @nin-jin 👋, I don't know how to use the website so can't test it, but this problem we think needs to be avoided by developers, #9497 is the PR for this.
In fact, alien-signals has an equalityComputed API under the unstable namespace that can return the results you expect and you can take a try.