Can't download pipeline artifact files use matching patterns starting with artifact name

I'm raising this issue here since pipeline artifacts publish/download tasks are agent plugins.
Agent Version and Platform
Agent 2.186.1 on ubuntu-20.04
Azure DevOps Type and Version
dev.azure.com
What's not working?
Pipeline artifact download task with file matching patterns patterns doesn't work as expected.  When downloading multiple artifacts, you can't filter files by artifact name.
According to docs:

File matching patterns should assume the first segment of the pattern is (or matches) an artifact name. For example, WebApp/** matches all files from the WebApp artifact. The pattern */*.dll matches all files with a .dll extension at the root of each artifact.

So one might expect that for existing artifact WebApp, the pattern WebApp/** will download all files. Unfortunately this doesn't happen and such patterns result in 0 files being downloaded.
Related Stack Overflow question: https://stackoverflow.com/questions/67567408
Example
This template will not download any files in the Download job.
Minimatch patterns: [test/*.xyz]
Filtered 0 files from the Minimatch filters supplied.

pool:
  vmImage: ubuntu-latest

jobs:
  - job: Publish
    steps:
      - bash:
          mkdir -p test
          touch test/test.xyz
        displayName: Create artifact

      - bash: find . -name '*.xyz'
        displayName: List created artifact

      - publish: test
        artifact: test
        displayName: Publish test

  - job: Download
    dependsOn: Publish
    steps:
      - download: current
        patterns: test/*.xyz
        displayName: Download using pattern

      - bash: find $(Pipeline.Workspace) -name '*.xyz'
        displayName: List downloaded artifacts

Hi @beatcracker 'patterns' input for Download Pipeline Artifacts represents patterns for paths relevant to the published artifact folder - so if you specified 'test' folder as a targetPath for Publish Pipeline Artifacts task - 'test' folder content will be published, and you need to specify path mask relatively to root of this folder ('.xyz' instead of 'test/.xyz').
This is expected behavior - please see also docs for Download Pipeline Artifacts  and Publish Pipeline Artifacts.

@anatolybolshakov Yes, current behavior make sense from the practical standpoint, but it doesn't match what documentation says, i.e., For example, WebApp/** matches all files from the WebApp artifact. Should I raise a docs issue to change this bit about patterns in conjunction with multiple artifacts?

@beatcracker oh yes, I see - let us prepare documentation changes for this.

Docs are not updated yet, so not stale.

The incorrect docs just caught me out as well.
I have a parallel job producing artifacts called MyArtifact_$(System.JobPositionInPhase), then in another job I want to download all those artifacts and merge them. It seemed like the way to do this was to specify something like patterns: MyArtifact_*/* in the download step, however this doesn't work. Neither do other variations on that pattern like patterns: MyArtifact_*/**/*.
It would be helpful if either the docs were updated or, even better, if the functionality was implemented as documented.

In fact, I see a totally different behaviour: the artifact name can be matched via patterns: in the download, but using multiple patterns (which are also supposed to work according to the docs) do not work at all!?
For me this is on Linux agents with agent version 2.185.1, and DownloadPipelineArtifacts version is 2.198.0
@beatcracker @jamesthurley mind re-checking if your examples are working now (maybe in the meantime something had changed on server side)?

This is still an issue, and must be reopened.


remove github pages files

Now that you are using readme.io I figured the files could be cleaned up.
Curious if RIAK.md and EQC_CI_LICENCE.txt are actually needed though?

No, you can remove them as well.

Please leave the images, but move them somewhere else.  This is where people go to get the assets.

OK, I added back the images. Not sure of a better place to put them then where they are though.

Hrm, isn't that dtl file required for the internal webmachine interface?

It looks like things that are used for the homepage and things that are required for the webmachine interface are conflated in this PR, please make sure this is one removing the stuff related to the deprecated homepage.

Oh, hm, I thought anything related to the webmachine interface was under priv/.
I can't find any reference to the index dtl file or use of a dtl template renderer.


DESENG-237 Update CHES endpoints

@ShawnTurple Thanks for the quick review. I have to make some additions to this PR and will consider your suggestions in terms of DRY code


add libs to CMakeLists.txt to remove build duplication

Pull Request Title
Fixes #347 and fixes #210

Change Description

Previous build of code base took ~45 mins (e.g. see github actions)

I have modified the CMakeLists.txt files

They should be a lot simpler to read and faster to compile.

I have removed build duplication by linking against a compiled lib rather than rebuilding every cpp file for each executable (there are many tests, each are separate exe's)

In my first attempt I have created one main library containing the majority of nextsimdg code (nextsimlib)

This library could be split into modular libraries depending on use-case in future

My primary goal was to improve build time not necessarily thinking about how best to structure the code into libraries. This can be discussed at a later stage.

The other simple solution would be to just build these tests directly from the sources. Neither uses many source files (2 and 3 source files, respectively).

I think this approach makes the most sense. I will build against source :+1:

@timspainNERSC it looks like the mac build build-and-tests-on-mac is failing. I don't have a mac. Would you be able to find out why the test fails?
Also, it's worth noting. Unfortunately the CI workflow does not show the test name -- so I cannot even see what test has failed. I have created a PR #372 to fix this and tagged you as a reviewer.

Would you be able to find out why the test fails?

Apparently not! Building the library fails, due to being unable to find the <Eigen/Dense> header:
/Users/timpai/nextsim/dg/nextsimdg/dynamics/applications/../src/include/ParametricMesh.hpp:10:10: fatal error: 'Eigen/Dense' file not found
#include <Eigen/Dense>
         ^~~~~~~~~~~~~
1 error generated.

Yet the previous build system was able to find this file without any problem. And I cannot see any changes in CMakeLists that would cause to occur. Very puzzling.

Would you be able to find out why the test fails?

Apparently not! Building the library fails, due to being unable to find the <Eigen/Dense> header:
/Users/timpai/nextsim/dg/nextsimdg/dynamics/applications/../src/include/ParametricMesh.hpp:10:10: fatal error: 'Eigen/Dense' file not found
#include <Eigen/Dense>
         ^~~~~~~~~~~~~
1 error generated.

Yet the previous build system was able to find this file without any problem. And I cannot see any changes in CMakeLists that would cause to occur.
Also, the CI manages to build successfully, and it more or less the same set up as on my Mac. Very puzzling.

Can you check the version of Eigen you have on your mac and maybe check it is loaded/ in your PATHs?

Can you check the version of Eigen you have on your mac and maybe check it is loaded/ in your PATHs?

Which paths? Aren't PATHs exactly what CMake sets up with find_module and so on?
I don't think it is an installation issue: if I checkout develop from this branch without changing anything else, then that builds fine.

@timspainNERSC  and I have fixed the issue of building on mac by cleaning the build environment. I suspect that make was picking up the old nextsimlib and trying to build against that.
./testModelArrayRefDebugging was failing on the CI mac build. This was due to an error in core/test/CMakeLists.txt. I have removed erroneous link to nextsimlib and added a link to eigen to fix it.

I moved this to milestone two because it's not milestone one. What's the status? We've had some more important issues coming up in the last weeks, but we can't forget about this because of those.

It was ready to go in before the dynamics merge. I think @timspainNERSC didn't want to merge it yet though. I think he still has reservations about this approach. Happy to discuss options when Tim is back.
Current state is that it needs rebasing off of feat_mar3 if it is to go into the next milestone.
I can do this if everyone agrees but we would need to merge it back in before any other big changes. The problem is that the CMakeLists.txt files are central to the repo structure and if we have any big merges this will generally cause quite a few merge conflicts.
It shouldn't take me more than a couple of hours to rebase when we need it, so please just let me know and we can look at merging it back in.

@einola , I have rebased against feat_mar3 so that it is ready to go when @timspainNERSC  is back

Thanks @TomMelt! We'll get @timspainNERSC's feedback when he's back.

I certainly think this is in a state where it can be converted to a non-draft PR. Then I will take a more thorough look at it as part of the review.

superseded by #449


apply-operations: Report invalid JSON structure from the backend to the frontend

This adds error reporting to the apply-operations command, for things that are valid JSON but when that JSON does not correspond to a valid operation history (for instance [{}]).
This will still accept operations with missing parameters, such as:
[
    { "op": "core/mass-edit" }
]

Rejecting those sorts of inputs will be done in further PRs.

With #6908 being merged, I have resolved the conflicts with this PR. Now that operation validation is available, I have added another small change on top (c7312dc508beb7814d8129a8817ae948700b078a), to completely separate the validation of the operations and their execution. The goal there is to avoid leaving the user in a half-baked state where only some of the operations ran. This will be improved later with the validation of column dependencies ahead of time.


combined patch for the more or less obvious issues:

#2087 #2094 #2103 #2104 #2105 #2106 #2107 #2108 #2110 #2111 #2112 #2115

updated patch should keep return code as before,
and only clean up *pval if it is actually initialized.
Note that ASN1_OP_NEW_PRE does not always initialize
*pval if the return code is zero. see sig_cb in dsa/dsa_asn1.c

PS:  CCLA was signed and sent to<EMAIL_ADDRESS>today.

I noticed there is a further memory leak in ex_data.c if lh_insert fails.
The issue is similar to what can happen in the SSL_SESSION cache.

oops, I doubt that the error in the AppVeyor build is due to my patch, so please ignore:
'ml64' is not recognized as an internal or external command,
operable program or batch file.
nmake /f ms%MAK%
'nmake' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1

Thinking at it again,
I noticed that not calling the free_func may result in memory leaks,
so there needs to be a fallback strategy, if allocating "storage" in
int_free_ex_data fails.
In my testing I did not have any free_func != NULL,
probably because I was not using any engine.
But I see that  dynamic_data_ctx_free_func is one example of
what might happen if the free_func is not called.
Furthermore, but I have not seen any examples of these
function pointers, the return codes of new_func and dup_func
seem to be ignored as well.

Oops, and the data flow in the new_func is reversed.
I really doubt that ever worked.

I'm a little confused by this PR.  Is it only for 1.0.2?

Yes, this PR is for 1.0.2 only,
I have another pull request for 1.1.0.

Okie.  This looks good to me, I just want to see the build results (Travis seems to have ground to a halt for the moment)

ping @levitte to reconfirm.

@richsalz I think you accidentally closed this PR, I cannot re-open this PR, is that a problem,
can you still do the merge, or should I open a new PR for 1.0.2?

748cb9a on 1.0.2  Is there a version for 1.1.0/master still pending?  Or should I just close all those issues?
Thanks!

All issues are fixed on all branches.  Please go ahead and close all issues. Thanks!

@bernd-edlinger thank you very much for all your work on improving OpenSSL!


Update request: gimp-plugin-resynthesizer  2.0.3 → gimp-resynthesizer-scm

https://github.com/NixOS/nixpkgs/commit/4b023832f84119a67af511f40d6edb440a9064ae

Package name:gimp-plugin-resynthesizer

Latest released version: https://github.com/itr-tert/gimp-resynthesizer-scm

^ this version fixes the fact that python2 isnt supported ^

Current version on the unstable channel: 2.0.3
Current version on the stable/release channel: 2.0.3

[x] Checked the nixpkgs pull requests

Notify maintainers
@jtojnar

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

The stable version of GIMP does not support Python 3 either. And the Python version has a work in progress branch targetting GIMP and Python 3:
https://github.com/bootchk/resynthesizer/tree/resynthesizer3

Any updates on this?


Added queue url to the connection details. Added writeConnectionSecre…

Description of your changes
Added the SQS queue url to the connection details so that the value will appear in the secret created by writeConnectionSecretToRef
Fixes #730
I have:

[x] Run make reviewable test to ensure this PR is ready for review.

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

/test-examples="examples/sqs/queue.yaml"

/test-examples="examples/sqs/queue.yaml"

@turkenf Added the test results and verification of the secret creation and contents.


Ansible-stuck-issue

(gwright99 edit): Proposed fix for issue: https://github.com/seqeralabs/cx-field-tools-installer/issues/26

@adriannavarrobetrian -- What tests have you run to confirm the behaviour of the counter logic?

Positive case should be pretty easy (_i.e. run the installer and if it doesn't fail, it means it works).
Negative case: How are making it so that the call to pypi fails?

@gwright99 I've tested both the positive case and the negative one.
For the negative I've used a bogus endpoint for pip and it fails and exists the terraform setup with the error
"Failed to download file after 10 attempts."

@gwright99 what do you think about add tflint and tfsec steps to the terraform code? There are a couple of vulnerabilities on it.
❯ tflint
21 issue(s) found:

 ❯ tflint
  57 passed, 27 potential problem(s) detected.

@gwright99 what do you think about adding tflint and tfsec steps to the terraform code? There are a couple of vulnerabilities on it.
❯ tflint
21 issue(s) found:

 ❯ tflint
  57 passed, 27 potential problem(s) detected.

I'm supportive in theory. Want to book me for a quick discussion, then we can decide?


Dependabot benchmark ignores

Another attempt to disable the benchmark workflow on dependabot. Here, I disabled benchmarking on doc/* branches as well.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.033%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5970

Relevant Lines:
6282

💛  - Coveralls


Changing usdz model alongside with glb

I saw this webxr demo, link and I saw we can change model-viewer src and I couldn't find anything about ios-src. Is there way to change usdz model alongside with glb?
Thanks for responses

Ok I found it but its not written anywhere in docs
modelViewer.iosSrc = 'model.usd';


chore: bdd-spring-1574962987 to 0.0.1

chore: Promote bdd-spring-1574962987 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


problem with docker

since .env is useless , code should be deleted.
https://github.com/RainEggplant/chatgpt-telegram-bot/blob/4b4ecd51896e16155e6fc78c43bab4feac21188b/docker-compose.yml#L6
new version uses local.json, please insert code in Dockerfile
COPY config /app/config

https://github.com/RainEggplant/chatgpt-telegram-bot/blob/4b4ecd51896e16155e6fc78c43bab4feac21188b/Dockerfile#L26
or add code in docker-compose.yml
volumes:
            - "$PWD/config:/app/config"

by the way , It's better to add code in docker-compose.yml

I also have a need for this. After Github updates, it is a bit inconvenient to re-build Docker Image. I need to delete the GitHub project directory on the VPS first, and then replace the default.json, which is a bit cumbersome.

OK, I'll refactor the docker-related files (like separating browserless and browser-based versions) when I have time. Already pushed a temporary fix in 668820e.

OK, I'll refactor the docker-related files (like separating browserless and browser-based versions) when I have time. Already pushed a temporary fix in 668820e.

https://github.com/RainEggplant/chatgpt-telegram-bot/blob/668820e9b74d8e76b19c226a8ce04565e3051100/docker-compose.yml#L7
this temporary fix will not work.
base on code, it need config not configs.

@wangliangliang2 My bad. Fixed in 36593fb.


Add Gorman Health Group

Also looks like my editor trimmed a trailing space in the README ;)

Thanks for adding this! And thanks for the trim :)


Take survey button

IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Do not change the following line aside from replacing YOUR-ISSUE-HERE with the issue this PR fixes
fixes #342
Please provide enough information so that others can review your pull request:
Explain the details for making this change. What existing problem does the pull request solve?
Test plan (required)
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Final Checklist

[x] Have you bumped the version in package.json?

Second decimal for major change, third decimal for minor change. This can go past 10 i.e. 1.0.9 !=> 1.1.0, 1.0.9 => 1.0.10
Read here for more info

[ ] Have you added any new tests necessary?
[x] Is your PR rebased off the most current master?
[x] Have you squashed all commits, or if you will merge will you squash all commits?
[x] Did you use yarn, not npm?
[x] Did you use Material-UI wherever possible?
[ ] Did you format according to Prettier?
[x] Did you run all of your most recent changes locally to make sure everything is working?

Looks nice!


[📚] pub.dev claims Windows support

The pub.dev page says that the package supports Windows.

However, running flutterfire configure generates this code:
class DefaultFirebaseOptions {
  static FirebaseOptions get currentPlatform {
    // ...
      case TargetPlatform.windows:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for windows - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );
      case TargetPlatform.linux:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for linux - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );

https://firebase.google.com/docs/flutter/setup doesn't contain any instructions to configure firebase for Windows.
If the package doesn't support Windows, then the pub.dev page should be updated.
Otherwise, it would be helpful if the documentation was updated to explain how to setup Windows support.

The pub.dev page says that the package supports Windows.

The package does now support Windows, as part of this PR

However, running flutterfire configure generates this code:

You might need to raise this in dedicated repo to get the tool update the windows specific implementation.

https://firebase.google.com/docs/flutter/setup doesn't contain any instructions to configure firebase for Windows.

The Windows support has been added just a week ago, so the instructions should get updated soon.

If the package doesn't support Windows, then the pub.dev page should be updated.

It does support now per the fixed PR.
I'll close this for now, as flutterfire configure related issue should be addressed in other repo. If the documentation is not yet updated soon, will reopen it. If you disagree, write in comments and I'll reopen anyway.

Please, any luck with the configuration

Not yet, we need https://github.com/invertase/flutterfire_cli/issues/219.
There's probably a way to get all the information for FirebaseOptions to do it yourself, but that's beyond me


Initialize inertia information for new colliders

Inertia matrix has to be calculated with algorithm specific for each
shape. Without calculated matrix the physics behaves very floaty and
slowed down.
This commit will fix physics for most users that only use world:new___Collider().
It will still not work correctly if shapes are manually added to collider. For that case the inertia matrix would have to be re-calculated for each new shape, which is ...complicated. It needs more discussion because API would have to be adapted.
I also increased MAX_CONTACTS to 10 because 4 is too low. The number represents maximum handled simultaneous collisions as well as connected joints.

This is really exciting, thanks!


Grocery List

To test:

Update python requirements
Run migrations
npm install
Log in
Navigate to My Account -> Grocery List

My goal is that the UI should be simple and easy enough for anyone to use and understand. If you're not understanding anything let me know and I will try and explain/fix it. I'm still missing translations for this. But we can add them once this gets merged in.

Sorry for the delay in looking at this, been pretty busy this last week. I've just checked it out and tested it a bit. It looks and works great! I haven't had the time to dig in to the code though. I will definitely have time to do that at some point next week if you're ok with not merging until then, otherwise go for it and we can always refactor/fix things later if there's a need.

No Worries. I would prefer to have a review of this, since its so big. But I also understand that you have other stuff to do. If you just don't have time I can just merge it in. :)


Assist Platform with MVP mapping for UP CSV

Documentation for UP CSV here:
https://docs.google.com/spreadsheets/d/1WumZYfUURgQWu1ihvK4NgUbR2ms0VE2MfzspDx22eTw/edit#gid=686884179

This is the work that Platform is leading that we are assisting with.


fix: add warning when no proxy env vars are set

What does this PR do?
adds a warning when no proxy env vars are set.  updates tests.
What issues does this PR fix or reference?
@W-16510822@

QA notes
✅ can see warning about current state of NO_PROXY support when NO_PROXY or no_proxy is set


recalculate in handleIframeLoad

It's necessary to call this.contentProtectionModule.recalculate if the active book position is advanced beyond the beginning of a chapter in handleIframeLoad. Otherwise, the text appears scrambled:

@pszujewski makes sense, i'll test it, merge it and tag a new version by tomorrow.


The README says MamloEnv instead of MalmoEnv

MamloEnv implements an Open AI "gym"-like environment directly in Python
"MamloEnv` in the first paragraph

Thanks!


changed some styles of blog page

Description
added some changes to the styles on the blog reading page
Pull Request Checklist
Please make sure that your PR meets the following requirements:

[x] The app is working correctly after applying the changes.
[x] The app is responsive and displays properly on different screen sizes and devices.
[x] The changes are thoroughly documented in the appropriate files or documentation sections.
[x] The coding conventions and style guidelines are followed consistently.

Checklist
Please check all applicable boxes and provide any additional information if needed.

[x] I have tested the changes locally and ensured that the app is functioning as expected.
[x] I have verified that the app is responsive and looks good on various screen sizes and devices.
[x] I have reviewed the documentation and ensured that it accurately reflects the changes made.
[x] I have followed the coding conventions and style guidelines defined in the project.
[x] I have run the automated tests and all of them pass.
[x] I have considered the performance implications of the changes made.
[x] I have considered the security implications of the changes made.
[x] I have checked for any potential regressions or side effects caused by the changes.
[x] I have performed a self-review of my code.
[x] Starred the repository.
[x] Added My Name to the Contributor's List.
[x] Followed the repository's Contributing Guidelines.
[x] I ran the app and tested it locally to verify that it works as expected.

Screenshots - If Any (Optional)
Additional Notes(Optional)
Please provide any additional information or context that may be helpful for reviewing the pull request.
Related Issues
none
Reviewers
Please tag the relevant team members or reviewers who should review this pull request.

which issue is this ? let me know, if it was assigned to you.


2.0 upgrade add spaces in ranges

Hello,
First of all thank you for this nice formatter which format my list as I want (not like prettier)
Between version 1.1.0 and 2.0.0 you added the range formatter, is it possible to disable it?
With 1.1.0
valid_http_versions: [ "HTTP/1.1", "HTTP/2.0" ]
With 2.0.0
valid_http_versions: [  "HTTP/1.1", "HTTP/2.0"  ]
I don't want to add the space at the beginning and the end of the range.
Thank you in advance for your answer

hello,
Range formatter only works when you select a range of code.
And the v2 version will only add one space at the beginning and the end.
What you want is ["HTTP/1.1", "HTTP/2.0"]?

Hello,
Yes this is exactly what I would like to do

Hello, the version 2.4.0 has been released which contains a new option better-yaml.flowCollectionPadding which default to true.
Set to false will give you that result.

Thank you very much, it works perfectly.


Websocket stream skips messages if many symbols are used

Hello. I was looking for a library that would implement websockets functionality. I decided to stop at yours, but since it does not work with futures, I decided to improve its functionality (also, I want to process messages in separate goroutines). During testing, I encountered the following problem.
I have 372 symbols. For each of them, I subscribe to 5 intervals (1h, 4h, 1d, 1w, 1M). As far as I know, Binance does not allow subscribing to more than 200 symbols per stream. Therefore, I made a small method that breaks symbols into chunks.
func ChunkBy[T any](items []T, chunkSize int) [][]T {
	var _chunks = make([][]T, 0, (len(items)/chunkSize)+1)
	for chunkSize < len(items) {
		items, _chunks = items[chunkSize:], append(_chunks, items[0:chunkSize:chunkSize])
	}
	return append(_chunks, items)
}

Also, I create a new stream each time for the interval-chunk.
intervals := []string{"1h", "4h", "1d", "1w", "1M"}
pairsChunks := shared.ChunkBy(pairs, 200)

for _, interval := range intervals {
	for _, pairsChunk := range pairsChunks {
		websocketClient := getWebsocketClient()
		for _, pair := range pairsChunk {
			err := startWebsocketClient(pair, interval, websocketClient, app)
			if err != nil {
				log.Fatal(err)
			}
		}
	}
}

But, I see that some data is skipped for 1w and 1M.
If I reduce the number of intervals (for example, to 3) or reduce the number of symbols, for example, to 50 - all data comes correctly.
Any ideas why this is happening and how it can be handled?
My Websocket client implementation
type WsContinuousContractKlineHandler func(event *WsContinuousContractKlineEvent)

func getWebsocketClient() *FuturesWebsocketStreamClient {
	websocketClient := binanceconnector.NewWebsocketStreamClient(false, "wss://fstream.binance.com")
	return &FuturesWebsocketStreamClient{websocketClient}
}

func startWebsocketClient(pair, interval string, websocketClient *FuturesWebsocketStreamClient, handler MessageHandler) error {
	WsContinuousContractKlineCallback := func(event *WsContinuousContractKlineEvent) {
		go handler.HandleMessage(event)
	}

	errHandler := func(err error) {
		fmt.Println(err)
	}

	go func(s, interval string) {
		doneCh, stopCh, err := websocketClient.WsContinuousContractKlineServe(s, interval, WsContinuousContractKlineCallback, errHandler)
		if err != nil {
			fmt.Printf("Error for symbol %s: %v\n", s, err)
			return
		}
		go func() {
			stopCh <- struct{}{}
		}()

		<-doneCh
	}(pair, interval)
	return nil
}

func newWsConfig(endpoint string) *binanceconnector.WsConfig {
	return &binanceconnector.WsConfig{
		Endpoint: endpoint,
	}
}

func (c *FuturesWebsocketStreamClient) WsContinuousContractKlineServe(
	symbol string,
	interval string,
	handler WsContinuousContractKlineHandler,
	errHandler binanceconnector.ErrHandler,
) (doneCh, stopCh chan struct{}, err error) {
	endpoint := fmt.Sprintf("%s/%s_perpetual@continuousKline_%s", c.Endpoint, strings.ToLower(symbol), interval)
	cfg := newWsConfig(endpoint)
	wsHandler := func(message []byte) {
		event := new(WsContinuousContractKlineEvent)
		err := json.Unmarshal(message, event)
		if err != nil {
			errHandler(err)
			return
		}
		handler(event)
	}
	return wsServe(cfg, wsHandler, errHandler)
}

var wsServe = func(cfg *binanceconnector.WsConfig, handler binanceconnector.WsHandler, errHandler binanceconnector.ErrHandler) (doneCh, stopCh chan struct{}, err error) {
	Dialer := websocket.Dialer{
		Proxy:             http.ProxyFromEnvironment,
		HandshakeTimeout:  45 * time.Second,
		EnableCompression: false,
	}
	headers := http.Header{}
	headers.Add("User-Agent", fmt.Sprintf("%s/%s", binanceconnector.Name, binanceconnector.Version))
	c, _, err := Dialer.Dial(cfg.Endpoint, headers)
	if err != nil {
		return nil, nil, err
	}
	c.SetReadLimit(655350)
	doneCh = make(chan struct{})
	stopCh = make(chan struct{})
	go func() {
		// This function will exit either on error from
		// websocket.Conn.ReadMessage or when the stopC channel is
		// closed by the client.
		defer close(doneCh)
		if binanceconnector.WebsocketKeepalive {
			keepAlive(c, binanceconnector.WebsocketTimeout)
		}
		// Wait for the stopC channel to be closed.  We do that in a
		// separate goroutine because ReadMessage is a blocking
		// operation.
		silent := false
		go func() {
			for {
				_, message, err := c.ReadMessage()
				if err != nil {
					if !silent {
						errHandler(err)
					}
					stopCh <- struct{}{}
					return
				}

				go func(msg []byte) {
					handler(msg)
				}(message)
			}
		}()

		for {
			select {
			case <-stopCh:
				silent = true
				return
			case <-doneCh:
			}
		}
	}()
	return
}

func keepAlive(c *websocket.Conn, timeout time.Duration) {
	ticker := time.NewTicker(timeout)

	lastResponse := time.Now()
	c.SetPongHandler(func(msg string) error {
		lastResponse = time.Now()
		return nil
	})

	go func() {
		defer ticker.Stop()
		for {
			deadline := time.Now().Add(10 * time.Second)
			err := c.WriteControl(websocket.PingMessage, []byte{}, deadline)
			if err != nil {
				return
			}
			<-ticker.C
			if time.Since(lastResponse) > timeout {
				return
			}
		}
	}()
}

After investigating I noticed that I start to exceed the context deadline exceeded and dial tcp <IP_ADDRESS>:443: i/o timeout errors when the number of subscriptions approaches 1000. I increased the wait time between creating subscriptions to 0.5 seconds, but the problem remains.
I understand that I am violating one of these limits
https://developers.binance.com/docs/derivatives/portfolio-margin-pro#websocket-limits
If I understand correctly, then I have no more than 200 streams per connection, i.e. I do not violate this point?

A single connection can listen to a maximum of 1024 streams.

Most likely, this is the limit

WebSocket connections have a limit of 5 incoming messages per second. A message is considered:
A PING frame
A PONG frame
A JSON controlled message (e.g. subscribe, unsubscribe)

But I don't really understand when I violate it. Even if there is a ping, pong and creation of subscriptions (with an interval of 0.5 seconds) during one second - there will be a maximum of 4 messages per second.

Also this code on the Python work fine for me with the same pairs and intervals
    intervals = ['1h', '4h', '1d', '1w', '1M']
    for interval in intervals:
        for pair_chunk in chunks(pairs, 200):
            manager = UMFuturesWebsocketClient(
                stream_url="wss://fstream.binance.com",
                on_message=g
            )
            for pair in pair_chunk:
                manager.continuous_kline(pair=pair, contractType='perpetual', interval=interval, id=uuid.uuid4().hex)
                time.sleep(0.2)


call is ambiguous between the following methods or properties FrameExtensions.Sum and FrameStatsExtensions.Sum

I am using Deedle NuGet packet in VS 2019 version 2.2.0. When I add the following code:
var normalizedDf = Frame.CreateEmpty<int, string>();
var average = ecommerceDF.Columns[features].Sum() / ecommerceDF.RowCount;
foreach (var feature in features)
{
normalizedDf.AddColumn(feature, (ecommerceDF[feature] - average[feature]) / ecommerceDF[feature].StdDev());
}
I get a compiler error:
Error	CS0121	The call is ambiguous between the following methods or properties: 'FrameExtensions.Sum<R, C>(Frame<R, C>)' and 'FrameStatsExtensions.Sum<R, C>(Frame<R, C>)'	MarketingLists	C:\Users\DDemland\source\repos\MarketingLists\MarketingLists\MarketingList.cs	391	Active
When I revert back to version 2.1.0 the error does not occur. How do I fix this?
Thank You,
David Demland

Thanks for reporting this bug. It should be addressed now. Try out the latest version 2.3.0 that I've just published.

Thank you
David
From: Zhenyong Zhu<EMAIL_ADDRESS>Sent: Wednesday, September 16, 2020 11:52 AM
To: fslaborg/Deedle<EMAIL_ADDRESS>Cc: ddemland<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [fslaborg/Deedle] call is ambiguous between the following methods or properties FrameExtensions.Sum and FrameStatsExtensions.Sum (#514)
Thanks for reporting this bug. It should be addressed now. Try out the latest version 2.3.0 that I've just published.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/fslaborg/Deedle/issues/514#issuecomment-693594623 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQRGQBUTWX65QOJYHQE6DSGECNJANCNFSM4RPFGRPA .  https://github.com/notifications/beacon/AAAQRGQTKN2ERUFBTVJFIFTSGECNJA5CNFSM4RPFGRPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFFLWT7Y.gif


Violationreporting of POsts

wird aktuell bearbeitet

you can mark issues with closes #id in a commit message or pull request and the issue will be closed automatically when it is merged into master. Additionally, we get a nice linking between issue and PR.


[WIP] Fix global strategy highlighting

I am opening this PR for the sake of transparency. This PR is my attempt at fixing the broken highlighting caused by Neovim 0.10, it involves a rewrite of the core highlighting algorithm to use iter_matches rather than iter_captures now that the bug that make iter_matches unworkable has been fixed in Neovim.
As of the time of writing this all tests pass, but that does not mean that I don't have any blind spots in my tests. Now is the time to actually try it out. Rewriting the highlighting has revealed a number of bugs, so of which are not even visible, in the old code, so there have been quite a few commits to master as well. Some patterns had to be dropped unfortunately because they never worked correctly to begin with (usually because nested parentheses would be on the same level in the tree).
I have also found the previous highlighting code to be lacking in structure and hard to understand. I was making new data structure types up as I went along and I was abusing stacks as ad-hoc sets. Thus I used this opportunity to introduce a proper set type and properly define what a match and what a match tree are. These definitions will probably change before I merge this branch into master though.
@Danielkonge Thank you for the time you have invested and the PRs you have opened, but I think this one obsoletes them.

The new global strategy looks good to me, I played around with something similar and it generally worked fine, but I wanted to play around with making a blocks query for python and couldn't do that without something more complicated.
I have a few comments for problems I have noted:

on_changedtree sometimes give us bad (as in not precise enough) changes on undo and when using snippets, and that can mess with highlighting. (I don't have a good solution for this.)
The check that parent_lang ~= lang should really only be relevant for rust from what I can tell, and the main problem stems from the way neovim uses injections of a language inside the language itself. In general, I think we would have much nicer code here, if neovim didn't do this, and I am not really sure why they have made that choice.
I played around with updating highlights on screenupdates and during that I noticed a small optimization we might want to add. Instead of doing string comparisons, we can compare the ids of container, delimiter and sentinel instead, which should be faster. I haven't tested if this actually makes any measurable difference, but the code change is quite easy, if you want to do this. Something like this before the main part of the code:

-- we get id's in the order they show up in the query file, which
-- will usually be
local delimiter_id, sentinel_id, container_id = 1, 2, 3
-- this will fix any mistaken order
for id, name in ipairs(query.captures) do
    -- captures should only contain at most these three
    if name == 'delimiter' then
        delimiter_id = id
    elseif name == 'sentinel' then
        sentinel_id = id
    elseif name == 'container' then
        container_id = id
    end
end

And then compare e.g. id == delimiter_id instead of capture == 'delimiter' (after local capture = query.captures[id]).

I think the problem with Python is that the body of a statement is not sandwiched between two parent delimiters. Let's take the following piece of Python:
if True:
    print([{'a': {'b', 'c'}}])

The full tree is
(if_statement ; [0, 0] - [1, 30]
  "if" ; [0, 0] - [0, 2]
  condition: (true) ; [0, 3] - [0, 7]
  ":" ; [0, 7] - [0, 8]
  consequence: (block ; [1, 4] - [1, 30]
    (expression_statement ; [1, 4] - [1, 30]
      (call ; [1, 4] - [1, 30]
        function: (identifier) ; [1, 4] - [1, 9]
        arguments: (argument_list ; [1, 9] - [1, 30]
          "(" ; [1, 9] - [1, 10]
          (list ; [1, 10] - [1, 29]
            "[" ; [1, 10] - [1, 11]
            (dictionary ; [1, 11] - [1, 28]
              "{" ; [1, 11] - [1, 12]
              (pair ; [1, 12] - [1, 27]
                key: (string ; [1, 12] - [1, 15]
                  (string_start) ; [1, 12] - [1, 13]
                  (string_content) ; [1, 13] - [1, 14]
                  (string_end)) ; [1, 14] - [1, 15]
                ":" ; [1, 15] - [1, 16]
                value: (set ; [1, 17] - [1, 27]
                  "{" ; [1, 17] - [1, 18]
                  (string ; [1, 18] - [1, 21]
                    (string_start) ; [1, 18] - [1, 19]
                    (string_content) ; [1, 19] - [1, 20]
                    (string_end)) ; [1, 20] - [1, 21]
                  "," ; [1, 21] - [1, 22]
                  (string ; [1, 23] - [1, 26]
                    (string_start) ; [1, 23] - [1, 24]
                    (string_content) ; [1, 24] - [1, 25]
                    (string_end)) ; [1, 25] - [1, 26]
                  "}")) ; [1, 26] - [1, 27]
              "}") ; [1, 27] - [1, 28]
            "]") ; [1, 28] - [1, 29]
          ")")))))

I would like to highlight the if as level 1, and the parentheses from print(...) as level two. The query for the if statement is
(if_statement
  "if" @delimiter) @container

There is no matching delimiter to sandwich consequence between, so the parentheses get highlighted as level one, even though the nesting of containers is correct. We do not have this problem in Lua where there is always a closing end delimiter.
The problem is definitely lack of a closing delimiter. If I make both the for and in of a for-loop into delimiters and there is a parenthesized expression between them it will get highlighted properly.
This is definitely something I would like to get working. I want rainbow blocks in Python as well, but until now that was impossible because of  the lack of a sentinel node. But now that we no longer need sentinels it should be doable.

I now know why sandwiching is required: the algorithm to determine nesting assumes that matches are returned in a certain order which is outlined in the HACKING file (when exiting a node according to a depth-first visitor pattern). This assumption only holds true if child matches are sandwiched between delimiters. Otherwise the match will be returned upon entering the node.
This means I need to modify the nesting algorithm to account for the reverse case. I have updated the HACKING file with the current state of knowledge so far.

OK, I give up on Python for the time being. Trying to get rainbow-blocks working for Python has given me some deeper insight though, so I do think that it is doable in the future, but the priority is getting this fix out of the door.  A my findings are documented in the HACKING file.
The problem is that right now I am assuming that for two matches m1 and m2 if m1 is not an ancestor of m2 they must be cousins. This works fine as long as the body is sandwiched between two delimiters.  For Python I need a third possibility: if m1 is not an ancestor of m2, m2 might be an ancestor of m2. This can happen with pairwise delimiters as well.  Consider this Awk code:
if (some_var) {
    # ...
}

Right now we highlight the parentheses and braces the same, which makes sense because visually they are all siblings. However, in the syntax tree the block delimited by the braces is a child of the whole if-statement, and so it would get highlighted differently from the parentheses.  I could define a @body capture in the pattern and then say that a match is only considered a child if and only if it contained inside the @body
(if_statement
  "if"
  "(" @delimiter
  condition: _ @body
  ")" @delimiter @sentinel) @container

Now only what is inside the parentheses is considered a child, but the block with braces is a sibling (or more generally a cousin).  The same for Python:
(for_statement
  "for"
  left: _ @body
  "in"
  body: _ @body) @container

Here we have two bodies: whatever is between for and in, and the body of the loop. Let's look at an example:
for (k, v) in {'a': 1, 'b': 2}:
    print(k, v)

Here for, in and the dictionary are considered siblings, while (k, v) and print(k, v) are children because both are inside a @body of the pattern.

@Danielkonge

on_changedtree sometimes give us bad (as in not precise enough) changes on undo, when using snippets and when pasting something copied, and that can mess with highlighting. (I don't have a good solution for this.)

Can you please provide some examples so I can replicate it?

I have found one broken edge case: when pasting multiple lines with delimiters only the last line will have the proper highlighting, the other lines will be off by one per how many lines they are above the last line.  Take the following example:
print {
    {a = 1, b = 2},
}

Now type ggjyy5p to past the second line five times and you will see what I mean.  Oddly enough this works fine when pasting just one line or when pasting inside an embedded language (such as this code block in this Markdown buffer).
I have added a test case. I anyone finds more edge cases please post them here.

Pasting multiple lines should be fixed now.

Sorry for the late reply, I have been on vacation and then after that I was quite busy for some time. I am not sure exactly what you have looked at since your last messages. Is there any of the problems I mentioned I should still try to find a way to reproduce?
Also just a note: To get around the issue with not having sentinels (e.g. in Python), I used the end (line,column) of the node for queries with no sentinel provided, and that worked fine. I could generally get good highlighting in Python (and other languages) with that, I just used a really hacky solution to get around the problems you mentioned in Python, so that should definitely be considered a bit more thoroughly at some point, if we would want something like that to work.

I am not sure exactly what you have looked at since your last messages. Is there any of the problems I mentioned I should still try to find a way to reproduce?

The best thing to do would be just to use the current state as it is and report if you find some issue. I have already fixed one issue (outlined above), but I have noticed a different one. Take this Lua code:
print {
    {
    }
    {
    }
}

The execute %s/\v\{\n\s+/{ to remove line breaks after the opening brace. The highlighting will be messed up.  To be honest, I consider this to be a very marginal edge case and I would leave it as is for the time being until the PR is merged. I can look into it afterwards. There is already a failing test for it.

Also just a note: To get around the issue with not having sentinels (e.g. in Python), I used the end (line,column) of the node for queries with no sentinel provided, and that worked fine. I could generally get good highlighting in Python (and other languages) with that, I just used a really hacky solution to get around the problems you mentioned in Python, so that should definitely be considered a bit more thoroughly at some point, if we would want something like that to work.

I don't want to spend time on it until after this PR. I don't think we can make it work without an explicit @body capture which tells us where a child tree can be, but I don't mind being proven wrong.. Maybe it will be possible to omit the @body when we don't need it, but it is not a big deal to add it to all queries.
The first priority is finishing this PR. The global strategy is in a good enough shape, the next step is porting over the local strategy and that should be it then.

Just wanted to give some feedback. I have been using this branch for a couple of weeks now, and I haven't noticed any problems. It seems to work even better than previous versions before the neovim update. :)

Just wanted to give some feedback. I have been using this branch for a couple of weeks now, and I haven't noticed any problems. It seems to work even better than previous versions before the neovim update. :)

Thank you for test-driving it. I have finally merged the PR after tying up some loose ends today.


Binary distribution plans?

hi everyone 👋
we are using Kronos as a dependency in Datadog iOS SDK and we were wondering if you had any plans for distributing Kronos as binary / xcframework?

I'm definitely up for us doing this in general, if you have an example of the type of config you ship that kinda thing with that would be great (or if you want to PR it! 🙏🏻 )

tl;dr: my PR above breaks Kronos for carthage users who mix Swift with Obj-C, i'm reverting it if that's ok with you.
hi again @keith 👋
i've just found out BUILD_LIBRARY_FOR_DISTRIBUTION is incompatible with Obj-C bridging headers.
if the client app has a bridging header / mixes Swift&ObjC then it cannot use a framework built with this build setting.
this WWDC session somehow mentions it (but leaves it unclear).
i'm raising a new one to revert it, sorry about raising the first PR too early!
it probably makes sense to let the user choose between downloading binary directly (build for distro) and building from the source (NOT built for distro).
SPM and Cocoapods don't have such a mechanism; carthage has no-use-binaries flag but AFAIK you can't choose which dependencies to use binaries and which not to, so this is not a viable option neither.
from what i understand, the effort for distributing binaries of an open-source project isn't worth the juice; it looks like it only makes sense for closed-source frameworks. after all, they can cache their dependencies in their ways after building from the source.
this topic turned out to be much more complex than i initially expected, please let me know if i'm missing something or if you have a different idea 👂

yea it seems like this has always been a huge pain, which is why I love building our dependencies from source in a way that we define 🙃 . I think having a separate binary on each release would be fine with me though, and we could override that setting, if needed, in that build, separate from the CocoaPods or manual project integration routes.

i thought it wasn't a pain anymore with xcframework and build_for_distro setting... but i turned out to be wrong :(
my initial idea was that if DatadogSDK and Kronos provide binaries then our regular users (who use SPM/cocoapods/carthage) can download both binaries easily with the help of package managers.
but due to that bridging header limitation, providing binaries via package managers is not really an option.
please let me do a bit more research while keeping the issue open ⏳ (but i will probably close the issue without further action)
we as Datadog still may need to provide binaries but this will be for non-package-manager-users and i think it makes more sense to provide a single standalone binary for them (only Datadog.xcframework which statically contains Kronos inside).

statically linking Kronos in your xcframework is normally Lyft's preferred way to include 3rd party binaries as well

hi again @keith 👋
i'm closing the issue. for now we decided to go with providing standalone binaries (a zip file containing OurFramework.xcframework and Kronos.xcframework in Github releases) for the users who don't use package managers.
i want to correct a mistake i made above:
Obj-C incompatibility issue was actually a mistake in my test project. when i set BUILD_LIBRARY_FOR_DISTRIBUTION = YES in the xcconfig for my framework target it was also affecting my app target (xcconfig was shared indirectly among both targets).
in short, BUILD_LIBRARY_FOR_DISTRIBUTION cannot be used in app targets but you can use it in framework targets without problem 👌
it still doesn't look like a good idea to distribute binaries via SPM and Cocoapods.


PushPlugin is deprecated

"This plugin is deprecated, i.e. it is no longer maintained. Going forward additional features and bug fixes will be added to the new phonegap-plugin-push repository." https://github.com/phonegap-build/PushPlugin
When the new plugin will be available in ng-cordova?

I'm looking into it today. I'll let you know.

Just found out myself. +1 thanks :)

I'm writing the wrapper for this plugin today; shouldln't take too long.  It'll go into the next version.

one word: AWESOME!
thanks

+1, it would be great, thanks :)

Waiting for it!!

Debugging it now. Will push when it's ready.

+1

+1

I had some trouble getting my Push Notifications working through Parse's service; hence the trouble.  That'll be a separate plugin; but for now here's the plugin I'm using. There's some cleanup I need to do before adding it in, but it's available here: https://github.com/Jewelbots/ng-cordova/

When the docs are cleaned up and everything's added in, I'll submit a PR.

Thank you for your work @gortok
How could we update and test the upgrade via bower? We currently use the 0.1.17-alpha, should we wait for the 0.1.21-alpha release, or is there any other way to do this?

@fazermokeur It'll be going into dev-next shortly, and will be part of the 0.1.21-alpha release.

:1:

:+1:

Appreciate for your work @gortok
Possible to let me know when the new ngCordova plugin will be available for new phonegap-plugin-push which can be work with iOS 9 ?
Thanks in advance.

@razmik it's available now if you use bower's branch resolution against 'Dev-next', I'm currently running against Dev-next for our production work. I'll likely push out a release Tuesday or Wednesday of this week, depending on feedback.

hi, plz. Is this new version compatible with Ionic Push Service? Thanks.

@paulogr I'm not qualified to answer that. We have parse for our backend push (ionic push wasn't out yet) and I modified the push plugin to work with parse; I don't know if something similar works with the ionic push plugin or if you can use it out of the box. @mhartington?

Hey @gortok just a question on how to use the $cordovaPushV5 correctly.
its saying that when i run $cordovaPushV5.register.then(onSucess); that there is no then, even though it is a promise.
im calling $cordovaPushV5.initialize(options);
first and i get a successful response from that, and i run the register inside the onSuccess function.

in the dev-next branch, does the module.js need the 'ngCordova.plugins.push_v5' added to it for it to work correctly?

@gortok Hi again, any updates on pushing next version to production soon?
"I'll likely push out a release Tuesday or Wednesday of this week, depending on feedback."

@Gortok does your plugin only work with parse? This means that to use a different baas or something like node-apn I'll have to roll my own wrapper for the phonegap-push-plugin?

the wrapper here works with the push plugin. i didn't have to change this wrapper on my own repo that allows for it to integrate with parse because parse requires changes to the underlying plugin to work, not the wrapper. I don't know what other BaaS's do, so I can't speak to their needs for the underlying plugin.

@gortok I'm a bit of a novice with this stuff. How would I get the specific build/version that incorporates this change? It looks like the last release on the releases page was in May.

+1

If you're using bower, you could install specific version using #numVersion behind the plugin name:
bower install ngCordova#0.1.20-alpha --save-dev

Hi, i'm new with cordova, angular and that stuff. will there be an instruction in the ngcordova docs soon?

Is there an update on this or an ETA for when it will be merged in?  Is there something holding it back?

@philmerrell Was hoping for more feedback than just my usage of it.

@gortok Cool.  I'll lend a hand.  I'm currently implementing Push Notifications in an Ionic app using Amazon SNS.  I'll let you know how it goes.

@philmerrell, nice! We're building the stack :beers:

@gortok We use your fix from and it works fine \o/
The only point is that we don't receive error message whenit fails to register app when testing on IOS emulator. Not a major point, it could be specified in the doc.

@jskrzypek :beers: cheers!
@gortok: It works great. Successfully tested on both Android and iOS.  The underlying plugin has changed enough to where example code may need to be updated, but maybe you've already done that, I haven't looked.
The biggest differences, which I'm sure you're well aware of, are sending one options object (rather than a platform specific object) when initializing:
var options = {
   "android": { "senderID": "1111111" },
   "ios": { "alert": true, "badge": true, "sound": true}
};

$cordovaPush.initialize(options);

Also, the register method on Android responds with a registration ID now, which is awesome.  It used to respond with simply "OK" and you'd get the registration ID through a switch statement on the $cordovaPush:notificationReceived event.
The only thing I noticed is there's a few missing (iOS only) methods: push.getApplicationIconBadgeNumber and push.finish.

Hi @gortok,
Thank you for your integration with new push plugin!
I tested it and I was a bit confused with implementation...
Here is my PR.
I wanted to keep it simple and merged "initialize" and "register" method because in common case you will call them sequentially.
Possible use case of "initialize" without "register" - unregistration but it's not the case with current push plugin - https://github.com/phonegap/phonegap-plugin-push/issues/208.
Otherwise there is chance to miss "registrationId" as "PushNotification.init" registers on initialization:
   setTimeout(function() {
       exec(success, fail, 'PushNotification', 'init', [options]);
   }, 10);

Register resolves with RegistrationId(token), rejects with registration error, subscribes to "notificationReceived" and "error" (as per current state of Push Plugin code errors triggers only during registration).
"onNotification" and "onError" methods - no need to call them, we can subscribe on "registration" to not miss "$cordovaPushV5:notificationReceived" and "$cordovaPushV5:errorOccurred".
onNotification : function () {
// It's just subscription and can be done on register call.
    $timeout(function () {
      push.on('notification', function (notification) {
        $rootScope.$emit('$cordovaPushV5:notificationReceived', notification);
  });
});

Example for this PR:
$rootScope.$on('$cordovaPushV5:notificationReceived', function (event, notification) {
    // ...
});

$rootScope.$on('$cordovaPushV5:errorOccurred', function (event, error) {
    // ...
});

$cordovaPushV5.register(options).then(function (token) {
    // ...
}, function (error) {
    // ...
});

@evgd
I totally see what your saying in terms of merging the 'init' and 'registration' methods, but since this is a wrapper for the 'phonegap-plugin-push', I'd personally like to see consistency between the methods in the plugin and the ngCordova wrapper.
I think it could also cause confusion to have the wrapper diverge in functionality from the plugin, but that's just my 2 cents.  Often I find myself reading the original plugin's documentation.

@philmerrell
Thank you for feedback. I agree with you that there is inconsistent with phonegap-plugin-push API. I thought that it would be handy to have "init" and "registration" in single method. We should consider that phonegap-plugin-push API consists of "init" method and "registration", "notification" and "error" events which means to keep it fully consistent there should be only "init" and "$cordovaPushV5:registrationId" event. I think some deviations is acceptable if they are well documented. As from my experience, I started using push plugin right from ngCordova examples and then, just to know how it works, checked push plugin documentation.
For me either one or two methods will look fine. But there is also other changes from PR aimed to prevent missing events(1), missed digest(2) and just to not force write sequence "$cordovaPushV5.onNotification(); $rootScope.$on('$cordovaPushV5:notificationReceived', ...);" that can be made implicitly (3).
Below original implementation with comments on points.
// (3) it just subscribes to "push" events. If you don't want them just don't listen '$cordovaPushV5:notificationReceived' rootScope event.
onNotification : function () {
// (2) no need of timeout here because it doesn't touch scope.
	$timeout(function () {
	  push.on('notification', function (notification) {
// (2) but here we will want to wrap "$emit" with $timeout, $evalAsync or $apply to execute in "angular" context and force digest cycle.
	    $rootScope.$emit('$cordovaPushV5:notificationReceived', notification);
	  });
	});
}

With (1) it's not likely to happen if you know that "init" and "register" must be called sequentially (no postpone of "register" execution). Somebody can think that it's OK to init service at startup and register after some user interactions (like login, or press button, etc).
Another case for ideal latency world but it might happen if your have tons of watches for example:
// this initializes "Registration" process. Check android code here https://github.com/phonegap/phonegap-plugin-push/blob/master/www/push.js#L60-L62 you have only 10ms to subsribe to events...
$cordovaPushV5.initialize()
	.then(() => {
// I'm not aware of this behaviour and wanted to subscribe "notification" and "error" first, then make "register"
		$cordovaPushV5.onError(); // digest loop
		$cordovaPushV5.onNotification(); // digest loop
		$cordovaPushV5.register((registrationId) => ...); // are we still in 10ms range here?
	});

can somebody post a little example with the new syntax? I still don't understand what has changed, sorry!

+1

The main difference is that you have to pass in an options object to the initialize method first.  Then you can call register to get a registration id.
var options = {
        "android": { "senderID": "12345" },
        "ios": { "alert": true, "badge": true, "sound": true }
      };
$cordovaPush.initialize(options);

Now you can do this:

$cordovaPush.register().then( (regId) => {
    console.log('Registration ID: ', regId);
});

Thank you

@ronyrun complete example for this branch
module.run(function($cordovaPushV5, $rootScope) {

      var options = {
        "android": {
          "senderID": "12345"
        },
        "ios": {
          "alert": true,
          "badge": true,
          "sound": true
        }
      };

      document.addEventListener("deviceready", function() {

        $rootScope.$on('$cordovaPushV5:notificationReceived', (event, notification) => {
           // handle notification in application
        });

        $rootScope.$on('$cordovaPushV5:errorOccurred', (event, error) => {
          console.log('$cordovaPushV5:errorOccurred ' + error);
        });

        this.$cordovaPushV5.initialize(options);
        this.$cordovaPushV5.register().then(token => {
          console.log('$cordovaPushV5:REGISTERED', token);

          // below code required to configure $cordovaPushV5 notifications emitter. Don't pass function it's not handler.
          $cordovaPushV5.onError();
          $cordovaPushV5.onNotification();
        }, err => {
          console.error('$cordovaPushV5:REGISTER_ERROR', err);
        });
      }
});

$cordovaPushV5.register().then( function(token){
//the code never comes here.... there is no log no error
} )

@scripterkaran

there is no log no error
in console?

To check promise rejection you should change code to:
$cordovaPushV5.register().then( function(token){}, function(){
console.log('error occurred');
} )

to check cordova push errors you should listen to "$cordovaPushV5:errorOccurred"

THIS will NOT work!
module.factory(function($cordovaPushV5, $rootScope) {

     var iosConfig = {
             "alert": true,
             "badge": true,
             "sound": true
        };
     $cordovaPushV5.initialize(iosConfig);  //at run time only

    return {
        serverRegister: function(){
            $cordovaPushV5.register().then(function(token){
                console.log('$cordovaPushV5:REGISTERED', token);
            }, function(err){
                console.error('$cordovaPushV5:REGISTER_ERROR', err);
            });
        }
    }
})

THIS WILL WORK
module.factory(function($cordovaPushV5, $rootScope) {

    var iosConfig = {
        "alert": true,
        "badge": true,
        "sound": true
    };
    return {
        serverRegister: function(){

            $cordovaPushV5.initialize(iosConfig);   // as a function instance
            $cordovaPushV5.register().then(function(token){
                console.log('$cordovaPushV5:REGISTERED', token);
            }, function(err){
                console.error('$cordovaPushV5:REGISTER_ERROR', err);
            });
        }
    }
})

@scripterkaran yes, it's because you shouldn't call initialize prior to "deviceready" event. The above examples clearly showed this.
Here is some details on this common issue - http://ngcordova.com/docs/common-issues/
Here is phonegap-plugin-push example - https://github.com/phonegap/phonegap-plugin-push/blob/master/example/www/js/index.js

I am using manual bootstrap of angular. So... My angular app is only initialised when device ready is called. So the problem is something else, but still it works in the latter snippet I posted.
Thank you for the links but this is of no help in this context.
<script type="text/javascript">
            document.addEventListener('deviceready', function onDeviceReady() {
                angular.bootstrap(document, ['MyApp']);
            }, false);
        </script>

Thank you gortok, great plugin and great work. Just wonder why have you not included ngCordova.plugins.push_v5 module in the ngCordova.plugins module(version 0.1.22-alpha)? Thanks.

@seenimurugan It's in v0.1.22-alpha, I'm not sure what you're referring to, can you link me to the file where it should be (but isn't)?

Hi @gortok thanks for the reply, I think ngCordova.plugins.push_v5 module in the ng-cordova.js file needs to be included in the 'angular.module('ngCordova.plugins', ['all_other_modules', 'ngCordova.plugins.push_v5'])' module's list as well. So that we can directly use the $cordovaPushV5 service without injecting the module manually. May be i am wrong/silly but just thought.

@seenimurugan That's why I wanted you to link to the file; I couldn't find it to see where it should have been added. You're right, it' an oversight it wasn't added. I'll add it and increment the release so bower and NPM pick it up.

This will be resolved when #1064 is merged, and I'll push out a new tag.   v0.1.23-alpha it will be. Some day I'll be able to make a build without having to make 3 builds to fix that build. Someday.

pushed and merged. Let me know if you still run into an issue.

@gortok Perfect. Thanks.

@gortok I see that final implementation has been agreed and ticket was closed. Did you have a chance to look at my PR and https://github.com/driftyco/ng-cordova/issues/963#issuecomment-153174075 ? Correct me if I'm wrong but in some cases current implementation can lead to unexpected behaviour or/and api not clear (for example onNotification, onError methods for subscription).

@gortok
Tried to use new $cordovaPushV5 and having issues.... dont see any log messages either.
I am trying to make this work with Parse push service as well - would you be able to share sample project.

I had similar problems to @scripterkaran with the promise never resolving on iOS and they were caused by some sort of incompatibility with the new push plugin and the old one.
If I would install the new plugin while the deprecated one was still there, and then remove the deprecated one, the new one would stop working properly. I could confirm this in the logs from the device, where there would be an error about Plugin 'PushPlugin' not found or is not a CDVPlugin. I noticed something was wrong after putting a break point in the init function of PushPlugin.m in XCode and not seeing it trigger.
What did it for me was removing both plugins and then just adding the new one. It may also help removing the iOS platform and re-adding it.

Hello,
Could you guys please help me?
Notifications work well but when setting badgeNumber, the badge keeps displayed even if the app is relaunched/unistall etc...
I permanently have this badge...
How can I remove it?
Thanks

Sorry but there is some sort of documentation for $cordovaPushV5 ? I cannot find it.

Documentation is limited, but this piece of code saved the day for me.
I'll repeat it just to make sure it is clear. Thx @ronyrun
$cordovaPushV5.initialize(options);
$cordovaPushV5.register().then(token => {
console.log('$cordovaPushV5:REGISTERED', token);
    **  // below code required to configure $cordovaPushV5 notifications emitter. Don't pass function it's not handler.**
      $cordovaPushV5.onError();
      $cordovaPushV5.onNotification();
    }, err => {
      console.error('$cordovaPushV5:REGISTER_ERROR', err);
    });

Given that https://github.com/phonegap-build/PushPlugin.git is deprecated – and causes a compile error with Cordova 6 in XCode – why does the ngCordova documentation here still reference it?

How are we meant to call the push.finish() function to let the device know we have finished processing a background notification?

Similar to my previous comment, how can we call the push.getApplicationIconBadgeNumber() function ?

I am getting an error while injection  $cordovaPushV5 to app.run().

Me too.
Unknown provider: $cordovaPushV5Provider <- $cordovaPushV5

@samoka check follow link
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/EXAMPLES.md


chromiumKey导出这个如何使用

chromiumKey导出这个如何使用

This a temporary file has no effect and can be deleted. Generally, it founded when hack-browser-data has been killed but has not completely end.


Failed to run fleet with an os error: no such file or directory

Describe the bug

I try to run fleet build --release with my repo and it just prints out this error without any further information.
To Reproduce
Steps to reproduce the behavior:

Install fleet with curl -L get.fleet.rs | sh on macOS.
Clone https://github.com/tikv/tikv
fleet build --release

Expected behavior
The building should start normally.
Screenshots
As above.
Desktop (please complete the following information):

OS: macOS 12.3.1 (21E258)

@VarunPotti and I are currently implementing a fix for a similar issue faced by another user, will keep you posted 😄

Hey @JmPotato the bug has been fixed! Please run cargo install fleet-rs --force 😀.

@JmPotato Let me know if this solved it for you, we'll close the issue then!

Hello, i have the same issue, and with installing via cargo install fleet-rs --force i still have the same issue
I'm on macOS 12.3.1, fleet version says 0.0.7, i was on nightly toolchain but i tried switch to stable, uninstall and reinstall fleet, but still

Hey @IAMISSAM, can you share the fleet.toml file? And if rd_enabled = true please change that to false, the issue should be fixed.

Hello, here is my fleet.toml :
rd_enabled = true
fleet_id = "83504b5d-adbb-41a7-9a50-4815c347aaea"

[build]
sccache = "/Users/issam/.cargo/bin/sccache"

When i disable rd_enabled, i have the same issue

I see, is the target directory created?

No, i don't see any target directory inside my project

What is the output cargo run gives? Does it throw a similar error?

cargo run works fine, and the program is running

I see, will look into it, the ${PWD}/.cargo/config.toml file is created right?

Inside the project directory, there is no .cargo directory

That must be the issue will look into this.

Hey @IAMISSAM, I tried building on MacOS 11 https://github.com/VarunPotti/fleet-actions/runs/6146796095?check_suite_focus=true, and it works! I seem to have fixed the error I will merge it into the master branch and publish this version into cargo, will notify you when done 😁

Yep published now along with a github workflow to check if everything works! So you can run cargo install fleet-rs --force and you will be good to go!

Let us know if this issue is resolved1

Yeah, can confirm this is working now, thanks

@VarunPotti @suptejas Hi, after upgrading the fleet-rs, there is something wrong with the split-debuginfo config field.

Hey @JmPotato, what version of cargo, rustc are you running? split-debuginfo='...' is specified in the documentation so it must work fine

This issue has seemed to be fixed. If this issue re-occurs, or you’d like to open another issue, please create one! If you feel like it needs to be reopened, reach out to me over at our Discord Server (https://discord.gg/RsTeV6rpqJ).
Grinder (Community Manager)

Hey @JmPotato, what version of cargo, rustc are you running? split-debuginfo='...' is specified in the documentation so it must work fine

I think you may have misunderstood that split-debuginfo = '...'  # Platform-specific. in the docs is a valid option. To me it looks like the author simply don't want to write out platform specific value for split-debuginfo in the docs not that ... is a valid option.
See also https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo
cc https://github.com/napi-rs/napi-rs/discussions/1246


Create jobs/tasks

For example, to send emails to confirm registration.
Probably this is the only one we need at the moment.

Note: We also may need to add tasks for notifications, so I'm not sure how to do those.


Update rpc-list.mdx

Added Gateway FM (and removed BlockEden since they are in the Data providers list)

Preview is available here:http://soroban-docs-pr653.previews.kube001.services.stellar-ops.com/


Uncaught (in promise) Error: Error invoking SVGAnalyzer. Check the inner error for details.

I did the download and installation of<EMAIL_ADDRESS>after configure the application plugin:
export function configure(aurelia){

    aurelia.use
           .standardConfiguration()
           .developmentLogging()
           .plugin("aurelia-validation");

    aurelia.start().then(a => a.setRoot('app', document.body));

};

it shows me this error
what am I doing wrong? :(
aurelia-pal.js:20 Uncaught (in promise) Error: Error invoking SVGAnalyzer. Check the inner error for details.
inner error: TypeError: _aureliaPal.DOM.createElement is not a function
at createElement (http://localhost:54141/jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.0/aurelia-binding.js:4391:31)
at new SVGAnalyzer (http://localhost:54141/jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.0/aurelia-binding.js:4400:11)
at Object.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:364:14)
at InvocationHandler.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:339:168)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:587:25)
at StrategyResolver.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:145:37)
at Container.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:518:41)
at Object.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:389:105)
at InvocationHandler.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:339:168)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:587:25)
at createElement (http://localhost:54141/jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.0/aurelia-binding.js:4391:31)
at new SVGAnalyzer (http://localhost:54141/jspm_packages/npm/aurelia-binding@1.0.0-beta.1.3.0/aurelia-binding.js:4400:11)
at Object.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:364:14)
at InvocationHandler.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:339:168)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:587:25)
at StrategyResolver.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:145:37)
at Container.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:518:41)
at Object.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:389:105)
at InvocationHandler.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:339:168)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:587:25)
at new AggregateError (http://localhost:54141/jspm_packages/npm/aurelia-pal@1.0.0-beta.1.1.1/aurelia-pal.js:20:13)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:589:15)
at StrategyResolver.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:145:37)
at Container.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:518:41)
at Object.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:389:105)
at InvocationHandler.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:339:168)
at Container.invoke (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:587:25)
at StrategyResolver.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:145:37)
at Container.get (http://localhost:54141/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.5/aurelia-dependency-injection.js:518:41)
at HtmlBehaviorResource.initialize (http://localhost:54141/jspm_packages/npm/aurelia-templating@1.0.0-beta.1.2.0/aurelia-templating.js:3252:40)AggregateError @ aurelia-pal.js:20invoke @ aurelia-dependency-injection.js:589get @ aurelia-dependency-injection.js:145get @ aurelia-dependency-injection.js:518invoke @ aurelia-dependency-injection.js:389invoke @ aurelia-dependency-injection.js:339invoke @ aurelia-dependency-injection.js:587get @ aurelia-dependency-injection.js:145get @ aurelia-dependency-injection.js:518initialize @ aurelia-templating.js:3252initialize @ aurelia-templating.js:2515initialize @ aurelia-templating.js:2434(anonymous function) @ aurelia-templating.js:2795

do you have any forks? jspm inspect --forks

npm:aurelia-binding 1.0.0-beta.1.2.2 1.0.0-beta.1.3.0
npm:aurelia-dependency-injection 1.0.0-beta.1.1.5 1.0.0-beta.1.2.0
npm:aurelia-loader 1.0.0-beta.1.1.1 1.0.0-beta.1.2.0
npm:aurelia-logging 1.0.0-beta.1.1.2 1.0.0-beta.1.2.0
npm:aurelia-metadata 1.0.0-beta.1.1.6 1.0.0-beta.1.2.0
npm:aurelia-pal 1.0.0-beta.1.1.1 1.0.0-beta.1.2.0
npm:aurelia-path 1.0.0-beta.1.1.1 1.0.0-beta.1.2.0
npm:aurelia-task-queue 1.0.0-beta.1.1.1 1.0.0-beta.1.2.0
npm:aurelia-templating 1.0.0-beta.1.1.4 1.0.0-beta.1.2.0

k you'll need to jspm install each of these to clean up the forks... eg jspm install aurelia-binding and so on.

I did it, but unfortunately the error is still there.

gulp unbundle (just a guess)
else rebuild the config (@jdanyow i'd lke to see a task for that. i'm getting tired of explaining howto)

delete the jspm folder
delete the map entry in config js
run jspm install

@fabiomdf let us know if @doktordirk's steps solve your issue

Now it's working. I did exactly what @doktordirk said. Thank you guys very much.

:+1:

For those that got here via Google - I ran across the same issue after installing aurelia-dialog; following   the instructions from @doktordirk resolved the issue for me as well.

I'm getting the same error using webpack, trying to use @bindable foo in a custom element. Tried deleting node_modules folder and re-installing latest rc versions of all the aurelia libraries but still same error.
If I put a breakpoint at aurelia-binding line 4418 and step into _aureliaPal.DOM.createElement that function is defined and seems to run through successfully, but then letting it continue on, still get the stack trace:
aurelia-logging-console.js:54 ERROR [app-router] Error: Error invoking SVGAnalyzer. Check the inner error for details.
------------------------------------------------
Inner Error:
Message: _aureliaPal.DOM.createElement is not a function
Inner Error Stack:
TypeError: _aureliaPal.DOM.createElement is not a function
    at createElement (webpack:////Users/dbaron/projects/flute-ui-histogram-component/~/aurelia-binding/dist/commonjs/aurelia-binding.js?:4418:29)
    at new SVGAnalyzer (webpack:////Users/dbaron/projects/flute-ui-histogram-component/~/aurelia-binding/dist/commonjs/aurelia-binding.js?:4427:9)
    at Object.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:337:12)
    at InvocationHandler.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:314:166)
    at Container.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:576:23)
    at StrategyResolver.get (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:126:35)
    at Container.get (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:507:39)
    at Object.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:367:103)
    at InvocationHandler.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:314:166)
    at Container.invoke (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:576:23)
    at StrategyResolver.get (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:126:35)
    at Container.get (webpack:///../~/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js?:507:39)
    at HtmlBehaviorResource.initialize (webpack:////Users/dbaron/projects/flute-ui-histogram-component/~/aurelia-templating/dist/commonjs/aurelia-templating.js?:3775:38)
    at ResourceDescription.initialize (webpack:///../~/aurelia-templating/dist/commonjs/aurelia-templating.js?:2930:19)
    at ResourceModule.initialize (webpack:///../~/aurelia-templating/dist/commonjs/aurelia-templating.js?:2850:15)
    at eval (webpack:///../~/aurelia-templating/dist/commonjs/aurelia-templating.js?:3208:18)
    at tryCatcher (webpack:///../~/bluebird/js/browser/bluebird.js?:5098:23)
    at Promise._settlePromiseFromHandler (webpack:///../~/bluebird/js/browser/bluebird.js?:3129:31)
    at Promise._settlePromise (webpack:///../~/bluebird/js/browser/bluebird.js?:3186:18)
    at Promise._settlePromise0 (webpack:///../~/bluebird/js/browser/bluebird.js?:3231:10)
    at Promise._settlePromises (webpack:///../~/bluebird/js/browser/bluebird.js?:3310:18)
    at Promise._fulfill (webpack:///../~/bluebird/js/browser/bluebird.js?:3255:18)
End Inner Error Stack

package.json is:
"dependencies": {
    "aurelia-bootstrapper-webpack": "^1.0.0-rc.1.0.0",
    "aurelia-event-aggregator": "^1.0.0-rc.1.0.0",
    "aurelia-fetch-client": "^1.0.0-rc.1.0.1",
    "aurelia-framework": "^1.0.0-rc.1.0.2",
    "aurelia-history-browser": "^1.0.0-rc.1.0.0",
    "aurelia-logging-console": "^1.0.0-rc.1.0.0",
    "aurelia-pal-browser": "^1.0.0-rc.1.0.1",
    "aurelia-polyfills": "^1.0.0-rc.1.0.0",
    "aurelia-route-recognizer": "^1.0.0-rc.1.0.1",
    "aurelia-router": "^1.0.0-rc.1.0.1",
    "aurelia-templating-binding": "^1.0.0-rc.1.0.1",
    "aurelia-templating-resources": "^1.0.0-rc.1.0.1",
    "aurelia-templating-router": "^1.0.0-rc.1.0.1",
    "aurelia-validation": "0.8.1",
    "babel-plugin-transform-runtime": "6.7.5",
    "babel-runtime": "5.8.38",
    "bluebird": "3.3.5",
    "bootstrap": "3.3.6",
    "d3": "4.1.1",
    "exports-loader": "0.6.3",
    "font-awesome": "4.6.1",
    "imports-loader": "0.6.5",
    "isomorphic-fetch": "2.2.1",
    "jquery": "2.2.3",
    "lodash": "4.11.1",
    "moment": "2.13.0",
    "whatwg-fetch": "1.0.0"
  }

I've also run in to this issue when using<EMAIL_ADDRESS>and installing<EMAIL_ADDRESS>and @doktordirk's instructions did not resolve the issue. Any other ideas on what I can do?

do you have any forks? jspm inspect --forks

@doktordirk - thanks for the quick response. I have the following forks:
npm:aurelia-binding 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-dependency-injection 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-loader 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-logging 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-metadata 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-pal 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-path 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-task-queue 1.0.0-rc.1.0.0 1.0.0
npm:aurelia-templating 1.0.0-rc.1.0.0 1.0.0
I installed them per @jdanyow's instructions above the I still get the error, both before and after following your steps again.
I guess one question I should ask is when you refer say "delete the jspm folder" do you mean the jspm_packages folder or another folder (I have jspm_packages/github/jspm and node_modules/jspm)?

the whole ./jspm_packages folder. but maybe just try jspm update -a first

Thanks, jspm update seems to have resolved the issue.


Temp

Title and Issue number

Title :
Issue No. :
Code Stack :
Close #<issue_no>

Video/Screenshots (mandatory)

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have gone through the  contributing.md file before contributing

Additional context (Mandatory )
Are you contributing under any Open-source programme?

Title: Feedback page Typography changes
Contributed under GirlScript Sumer of Code(GSSOC).


Multiple level selection

Hi, does this plugin support selection of data items in multiple levels?

I'm implmenting an tree select over here

@pkempenaers Thanks mate!


how export outline-client config or copy or share config to other outline-client?

how export outline-client config or copy or share config to other outline-client?
or
where is the config file

@hktalent Thanks for using Outline. I'm afraid it's not possible right now to re-share a server via the client: you must keep the original email/IM/whatever message containing the invite.
This has come up before and we are considering this:
https://github.com/Jigsaw-Code/outline-client/issues/90

How can I make backup of users? I need to move the users on another server.


[lit-helpers] ref directive

when all you have is a template and not a full web component it can become a hassle if you need to reference one node to another
Example:
return html`
  <my-dialog>some content</my-dialog>
  <button @click=${() => dialog???.open()}>open dialog</button>
`;

a ref directive could allow getting a reference to the node
import { setRef, getRef } from '@open-wc/lit-helpers';

return html`
  <my-dialog ~=${setRef('dialog')}>some content</my-dialog>
  <button @click=${() => getRef('dialog').open()}>open dialog</button>
`;

PS: setRef would be a directive whereas getRef is just a plain function
Why ~=?
A directive needs a hook on an attribute or property in order to work. It could be anything... as a best practice proposal it could be ~=... feel free to propose alternatives
Why setRef and not setReference
Good question - both are fine... one is short the other is more explicit.
Let us know what you would prefer.

Great idea! I think a directive for getting a reference to an element would be good, but I think a global registry is problematic and I think unneeded.
With just getRef you can do this:
function myStory() {
  let dialogRef;
  return html`
    <my-dialog ~=${getRef(ref => dialogRef = ref)}>some content</my-dialog>
  <button @click=${() => dialogRef.open()}>open dialog</button>

`;
}

uh that looks even nicer 💪
less magic ✨ is always good 👍

function myStory() {
return html    <my-dialog id="mydialog">some content</my-dialog>   <button @click=${() => getRef("mydialog").open()}>open dialog</button>  ;
}

function myStory() {
  return html`
    <my-dialog id="mydialog">some content</my-dialog>
  <button @click=${e => e.target.getRootNode().getElementById("mydialog").open()}>open dialog</button>
  `;
}

getRef() is simple :)

import { html } from 'lit-html'
import { LitElement, customElement } from 'lit-element'

@customElement('my-dialog')
class MyDialog extends LitElement {
  open = () => {}
}

const refs = {}
function getRef<T = HTMLElement>(key: string): [(element: T) => void, () => T] {
  return [
    (element: T) => {
      refs[key] = element
    },
    () => refs[key],
  ]
}

function myStory() {
  const [assign, ref] = getRef<MyDialog>('dialogref')
  return html`
    <my-dialog connectedCallback()=${assign}>some content</my-dialog>
    <button @click=${() => ref().open()}>open dialog</button>
  `
}

Would require lit-element to expose it's lifecycle callbacks, not sure if it's possible to do the connectedCallback() syntax.

We can also just create a function to return querySelector to provided string as ID easily enough without adding something like setRef and getRef to Lit?

Fair point, I think i'd prefer this (less magic, less code):
    <my-dialog id="mydialog">some content</my-dialog>
    <button @click=${() => this.querySelector('#mydialog').open()}>open dialog</button>

if all you have is a function then ids or query function might be dangerous... as you can't assume that there will be only one story in your current dom...
// story1.js
function myStory() {
  return html`
    <my-dialog id="mydialog">some content</my-dialog>
    <button @click=${() => getRef("mydialog").open()}>open dialog</button>
  `;
}

// story2.js
function myStory2() {
  return html`
    <my-dialog id="mydialog">some other content</my-dialog>
    <button @click=${() => getRef("mydialog").open()}>open other dialog</button>
  `;
}

if you render them both on the same page it would result in
    <my-dialog id="mydialog">some content</my-dialog>
    <button @click=${() => getRef("mydialog").open()}>open dialog</button>
    <my-dialog id="mydialog">some other content</my-dialog>
    <button @click=${() => getRef("mydialog").open()}>open other dialog</button>

which will fail for the same ID 🙈 also a querySelector to my-dialog would fail...
I think inside of those functions the only reliable way that works all the time is by using using a direct reference to the node...

You could do things with e.currentTarget.closest(...) but a ref directive can be useful in other contexts. We will need to be careful with performance impact and creating memory leaks though.

What is the reason you can't have a unique ID for each element? Create a factory method that passes you the index as an argument and create an ID for that purpose. Or do something like Math.random to randomly generate an ID.
The whole ref system is to go from Virtual DOM to real DOM of course :)

lit-html templates are not the same as live DOM nodes either, so you still need something to map between templates and DOM nodes. Not so different from going from vritual DOM to real DOM.
I've played around with my proposed solution, but the challenge is that the template function is called for each re-render so we need something to store the state (dom reference) of the function for each rendered instance, and teach developers the right mental model. It's basically creating a hooks system.
I don't think a global reference registry is a good idea either, maybe we can do something where it's scoped to a particular template instance but that seems like a lot of work for something where the only known use case is a demos and tests.
@georges-gomes I'm not sure how your suggestion for getRef("mydialog").open() would work. Would that select from the document? Then it wouldn't for when rendered inside of a shadow root.
@paales your proposal suffers from the same drawbacks like mine, where we need to create a concept of maintaining state between function calls. What do you mean with <my-dialog connectedCallback()=${assign}>some content</my-dialog>? It's not valid syntax I think...
For the use case in the original issue post, I think this is actually pretty concise and reliable:
html`
  <my-dialog ~=${setRef('dialog')}>some content</my-dialog>
  <button @click=${e => e.target.closest('my-dialog').open()}>open dialog</button>
  <!-- or -->
  <button @click=${e => e.target.previousElementSibling.open()}>open dialog</button>
`;

If you're able to guarantee unique ids, you can use e.target.getRootNode().getElementById() or e.target.getRootNode().querySelector(). We could perhaps create a helper to make that more concise?
Any thoughts on this?

My proposal was more pseudo-code.
But a short helper for e.target.getRootNode().getElementById() sounds good to me 👍

This comment may be a bit premature, but im not really sure how I feel about the ~ prefix, for a few reasons: We're gonna run out of weird symbols to use at some point, and 2: it gives me flashbacks to angularjs where nothing makes sense

I think the prefixes lit-html uses make a lot of sense, @ for events reads as 'at event', . for properties refers to setting props in js, etc. But ~ in relation to ref just doesn't mean anything to me, and I really dont look forward to having my templates filled with a bunch of symbols ~%*& in the future 🙈

I don't think a global reference registry is a good idea either, maybe we can do something where it's scoped to a particular template instance but that seems like a lot of work for something where the only known use case is a demos and tests.

I was also thinking of scoping it to a particular template instance, but technically I don't know how this is possible. How do you scope something to a lit html template instance?
For me the most important thing here is to be able to:

refer from one part of your template, to another part in the same template
without having to set up ID + querySelector, or needing to do some JavaScript stuff next to the template like offline rendering your reference as a node so you can refer to it in your template.

A simple use case that goes beyond tests or demos is:
<my-dialog>
  <button @click=${() => close the dialog}></button>
</my-dialog>

Right now that scenario can only be solved by either having the node reference somehow to the my-dialog or by bubbling an event to it, both non-ideal.
For me, the perfect API would be:
<my-dialog ${setRef('dialog')}>Some content</my-dialog>
<button @click=${()=> getRef('dialog').open}>open dialog</button>

Where 'dialog' is a scoped reference on that lit-html template instance (avoiding conflicts that way).
How we can technically do this, I'm not sure :|

How to setRef in the TemplateResult to refer to a node that doesn't exist yet.
How to getRef in the TemplateResult to refer to a node that doesn't exist yet.

I lack knowledge on lit-html + directives to be able to reason about those challenges, but I am posting mostly to stress that for me a simple helper for e.target.getRootNode().getElementById() has very little to no value. I would never use it, I would just use the native JS one-liner 100% of the time.... because it's kinda straightforward. And it still has the downside that the user is responsible for ensuring a unique ID. With the ideal setRef/getRef you only need to ensure uniqueness in the scope of the directive of that specific template which is much less error prone, and it makes the template code very readable to me.

It seems we have 2 serious contenders
1.
function myStory() {
  let dialogRef;
  return html`
    <my-dialog ~=${getRef(ref => dialogRef = ref)}>some content</my-dialog>
    <button @click=${() => dialogRef.open()}>open dialog</button>
  `;
}

scoped via javascript 👍
no internal data structure (e.g. no issues with garbage collection) 👍
needs "external" variable 👎

2.
function myStory() {
  let dialogRef;
  return html`
    <my-dialog ${setRef('dialog')}>Some content</my-dialog>
    <button @click=${()=> getRef('dialog').open}>open dialog</button>
  `;
}

very intuitive (feels like an id) 👍
needs to be a unique name 👎
needs internal data structure (howto make sure it can be garbage collected?) 👎

I would personally vote for 1 🤗 What do you guys think?

I think you forgot to delete let dialogRef; in the second option, which is actually why it's so good in my opinion, because you only have a template and nothing else
function myStory() {
  return html`
    <my-dialog ${setRef('dialog')}>Some content</my-dialog>
    <button @click=${()=> getRef('dialog').open}>open dialog</button>
  `;
}

Number two definitely has my vote, because it supports my use case for not needing external javascript (template-only)

I think that for your use case this is sufficient, and there is no need to make a reference registry:
html`
  <my-dialog>some content</my-dialog>
  <button @click=${e => e.target.closest('my-dialog').open()}>open dialog</button>
  <!-- or -->
  <button @click=${e => e.target.previousElementSibling.open()}>open dialog</button>
`;

Also in the case of a demo system (like storybook) there should be a hook for getting a reference to the rendered element:
export const myStory = {
  render: () => html`...my story...`,
  afterRender(element) {
    // imperative code after rendering
  }
}

I have a prototype for this for a storybook addon.

for the stories we write having a query selector is quite inconvenient as we have nodes that get moved to the body (for a11y reasons) so the button and the element you want to access may be in fastly different parts of the dom... same implications to an afterRender... it does not help us in this situation...
so a ref is basically the only thing that works always without needing unique generated IDs or so...

Yes, not just the stories but our dialogs in general, where the content node is moved outside of the scope of the  element, so the "relative" query selectors will not work like that.

how about adding 2 helpers
one for simple usecases (probably > 80% of cases)
function myStory() {
  let dialogRef;
  return html`
    <my-dialog ref=${setRefAs(dialogRef)}>Some content</my-dialog>
    <button @click=${()=> dialogRef.open()}>open dialog</button>
  `;
}
// the ref in "ref=${}" is completely irrelevant you can call it foo=, bar=, ...

one where you want/need more control (e.g. if you wanna story it somewhere on an object)
function myStory() {
  let dialogRef;
  const demoElements = {};
  return html`
    <my-dialog ${getRef(ref => demoElements.dialog2 = ref)}>Some content2</my-dialog>
    <button @click=${()=> demoElements.dialog2.open()}>open dialog2</button>
  `;
}

@daKmoR that first example won't work, you can't reassign a variable in that way.
The relative query works fine in your use case even if you move the content to the DOM, the dialog element isn't moved. The dialog element should provide the necessary APIs to find the moved elements.

@daKmoR in your example above, would it be cool if the ref attr actually left behind a unique id string that maps to the js var, then referencing that ref would use a some getRef directive that used getRootNode().querySelector([ref=${theRefId}]) under the hood?

There is now an official ref directive with the latest version of lit.
https://lit.dev/docs/api/directives/#ref