anchorId already registered! error

Hi,
it's possible add functionality to override or disable error in register function?
if (this.anchors[anchorId]) {
throw new Error('anchorId ' + anchorId + ' already registered!');
}

I know this is a super old ticket, sorry to necro.
However i figured id share my solution as I found this issue yesterday trying to research my issue.
I was facing the same error whilst working with items within nested lists (its a complex UI).
Well my solution was to extend TourService and override its provider. I hooked into the register and unregister methods so i was in control of what tour directives were registered at any point in time. So i can them work around the issue.
Just thought id share the technique, once you have your extended TourService you could have any behaviour you desire. Another feature i added was namespaced yours. So instead of just a single flat list of yours, i have groups and when i call start i now provide a key to say which group of yours i want to begin.
For the issue specifically logged here you could do something like this which will just un-register an element before registering it, meaning if you try to register dupes the last one registers is what will be used.
@Injectable({
  providedIn: 'root'
})
class ExtendedTourService extends TourService {
  // Note anchor should be of type `TourAnchorDirective` but that is not piblicly exported
  // so cannot be set.
  override register(anchorId: string, anchor: any): void {
    console.log('OVERRIDE');
    super.unregister(anchorId);
    return super.register(anchorId, anchor);
  }
}

export const appConfig: ApplicationConfig = {
  providers: [
    {
      provide: TourService,
      useClass: ExtendedTourService
    },
    provideMarkdown(),
    provideHttpClient(),
    provideRouter(routes),
    provideAnimationsAsync()
  ]
};

Or you could just use duplicateAnchorHandling setting.

Ahh but there’s the fun in just doing that when I can re-invent the wheel.
In seriousness, I missed that part of the documentation.
At least the starting a tour based on a namespace doesn’t seem to be re-invention!


Ignore case on handlerVersion

For #921 . Also refactored tests a bit.

Add an empty name/value test cases to make sure it doesn't crash.

@dotnet-bot test this please

In the appveyor build there looks to be a double free with strings (error code is Heap corruption). We may not be able to free the bstrs. Will try to repro.

🆙 📅


Cross-compiler for building "darwin" target

Description
It would be nice to be able to build all targets, before having it fail in CI on a VM
Something like https://github.com/neilotoole/xcgo and use a container builder?
Main issue is that github.com/Code-Hex/vz/v3 doesn't build (cgo).
Not sure if darwin is still open enough, or if it would need a mock?

i.e. trying to build with GOOS=darwin, from a Linux host
# github.com/Code-Hex/vz/v3
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:11:8: undefined: VirtualMachineStateStopped
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:12:8: undefined: VirtualMachineStateRunning
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:13:8: undefined: VirtualMachineStatePaused
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:14:8: undefined: VirtualMachineStateError
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:15:8: undefined: VirtualMachineStateStarting
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:16:8: undefined: VirtualMachineStatePausing
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:17:8: undefined: VirtualMachineStateResuming
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:18:8: undefined: VirtualMachineStateStopping
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:19:8: undefined: VirtualMachineStateSaving
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:27:9: undefined: VirtualMachineState
../go/pkg/mod/github.com/!code-!hex/vz/v3@v3.1.0/virtualmachinestate_string.go:19:8: too many errors

Being able to run unit tests  (with binfmt_misc) would be nice.
i.e. similar to current GOOS=windows support (as in 8028e500719d746f38712e4cf5e63144ab2f7bec)
Integration and release tests still need hardware, of course.

https://github.com/tpoechtrager/osxcross

This seems to be what I want, for running the unit tests (similar to wine for windows):
https://www.darlinghq.org/
~ $ uname
Linux
~ $ darling shell
Darling [~]$ uname
Darwin

It doesn't have to be perfect.

This seems challenging in both technological and legal aspects.
It is unlikely that we can work on this.😢

The legal was supposed to be covered, if not it should be avoided for sure.

We only directly use those parts of Darwin that are released as fully free software.

But, like Wine, I don't think it is something that is needed upstream.
If the user have such an environment already, they can "just use it"...
If not, they would have to remote to a real Windows or Darwin machine.
Also, for testing purposes the no_vz flag avoided most of the build issues.

The cgo compilation failed, when trying to run cc -E -dM to get some macro definitions:
clang: error: argument unused during compilation: '-arch x86_64' [-Werror,-Wunused-command-line-argument]
That is, there was no actual code being compiled but it wanted to get a enum value...
	FSEventsInodeMetaMod          = 0x00400


HDDS-10046. Replace PrecomputedVolumeSpace with SpaceUsageSource.Fixed

What changes were proposed in this pull request?
PrecomputedVolumeSpace, added in HDDS-9380, is structurally very similar to the Fixed implementation of SpaceUsageSource.  The latter is currently only used for testing.  We can reduce duplication by moving Fixed from tests to production code and replacing PrecomputedVolumeSpace with it.
https://issues.apache.org/jira/browse/HDDS-10046
How was this patch tested?
Refactoring, covered by existing tests:
https://github.com/adoroszlai/ozone/actions/runs/7385534327

@xichen01 please review

Thanks @sadanand48 for the review.


resized images aren't being added to the resource manifest

I'm using middleman-s3_sync to upload files to S3. The resized versions of the images aren't being added to the resource manifest, so they don't get uploaded, breaking the site.

Hello,
Is that a new problem on an project using middleman-simple-thumbnailer since a long time , or is this the description of a problem you encountered when trying to use middleman-simple-thumbnailer for the first time ?
Thank you,
ymh

Trying to use the extension for the first time.

Hello,
Thank you for your response.
Unfortunately, this is a direct consequence of the current implementation and is not easily corrected. This is explained in the issue #13.
The only solutions I came up for the moment will imply a radical change in the way this extension is used, which can be problematic for existing users. So do not expect a correction in a near future.
In the meantime I will update the documentation to warn of this limitation. When done I will close this issue as duplicate of #13.
Regards,
ymh

Duplicate of issue #13.


Investigate if test case always should be prepared for test

From<EMAIL_ADDRESS>on September 11, 2009 14:57:43
To always produce the same result when it comes to suppressing constructors
and perhaps in the future mocking new using the new keyword (see previous
issue)
Original issue: http://code.google.com/p/powermock/issues/detail?id=162

From<EMAIL_ADDRESS>on September 22, 2009 11:20:01
Test case is automatically prepared since version 1.3
Status: Fixed
Labels: -Type-Task Type-Enhancement


Enable SideBar by deafult

An using v2.
I have added
'show_side_bar'  => true,
but still sidebar is disabled by default.

I tried this, it's working, just make sure you clear the application store from your browser

Hi @saleem-hadad
I checked the history of the files and I can confirm that this is not working anymore with v2. Here are some of the lines that supports this feature.
resources/js/larecipe.js:35 v2
sidebar: false,`
and here's the previous feature for v1.3 comparison.
Thank you! Your work is very beautiful btw. Keep it up!


Generate third_party/ instead of 3rdparty/ (or make it configurable)

Some languages, such as Python and Go, require directories to have legal symbol names, so they can't begin with digits or contain dashes, for example.

is it not configurable? I think it is:
https://github.com/johnynek/bazel-deps/blob/master/src/scala/com/github/johnynek/bazel_deps/DepsModel.scala#L858
looks like that is not documented.

added documentation: https://github.com/johnynek/bazel-deps/commit/6d1498cb8ed10f5a1ade78698790b8bddc8e6303

Ah, nice! works great :)


[BUG] Uncaught TypeError: Cannot read property 'getUndoManager' of null  at w.endOperation (ace.js:1)

Environment
Please provide as many details as you can:
Uncaught TypeError: Cannot read property 'getUndoManager' of null  at w.endOperation (ace.js:1)

Hosting type

[x] Form.io
[ ] Local deployment

Version:

Formio.js version: "formiojs": "^4.9.5", | "react-formio": "^4.3.0",
Frontend framework: "react": "^16.12.0"
Browser: Chrome
Browser version: 80.0.3987.149

Steps to Reproduce

Drag a component into the Formio Builder

Expected behavior
Observed behavior
Example
If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.
For code or form JSON, please enclose in a code block:
// your code here

This looks like a crash in the Ace editor. Can you see if it is a problem there instead of our platform?

Looks like things may have changed recently with ace. We may need to look into what is wrong. This is another issue with ace just reported. https://github.com/formio/formio.js/issues/2569

Hello @randallknutson
The issue might be related to the fact that one js file is not loaded from the CDN:
ace.js:1 GET https://cdn.form.io/ace/1.4.8/theme-snow.js net::ERR_ABORTED 404
Opening the URL above we see:

Code: NoSuchKey
Message: The specified key does not exist.
Key: ace/1.4.8/theme-snow.js
RequestId: AF392064C6DBF8AC
HostId: ZegNZjSdRygLYkWOYWWYD05nUJX8tDRqOFWJCcB6dmwfpGNb62GKqAHsFbVyUNNaFUWt7y3nOKQ=

Hopefully it helps you pinpoint the issue.
On the first load everything works fine. The issue can be replicated on dragging field on the FormBuilder.
Thank you.

theme-snow is not a valid theme for Ace. I believe this is probably caused by default wysiwyg settings (which were originally for the Quill editor) are somehow getting applied to Ace editor.

@randallknutson @travist Thanks for investigating this bug. It does affect old versions of form.io too. Any progress on this one?

@AgileFlexAgency
This item is currently being worked on by our dev team. We are hoping to have a fix out by the end of this week or early next week.

I am closing the issue as it was created too long ago and there are no new comments here. I hope it was resolved. If not, please reopen it. Thanks!


how to download the bigdata response that type content type is application/octet-stream

he file is very large and the local memory cannot be fully loaded, so how read it as a iterator.

First read the header:
https://www.boost.org/doc/libs/1_76_0/libs/beast/doc/html/beast/ref/boost__beast__http__async_read_header.html
And then while !parser.is_done(), read section and handle them incrementally:
https://www.boost.org/doc/libs/1_76_0/libs/beast/doc/html/beast/ref/boost__beast__http__async_read_some.html


Force dependency verification

Seems like right now we have a discrepancy between the content of godeps.json and what is actually vendorized.
This forces a full nuke of the vendorized folder, and reinstall from the json source, making sure we test against that.
Should make (unfortunately) the gcs driver fail.

@aibaars It seems like what you vendorized inside Godeps/_workspace is not the same thing as what is indicated inside the Godeps.json file.
Put otherwise, you vendorized (or modified) without updating the godeps list, which is biting us now.
This PR here makes sure we now catch these situations.
Nevertheless, we have to fix the GCS driver, but this is non trivial since it requires finding what is the revision you initially vendorized.
Can you help?
cc @RichardScothern

My intention was to add the following dependencies: https://github.com/docker/distribution/pull/756/commits/95db61e97f69720d807329075196e89815890214
I might have done something wrong, sorry about that. I'll have a look.

@aibaars
If what you intended to add is what's in the godeps.json file then you can:

rm -Rf Godeps/_workspace
godep restore
godep save

Then you will probably have to fix things.
Thanks for looking into this.
Let us know on irc if you struggle with godep we may be able to help.

@dmp42 I made a PR against yours in an attempt to fix the problems. Could you check whether I got it right this time?

Got merged with https://github.com/docker/distribution/pull/1544
Closing


How to Scale out in Java EE Servers?

I am using netty-socketio embed inside Servlet as a Socket.IO server.
In Node.js world, Socket.IO server can leverage MongoDB and Redis to support broadcasting message across Socket.IO namespaces / rooms.
Is netty-socketio capable to do the same?
I check the description mentioning "Supports distributed broadcast across netty-socketio nodes (Redisson, Hazelcast)", not sure if mean the same.
If yes, how should I configure? Are there any sample codes?
Thanks in advance!

I didn't test scaling yet.

@xdallen , the followings are my suggestions about scaling out:

only use netty-socketio to support connections between clients and server(node), the server node has nothing to do about business except build a channel.
communicate among different servers(nodes) with MQ(RabbitMQ/RocketMQ/Kafka...) or Redis.


Drop support for docker log format

What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Dockershim has been removed from Kubernetes so we only need to support the CRI log format.
Which issue(s) this PR fixes:

None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?

Removed support for docker log format in tests since dockershim is not available in Kubernetes any more.

/lgtm

Sorry for the late comment. Will this work with CRI-DOCKERD? We are not dropping this from kubelet because of cri-dockerd to protect back compat.

Do you know any maintainers of cri-dockerd? @nwneisen I see you are making releases. please advice

@SergeyKanzhelev I recently took over cri-dockerd. The project uses k8s.io/klog/v2 which looks like the output can be configured. The logs I've seen have been in the logfmt format

@nwneisen in this case we're talking about container logs--how does cri-dockerd write logs to disk for the kubelet to read them?

{"log":"I0719 22:04:51.982483       1 log.go:195] Started HTTP server on port 8080\n","stream":"stderr","time":"2023-07-19T22:04:51.993532538Z"}
{"log":"I0719 22:04:51.982923       1 log.go:195] Started UDP server on port  8081\n","stream":"stderr","time":"2023-07-19T22:04:51.993575341Z"}
{"log":"I0719 22:05:48.595826       1 log.go:195] GET /\n","stream":"stderr","time":"2023-07-19T22:05:48.595996805Z"}
{"log":"I0719 22:05:48.618534       1 log.go:195] GET /\n","stream":"stderr","time":"2023-07-19T22:05:48.618656559Z"}

Container logs are being written to disk in json format. I agree that cri-dockerd should use cri format. I will work on making a change for this.

Thank you @nwneisen! :pray:


Simplified/revised CoC

Contributor Covenant v1.4
Emphasize that disagreement is ok/expected

I wonder if there's anything we could do/say to encourage the use of real names in our communities. [This is, like, the #1 best way to improve behavior online.]


Implement some kind of release/stable branches

Currently I am fetching the 'master' branch as version to be used.
However, some of the commit messages show me that the 'master' is not necessarily always a stable version.
It would be great to have some kind of versioning and/or assurance that certain branches will always be stable.

A "stable" branch will be created soon.


using Dropdown with variables, not api ?

I try to combine dropdown with search modules, but from the docs, only the api can be used:
$('.remote.example .ui.dropdown')   .dropdown({     apiSettings: {       url: '//api.semantic-ui.com/tags/{query}'     }   }) ;
What I try to do, is to use a variable already existed in the document:
source : someObject.value

You can use apiSettings along with response and a static object. See API docs.

ah, got it, thank you :)


Compile comand hangs

Version(s)
Tested on 0.2.0
Describe the bug
scala-cli compile command hangs for this program
//> using scala "3.2.2"
//> using dep "co.fs2::fs2-io:3.6.1"

import cats.effect.*
import fs2.*

object Main extends IOApp.Simple:
  def run: IO[Unit] = Stream.duration

To Reproduce
Run scala-cli compile . of the program mentioned above
Expected behaviour
I expect this program to fail compilation, but scala-cli just hangs(leaving bloop process hanging as well)
Interestingly, when I comment out Stream.duration part compilation succeeds def run: IO[Unit] = ???//Stream.duration
So this happens when Stream.duration is present in the code
Also could be somehow related with this bug https://github.com/VirtusLab/scala-cli/issues/532, but in my case I have scala program(not a script) with explicit main method

If I bypass scala-cli and invoke the compiler directly with:
% /usr/local/scala/scala3-3.3.0-RC2/bin/scalac -classpath \
  `cs fetch --classpath "co.fs2::fs2-io:3.6.1"` \
  S.scala

then I get
java.lang.OutOfMemoryError: Java heap space while typechecking S.scala
java.lang.OutOfMemoryError: Java heap space while compiling S.scala
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at dotty.tools.dotc.util.WeakHashSet.resize(WeakHashSet.scala:114)
	at dotty.tools.dotc.util.WeakHashSet.addEntryAt(WeakHashSet.scala:161)
	at dotty.tools.dotc.core.Uniques$NamedTypeUniques.linkedListLoop$1(Uniques.scala:56)
...

and with 3.3.0-RC3 instead of 3.22, same
so this would need to be reported over at https://github.com/lampepfl/dotty/issues

I think this issue may be related to #1781, where bloop doesn't properly handle java.lang.OutOfMemoryError from compiler.
When I tried to run this example with --server=false, it seemed to work, but I had to wait a while to get a result:
➜  scala-demo scala-cli Hello.scala --server=false
-- Error: /private/tmp/scala-demo/Hello.scala:8:37 -----------------------------
8 |  def run: IO[Unit] = Stream.duration
  |                                     ^
  |No given instance of type cats.effect.kernel.Clock[F] was found for parameter F of method duration in object Stream
  |
  |where:    F is a type variable with constraint <: [_] =>> Any
  |.
  |I found:
  |
  |    cats.effect.kernel.Clock.clockForOptionT[F](
  |      /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |        summon[cats.Monad[F]]
  |    ,
  |      cats.effect.kernel.Clock.clockForStateT[F, S](
  |        /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |          summon[cats.Monad[F]]
  |      ,
  |        cats.effect.kernel.Clock.clockForEitherT[F, E](
  |          /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |            summon[cats.Monad[F]]
  |        ,
  |          cats.effect.kernel.Clock.clockForKleisli[F, R](
  |            /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |              summon[cats.Monad[F]]
  |          ,
  |            cats.effect.kernel.Clock.clockForWriterT[F, L](
  |              /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |                summon[cats.Monad[F]]
  |            ,
  |              cats.effect.kernel.Clock.clockForIorT[F, L](
  |                /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |                  summon[cats.Monad[F]]
  |              ,
  |                cats.effect.kernel.Clock.clockForContT[F, R](
  |                  /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |                    summon[cats.Monad[F]]
  |                ,
  |                  cats.effect.kernel.Clock.clockForReaderWriterStateT[F, R, L, S](
  |                    /* ambiguous: both method catsInstancesForTry in object Invariant and method catsInstancesForQueue in object Invariant match type cats.Monad[F] */
  |                      summon[cats.Monad[F]]
  |                  , /* missing */summon[cats.effect.kernel.Clock[F]], ???)
  |                , ???)
  |              , ???)
  |            , ???)
  |          )
  |        )
  |      )
  |    )
  |
  |But no implicit values were found that match type cats.effect.kernel.Clock[F].
1 error found
Compilation failed

I have checked this issue more deeply and have determined that #1781 don't address the problem reported in this issue. While #1781 dealt with StackOverflowError, but this issue is caused by a different exception - java.lang.OutOfMemoryError.

Looks like there is no way actually for us to report out of memory errors from Bloop, so the only option to check this is using server=false


"has_been_modified" of api.py has 2 arguments.

Hello.
"has_been_modified" of api.py has 2 arguments.
https://github.com/spyder-ide/spyder/blob/c5b4291245dc8b0ee71705175023f0fbe0f565c9/spyder/plugins/preferences/api.py#L387-L389
But in the code below, only one is entered.
https://github.com/spyder-ide/spyder/blob/c5b4291245dc8b0ee71705175023f0fbe0f565c9/spyder/plugins/shortcuts/confpage.py#L64-L66
Thank you.

Hey @ok97465, thanks for reporting. We'll try to take a look at this problem after we release 5.2.0 in a couple of weeks.

@steff456, could you take a look at this one next week? I noticed it's a serious bug because it doesn't allow to set new shortcuts in Spyder.


added support for same functionality as slf4j-ext.

Turns out to get location-aware work as expected I didn't use XLogger.
Replicated the functionality. I'm not sure if essentially copying the code is legal.

If in any case, we're implementing the xlogger methods by hand, I don't really understand why to create another factory/class/ etc' and not just add new methods to the existing KLogger. I also don't understand why slf4j didn't take that approach. maybe a compatibility issue?
In addition, if there is no js implementation at the moment, maybe we should keep it on the jvm level only?

After all this I'm thinking the best may be to just add the entry, exit, throwing and catching methods to the existing KLogger. Their presence doesn't add any overhead. We don't need any extra dependencies.

As to the JS implementation, I'm not sure how much work is involved in logging the method name for entry / exit

Sounds good!

Its ok to start with jvm-only version.

You can reject/close this PR.


generator cli broke in 0.39

Describe the bug
I cannot generate with the latest version
How to Reproduce
Using a example file:
wget https://raw.githubusercontent.com/asyncapi/generator/master/test/docs/ws.yml

# 0.38.0 works
npx<EMAIL_ADDRESS>--force-write --output ./build  ws.yml @asyncapi/html-template
# 0.39.0 is broken
npx<EMAIL_ADDRESS>--force-write --output ./build  ws.yml @asyncapi/html-template

0.39.0 gives this exception:
Something went wrong:
Error: Cannot read property 'startsWith' of undefined
    at parse (/Users/laat/.npm/_npx/60303/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/parser.js:92:11)

Thanks for reporting, @laat. A fix is on its way: https://github.com/asyncapi/generator/pull/305.


Update maintainer list

Description
Following https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md#addition to update maintainer list with nominees.
Issues Resolved
N/A
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #687 (1292df3) into main (8d9b459) will decrease coverage by 31.98%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main     #687       +/-   ##
=============================================
- Coverage     94.74%   62.76%   -31.99%
=============================================
  Files           283       10      -273
  Lines          7676      658     -7018
  Branches        561      119      -442
=============================================
- Hits           7273      413     -6860
+ Misses          349      192      -157
+ Partials         54       53        -1

Flag
Coverage Δ

query-workbench
62.76% <ø> (ø)

sql-engine
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ch/sql/expression/window/ranking/RankFunction.java

...pensearch/sql/planner/physical/DedupeOperator.java

...ch/sql/expression/aggregation/NamedAggregator.java

...org/opensearch/sql/expression/env/Environment.java

...opensearch/sql/exception/QueryEngineException.java

...opensearch/sql/expression/span/SpanExpression.java

...nsearch/response/error/OpenSearchErrorMessage.java

.../org/opensearch/sql/analysis/symbol/Namespace.java

...h/sql/protocol/response/format/ErrorFormatter.java

...earch/storage/script/filter/lucene/RangeQuery.java

... and 263 more

Continue to review full report at Codecov.

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

!!! NOTE !!!: Blocking this PR until we finish the first and second step in https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md#addition

@dblock As the final step below, do you know how can I find repo admin to change the permission for the new maintainers?

The repo admin adjusts the new maintainer’s permissions accordingly, and merges the pull request.

@dai-chen organizational owners are the only ones that can add external contributors, @CEHENKLE please help?

FYI @anirudha has the same level of access as me here, for next time

Good to know that. Thanks for the help this time!


Hack to make issue #1 sort of work

Quick and dirty hack to make it load and store files at run-time.
I think you could rewrite a good chunk of the derive as functions to to do all the directory checks etc., but that was more than I wanted to do to get basic functionality working.
One caveat, this will create the default directory and needs to read the extension of the config_file attribute to know the type of file to read/save.

Honestly, this is the first time I've ever even looked inside macro code,
so I'm surprised I got anything to work as quickly as I did.
I have no idea what your code suggestion would do, so I won't take it
personally if you toss my work and come up with something cleaner.
I mainly sent the PR to you since I had made it work for myself and wanted
something like it to get into the main repo.  I'm liking being able to
roundtrip confs without a bunch of work from my side, so I look forward to
the future of this.
On Mon, Apr 6, 2020 at 1:11 AM Akshay<EMAIL_ADDRESS>wrote:

@NerdyPepper commented on this pull request.
Looking pretty good!
In the future, I plan on having runtime paths integrated into command line
args (structopt or clap), this would help in realizing that.
In fondant_deps/src/lib.rs
https://github.com/NerdyPepper/fondant/pull/2#discussion_r403849119:

@@ -42,6 +44,9 @@ pub enum FondantError {

/// Derive this trait on a struct to mark it as a 'configuration' struct.
pub trait Configure: Serialize + DeserializeOwned + Default {

fn load_file(config_file: &PathBuf) -> Result<Self, FondantError>;

perhaps these signatures could be converted to allow more flexibility?
⬇ Suggested change

fn load_file(config_file: &PathBuf) -> Result<Self, FondantError>;

fn load_file<P: AsRef>(config_file: P) -> Result<Self, FondantError>;

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/NerdyPepper/fondant/pull/2#pullrequestreview-387955169,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYYWZOBK6D27JY4QC65D53RLFXBXANCNFSM4L7VTMKQ
.

Honestly, this is the first time I've ever even looked inside macro code,
so I'm surprised I got anything to work as quickly as I did.

I appreciate your effort! The suggestion I made allows you to pass not just PathBufs into the function but also &strs, and in general, any type that can be dereferenced to produce a Path.
I have made some changes to your version and merged them. A bit of documentation, a version bump and this change will be good to go!
Thanks for working on this!


Experiment: Use HttpClient logging instead of SCM HTTP logging

POC sample

API change check
APIView has identified API level changes in this PR and created following API reviews.
System.ClientModel


Sample boards nrf mesh onoff_level_lighting_vnd not working

Describe the bug
Trying to run the mesh sample described here : sample Mesh Generic OnOff, Generic Level, Lighting & Vendor Models
To Reproduce
Steps to reproduce the behavior:

cd zephyrproject/zephyr
west build -b nrf52840dk_nrf52840 samples/boards/nrf/mesh/onoff_level_lighting_vnd_app
west flash --erase

Expected behavior
I expect to be able to provision the device through meshctl of BlueZ. It's not the case.
The connection to the device is successful but the provisioning itself fails. Cf. Log of the meshctl and Nrf52840.
LogMeshctl.txt
LogNrf52840.txt
I tried with two different Nrf52840. I even tried on another Linux (virtual machine) - same problem. The another sample onoff-app was working though.
Btw, can I know where I can find the mesh implementation of the API ? I couldn't find for example struct bt_mesh_model_op which is noted here here but not really described.
Impact
Can't prove the extraordinary benefit of bluetooth mesh and Zephyr OS to my chief project :)
Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
Environment (please complete the following information):

OS: Ubuntu 20.04 LTS
Zephyr SDK (0.11.3)
Zephyr version 2.4.0-rc1
We have the nRF52840 DK.

Hi, i saw your log and found no problem, but I noticed that you are using the lowest security level(NO OOB) for provisioning. Do you set the security level of meshctl?
security 0 should be set for this level security.

https://github.com/zephyrproject-rtos/zephyr/tree/master/include/bluetooth/mesh
All mesh related definitions are included here.
For example, if you want to know about bt_mesh_model_op , you can look at access.h.

Hello,
Thanks for quick answer.
Yes you were right. Changing meshctl security level permitted me to do the provisioning so I could run the sample.
Several questions though :

For my own understanding : why is the security level important with this sample opposed as the "onoff-app" sample which could run without me setting anything ?

It's written that before provisioning "Each button controls the state of its corresponding LED". In my case, that's wasn't like that as it would display "bt_mesh_model_publish: err: -49" on minicom terminal. Is that normal ?

After provisioning I could set up the generic on/off and light models as shown in the documentation. However, I had difficulties to set up the vendor model.
First I tried with meshctl to do as follow :

discover-unprovisioned on
provision
menu config
target 0100
appkey-add 1
bind 0 1 4321 0002
pub-set 0100 c000 1 0 5 4321 0002

So far, it worked but then I wanted to do

pub-set 0100 c000 1 0 5 4321 0002

To my surprise, I saw that meshctl doesn't provide a sub-set with [cid] parameter.. ?
If I look to all commands in menu config, I can read this :

pub-set <ele_addr> <pub_addr> <app_idx> <per (step|res)> <re-xmt (cnt|per)>  [cid]
bind <ele_idx> <app_idx> <mod_id> [cid]
sub-add <ele_addr> <sub_addr>

I've got meshctl v.5.55 (ie. latest version I believe). So it surprises me.
Next, I tried with nRF connect by adding an app key and configuring vendor model of element 1 to publish and subscribe on group 0xC000. It didn't do anything as it would still display "bt_mesh_model_publish: err: -49" on minicom terminal.
I'm a bit lost. Did you manage to setup the vendor model with meshctl only ?
Nice day !

why is the security level important with this sample opposed as the "onoff-app" sample which could run without me setting anything ?

Your application does not enable any OOB authentication (as the OOB selection in src/mesh/ble_mesh.c is surrounded by #ifdef OOB_AUTH which is never defined). Without authentication, meshctl rejects your device if you don't lower the security level.

it would display "bt_mesh_model_publish: err: -49" on minicom terminal

This happens if you don't configure the model publication for the model that sends on the button press. Note that none of the models in this sample defines an update callback, so pub-set will fail if you attempt to configure periodic publication. Make sure to check the return value of the pub-set procedure.

I saw that meshctl doesn't provide a sub-set with [cid] parameter

This looks like it has been added pretty recently, you might want to update bluez: https://github.com/bluez/bluez/commit/5474314d895e802ede83c9862c81013707249be2

This looks like it has been added pretty recently, you might want to update bluez: bluez/bluez@5474314

I forgot to mention but I've already got the latest version since the beginning (v. 5.55). Maybe I'll have to ask bluez about this then.

This happens if you don't configure the model publication for the model that sends on the button press. Note that none of the models in this sample defines an update callback, so pub-set will fail if you attempt to configure periodic publication. Make sure to check the return value of the pub-set procedure.

I think I couldn't make myself clear : before provisioning, I can't turn off/on the LEDs like your documentation says.

This happens if you don't configure the model publication for the model that sends on the button press.

I configure it though (well it seems to me). I'm trying with the nRF Mesh app as the meshctl isn't working. I set the publish address of the vendor model to group 0xC000. I set the subscriptions address of the vendor model to group 0xC000. But the buttons still return me the error.
From the app, I can send a get message (opcode 0xC001) and it return me the dummy message as defined in the code (A578FEB3).
What am I still missing to make the sample work ?

I can't turn off/on the LEDs like your documentation says.

This looks like a discrepancy in the documentation, there's no code to support this in the sample, as far as I can see. @vikrant8051 do you know what happened here?

What am I still missing to make the sample work ?

Error -49 is only returned from bt_mesh_model_publish here, so one of these checks are failing:
https://github.com/zephyrproject-rtos/zephyr/blob/1342d12500867d3de09025037e65e756d5486eba/subsys/bluetooth/mesh/access.c#L741-L748
If possible, try enabling debug logs for foundation models to see what is missing from your publication configuration. It could also be a missing application key

Hi @trond-snekvik
Yes, as per implementation without proper provisioning & configuration of Clients (Buttons), they don't work like in case of onoff-app since buttons functionality is altogether different.
I intentionally did it, so that Clients (Buttons) get isolate from Servers (LEDs).

If possible, try enabling debug logs for foundation models to see what is missing from your publication configuration. It could also be a missing application key

I tried to activate the log through the prj.conf file where I uncommented the following lines :
CONFIG_BT_MESH_DEBUG=y
CONFIG_BT_MESH_DEBUG_PROV=y
CONFIG_BT_MESH_DEBUG_MODEL=y
CONFIG_BT_MESH_DEBUG_ACCESS=y
(let me know if others should be uncommented).
In the attached log file you can see the log output for every action I've done to set up the vendor model.
Logs.txt
For me, it seems the application key and publish/subscribe address is set up correctly. It seems kinda similar to the log I get when trying the On/Off model.
I'm able to set up the On/Off model with the behavior described by vikrant8051 just above.
The provisioning and set up was done with nRFMesh App.

they don't work like in case of onoff-app since buttons functionality is altogether different.

I get it now. The documentation should be corrected because as it is now it's a copy paste of onoff-app and it could confuse people like me :)

@carlescufi @trond-snekvik
Issue has resolved & could close now.

It's not resolved...
I'm simply showing up that :

If I do the generic on/off app it works as expected.
If I do the vendor model it doesn't publish (displaying of error -49, when clicking on a button), even though it seems to me I have the same logs as with on/off app (for adding the app key and publish/subscribe group address). BUT I'm able to send vendors model to one particular device.

I made a PR removing the pre-provisioning button text from the readme of this sample: https://github.com/zephyrproject-rtos/zephyr/pull/28949
Just to confirm, in publisher.c, you're removing the defines for ONOFF and GENERIC_LEVEL, and defining VND_MODEL_TEST? By default, this module publishes on the onoff model, and the model selection has to be made at compile time.
I'm not able to reproduce with the nRF Mesh app, regardless of which model is compiled in for publishing, so I'd need some more information.
My steps are the same as yours, but I'm only configuring the models that end up sending in publisher.c (based off the defines). I'm able to publish with the onoff client if I use the default defines and set publish parameters for that model.
I'm able to publish with the vendor model if I replace the defines at the top with VND_MODEL_TEST and set publish parameters for that model.

Just to confirm, in publisher.c, you're removing the defines for ONOFF and GENERIC_LEVEL, and defining VND_MODEL_TEST?

Ah ! It's what I was missing ! I though it was enough to set up the model correctly through meshctl or nRF Mesh and didn't see there is a filter in the code.
My bad.
Thanks very much for your help !


Remove the Lateral Join Query Support

This strategy turned out to be slower for querying anyway, and it's making the internals more complicated. Can we just agree to nuke this?
See http://jeremydmiller.com/2015/11/09/optimizing-for-performance-in-marten/

If it's off by default then I'm not using it so I have 0 issues with it being ditched in favor of simplicity and performance.
:+1: :shipit:

I'm fine too, not using it. (y)


Allow paths to be regexp

So i can do this:
export const server = new Pretender();
server.get(/^((https?:)?\/\/)(.*)/, server.passThrough);

Pretender uses route-recognizer for this, which has support for dynamic segments at least.
Correct me if I'm wrong, but your regex matches everything and passes through. If that's your use case, why use Pretender?

my recommendation is to create a catchall, server.get('/*, function() { /* custom handler to do regexp*/) ) It is unlikely for us to support both regexp and the NFA the route-recognizer users.

@DingoEatingFuzz  actually it shouldn't. it only captures external urls. so urls like /api/v2/users should get captured by pretender.
This is actually becoming a really massive problem.
I think pretender started out with different goals than it aims for these days. Way back it was a mocking tool for frontend development, not it's a mocking tool for your unit tests. two ENTIRELY different things.
We chose pretender because it let us mock out the api before our backend team got round to the sprints and tickets that cover particular api requirements.
additionally, the library plyr.io uses ajax to load in the svg sprites... which pretender blocks.
this passthrough fiasco needs to be solved.


CuboCore.coreuniverse: 4.4.0 -> 4.5.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/coreuniverse/versions.
meta.description for CuboCore.coreuniverse is: Shows information about apps from the C Suite
meta.homepage for CuboCore.coreuniverse is: https://gitlab.com/cubocore/coreapps/coreuniverse
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.5.0 with grep in /nix/store/n1krmah00bx1ckvic2dy2k6249g0qfrx-coreuniverse-4.5.0
found 4.5.0 in filename of file in /nix/store/n1krmah00bx1ckvic2dy2k6249g0qfrx-coreuniverse-4.5.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
CuboCore.coreuniverse

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/n1krmah00bx1ckvic2dy2k6249g0qfrx-coreuniverse-4.5.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A CuboCore.coreuniverse https://github.com/r-ryantm/nixpkgs/archive/7a901b97b469bc4cdcbd6b2e415379fe240250a4.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/n1krmah00bx1ckvic2dy2k6249g0qfrx-coreuniverse-4.5.0
ls -la /nix/store/n1krmah00bx1ckvic2dy2k6249g0qfrx-coreuniverse-4.5.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

CuboCore.coreuniverse

Maintainer pings
cc @dan4ik605743 for testing.

Superseded by #256719.


Problems while conversion of float to int

Code:
plain_text = ""
for i in range(dimensions):
    plain_text += chr(int(result[0][i]) % 26 + 65)

Result Matrix: (after multiplication of inverse with cipher key matrix)
[[ 260.  574.  539.]]
After conversion to int:
[260, 573, 538]

Resolved issue.
Reference:
https://stackoverflow.com/questions/51797244/conversion-of-float-to-int-in-python-hill-cipher


feat(DSProof): Added DSProof to bch-js

PR related to this trello task --> https://trello.com/c/hsOC8RDw

:tada: This PR is included in version 4.20.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ability to rollback an individual migration without migrations that have...

... happened after it
There are some situations where migrations may happen out of order of they they are written, this change allows single migrations to be reverted on an individual basis.

I would also like to see this kind of feature being added, especially for large teams with different parts of a project, where linear based may only made sense up to a point (especially when testing out individual features etc)

I'm waiting to see if theres further community support before merging

I would like also migrate or rollback a specific version.

This would be a great feature addition

This would be really helpful. When merging in development branches of git it often happens that the migrations created are dated before some of the ones already deployed.

I would find this feature a bit of a problem for views/stored procedures/etc that are dependent upon a specific column existing that can be removed by randomly rolling back a migration.
Rolling back should by LIFO (Last In, First Out).

@fabianhoward, We use a mechanism to rename the migrations in a branch such that they are pushed as close to now as possible rather than when they were created. This is done prior to feature finishing. So, as far as production is concerned, these migrations have just been developed. As each feature branch is closed, its migrations are the most recent ones to add. It works for us (4 devs in 2 countries with 3 different applications and - at the moment - 18 different features being developed across the set). Of course, YMMV.

+1 for this feature, it would be really helpful.

@automatical I really like the idea of this change, but it can no longer be merged into the 0.4.x branch, as we are now targeting 0.5.x. Please open a new PR against the 0.5.x-dev branch. Thank you!


#1681 Added the mentioned algorithms under string algorithms

📥 Pull Request
Description
Added the mentioned algorithms under string algorithms
1)SBOM (Set Backward Oracle Matching)
2)Galil-Seiferas Algorithm
3)DAWG-Match Algorithm
Fixes #1681
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] Any dependent changes have been merged and published in downstream modules

@ajay-dhangar Kindly review and merge the PR .... Thanks :)

@ajay-dhangar Can you please fix the error with the repo . Can't sync and update ..... Throwing the same error

branch              stringalgorithms -> FETCH_HEAD
error: invalid path 'docs/Fenwick Tree /FenwickTree.md'
error: invalid path 'docs/algorithms/Searching Algorithms/A*-Search.md'
error: invalid path 'docs/algorithms/Searching Algorithms/AO*-Search.md'
Merge with strategy ort failed.

@ajay-dhangar Can you please fix the error with the repo . Can't sync and update ..... Throwing the same error

branch              stringalgorithms -> FETCH_HEAD
error: invalid path 'docs/Fenwick Tree /FenwickTree.md'
error: invalid path 'docs/algorithms/Searching Algorithms/A*-Search.md'
error: invalid path 'docs/algorithms/Searching Algorithms/AO*-Search.md'
Merge with strategy ort failed.

Reclone our repo with latest commit

@ajay-dhangar Nope, it still shows the same issue , now a new file's naming convention is also causing issues. Please remove spaces from them , or special characters from these files to follow the proper naming convention that GitHub can recognize properly.
error: invalid path 'docs/Fenwick Tree /FenwickTree.md'
error: invalid path 'docs/algorithms/Searching Algorithms/A*-Search.md'
error: invalid path 'docs/algorithms/Searching Algorithms/AO*-Search.md'
(Extra Space in Fenwick Tree Directory, and the remaining two file's naming convention - Remove * from them as it is not recognized )

@ajay-dhangar Just a heads-up, filenames like AO*-Search.md are technically invalid on Windows, which could cause issues for anyone not on macOS. However, special characters like *  would bypass naming conventions on Linux and macOS based systems .....It’s always good to avoid special characters(and also blank spaces) if we want the repo to work for everyone.

@ajay-dhangar Nope, it still shows the same issue , now a new file's naming convention is also causing issues. Please remove spaces from them , or special characters from these files to follow the proper naming convention that GitHub can recognize properly.
error: invalid path 'docs/Fenwick Tree /FenwickTree.md' error: invalid path 'docs/algorithms/Searching Algorithms/A*-Search.md' error: invalid path 'docs/algorithms/Searching Algorithms/AO*-Search.md'
(Extra Space in Fenwick Tree Directory, and the remaining two file's naming convention - Remove * from them as it is not recognized )

Sure I'll fix this issue So, wait for some time ⌚


FileNotFoundError: [Errno 2] No such file or directory: '/.../IST-Net-main/data/Real/test/scene_1/0000_label.pkl'

Thanks for your work! There is an error occurred when I run the test, it just can't find the xxxx_label.pkl files, and how can I get them?

Sorry could you please show me the structure of the folder "IST-Net-main/data"? I guess you didn't link the original data to the "IST-Net-main/data"

I follow the guidance of DPDN, maybe I made something wrong..

Are these folder placed in the path IST-Net-main/data? You can check manually to see if you have the file scene_1/0000_label.pkl in the folder as you have shown above. If the file exist, I think there is sth wrong with the relative path.

Hi, Liu, I think I solve this problem and can run the test.
The .pkl files are generated from the data_processing.py copied from DPDN, so I checked the code of data_processing.py and found the last line was commented:
# annotate_test_data(data_dir)
But the real test .pkl files should be generated from it, so I uncommented this line and rerun data_processing.py. Then, another error occur:
FileNotFoundError: [Errno 2] No such file or directory: '/.../IST-Net-main/data/results/nocs_results/real_test/results_test_scene_1_0000.pkl'
There is no such files in the original NOCS datasets but I found them in SPD. It provides predictions of NOCS from here. By downloading and putting them in the right path and rerun data processing, I get the files scene_x/xxxx_label.pkl needed.
I run the test successfully and get the same results as in your paper.

Nice! Since the problem is solved, I will close this issue!


chore(deps): log4j 2.16.0

The 2.15.0 version is still vulnerable.

Hi @augi,
Thank you for your contribution! We really value the time you've taken to put this together.
Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:
https://www.lightbend.com/contribute/cla

The 2.15.0 version is still vulnerable.

Are you sure? I dont see anything in https://logging.apache.org/log4j/2.x/changes-report.html#a2.16.0 that suggests that...

@augi Thanks for the contribution.

The 2.15.0 version is still vulnerable.

Could you clarify this statement please? https://lists.apache.org/thread/d6v4r6nosxysyq9rvnr779336yf0woz4 says that it's more hardened but it doesn't say that 2.15.0 is "vulnerable" in the same way the 2.x releases prior to 2.15.0 was.

Hello, quoting from this ticket:

Dealing with CVE-2021-44228 has shown the JNDI has significant security issues. While we have mitigated what we are aware of it would be safer for users to completely disable it by default, especially since the large majority are unlikely to be using it.

So they decided to remove default JDNI support by default as it has significant security issue.

Waiting the new release... finishing this endless log4j curse.

Has this been deployed? I have been using version 1.5.6 but still, it is fetching the 2.15.0 log4j version.

The update to 2.16.0 is released in 1.5.7.

The update to 2.16.0 is released in 1.5.7.

Okay and Thanks


Adding transcoding mappings to gRPC

Following the transcoding guideline, Open Match should support protocol transcoding such that client can access gRPC by using JSON/HTTP requests. This simplifies client side testing and provides flexibility to access service resources.

Resolved by #183.


Feature request: search/filter in select

Bug, feature request, or proposal:
Feature request
What is the expected behavior?
User able to search/filter the options in a select
What is the current behavior?
User must scroll the select to find the desired option
What is the use-case or motivation for changing an existing behavior?
When there is a long list of options, it's not easy to find an option
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest Angular Material as of 12 July 2017
Is there anything else we should know?
This is different from autocomplete, autocomplete is a free-text input field.
I haven't found anything in Material Design related to this, but this could be an important feature

@xuanshenbo, have you try a function to validate selection of the md-autocomplete? I know it's not exactly the user experience that you're looking for, but I think it's a nice workaround: https://plnkr.co/edit/HzJNtcNLdctAbfeHbWCs?p=preview

This is something we do plan on supporting eventually (similar to the md-select-header from AngularJS Material), but are still figuring out exactly how we want to implement it (the a11y is rather tricky).

This would be really useful, because currently md-select is veery poorly usable for long lists (e.g. country list) when compared to regular , because with the latter, you can hit the letter and jump to the items beginning with that letter. In md-select this is not an option and I'm unfortunately not willing to accept this as good UX in my applications :(

+1

Hey guys. Thanks for this great library of Material Components. Could you please add this feature in your roadmap? I believe it is important functionality, as most have already mentioned, and a must have in a long list. Also, it would be great if the filtering function could be defined by us (return true or false).

@nekkon, it looks like it'll be possible soon:  #7835

Indeed https://github.com/angular/material2/pull/7835 would be the way to implement search/filtering. @crisbeto is waiting for feedback before merging, so please give your feedback there if you have any.

I have implemented this capability as a wrapper around mat-autocomplete - and as a base class that can easily be reused to make visual variations. Repository and demo link below.
https://github.com/OasisDigital/angular-material-obs-autocomplete
https://oasisdigital.github.io/angular-material-obs-autocomplete/
I am very interested in ideas in how I could reshape this work, in to the form of a component or similar thing to offer as a PR. Maybe the pair-of-functions that my solution uses, could be reshaped to something more like a mat-grid's DataSource ?

https://github.com/angular/material2/pull/7835
@crisbeto, thank you

Here is an implementation using mat-select:
https://angular-material2-issue-av7yf2.stackblitz.io
Code: https://stackblitz.com/edit/angular-material2-issue-av7yf2?file=app%2Fmat-select-search%2Fmat-select-search.component.ts

@jelbourn @crisbeto might this be worth filing as a PR once https://github.com/angular/material2/issues/2812 / https://github.com/angular/material2/pull/7835 is ready?

@macjohnny this is great! However, it has a strange behavior when using the "multiple" attribute of the mat-select. When filtering and then selecting a value from the filtered list, it overrides and removes the previously selected values, which is not the desired behavior.
Other then that it's great!

@eyalhakim Thanks for your feedback. I added an example with [multiple]=true and adapted the implementation of the mat-select-search to fix the behavior you described in https://github.com/angular/material2/issues/5697#issuecomment-365005477, so now it should also work correctly with [multiple]=true

@macjohnny works perfectly! thank you.
I would also suggest using <mat-icon>close</mat-icon> for clearing the filter.
Would appreciate if you release this as an npm package.

@macjohnny Same here, I would be delighted to use your component if your release it as an NPM package while waiting for the official implementation by the Angular team.

@macjohnny I am planning on using your mat-select-search component but I dont know how to use it to pre-select a value, for example, I already entered a value previously and when I try to show this component, I want to show the value preselected. Any help would be much appreciated.

@eyalhakim thanks for your feedback. I adapted the code to use <mat-icon>close</mat-icon> for clearing the filter as you suggested.
@eyalhakim @kevin-anidjar I will try to publish it as an npm package this week.
Meanwhile, you can simply copy the code of the https://stackblitz.com/edit/mat-select-search?file=app%2Fmat-select-search%2Fmat-select-search.component.ts file together with its html / scss into your application.
@speddi due to the use of the async pipe in the example <mat-option *ngFor="let bank of filteredBanks | async">, the initial value needs to be set after the filteredBanks observable  emits and hence after the mat-option elements are present, because it is only possible to set a value of the `MatSelect that is available among the current options:
  ngOnInit() {
    // set initial selection
    this.bankCtrl.setValue(this.banks[1]);
    ...
  }

  ngAfterViewInit() {
    this.setInitialValue();
  }

  /**
   * Sets the initial value after the filteredBanks are loaded initially
   */
  private setInitialValue() {
    this.filteredBanks
      .pipe(take(1), takeUntil(this._onDestroy))
      .subscribe(() => {
        // setting the compareWith property to a comparison function
        // triggers initializing the selection according to the initial value of
        // the form control (i.e. _initializeSelection())
        // this needs to be done after the filteredBanks are loaded initially
        // and after the mat-option elements are available
        this.singleSelect.compareWith = (a: Bank, b: Bank) => a.id === b.id;
      });
  }

Thank you @macjohnny for your time.

@macjohnny - would be useful to see this released formally with some sort of license. Can't really use it until then which is a shame as it's a solid looking implementation.

@artparks @speddi @eyalhakim @kevin-anidjar
I finally managed to bundle the code and publish it as an npm package:
npm install ngx-mat-select-search

See https://github.com/bithost-gmbh/ngx-mat-select-search for docs and issues / improvements.
Contributions would be welcome, and I would be glad if at some point we could have an official implementation in the material library.

@macjohnny thank for awesome code... it's helped me.

@macjohnny  Such an awesome work!
I saw @eyalhakim comment that there was a problem with the filtering for multi select and it was fixed.
However there is one more case where it doesn't work - if initially I have all values selected for multi select and then I filter and after that deselect a value, then previously selected values are removed again.
An example is shown here: https://stackblitz.com/edit/github-g1zbuf?embed=1&file=src/app/app.component.html
How to reproduce: Open multi select, type 'France', deselect one option (for example Bank C (France)) - the result is that all other previously selected values are removed.
Could you please check that case?

@joqkey thanks for your feedback. could you please move your issue to https://github.com/bithost-gmbh/ngx-mat-select-search/issues ?

I think this is a must-have when you need to search for example a user from a big database list (mat-select is not an option, you cannot load all the data at the same time). Also, it could be great to select multiple results in an autocomplete field (if you need to select multiple users like chip's example from select2 plugin).

This feature will be added to angular material2 ? Or stay in ngx-mat-select-search ?

Here is how i handled it. I used mat-autocomplete instead of mat-select https://stackblitz.com/edit/angular-v1b716
I used two form controls. One for the autocomplete and one for multiple selection which I managed manually.

Is there an update?

Here is a simple implementation using mat-select:
https://stackblitz.com/edit/angular-material-mat-select-filter

@corinna000
What is the problem with previously mentioned implementation? Can you explain it?

@macjohnny thank you for this masterpiece, just what I was looking for.
I just found that the search fields has a bug when using special characters. If you type an special character, like 'é' it shows the 'noEntriesFoundLabel'. Is there a workaround?
I also found that when you delete in the search field with the "backspace" (keyCode === 8), and reach the last character the action history.back() of the browser is triggered. I solved it by adding this to the _handleKeydown method:
_handleKeydown(event: KeyboardEvent) {
    if (event.keyCode === 32) {
        // do not propagate spaces to MatSelect, as this would select the currently active option
        event.stopPropagation();
    }
    //Code that prevents the trigger of the history.back() browser action.
    if (event.keyCode === 8) {
        if (this._value.length <= 1) {
            event.preventDefault();
            this._reset();
            return false;
        }
    }
}

Again thank you and hope my solution helps improve the implementation

@teoCasasbuenas would you mind creating a new issue here: https://github.com/bithost-gmbh/ngx-mat-select-search/issues ? also, it would be great if you could create a PR for your fix.

(I'm going through the highest voted issues today an commenting on their status)
So, this is a big one. We very much know that this feature is super in demand. We hear it from a lot of people inside Google, too. There's been a PR floating around for it for ages. The main problem has been getting a functional a11y interaction pattern for the feature. The select currently uses the role="listbox" pattern, which just does not play nicely with any kind of non-option content.
As of ARIA 1.1, though, there's a new pattern available; using role="combobox" along with a role="dialog" element (via aria-owns) seems like a viable path forward for this feature. The current plan is include the foundation for this interaction pattern as we rework the select components as part of integrating MDC Web into our library (see my recent ng-conf talk).

Is there any update that when this feature will be available?

@akvaliya not at this time. It's not currently a feature that is supported by MDCSelect.
Due to the difficulty of supporting this as part of mat-select in an accessible way, it may be better to create a separate community component that is focused on meeting this specific use case in an accessible way.

@Splaktar my current plan actually is build this on top of the MDC-based select.

Is the plan to only provide text input based filtering?
We have a pretty common use case where we need a select with multiple filters. Where filtering happens on the server. For example: "select a single contact from address book", and then there's a text input filter, but also additional filters for gender (checkbox), and age (slider).
Though, if possible and aria compliant, I'd suggest to make the filtering customizable. i.e. let the user provide a custom filter component.

@macjohnny if we are not using the form-control then is there a way of capturing the event of input in the ngx-mat-select-search.
<mat-form-field>   <mat-select placeholder="Select XX Status">     <mat-option>       <ngx-mat-select-search [placeholderLabel]="'Search Status'" (change)="onChange($event)"></ngx-mat-select-search>     </mat-option>     <mat-option *ngFor="let item of XX" [value]="item.id">       {{ item.label }}     </mat-option>   </mat-select> </mat-form-field>

@kaushikdighe you can do something like
<ngx-mat-select-search ngModel (ngModelChange)=„handleValue($event)“>
See https://github.com/bithost-gmbh/ngx-mat-select-search/blob/master/README.md#template-driven-forms

Hi @jelbourn I hope you are working on this feature. what is the expected date to release this feature

@mubashshir-uneecops there is no ETA for this feature (or any feature). However, you can find the team's roadmap here.

@jelbourn mentions a revamp of select here: https://github.com/angular/components/pull/7835#issuecomment-501812866
Can anyone from the team confirm this is still the plan?

I've been able to kind of hack this together through an autocomplete, but the exact functionality here would be so much better and easier!

Still planned, still no ETA. This one has a particularly complex a11y story, so it's a relatively large undertaking.

Hi guys, any update on this topic? Thanks

I've been able to kind of hack this together through an autocomplete, but the exact functionality here would be so much better and easier!

Do you think you would mind sharing? I have been trying to do this, but to all of my attempts I have come up empty handed.
Thank you,
Zach

Any news?

I also created a directive library for that https://github.com/dqfort/mat-autocomplete-asyc

Pleeease make this work!

Would still really like this feature!

Very interested in this!

Would be great to have this feature please add it.

I've been able to kind of hack this together through an autocomplete, but the exact functionality here would be so much better and easier!

Do you think you would mind sharing? I have been trying to do this, but to all of my attempts I have come up empty handed.
Thank you,
Zach

Recently needed this functionality as well. Here's how to hack around it using an autocomplete:
https://stackblitz.com/edit/angular-mm8n12?file=src/app/autocomplete-filter-example.ts

I've been able to kind of hack this together through an autocomplete, but the exact functionality here would be so much better and easier!

Do you think you would mind sharing? I have been trying to do this, but to all of my attempts I have come up empty handed.
Thank you,
Zach

Recently needed this functionality as well. Here's how to hack around it using an autocomplete:
https://stackblitz.com/edit/angular-mm8n12?file=src/app/autocomplete-filter-example.ts

Kinda strange this feature is not yet implemented officially in the world of this great framework.

Agreed. This is a super helpful feature that I use a lot in an intranet application. I had originally gone with my own solution until I discovered that ngx-mat-select-search was the better approach.
https://www.npmjs.com/package/ngx-mat-select-search
https://github.com/bithost-gmbh/ngx-mat-select-search

I have a usecase where i will select all in dropdown and i need to display only 3 options and rest it should show "4 More.."
How can i implement this in ngx-mat-select-search npm??

I created a reusable SelectSearchDropdown component that utilizes Angular Material's select.
It can be set to Multi or Single.
Check out here (and modify to meet your needs!) -->
https://stackblitz.com/edit/angular-mat-select-multi-with-formcontrol-x2tbvo?file=app%2Fselect-search-dropdown.component.html

I have made a reusable component 'MatSelectSearch' to select/filter the mat-options. It's easy to use.
https://www.npmjs.com/package/mat-select-search
See it in action here:  https://stackblitz.com/github/shafi-sahal/MatSelectSearch

I have made a reusable component 'MatSelectSearch' to select/filter the mat-options. It's easy to use.
https://www.npmjs.com/package/mat-select-search
See it in action here: https://stackblitz.com/github/shafi-sahal/MatSelectSearch

Nice but what for, if we have ngx-mat-select-search? mat prefix is reserved for material components I suppose. Also, there is a bug in your solution - just scroll the list and look for the search input at the top.

Thanks for your feedback!!
It's easy to use compared to ngx-mat-select-search. The searching logic is handled and optimized by the library, unlike ngx where you have to handle the logic. And yeah, even though the name is mat-select-search, the component is being called using .
And the scrolling is not meant to be a bug. It's useful sometimes, especially for mobile devices. If the input never scrolls up and if a user prefers scrolling, it's just a waste of space I think. Anyway, the input never loses focus and if you just hit a key the input reappears and searches.
Anyway, what I am thinking is to make an Input to specify whether you want the input to be scrolled or not.
Feel free to tell me about any suggestions, problems, or feedback.

I have made a reusable component 'MatSelectSearch' to select/filter the mat-options. It's easy to use.
https://www.npmjs.com/package/mat-select-search
See it in action here: https://stackblitz.com/github/shafi-sahal/MatSelectSearch

Nice but what for, if we have ngx-mat-select-search? mat prefix is reserved for material components I suppose. Also, there is a bug in your solution - just scroll the list and look for the search input at the top.

Thanks for your feedback!!
It's easy to use compared to ngx-mat-select-search. The searching logic is handled and optimized by the library, unlike ngx where you have to handle the logic.
It also supports multi-property search. For example, if there is a use case such that the user should be able to filter a list of countries using either the country code, dial code, or country name, just pass the keys of that properties to [searchProperties] as an array and it gives the result.
And yeah, even though the name is MatSelectSearch, the component is being called using
And the scrolling is not meant to be a bug. It's useful sometimes, especially for mobile devices. If the input never scrolls up and if a user prefers scrolling, it's just a waste of space I think. Anyway, the input never loses focus and if you just hit a key the input reappears and searches.
Anyway, what I am thinking is to make an Input to the component to specify whether you want the input to be scrolled or not.
Feel free to tell me about any suggestions, problems, or feedback.

I have made a reusable component 'MatSelectSearch' to select/filter the mat-options. It's easy to use.
https://www.npmjs.com/package/mat-select-search
See it in action here: https://stackblitz.com/github/shafi-sahal/MatSelectSearch

Nice but what for, if we have ngx-mat-select-search? mat prefix is reserved for material components I suppose. Also, there is a bug in your solution - just scroll the list and look for the search input at the top.

Thanks for your feedback!!
It's easy to use compared to ngx-mat-select-search. The searching logic is handled and optimized by the library, unlike ngx where you have to handle the logic.
It also supports multi-property search. For example, if there is a use case such that the user should be able to filter a list of countries using either the country code, dial code, or country name, just pass the keys of that properties to [searchProperties] as an array and it gives the result.
And yeah, even though the name is MatSelectSearch, the component is being called using <lib-mat-select-search>
And the scrolling is not meant to be a bug. It's useful sometimes, especially for mobile devices. If the input never scrolls up and if a user prefers scrolling, it's just a waste of space I think. Anyway, the input never loses focus and if you just hit a key the input reappears and searches.
Anyway, what I am thinking is to make an Input to the component to specify whether you want the input to be scrolled or not.
Feel free to tell me about any suggestions, problems, or feedback.

Thanks for this, it comes in handy when you have many dropdowns in a form ( individual handling of each dropdown becomes a lot of boilerplate). However, if you could include multiple selection that would bring it to perfection.

Thank you so much for the feedback!!!
Surely, the select all and the issue with alignment when using multiple will be solved in the next version.

I have made a reusable component 'MatSelectSearch' to select/filter the mat-options. It's easy to use.
https://www.npmjs.com/package/mat-select-search
See it in action here: https://stackblitz.com/github/shafi-sahal/MatSelectSearch

Nice but what for, if we have ngx-mat-select-search? mat prefix is reserved for material components I suppose. Also, there is a bug in your solution - just scroll the list and look for the search input at the top.

Thanks for your feedback!!
It's easy to use compared to ngx-mat-select-search. The searching logic is handled and optimized by the library, unlike ngx where you have to handle the logic.
It also supports multi-property search. For example, if there is a use case such that the user should be able to filter a list of countries using either the country code, dial code, or country name, just pass the keys of that properties to [searchProperties] as an array and it gives the result.
And yeah, even though the name is MatSelectSearch, the component is being called using <lib-mat-select-search>
And the scrolling is not meant to be a bug. It's useful sometimes, especially for mobile devices. If the input never scrolls up and if a user prefers scrolling, it's just a waste of space I think. Anyway, the input never loses focus and if you just hit a key the input reappears and searches.
Anyway, what I am thinking is to make an Input to the component to specify whether you want the input to be scrolled or not.
Feel free to tell me about any suggestions, problems, or feedback.

Thanks for this, it comes in handy when you have many dropdowns in a form ( individual handling of each dropdown becomes a lot of boilerplate). However, if you could include "select All" in the multiple selection that would bring it to perfection. Also , when using multiple, the checkbox and the labels do not align

A new version of MatSelectSearch is published with the requirements you have suggested.
The alignment problem happened only for that particular example. Anyway, it's also corrected.
MatSelectSearch 1.0.2  link: https://www.npmjs.com/package/mat-select-search

Is there any 3rd party lib that uses mat-select internally, but functions as a blackbox?
By blackbox, I mean, that you can just specify it in the template, without the need to maintain the filteredItems subject manually in the ts file. Or having to do anything else in the ts file.
I know I can wrap ngx-mat-select-search or mat-select-search (or just mat-autocomplete) in my own component, and have an input binding with the list of all possible items, but that is not what I'm after. I want it to work with content projection, not input bindings, so it has the option to put whatever it needs in mat-option (additional divs, icons etc.)
Something like this:
<my-mat-select>
    <mat-option [value]="1">Option 1 <span>some suffix</span></mat-option>
    <mat-option [value]="2">Option 2 <mat-icon>home</mat-icon></mat-option>
    ...
</my-mat-select>

And that would be it. Similar to a normal mat-select. Without anything else needed in the ts file.
I guess, internally it would need to:

get the original content projection with @ContentChildren without rendering it
parse the content children (preserving the html) and store them to some internal list
then use that list as a list of all possible options, and have an internal filteredItems subject which slices from that list

My point is, I don't want to repeatedly do the filteredItems subject manually, every time I want to use the component. And I don't want it wrapped in a way that it would use an input binding for the list of all possible options (or having to specify that list in the parent component). It should just work with content projection.
My actual use case is much more complex. I'm writing a wrapped lib that can dynamically switch out different UI libs (Angular Material, Ionic, ngPrime... whatever), with a combination of dynamic components and template outlets. So I need a clean "meta" interface, that doesn't rely on having lists and subjects in the ts files backing up the template. There are alternatives, of course, like doing the steps above myself. But if there is something already out there, it would save me a lot of time,
Also, it would need to support multiple selection and option groups.
I'm not asking for much, am I :)

@zolakt I would like to consider that but I don't know about the concepts you mentioned in detail to implement them. Could you help with it?

@

@shafi-sahal I've implemented my approach, but my use case is complex. I don't have time right now to streamline it out into something simpler. I'll try to do it and post it when I have some time.
But in general, it's the approach I mentioned above: First I get the content children without printing them to html (without ng-content in the template). Then from those content children I create a list of objects that are used in the *ngFor of the template.
It's a little messy since I can't get the text of the mat-option cleanly. Instead I need to parse it from nativeElement. But it works.

❤

..... 7 years...... just saying

..... 6 years...... just saying

Since no one has lifted a finger regarding this for a few years now, it will be at least 6 more...
They have removed the "under consideration" tag. That is the max effort they are willing to put in. As far as they are concerned they are safe for the next 5 years. Common pattern on way too many issue reports...

Any update on this since 2018? This is such a fundamental feature I'm very surprised Angular has not taken care of this as it is an otherwise great framework.

Any movement or plans to move this forward?

Same, will be using ngx-mat-select-search for the time being.

7 years... for a basic function. It's not hard to see why angular is so bad these days

not related to angular I guess. there's tons of libraries you can use in your project. Angular and Angular Material is not the same, right?


Why does this API elide tables/subtables not supported by the UA?

The draft says:

Table types within the original font file that are not supported by the user agent should be elided from the font representation's table list as defined by this specification. Tables with subtables not supported by the user agent should be transcoded to elide those subtables.

This seems odd to me. Surely one reasonable use case for an API like this would be to allow a page or webapp to implement things that the user agent does not natively support. For example, if the font contains bitmap glyphs (or perhaps embedded SVG glyphs) in a format that the UA doesn't support, the app might wish to parse those tables itself to extract and render the glyph images itself. Or if the UA doesn't support a particular shaping technology (e.g. SIL Graphite), the app might want to embed its own WASM-compiled engine, but to do this it will need access to the Graphite tables in the font, which this proposal says would be elided as "unsupported".
So I think this aspect should be reconsidered.

We did reconsider this statement. In fact, we're reconsidering getTable() in favor of blob(), which will return font data, even if not supported by the UA.


Uncaught TypeError: Cannot read properties of null (reading 'define')

When i use your module in setup script vue 3.2.1

Should be fixed now. Updated vue to >3.2.0