Add type inference for functions without OutputType attribute and anonymous functions

PR Summary
This adds type inference for functions where the OutputType attribute hasn't been filled out and for anonymous functions.
This allows tab completion to work like you would expect in situations like:
function MyFunction
{
    [pscustomobject]@{Property1 = "Hello"; Property2 = "Hi"}
}
MyFunction | Select <Tab>
# And also:
& {[pscustomobject]@{Property1 = "Hello"; Property2 = "Hi"}} | Select <Tab>

PR Context

PR Checklist

[X] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[X] Summarized changes
[X] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[X] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[X] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[X] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[X] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[X] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

I've got 2 test failures that I'm not sure how to handle. 1: Infers type from variable with AllowSafeEval it fails because it relied on the idea that type inference wouldn't be able to infer the type of a function with no OutputType defined. With that limitation removed, I'm not sure how to test that AllowSafeEval.
2: Should infer output from function without OutputType attribute (one of the tests I added) it seems to fail because the pseudobinding fails when running the InferTypeOf method. It works fine when tab completing though. The easiest fix for me would be to just add a tab completion test instead, but if there is a way to make it work the same as the rest of the type inference tests then that would be ideal.


Event with blocking

The withBlocking function uses fix to allow us to block inputs based on values discovered later in the process. A lot of the insight here comes from @monoidmusician, to whom I'm eternally grateful.

Closing to consolidate with the other PR


Ability to set custom port

I see various strategies upgrading from Elasticsearch to Opensearch, but setting Opensearch to 9201 seems somewhat common. We have no way around running both of them together for a short period of time, and this would allow our CI setup to continue ES on 9200 and Opensearch on 9201.
Would it be possible to have this option added? Let me know if you'd like any changes.
Edit: I just noticed there was a closed issue about this, I hope it was ok to fork and PR

Hey @phoffer, thanks for the PR. As you probably saw, I added a general config option yesterday. It may still make sense to have a separate port option (otherwise, we'll need to parse http.port from config for the waitForReady check).
I added it in the port branch for now, but not sure which direction to take yet.

I did, and I already got our setup working with the update. It's convenient because it aligns with how we'll handle dev config. I utilized the config option you added, so this is all that is necessary:
config: |
  http.port: 9201

That approach should be fully supported with f5925c401c5e591e7b8b4f8a58b8a3853b92022c.


Drop final modifier on the public DataInput.readGroupVInts method

Fixes #13820

Isn't the root cause of the issue the protected method? The final method just invokes other methods, so alternatively we could fix the visibility of the protected method to be public like all the others?

Isn't the root cause of the issue the protected method? The final method just invokes other methods, so alternatively we could fix the visibility of the protected method to be public like all the others?

Yes, this would also solve the problem. I wonder if it makes sense to expose that protected method though, if it's internal details of the implementation? I'd rather make the primary API method public and let subclasses do whatever they want with it (delegate, reimplement, etc.)

Yes, this would also solve the problem. I wonder if it makes sense to expose that protected method though, if it's internal details of the implementation? I'd rather make the primary API method public and let subclasses do whatever they want with it (delegate, reimplement, etc.)

I don't understand why there are 2 methods in the first place. There's a little bit of docs on the final one, but the protected one is basically undocumented. Seems a bit convoluted.
IMO one single, well-documented, public method would be a better fit.

Sorry for the confusion. We move group-varint encoding into DataInput to let subclasses make an optimized implementation.
In the first version, the readGroupVInts method is public. see delta:
class DataInput
public void readGroupVInts(long[] docs, int limit) throws IOException {
   fallbackReadGroupVInt(...)
}

protected void fallbackReadGroupVInt(long[] docs, int offset) throws IOException {
}

subclass MemorySegmentIndexInput
@Override
public void readGroupVInts(long[] docs, int limit) throws IOException {
}

private void readGroupVInt(long[] docs, int pos) throws IOException {
    if (...) {
      super.fallbackReadGroupVInt(docs, pos);
      return;
    }
    ....
}

The problem with this version is that subclasses have some duplicate code with small changes. then we try to move the duplicate code to a util class in the subclasses, but it has a bit performance regression. see delta
class MemorySegmentIndexInput
  @Override
  public void readGroupVInts(long[] dst, int limit) throws IOException {
    try {
      GroupVIntUtil.readGroupVInts(..);
    }
  }

Finally, we remove the readGroupVInts method from subclasses, and make the base class DataInput implement as final(because nothing to optimize there anymore), the subclasses just override the protected readGroupVInt().  see delta

I understand what the intention is here, @easyice , but this is the problem - you can't override that public method anymore and you can't call the protected method in a delegate class. I sort of agree with Robert that code duplication here is not worth the added API complexity. I suggest we remove the final modifier from that method first, then think of maybe dropping the protected method altogether (although this doesn't bother me as much, since it's protected).

I understand what the intention is here, @easyice , but this is the problem - you can't override that public method anymore and you can't call the protected method in a delegate class. I sort of agree with Robert that code duplication here is not worth the added API complexity. I suggest we remove the final modifier from that method first, then think of maybe dropping the protected method altogether (although this doesn't bother me as much, since it's protected).

+1

the current readGroupVInts is also pretty specific to what the postings are doing. And it just calls readVint() and readGroupVint() behind the scenes. Seems like a good candidate to move to PostingsUtil, leaving just the one readGroupVint() method in DataInput?

the current readGroupVInts is also pretty specific to what the postings are doing. And it just calls readVint() and readGroupVint() behind the scenes. Seems like a good candidate to move to PostingsUtil, leaving just the one readGroupVint() method in DataInput?

Actually, I have tried to use group-varint encoding in other places. just don’t see a significant impact on performance at this point.

Use group-varint encode the positions  https://github.com/apache/lucene/pull/12842
Cut over HNSW's neighbor lists to group-varint https://github.com/apache/lucene/issues/12871

i dont think we should add methods to DataInput when we are only "trying to use elsewhere". The method is only used from one place: PostingsUtil, lets move it out

Folks, if you'd like to do anything larger to this, please go ahead. I'm with very limited access to the internet this week and I won't be able to track your comments closely or make any code modifications. I'll return next Monday and then can jump back in.

Thank you @rmuir, Maybe we can move readGroupVInts() into GroupVIntUtil to achieve the same goal? I raised a PR #13830

Thank you @rmuir, Maybe we can move readGroupVInts() into GroupVIntUtil to achieve the same goal? I raised a PR #13830

This is much better. Let's keep only the inner loop part in DataInput and replace the protected method by a public method called by the static utility reading the whole think.
Anyways: I was a bit against the whole change from beginning because I was not happy to add new methods to DataInput just for a silly optimization. I am also not happy about the horrible bottom-up code just to get MemorySegment access working.
IMHO, we should move minimum Java version of Lucene main branch (and 10.x) to Java 22 and introduce MemorySegment as a first class citizen and remove all abstractions from DataInput. Just make DataInput read from/to MemorySegment (NIOFSDir) or let it provide "views" (MMap) on the internal buffers. Let's move all our DataInput encoding/decoding logic to work on top of MemorySegment.
That's all I have to say. I don't care about those arguments "wuhaaah, but Java 21 is LTS !!!!1!1111!!!!!!!!!!". Don't care, use Java 22 because this is what we need to be ready for future.
Uwe

I've looked at the merged patch - thank you, it's much nicer than what it was before. I'm closing this issue.

I've backported this to branch_10x and asked the RM to allow this to be cherry picked for the subsequent respin of Lucene 10.0.

I get confused that this PR was not merged yet it has a milestone set. Should the milestone be set to the other PR that has been merged instead (#13830) ?

I think we are also missing a CHANGES entry , @dweiss could you take care of adding that please?

I've added migration and changes entry and cherry picked on branch_10_0, branch_10x and main.

Thanks @dweiss !!!


[21.05] go_1_15: 1.15.12 -> 1.15.13

Motivation for this change
Fixes #128367
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 128446 at b718514b run on x86_64-linux 1

11 packages built successfully:

coyim
galene
garble
go_1_15
grafana-loki
ibus-engines.bamboo
kuttl
nncp
nomad (nomad_1_0)
oauth2-proxy
trillian


OCI_SetTrace() : passing NULL values for clearing trace information leads to segfaults

Workaround is to pass empty string OTEXT("") to OCI_SetTrace().
This will be fixed to allow NULL value to be passed to the function.

Fixed by commit bc6b4f13

commit bc6b4f13 also extend OCI_SetTrace() feature:

Added OCI_TRC_OPERATION:  Name of the database operation set by the
client application to be monitored in the database (according Oracle
docs). It fills the column DBOP_NAME of the syste view V$SQLMONITOR
OCI_GetTrace() returns now NULL instead of an empty string if the
given trace is not set


Add new testing infrastructure for knockout-winjs

Add karma testing infrastructure and tests for each control similar to angular-winjs,
and remove the old test app.

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

It looks like you're a Microsoft contributor (Cagri Yildirim). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


namespace attributes are not removed

As I wrote on Slack namespace attributes should be removed as well on diff.
Look at this line:
https://github.com/trueadm/inferno/blob/dev/src/DOM/patching.js#L130
What if this is a namespace attribute? removeAttributeNS is missing.
This is per MDN specs.
Further reading here: https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttributeNS

@Kflash Thank you. Fixed.


Design considerations

A collection of general design considerations

Font size is overall quite small
Content hierarchy should be improved


Update 04-skypilot.md

There is an issue with the model in the example code. It should not be mistralai/Mistral-7B-v0.1 but instead mistralai/Mistral-7B-Instruct-v0.2 and mistralai/Mixtral-8x7B-Instruct-v0.1.

Hi @masonbrothers - thanks for the PR. Could you change also this line from "mistral-7b-v0.1.yaml" to "serve-mistral.yaml".


Apply CI to Tutorial

The instructions in the tutorial often ends up out of sync with reality.
I wonder whether we can get CI to check the correctness of the tutorial...

I think @SchmErik had some thoughts on this

Hey wanted to take this on , and wondered how it was different from here

It's different because the code lies in the README.md file here https://github.com/risc0/risc0/blob/main/examples/factors/README.md
I wonder if it would make sense to write a script to generate the README.md. The issue we have is that this gets out of sync with whatever changes we make to the factors example so we need a way to 1) update the code easily when the example changes and 2) catch when we forget to update the code in CI.
For 1) I think we could write a small program to generate the README.md where the bootstrap program copy/pastes lines from the tutorial rust files and paste to the README.md file. When we modify the examples, the bootstrap command should be run to regenerate the README.md file and we should commit the file.
For 2) As a part of the CI process, we could run bootstrap, to re-generate the README.md if there are any differences between the committed README.md and the generated README.md, fail the CI.

Happy to take this on

Here's another idea - we could have the tutorial written in some form of Markdown except when we need to reference  code, we can use some sort of custom markdown text to indicate "copy/paste lines x-y from file z".
During the bootstrapping process, the rust program can look into the Markdown file with this extra extension and generate the README containing the actual code


Morning session: Peer-to-peer code review

hey Jules, your logic is the best keep it up! 👍🏾

hey Jules, your logic is the best keep it up! 👍🏾

Hello dear,
we have carefully reviewed your solution and found it excellent, and well organized.
To highlight: 🎯

Good usage of HTML semantic elements.
No Linters error.
Good git flow control.

Also here are some tips that will help you to improve your code even more. ❤

To improve the for loop performance when we want to iterate over an array and we have to use the arr.length, it's a good practice to store the arr.length into a variable and use that variable in for loop condition. see.
Another method to filter an array and remove a specific item is to use the filter method, so we kindly recommend using the filter method as it is more appropriate.


Updated emacs plugin

updated minimal version from 23 to 24
added new aliases that fix unexpected close https://github.com/robbyrussell/oh-my-zsh/issues/4221
removed some old aliases
fixed line that detects open frames, now it works

Can you describe what this does in detail?

Thanks! @hjpotter92 @emanresusername can you test this and comment on it?

i can't claim to be an emacsclient expert, but seems to be working great for me.
running e whatever.file with no frames open now does the expected thing (i.e. open and switch to a new frame visiting whatever.file. instead of before where it would just do . . . well . . . nothing :/) so 👍 for that!
maybe some comments for the usecases for the new aliases? it seems like they're trying to do different things (correctly i'm sure), it's just not apparent to me what each one is meant for?

worked fine for me all day today 👍

@mcornella @hjpotter92  anything gating merging in this one?

I was waiting for some input from @soredake, but your points don't seem to be that big of a deal.

The deleted aliases thing should be solved with setopt correct which automatically guesses which command you meant if you mispell it.

The te alias runs emacs ignoring the window system, so it runs entirely on the terminal: source.

So I am merging this because of your approval. Thanks! :+1:


No such file or directory: 'tasklist'

When PHAL service starts it complains about tasklist no such file or directory. Not sure if I'm missing a directory or a binary.
2023-03-27 21:25:24.046 - OVOS - ovos_PHAL.service:on_error:18 - ERROR - PHAL failed to launch ([Errno 2] No such file or directory: 'tasklist').

It appears after the ovos-PHAL-plugin-oauth loading, I don't know if it's related.
ovos_phal           | 2023-04-06 10:44:07.183 - OVOS - ovos_bus_client.session:reset_default_session:171 - INFO - New Default Session Start: 7a5639ea-80e5-4d21-b950-17fa0c8789d8
ovos_phal           | 2023-04-06 10:44:07.196 - OVOS - ovos_PHAL.service:load_plugins:75 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-alsa
ovos_phal           | 2023-04-06 10:44:07.221 - OVOS - ovos_PHAL_plugin_color_scheme_manager:provide_theme:75 - ERROR - cannot access local variable 'theme' where it is not associated with a value
ovos_phal           | 2023-04-06 10:44:07.232 - OVOS - ovos_PHAL.service:load_plugins:75 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-color-scheme-manager
ovos_phal           | 2023-04-06 10:44:07.245 - OVOS - ovos_PHAL.service:load_plugins:75 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-network-manager
ovos_phal           | 2023-04-06 10:44:07.257 - OVOS - ovos_PHAL.service:load_plugins:75 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-oauth
ovos_phal           |  * Serving Flask app 'ovos_PHAL_plugin_oauth'
ovos_phal           |  * Debug mode: off
ovos_phal           | 2023-04-06 10:44:07.276 - OVOS - ovos_PHAL.service:on_error:18 - ERROR - PHAL failed to launch ([Errno 2] No such file or directory: 'tasklist').
ovos_phal           | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
ovos_phal           |  * Running on all addresses (<IP_ADDRESS>)
ovos_phal           |  * Running on http://<IP_ADDRESS>:36536
ovos_phal           |  * Running on http://<IP_ADDRESS>:36536
ovos_phal           | Press CTRL+C to quit

The only component refering a tasklist is https://github.com/OpenVoiceOS/ovos-utils/blob/dev/ovos_utils/system.py#L276-L286

this is an issue in ovos-utils then, should handle this util some other way


ast-3918 add tf and yaml extensions to include list

Scan submitted to Checkmarx

Checkmarx SAST - Scan Summary & Details
Cx-SAST Summary
Total of 8 vulnerabilities 0 High 0 Medium 8 Low 0 Info
Violation Summary
No policy violation found

Checkmarx SCA - Scan Summary & Details
Cx-SCA Summary
Total Packages Identified: 0
Scan Risk Score: 0.00
 0 High severity vulnerabilities
 0 Medium severity vulnerabilities
 0 Low severity vulnerabilities
View more details on Checkmarx UI
Cx-SCA vulnerability result overview
No package violation found


Animation stops when shelljs.exec or consolo.log is called

I want to use the spinner so the user knows something is loading, but in the case of a shell command the animation just freezes and that makes it useless in some of my usecases.
Is there a workaround or am I missing anything?
Creating a childprocess and executing the command there doesnt help, as well as executing it in silent mode.
spinner.start()
shelljs.exec(my command that takes some seconds)
spinner.stop(true)

thanks already

can you please provide a code example of your issue?

This should create a node module in a previously specified folder with a requred dependency
const spinner = new Spinner('initializing new Project %s'
spinner.setSpinnerString(19)
spinner.start()
shelljs.exec('npm init -y && npm i -D --save scc_types')
spinner.stop(true)

As those two commands might take a while, i want to use the spinner to show that it is still running.
Instead the spinner appears but does not spin

Your problem here is you are using a "sync" version of shelljs.exec
You can think to reimplement your code like the following:
var Spinner = require('cli-spinner').Spinner;
var shelljs = require('shelljs');

const spinner = new Spinner('initializing new Project %s')
spinner.setSpinnerString(19)
spinner.start()
shelljs.exec('npm init -y && npm i -D --save scc_types', { silent: true }, function() {
        spinner.stop(true);
});


mrustc fixes for running on macOS

This commit contains the fixes to be able to run rustc and cargo on macOS.
Changes:

Makefile changes caused by Apple's ld64 linker and ar not supporting the D modifier on Mac
script-overrides added for Rust 1.29.0 and 1.39.0 on macOS.
Adding a _ in front of imported symbols because of Apple mangling conventions
set target_vendor
changing the __mrustc_atomicloop cast to remove compiler warnings on macOS.
Supporting macOS frameworks
Apple Silicon support (including Rust standard library patches for 1.29.0)
CoreFoundation Rust library patches for Rust 1.29.0

Note that the rustc patches required to build a rustc that actually targets Apple Silicon aren't present.
Tested with GCC 11.0 (beta) on macOS Big Sur (Apple M1).

Thanks for this! I've been testing this out and the results are very encouraging. By modifying the nix expression in https://github.com/NixOS/nixpkgs/pull/113817/commits/1ebe77246af2633919432cf375e6a3a2d08105e4 to use the HEAD of this PR (https://github.com/thepowersgang/mrustc/pull/151/commits/3c139c4784bcd4703bd7da0e6e3189ab94e9793a), I'm able to compile mrustc, minicargo, and a good number of rust libs. Currently, it fails at:
(12/95) BUILDING semver_parser from semver-parser v0.7.0
> /nix/store/5i9l27a2528fyjqc0qga90f0xx109f46-mrustc-0.9/bin/mrustc rustc-1.29.0-src/src/vendor/semver-parser/src/lib.rs -o outpu
> /private/tmp/nix-build-mrustc-bootstrap-0.9_1.29.0.drv-0/source/output/cargo-build/core-foundation-sys_build
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: TODO: rustc-link-lib framework
make: *** [minicargo.mk:114: output/cargo] Abort trap: 6

If I understand the .what() of that exception correctly, it's saying that this is a known issue - the darwin Framework linking isn't implemented yet. I'm curious to see how much further we'd get if that functionality were implemented - a full darwin bootstrap would be awesome! 👍

@r-burns going to fix it tonight.
Remember however to run with arch -x86_64 make on Apple Silicon to run under the Rosetta environment. I don't think that this is quite ready for Apple Silicon support at this point.

Just a heads-up, 1.39 is still in-progress (cargo builds, rustc doesn't yet)

Update: Apple Silicon support should be in the "mostly okay" category by now.
Remember however that 1.29.0 rustc shouldn't be expected to support macOS on Apple Silicon fully, so your mileage might vary.
(tested with GCC 11)

It works.

Nice, I just did a full bootstrap of rustc 1.29 on that last merge commit https://github.com/woachk/mrustc/commit/8ca7e0dbada75b182385536fc6bc951f10b3550a (macos 10.15 x86_64).
I had to change .so to .dylib here:
https://github.com/thepowersgang/mrustc/blob/01f73e7894119405ab3f92b6191f044e491c9062/run_rustc/Makefile#L133
https://github.com/thepowersgang/mrustc/blob/01f73e7894119405ab3f92b6191f044e491c9062/run_rustc/Makefile#L147
I needed some minor src tweaks since I'm using clang 7, but that's on me, it probably would've been easier to just use gcc.
Went quite smoothly and I ended up with a fully bootstrapped rustc + cargo :+1:

I built on top of this PR to get a full bootstrap of rustc and cargo 1.39.0 from macOS 11 on x86_64.
Here are the changes I needed to make: https://github.com/arlosi/mrustc/commit/c11c8ff009f3ceced57bd2da6b3d9d0eb7231027
@woachk do you want to merge my changes in to this PR? Or @thepowersgang should we do this as a follow up PR after this one's in?

@arlosi Follow up PR would be better tbh.
@thepowersgang would it be a good idea to merge this PR?

Seems good :)
Time to clear out some long-standing PRs


Is there any way to speed up the process of loading the page in the browser?

Hello!
When loading the demo page (bbtFaceSimilarity) the browser hangs and waits for 10-15 seconds and then only gives the result. I take it this is a library download? Is there any way to speed up the process to avoid hanging?

@justadudewhohacks
I understood. thank you!
Is there a minimum version?

The 6MB version is already the compressed model, there is no smaller one.


Notifications to Android 8.0+ are blocked because notification channels are required

Consider checking this: https://developer.android.com/training/notify-user/channels
See this code:
private void createNotificationChannel() {
    // Create the NotificationChannel, but only on API 26+ because
    // the NotificationChannel class is new and not in the support library
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        CharSequence name = getString(R.string.channel_name);
        String description = getString(R.string.channel_description);
        int importance = NotificationManager.IMPORTANCE_DEFAULT;
        NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);
        channel.setDescription(description);
        // Register the channel with the system; you can't change the importance
        // or other notification behaviors after this
        NotificationManager notificationManager = getSystemService(NotificationManager.class);
        notificationManager.createNotificationChannel(channel);
    }
}

It's java that needs to be directly integrated into Cordova, or there needs to be a Cordova package allowing us to execute this from the JavaScript.
Note that the guide says:

Creating an existing notification channel with its original values performs no operation, so it's safe to call this code when starting an app.

This might be of help :
PushNotification.createChannel(
  () => {
    console.log('success');
  },
  () => {
    console.log('error');
  },
  {
    id: 'testchannel1',
    description: 'My first test channel',
    importance: 3,
    vibration: true
  }
);

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/API.md#pushnotificationcreatechannel

Any updates? Did you get it resolved?

Haven't gotten a chance to attempt implementing this fix yet, though it seems promising. Will update once I've tried it.

Follow up question. Once the channel is implemented, how do you specify the channel when sending the notification?

From #334:
No support in Meteor <IP_ADDRESS> for android-cordova 7.1.0
Meteor <IP_ADDRESS> has pinned cordova-android on 6.3.0. As long as MDG doesnt upgrade to android-cordova 7.1.0<EMAIL_ADDRESS>can't be used. This leaves us currently at using<EMAIL_ADDRESS><EMAIL_ADDRESS>is a release of Feb 21, 2018:
https://github.com/apache/cordova-android/releases
Previous android-cordova upgrade was done in Meteor 1.6.1:
meteor/meteor#9213
This means it is currently impossible to show push notifications on 8.0+ devices.

Code works to register a channel. Now need to figure out how to send a notification to a specific channel.

I've made a fork for this repo with @da314pc's changes. I'll try testing it asap.

Would this be correct usage?
    Push.send({         from: 'push',         title: 'Hello World!',         text: 'Lorem ipsum',         android_channel_id: 'testchannel1',         query: {}     });

I think you can use android_channel_id or whatever variable you want to call it,
as long as set in push.api.js
"data.android_channel_id = notification.android_channel_id"
I'll try testing it when I get home.

It seems to be removing the argument android_channel_id before it gets to the code around line 309

your right, it will be removed because of the this:
https://github.com/raix/push/blob/464d82469ca15b8579b469b7156a6c9d16874d9b/lib/server/push.api.js#L282
so we have to add a new field android_channel_id to the collection:
https://github.com/raix/push/blob/464d82469ca15b8579b469b7156a6c9d16874d9b/lib/common/notifications.js#L11-L49

Done, https://github.com/TheRealNate/push/blob/master/lib/common/notifications.js

I'm no longer getting the error message, so the channel id seems to be making it to the code in push/lib/server/push.api.js, yet notifications still don't seem to be working.

Is the device token still registered in the database? In the debug settings does it say if it's been sent to any android devices.
If you registered the device:
We may have to check the "node-gcm" library. I have been doing some digging, but I'll keep checking to make sure the payload has the android channel Id available or it gets lost before it reaches the device.
in the readme:
data: {
key1: 'message1',
key2: 'message2'
},
notification: {
title: "Hello, World",
icon: "ic_launcher",
body: "This is a notification that will be displayed if your app is in the background."
}
but in:
https://github.com/TheRealNate/push/blob/41c7a8d8b535d9999475dded2d04a3c81da1970e/lib/server/push.api.js#L345-L352
It looks like we are adding formatting it slight differently.

The logs do confirm when Push.debug=true that it's reaching:
Push: Sent message "Hello World!" to 0 ios apps 8 android apps

And
ANDROID: Result of sender: {"multicast_id":xxx,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"xxx"}]}

As for node-gcm, you seem to be right. I cannot find any mention of notification channels anywhere in the GitHub repo (https://github.com/ToothlessGear/node-gcm/search?q=channel&unscoped_q=channel)

Here's another weird thing. I am unable to send notifications directly from the Firebase Console as well (https://console.firebase.google.com/project/xxx/notification). Maybe some changes to the manifest need to be made (https://firebase.google.com/docs/cloud-messaging/android/client)

Yea I noticed that too. Even when the notifications were working they were never integrated into firebase. It always showed blank.

So this is the correct format which is similar:
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#notification-vs-data-payloads
My recommended format for your push payload when using this plugin (while it differs from Google's docs) works 100% of the time:
{
"data": {
"title": "Test Notification",
"body": "This offer expires at 11:30 or whatever",
"notId": 10,
"surveyID": "ewtawgreg-gragrag-rgarhthgbad"
}
}
In the FCM-NODE:
Warning: on February 2, 2017, the Firebase Team released the admin.messaging() service to their node.js admin module. This new service makes this module kind of deprecated

@da314pc do you have any idea where they are obtaining surveyID?

not sure

@TheRealNate
one more thing to check,
in your Push.send: did you remember to include the android_channel_id?

So everything looks fine, but when you send the notification from the server:
Push.send({
from: 'test',
title: 'test',
text: "Hello, World"',
query: {
userId: "user1"
}, //
android_channel_id: "testchannel1" //channel you put in the client
});

I'm doing exactly that except I'm leaving the query as {}.

That's probably the problem, the device token is registered with the userId, so if the userId is blank, the Push notification can't find the device token in the database,
Its all database driven, so for the test, make sure in the
"db._raix_push_app_tokens", there is a token with the userId,
then send the userId in query from the server,
so you kind of have to have a user logged in for this to work.

I'll try that, however I've noticed that the server still outputs that it
successfully sent the notification to x devices.

Even running this:
    Meteor.users.find().forEach(function (doc){
      console.log(`Sending notf to ${doc.username}(${doc._id})`);
      Push.send({
        from: 'push',
        title: 'Hello World!',
        text: 'Lorem ipsum',
        android_channel_id: 'testchannel1',
        gcm:{
          android_channel_id: 'testchannel1'
        },
        date:{
          android_channel_id: 'testchannel1'
        },
        payload:{
          android_channel_id: 'testchannel1'
        },
        query: {"userId":doc._id}
      });
    });

it isn't working. A few things I noticed:

It says Sent message "Hello World!" to 0 ios apps 0 android apps, which means with the usedId query it isn't even finding the app
Every time I open the app on my device I get the Push: Settings userId "abc" for app: xyz but with a different app id
I added a console.log to data.android_channel_id in push.api.js and it is getting there

From https://github.com/ToothlessGear/node-gcm/issues/135 it seems that the syntax needs to be
{ ...
  data:
   { message:
      { ...
        channelId: 'channel-ship-devs',
        ...
      }
   }
 }

Is it possible we're getting the syntax wrong somewhere else? Maybe when we actually show the notification, we're not passing the channel id there?

I think the syntax is correct. There was a comment on the plugin push to put everything in data:""
I believe somewhere the android channel Id is getting lost

It gets all the way to the gcm.message in push.api.js, and is then passed to gcm.sender.send.

any updates on this? is raix/push already working on Android Oreo?
Thanks

@lokiribeiro No. We still need to figure out how to pass the channel name from the server to the actual Android Java code that displays the notification on the device.

@TheRealNate Any place where i can start looking for that implementation?

@TheRealNate I checked the node-gcm library and it seems it should work.
https://firebase.google.com/docs/cloud-messaging/http-server-ref
I think our payload is off. In your fork change this line:
https://github.com/TheRealNate/push/blob/f81a3079e44349965c22d2e400860855c270d8dc/lib/server/push.api.js#L322
to:
data.message.android_channel_id= notification.android_channel_id;
Also remove https://github.com/TheRealNate/push/blob/f81a3079e44349965c22d2e400860855c270d8dc/lib/server/push.api.js#L355-L358
The plugin says we should include the message inside the data struct.
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#notification-vs-data-payloads
But we may just have trial and error.

@da314pc Found anything usefull?

@CineXMike not just yet. Installing version 2 of the plugin causes some gradle build errors. Soon as I get through that stuff I can try to see whats going on in the logs.

@da314pc Thanks for keeping me updated!

@CineXMike @TheRealNate I think I got it working. I'm going to publish the changes I made. Let me test with ios, now.

@CineXMike @TheRealNate
You may need to update meteor,  The version of the plugin needs Cordova android 6.3.0,
I
This is what I am using so far for Android:
Meteor Version: 1.6.1
I usually run meteor run android device without a device connected, once the build throws no device, I open up android studio
Make sure to add "google-services.json" in the platforms/android root folder.
You can get this file from Firebase,
I did have this multi-dex issue compiling,:
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#multidex
just force  a specific version on the support library if its causing a problem in your gradle build
In my cordova plugins file I have:
<EMAIL_ADDRESS>I also bumped this version to: 2.1.2
https://github.com/raix/push/blob/464d82469ca15b8579b469b7156a6c9d16874d9b/package.js#L15
In my meteor app, I have this code after startup,
PushNotification.createChannel(
() => {
console.log('success');
},
() => {
console.log('error');
},
{
id: Meteor.userId(),
description: 'Android Channel',
importance: 3,
vibration: true
}
);
//Each channel needs a unique Id, so I just use userId,
I added the library here, I renamed the package so you can just change it or add the name I'm using,
https://github.com/da314pc/push
I added this tweak here:
https://github.com/da314pc/push/blob/8aa389071e711ee777497934ddd90912a9a36644/lib/server/server.js#L26
I was losing tokens I always keep a copy of the userId and previous token before It gets removed, there also may be more tweaks in there if you find it,
the channel Id is added to the notification collection:
https://github.com/da314pc/push/blob/8aa389071e711ee777497934ddd90912a9a36644/lib/common/notifications.js#L44
Here we copy the channel Id so it can be sent in the payload:
https://github.com/da314pc/push/blob/8aa389071e711ee777497934ddd90912a9a36644/lib/server/push.api.js#L317
Then on the server, when you call the Push Method:
Push.send({
from: 'test...',
title: '..',
text: 'test'
android_channel_id  userId,  	//userId that matches the channel userId
query: {
// Ex. send to a specific user if using accounts:
userId: userId  //userId that matches the channel userId
},
payload:payloadData
});
let me know if something doesn't work
I tried ios on version 2.1.2,
I did the pod setup, pod install, built the project,
but for some reason I wasn't getting notifications, I'll keep trying. We should have at least a fix for android.

You can put anything in payload, I just use the payload to redirect users with FlowRouter (or any routers)  once the app opens,

@da314pc Doesn't seem to be working. Have I missed any installation steps?
Here's the full code:
In it's only file in client:
if(Meteor.isCordova) {
    try {
        PushNotification.createChannel(
            () => {
                alert('success');
            },
            () => {
                alert('error');
            },
            {
                id:Meteor.userId(),
                description: 'Android Channel',
                importance: 3,
                vibration: true
            }
        );
    }
    catch(e) {
        alert(e)
    }
}

On server:
let payloadData = {};
Push.debug = true;

Meteor.methods({

    testPush: function () {
        console.log("Sending...");
        Push.send({
            from: 'test...',
            title: '..',
            text: 'test',
            android_channel_id:Meteor.userId(),
            query: {
                userId:Meteor.userId()
            },
            payload:payloadData
        });
    }

});

what version of meteor are you on?
you installed the right version of the plugin?

Meteor <IP_ADDRESS>
cordova:cordova-plugin-device  1.1.5
cordova:phonegap-plugin-push   2.1.2

Do I need to wrap the createChannel code in a Meteor.startUp or Accounts.onLogin
Also, even though I set Push.Debug to true all I'm seeing in console is Sending.... No error messages, and none of the verbose messages usually output by the push plugin.
Even running:
        Push.send({
            "from":'test...',
            "title": '..',
            "text": 'test',
            "android_channel_id":'test',
            "query": {
                "userId":'test'
            },
            "payload":{}
        });

Outputs 0 messages in server log

I put the createChannel code, in my layouts-js file. So after the user logs in, in the main layout create the channel.
My Plugins:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Push.debug is set on the server?
Add this on the client it helps debug:
Push.addListener('token', function(currentToken, newToken) {
//Token is { apn: 'xxxx' } or { gcm: 'xxxx' }
console.log("currentToken",JSON.stringify(currentToken));
console.log("newToken",JSON.stringify(newToken));
});

Push.debug is set on the server. I'll try the listener.
Here's my full plugin list, am I missing anything?
accounts-base                  1.4.2  A user account system
accounts-password              1.5.1  Password support for accounts
accounts-ui                    1.3.0  Simple templates to add login widgets to an app
anti:modals                    0.4.0  Modals and dialogs: the Meteor way
blaze-html-templates           1.1.2  Compile HTML templates into reactive UI with Meteor Blaze
brentjanderson:buzz            1.1.10  The fantastic Buzz javascript sound library repackaged for...
check                          1.3.1  Check whether a value matches a pattern
cordova:cordova-plugin-device  1.1.5
cordova:phonegap-plugin-push   2.1.2
ecmascript                     0.11.1  Compiler plugin that supports ES2015+ in all .js files
es5-shim                       4.8.0  Shims and polyfills to improve ECMAScript 5 support
force-ssl                      1.1.0  Require this application to use HTTPS
iron:router                    1.1.2  Routing specifically designed for Meteor
meteor-base                    1.4.0  Packages that every Meteor app needs
mobile-experience              1.0.5  Packages for a great mobile user experience
momentjs:moment                2.22.2  Moment.js (official): parse, validate, manipulate, and dis...
mongo                          1.5.1  Adaptor for using MongoDB and Minimongo over DDP
msavin:sjobs                   2.0.1* The simple jobs queue that just works [synced, schedule, ta...
raix:push                      0.0.1* Meteor push server for IOS and android
raix:pushinternal              0.0.0-semantic-release+ Isomorphic Push notifications for APN and GCM
random                         1.1.0  Random number generator and utilities
reactive-var                   1.0.11  Reactive variable
session                        1.1.8  Session variable
shell-server                   0.3.1  Server-side component of the `meteor shell` command.
standard-minifier-css          1.4.1  Standard css minifier used with Meteor apps by default.
standard-minifier-js           2.3.4  Standard javascript minifiers used with Meteor apps by defa...
themeteorchef:bert             2.1.3  A client side, multi-style alerts system for Meteor.
tracker                        1.2.0  Dependency tracker to allow reactive callbacks
underscore                     1.0.10  Collection of small helpers: _.map, _.each, ...

Did you remember this?
this usually configures the server:
Push.Configure({
apn: {
keyData:'',
certData:'' ,
passphrase: '',
production: true,
gateway: 'gateway.push.apple.com'
},
gcm: {
apiKey: '',
projectNumber:
},
production: true,
'sound': false,
'badge': true,
'alert': true,
'vibrate': true,
'sendInterval': 100, //Configurable interval between sending
'sendBatchSize': 100, //Configurable number of notifications to send per batch
// 'keepNotifications': false,
//
});

This is one of those extra embarrassing moments for a programmer. Commented out my Push.configure while I was trying a fix, never uncommented it.
Testing now that I have Push.Configure.

Ok. I've setup push.configure in mobile-config, client, and server.
I'm now seeing this:
Push: Settings userId "DuzDd6Qg5CddAGSc3" for app: n5hvdEp5iHbhT4wtf
Push: Send message "testTitle" via query { userId: 'DuzDd6Qg5CddAGSc3' }
Push: Sent message "testTitle" to 0 ios apps 0 android apps

I did the Push.Configure, and the channel creation is working. If I go to app details I can see the notification channels in the list.

Are you writing custom code to display the notification (I noticed you had the plugin de.appplant.cordova.plugin.local-notification)?

Check the  "_raix_push_app_tokens" collection for userId :"DuzDd6Qg5CddAGSc3", is there a gcm token in the collection?
It sounds like there were no tokens registered. Ignore the local notification plugin.

Weird, it seems there isn't. How do I force the token to register?

I have this:
Push.addListener('token', function(currentToken, newToken) {
// Token is { apn: 'xxxx' } or { gcm: 'xxxx' }
//console.log("currentToken",JSON.stringify(currentToken));
//console.log("newToken",JSON.stringify(newToken));
////console.log(thi.userId);
      if (newToken) {
          Meteor.users.update( { _id: this.userId }, { $set: { pushToken: newToken } } );
      };
  });

sometimes the new token doesnt get registed.

I had this code:
    Push.addListener('token', function(currentToken, newToken) {
        alert(JSON.stringify(currentToken));
        alert(JSON.stringify(newToken));
    });

And it doesn't seem to be alerting, so the listener isn't being called.

@CineXMike  @TheRealNate
I tested it on more devices, the problem is with:
https://github.com/raix/push/blob/464d82469ca15b8579b469b7156a6c9d16874d9b/lib/client/cordova.js#L18-L149
the event listeners get ignored, i looked at the libraries, but there big:
https://github.com/raix/Meteor-EventState
https://github.com/raix/Meteor-EventEmitter

@da314pc I'd like to note that I am not calling Push.id(). Is that required?

@da314pc PushNotification.createChannel(); is undefined on my end.

@da314pc IOS working on my end with phonegap 2.1.2 and i also got the notification channels in my settings applications on my samsung test devices but the notifications still dont get send
Since there are no GCM clients registered,

@da314pc
IOS still working correctly(nothing wrong),
This happens once i open my app on any android device:
[app]Push: Settings userId "2KvuFX2oRnRmdGgsm" for app: yRMyhv5zDt832iJAF
[app]Push: Settings userId "2KvuFX2oRnRmdGgsm" for app: RR5d94hR7ThXFYz4Z
And in the collection there is no row with userId: 2KvuFX2oRnRmdGgsm.

Are there any updates to this? Did you manage to get it working?

@timordenewitz I only managed to get ios working,
I still dont get any GCM tokens to my database.

Hello @TheRealNate ,
Were you able to make notifications work on Android 8.0+ already? :)

@lokiribeiro not yet. Looks like we're still not able to pass the android channel id in properly.

@TheRealNate I Think what was missing in my configuration was adding this to your build.gradle
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    **classpath 'com.google.gms:google-services:4.1.0'      // I added both of these
    classpath 'com.google.firebase:firebase-core:11.0.1'**  // I added both of these
}

}
//this should be at the end of the file.
apply plugin: 'com.google.gms.google-services'
you have to make sure this plugin is applied.
this is for version 2.1.2,
on the client
PushNotification.createChannel(
() => {
console.log('createChannel');
},
() => {
console.log('error');
},
{
id: Meteor.userId(),
description: 'Android Channel',
importance: 3,
vibration: true
}
);
you can try to test. make sure you delete the apptokens first and set:
App.setPreference('android-targetSdkVersion', '26');
App.setPreference('android-minSdkVersion', '23');

Yes this setup is now working on android.

Cool, @da314pc , glad it's working on your end. Will this release of raix/push also be updated with your changes/setup?

@lokiribeiro  sure I can create a pull request, but there are also changes you have to make within android studio.
Have you tried with this repo:
https://github.com/da314pc/push
Then add your google services.json file within your android platform folder, make sure you add the create channel on the client, the changes to your gradle.build file,
android_channel_id, in the Push.send on the server?

@da314pc Could we also update the getting started doc (https://github.com/da314pc/push/blob/master/docs/ANDROID.md) for the PR?

@TheRealNate yea I can do that, were you able to test the changes and get it working on your end?

@da314pc  Yup, will be trying using the repo you gave and the changes you mentioned. Thanks! 👍

@da314pc @TheRealNate how did you make PushNotification.createchannel to work in your meteor app? I added that part to my code and now it doesnt register tokens anymore for the mobile apps. seems like it doesnt recognize the PushNotification method

I went through it and it shows on my logs that PushNotification is an unidentified variable.
Should I initialize it into something somehow?

If your getting that message, then you don't have the right version of the plugin. I changed this to:
https://github.com/raix/push/blob/ef3323ccb5101573ae4404b6cda92373265b4b7c/package.js#L15
2.1.2,
also in my cordova plugins it shows:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

@da314pc so I installed your repo using npm install, then I didn't remove the existing raix:push package I installed using meteor.
So it finally worked; Android 8.0+ devices finally got the notifications I sent :) (from localhost)
But when I pushed it to production to our remote server the notifications doesn't send. But when I run my localhost again, all past notifications were sent.
Why is it only sending from my localhost? (BTW, we use a remote database so the database of localhost and production is the same)
Is it because this your repo is not yet implemented to this release of raix:push?

Thanks to all who put so much work into this. Is @da314pc the only one who got Android 8+ push messages to work on production so far? I hope to test that solution soon.
Are @raix or any other contributors on this issue? As far as I can tell, this is a breaking change in Android and two days from now no one using this plugin will be able to update their apps without breaking all push notifications.

@lokiribeiro Yes my repo isn't implemented yet. I will create a pull request soon and update the changes. It sounds like you are using the push plugin without the android modifications.

@da314pc How do you modify the build.gradle, cordova build override?

@da314pc Any way to do this without having to open Android Studio (for CI builds, etc)?
Could you for example copy the build.gradle from inside .meteor/local/cordova-build, modify it, then place in cordova-build-override?

@TheRealNate I'm not sure. I'll find you the link, but I think google changed firebase, and now you have to manually add it.

@da314pc were you able to make yours work on production?

Yes, but I'm using my copy of the project right now. I added the project to my packages folder. So the package of the push plugin is the same on the device and on the server.

Per Meteor docs:
Advanced build customization
There is a special top-level directory named cordova-build-override/ that allows you to override, in an ad-hoc way, parts of your Cordova project that Meteor generates for you in the .meteor/local/cordova-build directory. The entire file tree of this directory will be cp -R (copied overwriting existing files) to the Cordova project right before the build and compilation step.

The problem with this mechanism is that it overrides complete files, so it is not a good solution for customizing config.xml. Replacing the generated version with your own file means you lose all configuration information set by the build process and by installed plugins, which will likely break your app.

If you need to customize configuration files, a workaround is to create a dummy Cordova plugin. In its plugin.xml, you can specify a config-file element to selectively change parts of configuration files, including config.xml.

And per Cordova docs:

On Android (as of cordova-android@4.0.0), framework tags are used to include Maven dependencies, or to include bundled library projects.
<!-- Depend on latest version of GCM from play services -->
<framework src="com.google.android.gms:play-services-gcm:+" />
<!-- Depend on v21 of appcompat-v7 support library -->
<framework src="com.android.support:appcompat-v7:21+" />
<!-- Depend on library project included in plugin -->
<framework src="relative/path/FeedbackLib" custom="true" />

Framework can also be used to have custom .gradle files sub-included into the main project's build.gradle file:
<framework src="relative/path/rules.gradle" custom="true" type="gradleReference" />

@TheRealNate  Sounds like a good idea. Just add this to the build. Do you have a copy script I could start testing with?

@da314pc Not at the moment, but I'm trying to see if there is already a cordova plugin for this purpose.

Will this be implemented in the official release version?

After adding all the dependencies and loading the plugin, my app still won't connect to google firebase.

@CineXMike what issue are you getting? Also are you using the repo I have?

No issue,
IOS working fine,
Just android isnt connecting to google firebase.
I included your things in build.gradle aswell
On the android phone the notification chanel is being created tho.

@da314pc I test this fork https://github.com/FishSaidNo/push la to switch to FCM on meteor 1.8
https://github.com/FishSaidNo/push/blob/master/docs/FCM.md  (android target 26)
be up to date at android studio (tool, sdk, ...)
for build you have to use that for me
https://github.com/meteor/meteor/issues/7600#issuecomment-383327945
put the build-extras.gradle file at the root of the project meteor /cordova-build-override/platforms/android/build-extras.gradle
buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:+'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

ext.postBuildExtras = {
    apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

    def inAssetsDir = file("assets")
    def outAssetsDir = inAssetsDir
    def outFile = new File(outAssetsDir, "cdvasset.manifest")

    def newTask = task("cdvCreateAssetManifest") << {
        def contents = new HashMap()
        def sizes = new HashMap()
        contents[""] = inAssetsDir.list()
        def tree = fileTree(dir: inAssetsDir)
        tree.visit { fileDetails ->
            if (fileDetails.isDirectory()) {
                contents[fileDetails.relativePath.toString()] = fileDetails.file.list()
            } else {
                sizes[fileDetails.relativePath.toString()] = fileDetails.file.length()
            }
        }

        outAssetsDir.mkdirs()
        outFile.withObjectOutputStream { oos ->
            oos.writeObject(contents)
            oos.writeObject(sizes)
        }
    }
    newTask.inputs.dir inAssetsDir
    newTask.outputs.file outFile
    def preBuildTask = tasks["preBuild"]
    preBuildTask.dependsOn(newTask)
}

in /mobile-config.js add in addition to the rest
App.configurePlugin ('phonegap-plugin-push', {
   SENDER_ID: xxxxxxxxxx
});

App.addResourceFile ('google-services.json', 'google-services.json', 'android');

add google-services.json to the root of your meteor project
be careful if you went from "raix:push" to this fork the client side configuration there is "cordovaOptions" which includes the config which was not present before
do not forget that "payload" must be JSON.stringify with FCM
you need to activate the FCM API https://console.developers.google.com/apis/api/fcm.googleapis.com/overview?project=XXXXXXXXXX
if you want to configure FCM for ios https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821
and add GoogleService-Info.plist to the root of your project meteor and add these lines to your mobile-config.js, APP_NAME should be replaced with the real app name
App.addResourceFile ('GoogleService-Info.plist', 'APP_NAME/Resources/GoogleService-Info.plist', 'ios');

Doc
https://github.com/raix/push/blob/master/docs/ANDROID.md
https://github.com/FishSaidNo/push/blob/master/docs/FCM.md
Migrate a GCM Client App for Android to Firebase Cloud Messaging
https://developers.google.com/cloud-messaging/android/android-migrate-fcm
https://github.com/meteor/meteor/pull/9748

Migrate a GCM Client App for Android to Firebase Cloud Messaging
By any chance this fork can be merged to original repo and we can have new major release on this. @raix
and other things like and adding file and all gets documented in official docs. @aboire

@MrSpark2591 this project needs a new maintainer. Once we get that settled we can add in the changes and update the docs to make it easy for anyone to upgrade for android 8

@da314pc  Let me know if i can be helpful. I will be more than happy to contribute :)

@MrSpark2591 https://github.com/raix/push/issues/356

Hi @da314pc ,
Is your version already implemented with the official release? Your version works on local servers but we cant seem to implement it in the production server since it is installing raix:push.
Thanks

@ashish979 @lokiribeiro we have just merged in the changes into the release.

Thanks so much to the contributors and others that researched this and updated the plugin and readme to make it work!
I've been struggling to get it to work in my own app, likely due to dependency issues. But I made a small dummy app in which it's working perfectly in Android both 7 and 8.
I thought I'd share it here in case it helps anyone: https://github.com/namenotrequired/meteor-push-example


C++ DEBUG No such file or directory under the Chinese path of the Windows system

VSCode Version:  newest
OS Version: windows 7 and ubuntu 20

Steps to Reproduce:

The Chinese path C++ DEBUG of ubuntu system is no problem.
C++ DEBUG No such file or directory under the Chinese path of the Windows system.
The Chinese path of the window system C++ compilation is no problem.

Does this issue occur when all extensions are disabled?: Yes/No
yes

/extCpp


Jetcaster bug

when swiping HorizontalPager in Home Screen crashed app and this appear :
java.lang.IllegalArgumentException: Layout size for current item is 0         at com.google.accompanist.pager.PagerState$scrollableState$1.invoke(PagerState.kt:182)
https://github.com/android/compose-samples/blob/main/Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/Home.kt#L181 In this line I solved the error by placing if (featuredPodcasts.isNotEmpty()) featuredPodcasts.size else 1
Is this a good solution?

@chrisbanes is this what you were fixing last week?

Yeah, pretty sure this will be fixed in the latest releases.


[fix][build] Remove unnecessary and invalid Oracle maven repository from pom.xml

Motivation
The build stalls currently because of an invalid Oracle maven repository in pom.xml.
It seems that this repository was accidentially added in PR #22391.
Modifications
Remove the unnecessary and invalid from pom.xml
Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Looks like it was required for this purpose:
Error:  Failed to execute goal on project pulsar-io-rabbitmq: Could not resolve dependencies for project org.apache.pulsar:pulsar-io-rabbitmq:jar:3.4.0-SNAPSHOT: Could not find artifact com.sleepycat:je:jar:7.4.5 in central (https://repo1.maven.org/maven2) -> [Help 1]

It seems odd that there would be a need to add an Oracle repository for rabbitmq client.

Pulled in to test dependencies
[INFO] |  +- org.apache.qpid:qpid-bdbstore:jar:9.2.0:test
[INFO] |  |  \- com.sleepycat:je:jar:7.4.5:test

in pulsar-io/rabbitmq


added info about manual exchange rates

I think there should be a warning about static exchange rates.

thanks!


"Check Again" no-op if TLA+ debugger currently running

"Check Again" appears enabled but becomes a no-op if the TLA+ debugger is running.

Related to https://github.com/tlaplus/vscode-tlaplus/issues/261


Update artwork brick for new inquireability

Currently, sold artwork:

Not for sale:

On hold:

Desired https://cloud.githubusercontent.com/assets/1022172/22442271/c180c7d2-e708-11e6-851d-b29eb2e712f5.jpg

Use sample artworks referenced in https://github.com/artsy/force/issues/790 (one example of each).


Resolve DX operations via requestID (not event ID)

Fixes #871
Also enhance all E2E test suites to check for stuck operations, as this seems to be a recurring theme that slips through the cracks.

Codecov Report

Merging #872 (2cd19ef) into main (72747b7) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #872      +/-   ##
==========================================
+ Coverage   99.95%   99.96%   +0.01%
==========================================
  Files         299      299
  Lines       19456    19483      +27
==========================================
+ Hits        19448    19477      +29
+ Misses          6        5       -1
+ Partials        2        1       -1

Impacted Files
Coverage Δ

internal/dataexchange/ffdx/dxevent.go
100.00% <100.00%> (ø)

internal/namespace/manager.go
100.00% <0.00%> (ø)

internal/events/event_manager.go
100.00% <0.00%> (ø)

internal/events/system/events.go
100.00% <0.00%> (ø)

internal/events/webhooks/webhooks.go
100.00% <0.00%> (ø)

internal/orchestrator/orchestrator.go
100.00% <0.00%> (ø)

internal/events/subscription_manager.go
100.00% <0.00%> (ø)

internal/events/websockets/websockets.go
100.00% <0.00%> (ø)

internal/apiserver/server.go
100.00% <0.00%> (+1.01%)
:arrow_up:

Continue to review full report at Codecov.

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

Looks like for the unpinned message case, the message may get marked "confirmed" before the data exchange operation has recorded success. I assume it's due to operation updates being handle by a separate processing loop. I'm not sure of the best way to handle this... perhaps polling or listening to database change events...


Show query execution time in shell

> select * from instances;
Fetched in 0.1 seconds.
... rest of the data

Fixed in 3c7517e.


SimpleITK 1.0.0 not loading in python 2.7 64 bit (windows 7)

When upgrading to SimpleITK 1.0.0, it cannot be imported anymore due to a DLL load fail.

Works fine in Python 3.5.2

@jcfr

I assume this was installed with pip install SimpleITK with the wheels downloaded from PyPI?

My understanding is that it was.

yes I pip installed it

What operating system are you running? Is it new and clean?
I have a guess. Perhaps you are missing the msvcr90.dll? You could use the windows dependency walker to verify this, and to look for other problems.
Installing the MS Visual Studio C++ 2008 Redistributable my resolve this problem.

@blowekamp I'm running Windows 7. Not especially new or clean.
I'm running visual studio 2015 for most compiling I'm doing (msvcr140.dll), but can that be the issue if install from the wheel (isn't that already compiled?)

If you are using VS2015 and compiling for py27, that could be problematic. It may produce strange dll error like above. Python 2.7 was compiled with VS 2008, and the binary packages are supposed to be compiled with the same compiler to avoid conflicting runtime environments.
I think if you run the dependency walker on _SimpleITK.pyd it could be insightful.

Have you been able to solve the problem? Any additional information about the dll dependencies?

Sorry, no
I haven't had time yet. I will look at it on Monday
Verzonden vanaf mijn Samsung-apparaat
-------- Oorspronkelijk bericht --------
Van: Bradley Lowekamp<EMAIL_ADDRESS>Datum: 19-05-17 14:35 (GMT+01:00)
Aan: SimpleITK/SimpleITK<EMAIL_ADDRESS>Cc: Joost van Griethuysen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Onderwerp: Re: [SimpleITK/SimpleITK] SimpleITK 1.0.0 not loading in python 2.7 64 bit (windows 7) (#181)
Have you been able to solve the problem? Any additional information about the dll dependencies?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/SimpleITK/SimpleITK/issues/181#issuecomment-302691072, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARMRw6I3oyby3gj3kmiD1CYIjjdya-15ks5r7YyegaJpZM4Nd8Vt.

I hope you are successful in getting SimpleITK installed. I am closing the issue, please feel free to report the status, and re-open if needed.


Update benji.py

I thought in the wiki part , it would be more better if our assistant could answer who is or what is questions .

It's a nice thought :smile: . However, anyone would just type wiki Linux instead of typing wiki what is Linux. A small point. The same goes when we use B.EN.J.I. by speech.


Lower rentals complexity

fixes #209 i hope

I removed the old things @josephkelley, can you review and merge?


Gave name to the ship job

Current dependencies on/for this PR:

main

PR #327

PR #328   👈

This comment was auto-generated by Graphite.

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: qMXxO3eN85Mty5Ya3qYo


[HOPS-882] Handle null values for users and groups in protobuff and f…

…ix potential null pointer exceptions
Make sure there is no duplicate PR for this issue

Please check if the PR fulfills these requirements

[ ] Tests for the changes have been added and passed (for bug fixes / features)
[x] HOPS JIRA issue has been opened for this PR
[x] All commits have been squashed down to a single commit
[x] The commit message has the following format: [HOPS-XXX] message

Post a link to the associated JIRA issue
https://hopshadoop.atlassian.net/browse/HOPS-882

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Can one of the admins verify this patch?

Jenkins test this please.


Pack field in rule forms

The way st2-form-combobox is used here is kinda hacky since it cannot be used in an auto form. I think it would be better to make all the inputs independent from st2-auto-form, but it's a whole 'nother story.
Also, combo boxes now allow any values even if they are not in the suggestions. An option for restricting this would be useful.

LGTM.


Expand basicAuth and bearerAuth middleware

What is the feature you are proposing?
I'm interested in bearer token authentication for APIs with Hono. I noticed that Hono has a built-in middleware for this. Upon reading the docs, I found myself with two unanswered questions:

Is a pre-fetched / hardcoded whitelist of valid tokens the only way to use this middleware?
If so, what is the actual use case for the built-in bearer token middleware beyond extremely simple applications?

I thought perhaps it was just me, but then I've just been reading through #2316 and I think @tcurdt is talking a lot of sense, and I'd like to see if others have input on this matter.
When I authenticate using bearer tokens, I expect to check the token (somehow) and decide if it's valid or not. Maybe it's encrypted/encoded, or I need to verify a signature, or look up in a DB. Simply having a pre-determined list of tokens that are acceptable is not going to cut it for 99% of applications, and I personally feel that in Hono's official bearer token middleware, such a limitation is bad DX and also does not look good to potential evaluators. Something does not feel right about having such basic functionality missing from an official middleware.
I believe this would be a reasonably simple change to make (which I can contribute), but I should gather opinions first.
Also - all of the above applies to the basic auth middleware too!
Thanks.

In the case of bearerAuth and basicAuth, I found an easy way to extend the middleware:
import { decrypt } from 'xxx';
import type { MiddlewareHandler } from 'hono';
import { basicAuth } from 'hono/basic-auth';
import { HTTPException } from 'hono/http-exception';
import { ENV } from '../env';

const decryptWithException = (password: string) => {
  try {
    return decrypt(password, ENV.AUTH_SECRET_BASIC);
  } catch {
    throw new HTTPException(401);
  }
};

export const authBasic = (
  options: { username: string; password: string; realm?: string; hashFunction?: Function },
  ...users: { username: string; password: string }[]
): MiddlewareHandler => {
  return async function authBasic(ctx, next) {
    const auth = basicAuth(
      {
        ...options,
        password: decryptWithException(options.password),
      },
      ...users.map((o) => ({ ...o, password: decryptWithException(options.password) })),
    );

    return auth(ctx, next).catch(() => {
      throw new HTTPException(401);
    });
  };
};

The extended middleware accept a encrypted password.
So I can write code like this. and the actual password is 123456.
new Hono().get(
  '/',
  authBasic({ username: 'bingtsingw', password: '7C4A8D09CA3762AF61E59520943DC26494F8941B' }),
  async (c) => {
    return c.text('ok');
  },
);

The encrypt/decrypt logic is as you like, in my real world project, I use createDecipheriv with a salt saved in the env to encrypt/decrypt the password

The same way to extend hono/jwt:
import { db } from '@acme/model';
import type { MiddlewareHandler } from 'hono';
import { HTTPException } from 'hono/http-exception';
import { jwt } from 'hono/jwt';
import { ENV } from '../env';

export interface AuthJwt {
  Variables: {
    authId: string;
    userField: any;
  };
}

export const authJwt = (): MiddlewareHandler<AuthJwt> => {
  const jwtMiddleware = jwt({ secret: ENV.AUTH_SECRET_JWT });

  return function authJwt(ctx, next) {
    return jwtMiddleware(ctx, async () => {
      const sub = ctx.get('jwtPayload').sub;

      if (!sub) {
        throw new HTTPException(401, { message: 'Unauthorized' });
      }

      const user = await db.user.findOptional(sub).select('id', 'userField');
      if (!user) {
        throw new HTTPException(401, { message: 'Unauthorized' });
      }

      ctx.set('authId', sub);
      ctx.set('userField', user.userField);
      await next();
    });
  };
};

So I can use c.get('authId') in request handlers, some drawback of this method is I cannot unset and hide jwtPayload

For more complicated scenarios like nesting multiple middlewares in one to handle them together, I haven't found a good solution yet.

@callumthomson Thanks for creating the issue. @bingtsingw Thanks for the comments.
@callumthomson Could you show the code for the API that you expect? I can't imagine what exactly we need to implement.

As I posted in #2316, I think something along the lines of this would have met my expectations:
async function validateBearer (c, token) {
    return false // or true
}

async function validateBasic (c, username, password) {
    return false // or true
}

app.get("/private", authBearer((c, token) => (validateBearer(c, token))), (c) => {
  return c.text("This message is secret!");
})

app.get("/private", authBasic((c, username, password) => (validateBasic(c, username, password))), (c) => {
  return c.text("This message is secret!");
})

but I am not sure how this approach scales for more complicated usages.

@yusukebe I think the suggestion from @tcurdt is good. In my opinion, I don't think that the built-in middleware necessarily needs to handle anything more complicated.

@tcurdt @callumthomson Thanks!
Then simply, how about adding an option like authFn (I don't think this naming is best or not now):
 app.use(
  '/auth/*',
  bearerAuth({
    authFn: (c, token) => {
      // ...
    },
  })
)

Not the ideal naming but a reasonable option.
Not sure the middleware needs options AND a function. So maybe bearerAuth could also just check whether the first argument is a function or an options object. But having it as part of the options would be quite a common approach.

@tcurdt I think probably to keep things simple it would be best to add the function into the options as @yusukebe suggested, this would also aid readability as the function would always have the same name. Additionally, the options specify the realm which is sent in the response. Also, I would expect the token value provided to the function to already have the Bearer scheme name removed. As the prefix value is currently customisable in the options, the other values in the options object and the token verification function can be used together.
For example:
Lets say I send a request to an endpoint with the header Authorization: Bearer mySecretToken
 app.use(
  '/auth/*',
  bearerAuth({
    prefix: 'Bearer', // default value but provided here for example
    verifyToken: async (c, token): Promise<boolean> => {
      // Value of `token` is 'mySecretToken'
      return true; // or false
    },
  })
)

My last point has raised a couple of extra questions actually.

@yusukebe what is the use case for using a non-default value for prefix? My understanding is that the value of prefix is the name of the auth scheme, which in the case of bearer auth, should always be Bearer.
The verification function should be async, but what should it return? I suppose a boolean like shown in the previous example from @tcurdt

The verification function should be async, but what should it return? I suppose a boolean like shown in the previous example from @tcurdt

It could be an option to return possible user information (that might be available during validation anyway) that should be available further down the request chain.
Imagine someone logs in with their userid and you want/need their name in request processing. So the processing would stop if the validation function would not return a user object. Otherwise the user object would be available from the context.
Returning a boolean would be a clearer contract, returning a user would be more practical. Not sure what I would prefer yet.

Maybe also worth looking at other implementations.
With hapi we have an auth function that looks like this
async function validate (token, _request, _h) {

  if (tokenIsInvalid) {
    return { isValid: false }
  }

  // valid user
  const credentials = {
    scope,
    user,
  }
  return {
    isValid: true,
    credentials
  }
}

It could be an option to return possible user information (that might be available during validation anyway) that should be available further down the request chain.

@tcurdt That would be very nice and convenient but I guess it's up @yusukebe if he's happy to have the middleware expand beyond the single responsibility of token verification into the additional responsibility of user details lookup. Perhaps this function could just optionally return a primitive which could be placed onto the context (e.g. c.id) as the ID of the user, and then optionally have another custom middleware further down the chain which is responsible for looking up more information with regards to the user.
That way this function could return

a string/number (This user is authenticated, and I have their ID as a string/number)
true (This user is authenticated, but I don't have/need their ID in this instance)
false/undefined (This user is not authenticated)

@yusukebe what is the use case for using a non-default value for prefix? My understanding is that the value of prefix is the name of the auth scheme, which in the case of bearer auth, should always be Bearer.

I was thinking so. But there is an interesting use case:
https://github.com/honojs/hono/pull/299#pullrequestreview-995915379
And I prefer the verifyToken to return to boolean. The implementation will be like the following:
diff --git a/src/middleware/bearer-auth/index.ts b/src/middleware/bearer-auth/index.ts
index 6037ea4..30e1d39 100644
--- a/src/middleware/bearer-auth/index.ts
+++ b/src/middleware/bearer-auth/index.ts
@@ -1,3 +1,4 @@
+import type { Context } from '../../context'
 import { HTTPException } from '../../http-exception'
 import type { MiddlewareHandler } from '../../types'
 import { timingSafeEqual } from '../../utils/buffer'
@@ -5,13 +6,22 @@ import { timingSafeEqual } from '../../utils/buffer'
 const TOKEN_STRINGS = '[A-Za-z0-9._~+/-]+=*'
 const PREFIX = 'Bearer'

-export const bearerAuth = (options: {
-  token: string | string[]
-  realm?: string
-  prefix?: string
-  hashFunction?: Function
-}): MiddlewareHandler => {
-  if (!options.token) {
+type BearerAuthOptions =
+  | {
+      token: string | string[]
+      realm?: string
+      prefix?: string
+      hashFunction?: Function
+    }
+  | {
+      realm?: string
+      prefix?: string
+      verifyToken: (c: Context, token: string) => Promise<boolean>
+      hashFunction?: Function
+    }
+
+export const bearerAuth = (options: BearerAuthOptions): MiddlewareHandler => {
+  if (!('options' in options || 'verifyToken' in options)) {
     throw new Error('bearer auth middleware requires options for "token"')
   }
   if (!options.realm) {
@@ -49,13 +59,18 @@ export const bearerAuth = (options: {
         throw new HTTPException(400, { res })
       } else {
         let equal = false
-        if (typeof options.token === 'string') {
-          equal = await timingSafeEqual(options.token, match[1], options.hashFunction)
-        } else if (Array.isArray(options.token) && options.token.length > 0) {
-          for (const token of options.token) {
-            if (await timingSafeEqual(token, match[1], options.hashFunction)) {
-              equal = true
-              break
+
+        if (options.verifyToken) {
+          equal = await options.verifyToken(c, match[1])
+        } else {
+          if (typeof options.token === 'string') {
+            equal = await timingSafeEqual(options.token, match[1], options.hashFunction)
+          } else if (Array.isArray(options.token) && options.token.length > 0) {
+            for (const token of options.token) {
+              if (await timingSafeEqual(token, match[1], options.hashFunction)) {
+                equal = true
+                break
+              }
             }
           }
         }

And also the options for Basic Auth Middleware will be like this:
type BasicAuthOptions =
  | {
      username: string
      password: string
      realm?: string
      hashFunction?: Function
    }
  | {
      verifyUser: (c: Context, username: string, password: string) => Promise<boolean>
      realm?: string
      hashFunction?: Function
    }

Then, if you want to pass the username to the next middleware or handler, you can set the value with c.set():
app.use(
  basicAuth({
    verifyUser: (c, username, password) => {
      //...
      if (valid) {
        c.set('username', username)
        return true
      }
    },
  })
)

What do you think?

@yusukebe This looks great! Good idea to create the union type for the options as this will retain backwards compatibility.
Perhaps this is for another conversation, but I had a look at #299 and saw the discussion about the Discord bot. If I had to be highly nit-picky I'd say it'd probably be clearer to developers if prefix was called scheme (or at least have this be mentioned in the docs). This is the web standard name. It's also very non-standard to have the scheme be named anything other than Bearer. However removing / changing this option would be backwards incompatible.

Hey @callumthomson, @tcurdt, and @metrue !
I've created the PR #2449 and #2450 to resolve this issue. Can you review these if you have time?

Since you have tests I just skimmed the PR. Looks good to me!

The 4.2, which includes #2449 and #2450 are released. We can close this now. Thanks!


A way to name the .wasm

Summary
Is there a way to name the .wasm file? I noticed it takes the name of the input .wasm file and appends _bg to the name. I'd wondering if I could explicitly dictate what name it should give exactly. Simply changing the file name wont work as the corresponding .js file created relies on the _bg name.

You can't specify the exact name, but you can use --out-name to choose the bit before the _bg. For example, if you specified --out-name foo, the output files would be named foo.js and foo_bg.wasm.


[swift_snapshot_tool] Fatal error if the older assumed good fails or if the newer assumed bad succeeds.

Often times this happens since one forget to add --invert to invert the failure code in situations where the newer change succeeds and the older change fails... so I added that admonition to the error message.

Just making some improvements as I run into them as I am triaging other issues.

@swift-ci smoke test


[6.4.x] RHBPMS-3997: GSS Project dependencies are not retained in BPM Suite 6.3.0

This PR adds a method that retrieves compile dependencies. As "compile" is the default scope, this PR makes dependencies without scope be handled as a compile dependency.

+1

@karreiro could you please remove the 6.3.x string from the commit message? Since this is for 6.4.x branch it could cause certain confusion (and it does not seem to add any additional info anyway).
(It also seems the [GSS] prefix is not necessary...)

@psiroky I think gss and 6.3.x are there just because that is the Jira title.

@Rikkola sure, but I believe we don't need to copy the JIRA title into the commit message (at least not in cases where it seems wrong)

@Rikkola @karreiro I'm merging this PR "as is".. but please consider @psiroky comment next time. I'm merging "as is" since (although misleading) it is consistent with https://github.com/droolsjbpm/kie-wb-common/pull/398 (which was not objected to and has been merged already - reverting and recommitting is going to be even more confusing).


Add switching to previous workspace

Describe your PR, what does it fix/add?
Add the ability to switch to the last visited workspace as described in #324, inspired by i3. The syntax suggested in the issue has been adopted: bind=MODIFIER,KEY,workspace,previous.
Also included is a toggle setting general:auto_back_and_forth to allow switching back to the previous workspace by trying to switch to the same workspace again. I use it all the time in sway and my workflow would be greatly improved by the ability to quickly switch to and from a workspace to check on email, discord, spotify, etc.
E.g. start in workspace 1, then Super+7 to workspace 7, and then Super+7 again will move to workspace 1.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
I've moved a lot of code from CKeybindManager::changeworkspace to CCompositor::changeWorkspace, to make it easier to reuse the raw workspace switching.
This is also my first pull request, so my apologies if I've broken any conventions, just let me know and I'll fix it. I'm also not super experienced with C++, but I think I worked out enough for this small change.
Is it ready for merging, or does it need work?
Yes it's ready as far as I know (it builds and works in debug mode). However:

I'm not sure if I've put m_bAutoBackAndForth in the right place - let me know if there's somewhere else for settings like that to go.
Not sure if some hyprctl commands need to be added too.
Of course wiki updates will be necessary too, but I don't know how that's normally done.

generally 90% of the code here is just a big ????
Why are you storing the last workspace in CCompositor?
Why are you moving the function?
Why did you refactor it???
this entire thing can be done with a chain in 10 lines of code or less.

generally 90% of the code here is just a big ????
Why are you storing the last workspace in CCompositor?

I stored it there because I figured it was information scoped to the compositor, not workspaces or even monitors (previous workspace may be on another monitor). But you have a point, it might make more sense to implement as a chain for a series of 'back' operations. In which case, I could just store the source workspace in each workspace, instead? And use that to go back?

Why are you moving the function?
Why did you refactor it???

I wanted to re-use the workspace switching code and figured that it would make sense to go there, rather than in CKeybindManager. But I probably did unnecessarily change it too far, my bad, I didn't consider that would be an issue. I'll fix that, and just have conditions for setting the target workspace in CKeybindManager::changeworkspace instead. Much smaller change then.

this entire thing can be done with a chain in 10 lines of code or less.

Probably.
Look, sorry if you felt like I wasted your time. I'm excited to contribute here and I really like what you've made here. But I'm learning, and I really do want this feature. I'll try and fix it up as you suggest, just need some clarification:

Is it acceptable for me to store the previous workspace inside each workspace object?
Where can I store/access the autoBackAndForth setting?

doesn't currently exist, it should just be created rather than doing nothing

no

This implementation will also allow for cycles to occur, unless I destroy (set to -1) the 'previous workspace' id each time the user goes back a workspace.

make it configurable

Any progress on this?

Any progress on this?

Shoot, thanks for the reminder! I completely forgot about this. I'm starting a new job tomorrow so I'll try and redo this PR over the next few days or at the latest next weekend. If anyone else wants to give it a go instead - please, feel free. Can't be hard to do better than I did 😅

Any progress on this?

Shoot, thanks for the reminder! I completely forgot about this. I'm starting a new job tomorrow so I'll try and redo this PR over the next few days or at the latest next weekend. If anyone else wants to give it a go instead - please, feel free. Can't be hard to do better than I did sweat_smile

Good luck on the job!

@yavko Thanks! It's been a good first week, lots of flexibility to work from home has been lovely.
@vaxerski I've tried to take on your feedback as best I could. The only thing I didn't do was ignore non-existent workspaces when going to previous. I checked in i3 & sway, and this is how they do it too - users who want this setting will expect the behaviour I've implemented (automatically re-creating previous workspaces which have been destroyed).
The below PR description has been updated.
Describe your PR, what does it fix/add?
Add the ability to switch to the last visited workspace as described in https://github.com/hyprwm/Hyprland/issues/324, inspired by i3. The syntax suggested in the issue has been adopted: bind=MODIFIER,KEY,workspace,previous
Also included is a toggle setting general:workspace_back_and_forth to allow switching back to the previous workspace by trying to switch to the same workspace again. I use it all the time in sway and my workflow would be greatly improved by the ability to quickly switch to and from a workspace to check on email, discord, spotify, etc.
E.g. start in workspace 1, then Super+7 to workspace 7, and then Super+7 again will move to workspace 1.
Finally there's a general:allow_workspace_cycles option which toggles whether or not the previous workspace ID is retained after switching to the previous workspace. If this is not done, then there are situations in which a cycle can be formed and the previous workspace can be switched to endlessly.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Nope, besides some potentially unsafe pointer use, but as far as I can tell it's inline with the rest of the surrounding code and it would appear to be safe as far as I can tell. No bugs found in my testing, it's not a huge change.
My only real caveat is that today I've been getting an "Attempted to draw NULL texture!" assertion error when I run in debug, which gives me a black screen when I ignore it - nonetheless I've still been able to check that my code works by just looking at the live logs. So it should be fine as I suspect the issue is that there's something up with my dev environment.
Is it ready for merging, or does it need work?
Yes it's ready, pending approval.
Of course wiki updates will be necessary too, but I don't know how that's normally done.

@vaxerski Adjustments made.

For the wiki, since you probably know best how this works, make a PR to the wiki

Hey! Is there any way to bind workspace_back_and_forth to something?

You need to setup this general option, it's not a dispatcher.
Use the instead:
bind = $mainMod, TAB,workspace, previous

Hey! Is there any way to bind workspace_back_and_forth to something?

You need to setup this general option, it's not a dispatcher.
Use this instead:
bind = $mainMod, TAB,workspace, previous

Thank you! This was exactly what I wanted :)


[Confidential Ledger] Update post ledger entry example

Packages impacted by this PR
Issues associated with this PR
Issue: https://github.com/Azure/azure-sdk-for-js/issues/23041
Describe the problem that is addressed by this PR
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[ ] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
API changes are not detected in this pull request.


Option no-sort doesn't seem to work on gulp 5.0.0

What were you expecting to happen?
Only changing between gulp v4.0.2 and v5.0.0 (all other plugins stay the same and latest versions).
Issue is only really a problem for JavaScript files where the order of the files being concat is vital for plugins that depend on others - like jQuery needing to be first.
I am using ESM gulpfile, as required by latest gulp-autoprefixer v9.0.0 now.
Using the following to keep the order of input sources unsorted (mainly required for JavaScript dependencies).
What actually happened?
Works as expected for gulp v4.0.2 with "no-sort" option, however array is still sorted when using v5.0.0 with same option.
Please give us a sample of your gulpfile
return gulp.src(src, { "no-sort": true })
	.pipe(gulp_concat(file))
	.pipe....

In this case the src is an array of files similar to the following, and need to be concat in the same order:
const src = [
	"a.js",
	"b.js",
	"c.js",
	"d.js"
];

Only change needed to break is upgrading from gulp v4.0.2 to v5.0.0
Terminal output / screenshots
None
Please provide the following information:

OS & version: Debian Linux bookworm (all latest updates)
node version (run node -v): 20.11.0
npm version (run npm -v): 10.5.1
gulp version (run gulp -v): 5.0.0

Additional information
None

I have tried using gulp-order plugin to fix the order in a pipe after gulp.src, however it doesn't seem to work either on v5.0.0, or has no effect at least.

One final note I forgot to mention, the documentation says the option is "nosort" (no dash), I tried that and it didn't work on either v4.0.2 or v5.0.0.  I found the dash option from other documentation.

I'm seeing the same. When given an array of ["path/filename.js", ...], the output from gulp.src appears sorted in alphabetical order using the base filename without the leading path.
I never needed the "nosort" option with gulp 4.02. I also tried src options no-sort, nosort, and noSort without success.

To resolve this issue, try this option. Create an array with paths in the order you need, as you wrote above.
const scriptsList = [
	'node_modules/vanilla-lazyload/dist/lazyload.js',
	'node_modules/lightgallery/lightgallery.min.js',
	'app/js/main.js'
]

In order for the gulp-order plugin to work correctly and create a strict order like in an array, you need to specify the names of specific files
return src(scriptsList, { allowEmpty: true })
.pipe(order([
	'lightgallery.min.js',
	'lazyload.js',
	'main.js',
]))

in this form everything should work correctly for you

In gulp 5, we no longer use node-glob as our globbing library. I've removed the options that looked exclusive to that library in #2786 and added docs for created an ordered stream in #2788


add NLC token metadata

Summary by CodeRabbit

New Features

Added "Ninja Labs Coin" (NLC) to the token metadata, including details such as name, logo, symbol, and CW20 specifics.

Will republish from local branch

hey what you mean ?
my update is Rejected ?


Invalid Zone

I can't get this add-on to work anymore. I don't believe anything changed with my installation that I'm aware of. I did restore to a previous snapshot that was known working with adt-pulse-mqtt. I didn't upgraded to the 107 update of HA that was released today. I'm still using 106.6.
I never paid attention to the website, but I do see "Web Portal version: |   | 18.0.0-78". I wonder if ADT updated that and it broke something in this add on. Any help is appreciated because I find this to be one of my most useful add-ons and several automations are implemented based on door and motion sensors from adt-pulse.
The error log shows
3/18/2020, 8:29:57 PM Pulse: Invalid Zone JSONTypeError: Cannot read property 'items' of null
at Request._callback (/usr/src/app/adt-pulse.js:184:12)
at Request.self.callback (/usr/src/app/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/usr/src/app/node_modules/request/request.js:1154:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/usr/src/app/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)

ADT updated the zone file and turned it into null. This plugin is also using the same script as my plugin, homebridge-adt-pulse.

I have fixed the problem on my plugin homebridge-adt-pulse.
If anyone would like to contribute to adt-pulse-mqtt and fix this issue, you may witness the fix in this file.
The function name is getZoneStatusOrb.

@mrjackyliang Thanks, I'll take a look. Feel free to submit a pull request as well.

New version on Docker Hub if you are running in Docker. If you are using my Hass.io addon repository,  it should show an update available.


Major improvements to visuals

Why do we want to spawn them on the screen rather than out of the screen?
This propsed solution removes spawning partially on the screen while still spreading them out randomly.

Adding some more changes.