pod install on the example project doesn't work

$ pod --version
1.1.0.beta.1

$ pod install

[!] Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target `DisplaySwitcher_Example`..

 #  from /Users/aaron/Downloads/DisplaySwitcher-master/Example/Podfile:4
 #  -------------------------------------------
 #
 >  target 'DisplaySwitcher_Example', :exclusive => true do
 #    pod 'DisplaySwitcher', :path => '../'
 #  -------------------------------------------

Hi @aaronbrethorst! Thanks for reporting the issue
It was developed with cocoa pods 0.39. Now I've updated for 1.0.1, so everything should work fine

@aaronbrethorst has it solved your issue?

Yep works great!

@aaronbrethorst could you add the component to cocoacontrols, please?

hmm, weird. thought i had.

Now I see it. Thanks a lot, @aaronbrethorst!

thank you! 👍


Remove react libs from dependencies

I think having it only in peerDependencies makes more sense. There may be a clash otherwise.

I will remove it in next release.


Built-in type casting works differently in darwin/amd64 and darwin/arm64 of go1.17.1.

I have 2 mac, the one uses intel(darwin/amd64) the other one uses M1(darwin/arm64).
I found my test case work differently in other CPU.
Built-in type casting of each version handles overflow differently.

there is no different except for arch(amd64, arm64) in 'go env', 'go version'.

See previously #19405 #29468
The result is implementation defined


Possible vulnerability based on owasp-a3

VSCode Version: current master
OS Version: any

HTML5 adds the ability to send messages to documents served from other domains. According to the specification:

Authors should not use the wildcard keyword ( *) in the targetOrigin argument in messages that contain any confidential information, as otherwise there is no way to guarantee that the message is only delivered to the recipient to which it was intended.

This is found in the webview-pre.js file
on both lines 382 and 421

Do you have a proof of concept that shows this to be an actual security issue?

This issue was bring to light from a static analysis of the project's code. It may, or may not, affect the actual security of the project, as the information sent are not sensitive. As stated by the w3, see also: https://gist.github.com/jedp/3005816

Ok, I'm closing this. If someone can come up with a good alternative to this current approach let me know


Disable SSL generation when running custom config?

Running a custom config file (by mounting /opt/ejabberd/conf/ejabberd.yml), we define SSL certificates/locations in there for our various domains. But the startup scripts still attempt to generate ssl certificates/dh params/etc, which fails on read-only secret mounts.
Could we skip SSL snakeoil generation/symlinking/everything if $CONFIGFILE already exists, since the user is presumably taking control of their config in that situation?

I think the better way to do this is to check whether /opt/ejabberd/ssl is mounted as a volume, suggesting that the user wants to use his own cert.

I think the better way to do this is to check whether /opt/ejabberd/ssl is mounted as a volume, suggesting that the user wants to use his own cert

So if the directory is non-empty and the environment variables aren't set?

That's what I would argue, but it's just my opinion.

Generation of SSL certificates should be skipped if they exists as in
https://github.com/rroemhild/docker-ejabberd/blob/master/scripts/pre/02_make_snakeoil_certificates.sh#L82
and
https://github.com/rroemhild/docker-ejabberd/blob/master/scripts/pre/02_make_snakeoil_certificates.sh#L88
for SSL certificates and
https://github.com/rroemhild/docker-ejabberd/blob/master/scripts/pre/03_make_dhparam.sh#L18
for DH.

@rroemhild that only works if you have a pile of vhost certificates named correctly? In our case we have 1-2 certificates with SANs/wildcard certificates and a lot of vhosts.

My idea is to skip this with environment variables. Does #118 address your issue?

Does #118 address your issue?
LGTM 👍

Great. #118 is merged into master. Thx!


Performance optimization: expedite requestSynchronization

According to the profiling flame charts, kotlin KClass.toString() using reflection is a top culprit who spent more than 25ms doing KClass.toString() during the round-trip of requestSynchronization.
This patch can save us 20ms or so.

There should be also a follow-up task which scans out all KClass.toString() invocations in Arcs codebase and change them like what is done at this PR.

There should be also a follow-up task which scans out all KClass.toString() invocations in Arcs codebase and change them like what is done at this PR.

Please make sure to file items to track the follow-up tasks (the one you note, and cleaning up duplicate string vals, etc.) if you haven't already!

Will do.


Add SetRuntimeEnvironment unit tests

What does this Pull Request accomplish?

Add unit tests for SetRuntimeEnvironment behavior.
Add a SharedLibraryInterface class and MockSharedLibrary

Needed to support the unit tests
Was not able to figure out a way to include the swap method, but it doesn't seem to be used anywhere

Impelmentation Notes:

Tests were implemented with NI-SWITCH, instead of NI-FAKE due to functions missing from nifake.h that were present in the metadata.

I looked into adding these to nifake.h, but after iterating on the PR several times (having to add more and more: attributes, enums, etc, I decided it wasn't worth the effort).

Updated Library Classes

They now take in a shared_ptr instead of creating their own SharedLibrary object, to support the unit tests
Another constructor was added to automatically create the shared_pointer object to preserve existing behavior
Added an attribute and method to track, determine whether SetRuntimeEnvironment has been called (for testing purposes)

Why should this Pull Request be merged?
There are no plans to add system-level testing for SetRuntimeEnvironment in grpc-device, so this is the only testing we'll have to make sure it doesn't get broken.
What testing has been done?
Ran unit tests locally

Linux CI failures:

/home/runner/work/grpc-device/grpc-device/./generated/niswitch/niswitch_library.h:20:3: error: extra qualification ‘niswitch_grpc::NiSwitchLibrary::’ on member ‘NiSwitchLibrary’ [-fpermissive]
/home/runner/work/grpc-device/grpc-device/third_party/gtest/googlemock/include/gmock/gmock-actions.h:682:40: error: invalid conversion from ‘void (*)()’ to ‘const void*’ [-fpermissive]

Removed the unnecessary qualifer and added const_cast<const void*>(reinterpret_cast<void*>())

@reckenro @bkeryan Are the systems tests waiting for approval from an owner before running?

@reckenro @bkeryan Are the systems tests waiting for approval from an owner before running?

No, this is an intermittent issue with the self-hosted GitHub runner. I'll send you more info offline.


[Question] Is it possible to add a supplementary view to individual items in a ListBindingSectionController?

New issue checklist

[x] I have reviewed the README and documentation
[x] I have searched existing issues and this is not a duplicate
[ ] I have attempted to reproduce the issue and include an example project.

General information

IGListKit version: '3.4.0'
iOS version(s): 12.1
CocoaPods/Carthage version: 1.7.2
Xcode version: 10.3
Devices/Simulators affected: N/A
Reproducible in the demo project? (Yes/No): N/A
Related issues: N/A

Hi, I'm currently working on a project where I have a ListBindingSectionController to show a list of available accounts. On some of these accounts I wish for there to be a notification badge in the corner of the view's. Looking through the docs, I have found that supplementary views can be applied to section controllers but I've struggled to find any topic about supplementary views being applied to individual elements of a ListBindingSectionController. Is this possible with IGListKit's out of the box API and if so, can you point me in the right direction?
Love the framework!
Thanks :)

Hi, I think you should use your list items as objects for ListAdapter in this case. also supply SectionController for every single item.
Simple:
@interface SingleItemSectionController<YourItem> : IGListBindingSectionController <IGListSupplementaryViewSource,IGListBindingSectionControllerDataSource>

@end

@implementation SingleItemSectionController

- (instancetype)init{
    self = [super init];
    if (self) {
        self.dataSource = self;
        self.supplementaryViewSource = self;
    }
    return self;
}

// MARK: IGListSupplementaryViewSource

- (CGSize)sizeForSupplementaryViewOfKind:(nonnull NSString *)elementKind atIndex:(NSInteger)index {
    return CGSizeMake(1.f, 1.f);
}

- (nonnull NSArray<NSString *> *)supportedElementKinds {
    return @[UICollectionElementKindSectionHeader,UICollectionElementKindSectionFooter];
}

- (nonnull __kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(nonnull NSString *)elementKind atIndex:(NSInteger)index {
    return [self.collectionContext dequeueReusableSupplementaryViewOfKind:elementKind forSectionController:self class:UICollectionReusableView.class atIndex:index];
}

Wish this can help


2.3.1~2.6.1 variant on Modrinth: upload policy issues

Within the scope of these versions, I noticed that you put different loader variants and even 1.16.5 and 1.17.1 in the same version release. This caused some launchers with the update mod feature to make incorrect choices when performing update operations.
I know you have adopted a different policy in subsequent version releases, but the situation with these specific versions has caused some unnecessary confusion: some launcher developers often receive false positives related to this (called false positives because this has nothing to do with the design logic of the launcher).
Could you please make some adjustments to Modrinth's upload? Regards.

fixed it, thanks!


Various Issues with different versions of the Xamarin iOS plugin including the latest Beta version

Expected Behavior
Accessing the plugin should show the Browse button to pick files from iCloud. Should work on both iPhones and iPads, particularly with the latest version/s.
Actual Behavior
With Beta version 2.0.81 I get a System.IO.DirectoryNotFoundException - Could not find a part of the path... The path of the file retrieved from iCloud looks like the below:
"file:///private/var/mobile/Containers/Data/Application/E4D562B3-0D10-4DEB-BAA2-742A69E034D9/tmp/com.atech.s2x.qm-Inbox/Mary.pdf"
where com.atech.s2x.qm refers to the bundle identifier of the app.
With Beta version 2.0.64, it works on iPhone, but nothing happens on iPad. The Browse button does not appear.
With the latest stable version it gives me this error:

{System.NotImplementedException: This functionality is not implemented in the portable version of this assembly.  You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.

Steps to Reproduce the Problem
Beta Version 2.0.81 - The app lets you choose the file and afterwards it crashes with the System.IO.DirectoryNotFoundException.
Beta Version 2.0.64, works properly on iPhone. With iPad nothing happens, browse button does not come up.
With Latest Stable version, when plugin is accessed, the System.NotImplementedException is immediately returned.
Specifications

NuGet package version: 2.0.81, 2.0.64, 1.2.1
Platform(s): Xamarin Forms (iOS case only)

I'm getting the same issue. When it tries to get the file with the GetStream method, it uses a path like this:
/private/var/containers/Bundle/Application/8C167674-B7ED-452E-8647-D239C012F721/ToolApp.iOS.app/file:/private/var/mobile/Containers/Data/Application/3C24AC4F-82CB-4812-96EF-2607486590C7/tmp/com.xinobistudio.toolapp-Inbox/reporte.pdf

I think the path that is being used is wrong. I will try a workaround and let you know.

I'm using a weird workaround but at least on iOS is working good:
Knowing the path of the file, I check if the file really exists with the Path class. Before checking this, We need to remove the "file://" characters that are on the FilePath property. After that, you can read the bytes of the file and do whatever you want. Maybe this can help you continue working and I will try to check what is wrong on the iOS side of the plugin.
var file = await CrossFilePicker.Current.PickFile();
if (file == null) return;
var extension = Path.GetExtension(file.FilePath);
var path = file.FilePath.Replace("file://", "");
var exists = File.Exists(path);
if(!exists) return;
var fileData = File.ReadAllBytes(path);

@codercampos thanks a lot for taking the time to comment. I've been stuck for a few days so it's great to actually try something new. Removing the file:// string for the path, does not solve the issue for me. The File.Exists line returns false. I initially thought the issue might be related to the fact that the path is automatically appending the bundle id of the app before the file name. But now that you told me it is working for you; I am confused. Are you selecting an item from the iCloud Drive? What extension is the file? Are you using a real device or simulator? And is it an iPhone or an iPad?

@codercampos  I am looking at your path:

/private/var/containers/Bundle/Application/8C167674-B7ED-452E-8647-D239C012F721/ToolApp.iOS.app/file:/private/var/mobile/Containers/Data/Application/3C24AC4F-82CB-4812-96EF-2607486590C7/tmp/com.xinobistudio.toolapp-Inbox/reporte.pdf

It is quite different than what I am getting from file.FilePath. My path looks like the second part of your path:

"file:///private/var/mobile/Containers/Data/Application/8F914E65-E6A2-44E1-808F-DB8C015BCD78/tmp/com.avantech.scan2x.qm-Inbox/TiffWPSample.tiff"

This may explain why your fix is working for you but not for me, but I don't know why it happens and how to fix it. The first GUID in your path: 8C167674-B7ED-452E-8647-D239C012F721, is different than the second: 3C24AC4F-82CB-4812-96EF-2607486590C7, so I can't see how I could possibly create the preceding bit dynamically as a work around.

Sorry, Just to get everything clear: the exception  throws me this path:
"/private/var/containers/Bundle/Application/8C167674-B7ED-452E-8647-D239C012F721/ToolApp.iOS.app/file:/private/var/mobile/Containers/Data/Application/3C24AC4F-82CB-4812-96EF-2607486590C7/tmp/com.xinobistudio.toolapp-Inbox/reporte.pdf"
But when I get the path from the FilePath it returns:
file:/private/var/mobile/Containers/Data/Application/3C24AC4F-82CB-4812-96EF-2607486590C7/tmp/com.xinobistudio.toolapp-Inbox/reporte.pdf
Based on this I came up with the removing "file://" thing.
But you came up with something I didn't think of. I will add your fix into my solution too to be aware of the "%20" characters. I hope also I can fix this and provide a solution from the plugin side. Thanks you!

I tried accessing file using above mentioned way but it returns false when I check for file.exists.
When I checked for the directory upto the point where file name starts, the directory does exist.
So for example.
System.IO.Directory.Exists("/private/var/mobile/Containers/Data/Application/XYZ-KEY/tmp/com.myapp.app-Inbox")
Returns true.
However, When I do File.Exists("/private/var/mobile/Containers/Data/Application/XYZ-KEY/tmp/com.myapp.app-Inbox/myebook.pdf")
Returns false
Any idea why?

I think the problem here is that somewhere, two full paths are concatenated; the part after the "file:" text looks like a complete path. I will check today with the iOS sample project.

One thing I've discovered is related to a solution suggested here: https://stackoverflow.com/a/48007752/641995
Specifically, when using UIDocumentPickerMode.Import which this project does, files left in the tmp/com.bundleid-Inbox/ folder can be aggressively deleted by iOS if you wait too long to access them.

Pick a file from iCloud, file gets copied to tmp/com.bundleid-Inbox/file_name.ext
Wait 30 seconds
Check tmp/com.bundleid-Inbox/ directory contents
File is now gone

The suggested workaround was to immediately move the imported file one level up to tmp or to the app's sandbox. I ended up doing something like this:
var fileData = await CrossFilePicker.Current.PickFile(new string[] { "com.adobe.pdf" });

if (null == fileData)
{
    return null;
}

fileData.FilePath = fileData.FilePath.Replace("file://", "").Replace("%20", " ");

var tmpDir = Path.GetTempPath();
var tmpFile = Path.Combine(tmpDir, fileData.FileName);
if (File.Exists(tmpFile))
{
    File.Delete(tmpFile);
}
File.Move(fileData.FilePath, tmpFile);

return new FileData(tmpFile, fileData.FileName, () =>
{
    return new FileStream(tmpFile, FileMode.Open, FileAccess.Read);
});

FYI this will overwrite any files that already exist in the tmp directory that have the same name.

@ryanoberleitner Good info about the temp file being removed. What happens when you directly get a file stream after PickFile(), e.g. with fileData.GetStream(), wait for some seconds and then try to access the stream? My guess would be that the file is gone (check with File.Exists()), but the stream can be read from.
Generally, the fix for FilePath containing %20 characters and the file:// prefix is fixed in NuGet package 2.0.106-beta. Please try it out. Thanks!

Just to note, it seem it's the same crash as in #74.

Well, then maybe the solution is to document the fact that iOS will remove the input file soon, so it's mandatory to save it to local storage. I think the CrossFilePicker.Current.SaveFile() method is used for that.

I now documented the behavior of iOS in the README so that other users don't fall into the same trap.


Inserted, updated and removed events

I think it would be useful for the datastore to expose data change events. This is an implementation with events that get emitted whenever documents are inserted, updated or removed:
db.on('inserted', function(docs){
//docs is an array of documents that have just been inserted
});
db.on('updated', function(docs){
//docs is an array of documents that have just been updated
});
db.on('removed', function(docs){
//docs is an array of documents that have just been removed
});

For consistency docs is always an array, even when only a single document has been inserted/updated/removed.

+1, that would be nice for my Node Webkit app

:+1: This is actually rather important functionality for me as of now, though I can temporarily workaround it by overriding Datastore prototype methods.  :confused:

FWIW, here's a Gist of a derivative class I use ("EventedDatastore.js") in order to add eventing:  https://gist.github.com/JamesMGreene/0e0b2506c7bd2a2557f7

+1 for this feature.

Took me a long time to answer, sorry. I actually think this is not a good idea to implement this event emitter at database level. Most if not all usecases will be very application specific and there is no good common way to expose an API around this, even though the pubsub pattern is of course very often useful.

For those who need this kind of functionality, I created an NeDB adapter for FeathersJS.  You can find it here: feathers-nedb.  The current implementation works on the server, but since we've just made Feathers isomorphic, we'll be making a browser version.
Thanks @louischatriot for sharing your great code.

Is worth mentioning in the official DOC the possibility to add eventing using @JamesMGreene gist? It's an important functionality.

P.S. I've updated my gist accordingly since the Datastore class in<EMAIL_ADDRESS>now inherits from the EventEmitter class.

FWIW, I've also implemented these in my active fork of NeDB: NestDB


Voluapp 1455 vol2obj v13

Purpose of this PR

New feature - vol2obj support for v1.3 volograms in a single file, with Basis Universal textures.
New feature - check disk space before writing images.
Also checked fwrite calls for failure when writing .objs to catch disk space fails there.
Bonus features: drag&drop support for single-file volograms.

Changes made in this PR

Fixed a portability bug in vol_geom.c on windows - and PRd to vol_libs.
Included files for basis universal.
Included vol_geom wrapper from vol_libs.
Updated Makefile.
Updated build_msvc.bat
Added drag&drop support for single-file volograms as well as folder of older vologram files.

Testing Summary
Provide more detail here as required.

[x] Explained how reviewers build, deploy, and test your code and what should they look for that would indicate a bug or regression.
[x] Tested locally. Windows and Ubuntu. Need help testing on macOS!
[x] Stated supported platforms have you not tested on, that you need help with?
[x] Named specific tools have you ran over the code: e.g. which { gcc Ubuntu, minGW, cl (msvc) compilers, GDB debugged with all warnings. No sanitiser or linter pass done. }.
[x] Explained inputs used to test for bugs. e.g. existing known working data, large files, empty files, etc.
Tested on 2x v1.3 volograms, and 1x v1.2 vologram on Windows and Linux.

Risk Introduced and any Breaking Changes
Provide more detail here as required.

[ ] This PR introduces breaking changes (API or ABI). Instructions are provided for existing users to update their projects.
[x] This PR introduces new dependencies. You have provided links and licences in this section. This is extremely important!. I updated the ReadMe with licence info copied from vol_libs.
[x] New dependencies: Explained how any new dependencies are linked and built againt - .dll, inline code etc.? Makefile and build .bat handle this.
[ ] Gaps in testing: Is any code not covered by tests?
[ ] Gaps in testing: Are you unable to test on some platform? Or is some input data not available to you for testing?
[x] Analysed any other potential risks here. I think the cutter tool is out of date and will require an update for v1.3 files and any changes to libraries. Not part of this ticket.

Pre-Merge Checklist

If you have a problem with the review process (e.g. it's taking too long, or the reviewers forgot) get in touch with the Team Lead of the project!

[x] Before making your PR, refresh your branch with a merge from its parent in case of conflicting changes since you started your branch.
[x] This PR description is written clearly so that reviewers can understand the why/what/how of the work done.
[x] Reviewed your own PR and checked your changed code.
[x] Invited a range of good reviewers.
[ ] Wait for a PR to be properly reviewed. Responded to all questions, and made any required changes.
[ ] Received one other reviewer's approval. Ideally wait for 2+ approvals, especially if you didn't get a thorough reivew on the first approval.
[ ] If a reviewer asks a question, even if you have another approval, got the approval of the other reviewers as well before merging.
[ ] Made sure existing reviewers approved any changes to the PR.
[ ] Resolved any merge conflicts after making the PR.
[ ] CI/CD builds are not reporting any errors.

i believe i fixed a bug there if you wouldn't mind reviewing again please

Tested on Mac:
make works perfectly
Works perfect with single file vologram
Doesn't work with multi-file volograms with basis texture (multi-file always expects video output) (not sure if this is edge case though since we we not be exporting basis volograms as multiple files now)
Final suggestion: all the usage examples in readme say vol2obj.exe but Mac and Linux use vol2obj.bin

Tested on Mac: make works perfectly Works perfect with single file vologram Doesn't work with multi-file volograms with basis texture (multi-file always expects video output) (not sure if this is edge case though since we we not be exporting basis volograms as multiple files now) Final suggestion: all the usage examples in readme say vol2obj.exe but Mac and Linux use vol2obj.bin

thanks!
oh hmm i didn't think multi-file basis texture things existed! i guess there is no harm in supporting those too...
i think i can just put a note on the readme.

Tested on Mac: make works perfectly Works perfect with single file vologram Doesn't work with multi-file volograms with basis texture (multi-file always expects video output) (not sure if this is edge case though since we we not be exporting basis volograms as multiple files now) Final suggestion: all the usage examples in readme say vol2obj.exe but Mac and Linux use vol2obj.bin

let's put it in the Issues list as an interesting edge case to support. i had a look through the code and it's going to be pretty hairy to implement:

We would lose the "missing --video parameter" check which is quite handy.
Drag-and-drop directory support searches for various video filenames. It's hard to know what to prefer by default in terms of 1024, 2048 and integrated textures in this case.
We would have to do a more comprehensive check for all 3 and add some is_a_file_and_a_video(x) type function, then we could stop and tell the user if none are available.


CreateTearsheet with intro and multiple flows shows the wrong information in the influencer panel

What package(s) are you using?

[x] Carbon for IBM Products (or Carbon for IBM Cloud & Cognitive)
[ ] Legacy/CDAI
[ ] Legacy/Security

Detailed description

Describe in detail the issue you're having.
Using this component https://carbon-for-ibm-products.netlify.app/?path=/story/ibm-products-patterns-create-flows-createtearsheet--with-intro-step we found out that having patterns with different amount of steps can cause an issue.

Is this issue related to a specific component?
Yes

What did you expect to happen? What happened instead? What would you like to
see changed?
In a CreateTearsheet with intro when user defines flows with different number of steps going back and forth the flows cause steps duplication in the influencer and the flow itself;
I.e. Having two flows with the following steps:

Flow 1: Steps A,B,C,D
Flow 2: Steps A,B,C
Expected result: Selecting the first flow then (without closing the tearsheet) going back to the intro and then selecting the second flow, the influencer should list 3 steps (A,B,C)
Current result: The influencer list 4 steps (A,B,C,C)

What browser are you working in?
Chrome

What version of the @carbon/ibm-products (or @carbon/ibm-cloud-cognitive)
package are you using?
"@carbon/ibm-products": "^1.52.0"

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?
IBM Cloud

Steps to reproduce the issue

Open https://codesandbox.io/s/angry-jepsen-d2e81h?file=/src/Example/Example.js in Chrome
Click on Open CreateTearsheet
Click on Flow 1 and then Next
Influencer should show steps A, B, C
Click on Back
Click on Flow 2 and then Next
Influencer should show steps A1, B2, C3, D4
Click on Back
Click on Flow 1 and then Next
Influencer should show steps  A, B, C but instead shows A, B, C, D4

Please create a reduced test case in CodeSandbox
https://codesandbox.io/s/github/carbon-design-system/ibm-cloud-cognitive/tree/main/examples/cloud-cognitive/codesandbox
Codesandbox:
https://codesandbox.io/s/angry-jepsen-d2e81h?file=/src/Example/Example.js

Additional information

Screenshots or code
Notes

Hey @kimbaz, sorry for the delay our team has been focused on our v2 release. I can take a look at this!

@kimbaz We’re wrapped up in a few others tasks at the moment. If you’re able to contribute a fix, that would be the fastest in this case. 🙏

@baraaabdelsalam Would you be interested in looking into this one?

Any updates please?

@IdanAdar @kimbaz
hello. i can confirm that i am able to replicate this behavior. for starters i'd like i'd like to state that I believe that when using this pattern it's intended to have the flow or steps established before rending the tearsheet and not after. because of that i don't think that the current implementation of create tearsheet supports dynamically updated steps like in the example. i personally think you may want to rethink your implementation given this limitation.
that being said i will still continue to investigate if this is behavior we can support.

so if you look at this CreateTearsheet example you'll see how a dynamic flow can be set using the includeStep attribute. The storybook code can be found here and should be what you're looking for.

Based on the investigation from @davidmenendez and @paul-balchin-ibm, it looks like you should be able to address this following the examples provided.
If there’s further discussion on the current behavior of the tearsheets, we are happy to continue in discussions since we have been considering a future rewrite to make some functionality easier to use.


VFS-805 - HTTP seek always exhausts response

Link to VFS-805 on Jira
This PR affects the http4 and http5 URI schemes. The http3 scheme is unaffected because it does not use the MonitoredHttpResponseContentInputStream abstraction.
With this PR, closing a MonitoredHttpResponseContentInputStream no longer closes the underlying stream which may download all remaining data. The HttpResponse itself is still closed of course.
The http5.MonitoredHttpResponseContentInputStream variant in addition required replacing the http entity with a dummy one during close in order to prevent downloading all remaining data: In contrast to hc4, closing the http response with hc5 now also closes the entity. Interestingly, replacing the entity is possible and does not close an existing one. Not sure about how stable this behavior is, but I couldn't find any reasonable alternative. For example, CloseableHttpResponse has a package private constructor, so it's not possible to create a custom http response interceptor that creates an instance of a custom subclass of CloseableHttpResponse that doesn't close the entity.
Also, I am not sure about how to best provide a test case:

While I see that the unit tests spawn an http server, I am not sure how much effort it would be in order for that server to track statistics about how much content was retrieved.
HttpClient 3/4/5 all return that ContentLengthInputStream if the HTTP header includes a Content-Length entry - this part is pretty much hard coded in all version of hc. So there doesn't seem to be a simple way to inject a custom InputStream implementation that tracks how much data is being read.

Locally, I tested this change with the benchmark described in the Jira issue and let it perform 100k iterations of seeking over a 2gb file in order to potentially reveal connection leaks. For me its working.
Test cases run in the course of mvn -Drat.skip=true clean install were also green.

It seems the best way to test this is with mocking.

@Aklakan
In git master now, with adjustments.
TY for you PR.


Exception with manageattachments;sa=attachpaths

Exception: The parent constructor was not called: the object is in an invalid state
index.php?action=admin;area=manageattachments;sa=attachpaths
File: /sources/subs/ManageAttachments.subs.php

Since there is no line it's not that easy, but in ManageAttachments.subs.php, the only class instantiation is at line 1283 a GlobIterator.
If this is the case, then it's this php bug https://bugs.php.net/bug.php?id=55701

It appears to be just that ... our current code is this and it generates the error (at least on the site)
	// Count the files with a glob, easier and less time consuming
	$glob = new GlobIterator($dir . '/*.elk', FilesystemIterator::SKIP_DOTS);
	$num_files = $glob->count();

I did a simple change to this and now it runs fine
	// Count the files with a glob, easier and less time consuming
	$glob = new GlobIterator($dir . '/*.elk', FilesystemIterator::SKIP_DOTS);
	try
	{
		$num_files = $glob->count();
	}
	catch (\LogicException $e)
	{
		$num_files = 0;
	}

Well almost ... looks like it errors not just on empty directories, but simply using ->count() so for those buggy versions of PHP the catch needs to instead be $num_files = count(iterator_to_array($glob));
I've added the following to the site and it seems to be working
	// Count the files with a glob, easier and less time consuming
	$glob = new GlobIterator($dir . '/*.elk', FilesystemIterator::SKIP_DOTS);
	try
	{
		$num_files = $glob->count();
	}
	catch (\LogicException $e)
	{
		$num_files = count(iterator_to_array($glob));
	}


Draft: update template

add more guidance for PRs and coordiner tags

thanks. do you want to see how to test this in a fork? (when it's ready)?

Hi @mslarae13, thanks for getting this started. When you change the PR to a non-Draft, I'd like to review the wording (I think there are currently some typos, but that may all be stuff you're already planning to change anyway). Anyway, I'm in favor of including the GitHub @ usernames in the PR template, in general, which you've done here. I think that'll save people time when creating PRs.

Hi @mslarae13, I left some suggestions. Are you OK with me committing directly to this branch (in which case, I'll resolve the suggestions)?

I'm comfortable with this being merged in as is.


Support for Yarn workspaces?

Which operating system and version is the project developed on?
macOS High Sierra, 10.13.4
Which version of ruby is the project developed on?
2.3.1
Which version of npm is the project developed on?
Yarn 1.6.0
Which version of ember-cli is the project developed on?
3.1.3
What is the rails version?
<IP_ADDRESS>
What is the ember-cli-rails version (from Gemfile)?
0.10.0
What is the ember-cli-rails-addon version (from package.json)?
0.10.0
Is your application server multi-threaded
(such as puma and unicorn) or is it multi-process (such as thin and webrick)?
Multi-threaded (puma).
What are the contents of config/initializers/ember.rb?
EmberCli.configure do |c|
  c.app :frontend, path: "frontend/packages/application"
end

I'm using Yarn workspaces, and so I have the Rails project, a frontend directory inside it, and then the Ember app I want to mount lives at frontend/packages/application. However, I've been getting a DependencyError:
No `ember-cli` executable found for `frontend`.

Install it:

    $ cd /Users/jackieluo/Code/merchant-front-end/frontend/packages/application
    $ npm install

Due the nature of Yarn workspaces, the node_modules live in frontend, not the application directory, but I think the application should still have access to the Ember CLI executable:

Does the project support Yarn workspaces in general? If not, is that on the roadmap at all?
Thanks!

Not sure if anyone cares 4 years later but here's what we did in our fork of ember-cli-rails to get workspaces working:
diff --git a/lib/ember_cli/path_set.rb b/lib/ember_cli/path_set.rb
index 9a30e2c..c246a51 100644
--- a/lib/ember_cli/path_set.rb
+++ b/lib/ember_cli/path_set.rb
@@ -1,3 +1,4 @@
+require "json"
 require "ember_cli/helpers"

 module EmberCli
@@ -41,7 +42,7 @@ module EmberCli

     def ember
       @ember ||= begin
-        root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
+        ember_path.tap do |path|
           unless path.executable?
             fail DependencyError.new <<-MSG.strip_heredoc
               No `ember-cli` executable found for `#{app_name}`.
@@ -148,6 +149,31 @@ module EmberCli
       app_options[:yarn] || app_options[:yarn_path]
     end

+    def workspace?
+      manifest_path = rails_root.join("package.json")
+      return false unless File.file?(manifest_path)
+
+      workspaces = JSON.parse(File.read(manifest_path)).fetch("workspaces", [])
+
+      workspaces.any? { |workspace| File.fnmatch(workspace, relative_path) }
+    end
+
+    def relative_path
+      @relative_path ||= begin
+        path = app_options.fetch(:path) { default_root }
+        pathname = Pathname.new(path)
+        pathname.relative_path_from(rails_root)
+      end
+    end
+
+    def ember_path
+      if workspace?
+        root.join("node_modules", ".bin", "ember")
+      else
+        root.join("node_modules", "ember-cli", "bin", "ember")
+      end
+    end
+
     def app_name
       app.name
     end

This works because doing a yarn install at the top-level with a package.json that has workspaces drops an ember bin stub in each dir under node_modules/.bin/ember.
I am not confident in making a PR because I'm not totally 100% knowledgeable about this gem and not sure where setup from our app starts and the gem finish. It's also only been tested with yarn (latest), node 14, rails 5, and ruby 2.5. So YMMV.


any/publish_pipeline

Need to create a CD pipeline for publishing.

Completed on commit https://github.com/jadham2/MakeMyDegree/commit/9ab6878d08bb24031aef008834b20bc0be7847bb
Example workflow https://github.com/jadham2/MakeMyDegree/actions/runs/2192167708


I7 example list

correction story_list_title

Nice, as soon as you opened the PR, I got an email notification.
You can also add me as a reviewer. In the top right there is a Reviewers section. Press the gear icon to choose me.


🐁 ADD - hook to configure the location of CRW Devfile 🐁

@oybed  / @jfilipcz  / @jtudelag  - I just threw this together quickly if it's any use for yous to test out and if it helps with the variable stuff for GLS
FYI @eformat / @ckavili

LGTM

@springdo thx for your support - this is what's needed!


Fix: Change buttons color

Fixes #491
Changes: Change color of buttons from blue to white
Screenshots for the change:

@chashmeetsingh , @jogendra  , please review the PR.

Not sure about this. It was based on the theme blue and white. IMO it doesn't look good.

@chashmeetsingh actually the issue is the buttons titles is not readable (they looks faded)

Oh, ok. @baquer please resolve the conflicts.

Oh, ok. @baquer please resolve the conflicts.
@chashmeetsingh , done


feat: add breakpoints to width utility class

Updated w- utility class to incorporate breakpoints. For example w-sm-100, w-md-auto.
Format
w-{breakpoint}-{size}
Breakpoints
xs: @media(min-width: 0)
sm: @media(min-width: 576px)
md: @media(min-width: 768px)
lg: @media(min-width: 992px)
xl: @media(min-width: 1200px)
Sizes
25: 25%
50: 50%
75: 75%
100: 100%
auto: auto

Coverage remained the same at 90.594% when pulling 2d4d1aea3c9ee4b46d6079e0293d4b176dbec113 on ciduarte/w-bp into ee2bc18a1079aeb07325d7da05a4fe400661730f on master.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Handling of 'resources' folder

I have added an integrationTest source to an IDEA project with the 'idea' plugin applied (java and groovy too)
testSets {
    integrationTest
}

IDEA marks the src/integrationTest/groovy (and resources) as directories containing sources and resources in the source tree view. The filesystem layout is as follows
├── integrationTest
│   ├── groovy
│   │   └── at
│   │       └── martinahrer
│   │           └── service
│   │               └── integrationtest
│   │                   └── HomeIntegrationSpecification.groovy
│   └── resources
│       ├── application.properties
│       └── application.yml
└── main
    ├── java
    │   └── at
    │       └── martinahrer
    │           └── service
    │               └── ServiceApplication.java
    └── resources
        └── bootstrap.ml

When running the integration test from IDEA it looks like src/integrationTest/resources is not included in the execution class path. The file application.properties should be loaded (the application is based on Spring Boot) but is not and fails. Running the same setup from command line (gradle integrationTest) the test is going green.
Renaming the integrationTest to test (as supported by the Gradle groovy source set) the application works. The same applies when just moving application.properties into src/main/resources.
So the question is if there is any special setup required for the resources folder or is this an IDEA issue. I know that IDEA is not able to isolate various source sets from each other. But I guess this is not the root cause here?

I'm observing the same issue and it's driving me crazy. But, as you noticed yourself, when run on the command line with Gradle, all is fine and it works. I think this is an IDEA issue and you should open on issue in their tracker.  I will be happy to cast my vote in case you do, just add a link.

There actually is a ticket already, and a fix was bound to come with IDEA 15, but now it's rescheduled to 16..., more here: https://youtrack.jetbrains.com/issue/IDEA-138076
There exists a workaround which works for me, found here: https://youtrack.jetbrains.com/issue/IDEA-128966#comment=27-884771
As we are using the test-sets plugin, all we need is this:
sourceSets {
if(System.properties.'idea.active') {
main {
resources.srcDir file('src/integrationTest/resources')
}
}
}

It seems that starting with some 2016 version IDEA is not calling the Gradle "idea" plugin at all anymore, effectively stopping any Gradle plugin from modifying the IDEA project or module files.
However, IDEA support should work fine with the "separate module per source set" option.


save button alerts user to save changes.

Save button background color gradually changes as more changes are done by user.This warns user to save changes.

Hmm that's a good start!  It's not quite what I had in mind..
Could you instead set an inline style like:
button
   .style('background', getBackground(numChanges));

That will make the button change very slightly with every edit, and avoid the need to use the css transitions.  (It's not very good for it to transition slowly from the disabled style at 0 edits to enabled style at 1 edit.)
Some other things:

Set opacity: 0.5 on the count, so it doesn't look like button once it gets background style.
Try to style the little triangle too.. it's sneaky

I had some problems with actually updating the background colors across the range of colors @bhousel specified,tried getting a percentage of numChanges over our range of colors ,using hexadecimal codes ,but colors went out of range.I have done using rgb and I think it is what you want. Any other modification or suggestion you wish to make , I am waiting to have them. As for the tiny triangle ,could not think much of a style to it.I increased the opacity to make it more visible.

Hey @tanerochris thanks for this!  I made some changes and merged it today.
Your getBackground() function was pretty good, but I realized that d3 already includes a color interpolator that we can use, so I swapped that in for simplicity.   I should have checked this before when I gave my initial feedback...
 function getBackground(numChanges) {
        var step;
        if (numChanges === 0) {
            return null;
        } else if (numChanges <= 50) {
            step = numChanges / 50;
            return d3.interpolateRgb('#fff', '#ff8')(step);  // white -> yellow
        } else {
            step = Math.min((numChanges - 50) / 50, 1.0);
            return d3.interpolateRgb('#ff8', '#f88')(step);  // yellow -> red
        }
    }

Some other things to keep in mind.

try to match the code style we use (e.g. 4 space indent, no trailing spaces, etc).
try to avoid global or class variables where local variables will do..

Thanks again!


Minor improvement to docs

Objective

Providing a "noob-friendly" example since not many people are proficient in 3D modeling / rendering concepts.

Solution

Adding more information to the example, with an explanation.

_Thanks to Nocta on discord for helping out when I didn't understand the subject well._

Code to test your mesh (because it's very easy to mess up vertex order, UVs, ... the best way to be sure is to test):
use bevy::{
    prelude::*, render::{mesh::Indices, render_resource::PrimitiveTopology},
};

fn main () {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_startup_system(setup)
        .run();
}

fn setup(
    mut commands: Commands,
    assets: ResMut<AssetServer>,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    commands.spawn(Camera3dBundle {
        transform: Transform::from_xyz(0., 0., 5.).looking_at(Vec3::ZERO, Vec3::Y),
        ..default()
    });

    let mesh = meshes.add(create_triangle());
    let texture_image = assets.load("icon.png");
    let material = materials.add(StandardMaterial {
        base_color_texture: Some(texture_image),
        ..default()
    });
    commands.spawn(PbrBundle {
        mesh,
        material,
        ..default()
    });
}

// Copy your create_triangle function here

made some improvements and tested the example. I am worried I made it too long, feel free to trim it down as you wish

(as intended)

made some improvements and tested the example. I am worried I made it too long, feel free to trim it down as you wish

I find it much better! I was thinking of stretching the sprite but that works too! Good job!
Put other reviews for potential improvements, but apart from the uppercase characters the rest looks good to me and is better than the current doc anyway.
I still think a visual and annotated image of what the mesh looks like would be helpful, but again not sure where to put the image (I think it is possible to add an image in rustdoc).
You can mark conversations where you fixed what was pointed out as "resolved".

@adamkobzan can you change the PR title to something more descriptive? These end up being used as commit messages in the final view (and for assembling patch notes), so it helps us out :)

Apart from minor formatting fixes, it looks good to me :+1:

Sorry, when I tested with cargo doc that didnt show up


https://archlinux.org/feeds/news doesn't work

there is something wrong with https://archlinux.org/feeds/news
curl https://archlinux.org/feeds/news returns nothing
curl -L https://archlinux.org/feeds/news gets correct .rss feed
this doesn't show any entries
(setq elfeed-feeds (quote (
                           ("https://archlinux.org/feeds/news" linux)
                           )))

I thought that elfeed out of the box follows redirects?

The canonical URL has a slash at the end, and the server redirects you
there from the non-slash URL, which is why you need -L (--location). You
should use the canonical URL if you add it to Elfeed because it would be
slightly more efficient, but it's not required so long as they maintain
the redirect.
Either way it works for me any way I test it, so perhaps it's a local
configuration problem. Clone the repository and "make virtual" to get a
clean configuration with a temporary database, add this feed, and then
gradually introduce your real configuration until it stops working.

@skeeto thank you, I haven't thought about that. You are right that curl curl https://archlinux.org/feeds/news/ works fine when / is added at end.
Sadly, I've used curl https://archlinux.org/feeds/news/ (with slash at the end) since the beginning (as that's how it's been published on archlinux website) and only changed it now when troubleshooting this issue.
I can't remember sadly commands to restart doom emacs with minimal configuration. This is my entire elfeed-related configuration:
(setq elfeed-feeds (quote (
                           ("https://lwn.net/headlines/rss" linux)
                           ("https://archlinux.org/feeds/news/" archlinux)
                           ("https://rss.slashdot.org/Slashdot/slashdotMain" linux)
                           )))
(setq elfeed-goodies/entry-pane-size 0.7)
(use-package! elfeed-system-notifier
  :defer t
  :commands elfeed-notifier-mode)
(elfeed-notifier-mode)

(defun elfeed-desktop-notifications (entry)
  "Parse and display new feeds as desktop notifications."
  (alert (elfeed-deref (elfeed-entry-content entry))
         :title (concat
                 (elfeed-feed-title (elfeed-deref (elfeed-entry-feed entry))) "\n"
                 (elfeed-deref (elfeed-entry-title entry))
                 )
         ;; :severity 'high
         ))

(add-hook! 'elfeed-new-entry-hook #'elfeed-desktop-notifications)

Sorry for reviving an old thread, but would anyone have any idea how this could be solved? Unfortunately I'm using doom emacs which makes minimizing configuration prohibitively complicated. Are there no other methods to check any parsing errors within elfeed? I'm sure that it receives response from archilinux based on this elfeed-log:
[2024-10-01 20:31:46] [info]: Elfeed update: October  1 2024 20:31:46 BST


No native support for slice Deletes

If I have the following class definition
@Table(table="MyTable")
public class MyTable {
    @PartitionKey
    private String pKey;

    @ClusteringColumn
    private String cColumn1;

    @ClusteringColumn(2)
    private String cColumn2
}

Now if I want to delete an entire partition / cusltering column out of the database I would write this query.
delete from MyTable where pKey = 'MyKey' and cColumn1 = 'MyCol';

Trying to represent this query in Achilles dsl doesn't work.
MyTable_Manager.dsl().delete().allColumns_FromBaseTable().where().pKey().Eq("MyKey").cColumn1().Eq("MyCol") -- No execute at this point

The dsl delete requires me to send in all keys rather than just the partitionkey or partition key and some (not all) of the clustering columns.
Am I missing something?   Is there a reason this isn't supported?   Looking at the select side it allows a slice query using just the partition key or partitionKey and some clustering columns.
MyTable_Manager.dsl().select().allColumns_FromBaseTable().where().pKey().Eq("MyKey").cColumn1().Eq("MyCol").getList();

Did you try to execute your delete from MyTable where pKey = 'MyKey' and cColumn1 = 'MyCol'; directly in cqlsh ? If it does not work in cqlsh it means it is a Cassandra restriction and not Achilles restriction

I have created a github project that demonstrates the issue.
https://github.com/kevinmic/achilles-bug
In MyTableDao.deleteByPartitionId_usingAchilles and MyTableDao.deleteByPartitionId_usingDatastax I show what I CAN do with using datastax directly, but Achilles does not support.
    public void deleteByPartitionId_usingAchilles(String pKey) {
//      Does Not Compile, I am force to pass the entire key before I can execute
//      myTable_manager.dsl().delete().allColumns_FromBaseTable().where().myKey().Eq(pKey).execute();

//      This does compile, but forces me to specify the entire key, not just the partitionKey
        myTable_manager.dsl().delete().allColumns_FromBaseTable().where().myKey().Eq(pKey).myCCol1().Eq("COL").myCCol2().Eq("COL2").execute();

    }

    public void deleteByPartitionId_usingDatastax(String pKey) {
//      This works just fine in my test
        myTable_manager.getNativeSession().execute(
                QueryBuilder.delete().from(MyTable.TABLE_NAME).where(QueryBuilder.eq("myKey", pKey))
        );
    }

You're slice, Achilles should allow slice DELETE


try to read latest iavl versions on bootup

right now we are implicitlly assuming that the database is new when we start the app, it should attempt to find the latest versions if they exit before making this assumption

Hit this after converting from old abci hooks to kepler module - started getting
panic: block.AppHash does not match AppHash after replay. Got 100FC429C51FB4C10F70528EA6DACBDDEA0B90FAB5278D314C84AA3C0EF45A8C, expected .

when trying to resume the app. The shown hash matches the logs from the initial run.
I'm not tracking any state besides the transactions themselves, so I was expecting the app to replay everything when resumed, but now I get that error.
https://github.com/tendermint/tendermint/issues/425 suggests I should return 0 as last known block height in the info hook, but that hook is not exposed for kepler modules?
The default implementation errors with *** Exception: ParsingException "key \"data\" not present"

If you are using kepler, are you also using the Auth module? If so are you using the provided transaction structure with nonce, etc? Because if so, then there is already application state being collected by Kepler corresponding to the accounts of the transaction senders. Specifically, it might be storing accounts and updated nonces, which creates application state.
Is there a link you can provide me to your app  or is it closed source?


[Proposal] Allow user to set false on queue creation to prevent

duplicate queues being made if you are not using the syntax ironworker:///WorkerName
We are using the url based entry for this in the HUD to add the &cluster=foo that did not work above. So this helps us to bypass that issue.

Thanks!


Refactor actions and reducers.

Coverage increased (+0.5%) to 57.636% when pulling 295a3ac50499bd701f7a9a8d2e286c676b62be4d on refactor-action-reducers into 9ef486c4886dd62ba0792a2ccb76e7f763905400 on master.


Add umbraco to the list of awesome!

Open source .NET CMS

@leekelleher Is it still maintained? It hasn't had a real update since early August.

@sindresorhus Yes, the list is still maintained :+1:

Alright, added.
@leekelleher Would be nice if you could remove this Inspired by all of the awesome-awesomeness collections. from your readme. That other awesome list isn't maintained anymore: https://github.com/bayandin/awesome-awesomeness/issues/194

@sindresorhus Cool, no worries - I'll update the link.
@tcmorris Thanks for making the PR :+1:

Awesome :+1:
Thanks for sorting that out.


Password is stored in plaintext

The VMWare vRO password in its configuration unencrypted in jobs' config.xml files on the Jenkins master.
This key could be viewed by users with Extended Read permission, or access to the master file system.
Can you please update this plugin to use the Jenkins Credentials Plugin or develop some internal encryption?

I am not actively working on this project. Please go ahead and make the change.


Migrate to ConfigurableInstanceFactory API

It's time to rewrite the DI subsystem one more time! To simplify the provenance of this long-time effort, all related changes here have been squashed back together. This addresses numerous items:

Rename Injector to InstanceFactory with a subinterface ConfigurableInstanceFactory and embrace some lessons from Spring
Teach Condition/Conditional API to support multiple conditions
Fix ConditionalOnProperty
Add ConditionalOnMissingBinding
Rename ReflectionAccessor to ReflectionAgent
Add several more specific exception classes
Add org.apache.logging.log4j.plugins.di.spi package for SPI-related classes in DI
Replace named Function<String, String> instance with StringValueResolver interface
Replace InjectorCallback concept with ConfigurableInstanceFactoryPostProcessor service class vaguely comparable to Spring's BeanFactoryPostProcessor family of classes
Add FactoryResolver strategy interface for abstracting resolution of "special" factories to simplify integration with configurable plugin annotation handling
Add InstancePostProcessor interface similar to Spring's BeanPostProcessor API for processing instances created through DI
Add and update API docs for plugin and DI things
Remove unused Configuration::getPluginPackages method and backing field
Add built-in bindings for PropertyEnvironment and ClassLoader
Split up DefaultBundle
Add @ConfigurationFactoryType JUnit 5 extension for defining a ConfigurationFactory class to use in a test
Add LoggerContextSource::selector option for specifying a ContextSelector class to use in a test

[A clear and concise description of what the pull request is for along with a reference to the associated issue IDs, if they exist.]
Checklist

Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
./mvnw verify succeeds (if it fails due to code formatting issues reported by Spotless, simply run ./mvnw spotless:apply and retry)
Non-trivial changes contain an entry file in the src/changelog/.2.x.x directory
Tests for the changes are provided
Commits are signed (optional, but highly recommended)

Not exactly sure why the Windows build keeps failing, but seems unrelated.

The tests in log4j-api-test are apparently still running in parallel in the same JVM. #1800 solves the your last Windows failure.


Isolate event serialization in system::Events for easier decoding

Now it's really hard to decode system::Events outside the runtime (e.g. in Subxt, or third party Substrate client like GSRPC).
A very common problem is, the client may miss some type definitions, and some type definitions are out-of-date, and due to the compactness of scale codec, a failure to decode a single event item will make all the remaining events unable to be decoded. As a result, there's a very high chance to cause event decoding failure.
Ideally we'd like to decode all the event types. However it's not very realistic. We must have all the type definition and keep them up-to-date. People usually only care about the events from their own pallets, but the problem is usually triggered by the ones introduced by the FRAME system, especially given their number is large, and the update is very frequent. (Sometimes even dynamic decoder like Polkadot.js fails, no wonder the static typed clients like sub-xt & GSRPC)
Mitigation: Isolate the events
To mitigate, we can change the data structure of Events to allow skipping the events with unknown types.
Now this is impossible, because the serialized events are concatenated as a vector. When decoding a Vec, the size of an element cannot be predetermined until it's decoded since it relies on the type definition of the full event type (E) is complete and accurate:
https://github.com/paritytech/substrate/blob/1d5abf01abafdb6c15bcd0172f5de09fd87c5fbf/frame/system/src/lib.rs#L616
https://github.com/paritytech/substrate/blob/1d5abf01abafdb6c15bcd0172f5de09fd87c5fbf/frame/system/src/lib.rs#L777-L784
A simple fix could be to replace the raw type E by the encoded data of E as Vec<u8>. In this way, each Vec element can be decoded without having the full type definition. And it's up to the user to decide if they will further decode the inner event or not.
Another option is to encode the event data length at the beginning of EventRecord. With a customized deserializer, we can still skip unknown event data. Compare with the above fix, this can save one Vec decoding call and reduce the CPU usage a little bit, but it also introduces customized serialization, and will introduce more burden to the client developers.
Compatibility
The both ways will break the compatibility with the existing ecosystem, especially the blockchain explorers and indexers. However we argue that this is still worth doing. To my knowledge, locating the type related problems and updating the type definition are the most time consuming job to maintain a client library. Our team has spend at least 2-3 days per month to fix problems in subxt & gsrpc.
But if the mitigation is implemented, people can easily filter the events they don't care. This allows developer to only focus on their own events.
Related work: Metadata with scale-codec types
#8615 will introduce embedded type definition to the runtime metadata. Ideally it will provide sufficient information to decode all the event data.
It's the best solution for dynamically-typed sdk like Polkadot.js. However, we think it may not be perfect for statically-typed languages like Rust & Go. For the latter ones, developers have to define or generate the types before compilation, and when the chain is upgraded, they will also need to include the changed types in the code, and carefully pick the correct version when decoding. It is especially problematic for the FRAME types.
Alternative mitigation
Another way to mitigate is to create our own event store. Just like System::Events, we can easily create a new StorageValue of a event Vec. We append events during the block execution, and clear it at on_initialize at every new block. This is already adopted by us for our message queue:
https://github.com/Phala-Network/phala-blockchain/blob/2ccca2717609363836b7145cf7fc67cb633b9e66/pallets/phala/src/mq.rs#L39-L44
However, this is not well supported by the ecosystem projects like GSRPC and SubQuery. So it introduces more efforts to develop customized ad-hoc solutions. It also doesn't solve the problem if one still wants to subscribe the extrinsic dispatch result, which is located at system events.

cc @thiolliere
We were already thinking about making a pretty large change to events in Substrate to help with PoV size, and isolate them from other parts of the runtime.
Specifically, creating the following keys:

:CURRENT_EVENT_LEN
:CURRENT_EVENT_LEVEL
:EVENTS_<LEVEL>

And then placing up to MAX_EVENT_LEN data into each level.
With this change, we could also introduce some of the encoding changes to the events as you suggested.

#8615 will introduce embedded type definition to the runtime metadata. Ideally it will provide sufficient information to decode all the event data.

It's the best solution for dynamically-typed sdk like Polkadot.js. However, we think it may not be perfect for statically-typed languages like Rust & Go. For the latter ones, developers have to define or generate the types before compilation.

Actually you should be able to use the metadata to dynamically "skip" over non statically defined events/types. This is what subxt does, although not very well at the moment because of the missing type definitions. In fact that was one of the original motivations for doing this work.
I've already done some work on this and I will resume it once I'm back from holiday at the end of the month (and #8615 is merged)

More issues about events:

It is not light client friendly. i.e. it can be expensive to proof something happened on a parachain to another parachain
It is hard to judge between too many events vs not enough events e.g. https://github.com/paritytech/substrate/pull/9425
Event parameters are unnamed and we are currently relying on non-standard syntax in docs comment to document it.

I am not sure what's the solution here but we do need a major refactor.

cc @thiolliere
We were already thinking about making a pretty large change to events in Substrate to help with PoV size, and isolate them from other parts of the runtime.
Specifically, creating the following keys:
* `:CURRENT_EVENT_LEN`

* `:CURRENT_EVENT_LEVEL`

* `:EVENTS_<LEVEL>`

And then placing up to MAX_EVENT_LEN data into each level.
With this change, we could also introduce some of the encoding changes to the events as you suggested.

In what way should that help the PoV size? And in what way are the events to the PoV size at all? I mean, the only problem is the deletion of the events from the old block, but that stuff is a "bug" in the trie.

Event parameters are unnamed and we are currently relying on non-standard syntax in docs comment to document it.

if I don't missundertand this should be fixed, we can now use named fields for events like:
#[pallet::event]
pub enum Event {
    Foo { bar: u32 },
}

The named Event params will definitely work now with #8615.

cc @thiolliere
We were already thinking about making a pretty large change to events in Substrate to help with PoV size, and isolate them from other parts of the runtime.
Specifically, creating the following keys:
* `:CURRENT_EVENT_LEN`

* `:CURRENT_EVENT_LEVEL`

* `:EVENTS_<LEVEL>`

And then placing up to MAX_EVENT_LEN data into each level.
With this change, we could also introduce some of the encoding changes to the events as you suggested.

In what way should that help the PoV size? And in what way are the events to the PoV size at all? I mean, the only problem is the deletion of the events from the old block, but that stuff is a "bug" in the trie.

I open a issue with the related ideas https://github.com/paritytech/substrate/issues/9482

I think modifying Event codec implementation so that it is decodable as Vec<u8> makes complete sense, we do that for many types already. It can be done in construct_runtime when generating the runtime event.

It is hard to judge between too many events vs not enough events

Yes it would be great to have some rocksdb benchmark to know what is our constraint here.

It is not light client friendly. i.e. it can be expensive to proof something happened on a parachain to another parachain.
We have event topics but no one is using it. I bet most of pallet developers does not know such feature exists.

maybe we should create more function and types around topic to make it usable ? or is there some other direction we should take to improve this ?

is #8615 an ok solution all in all ?
Or otherwise it shouldn't be difficult to implement EventRecord codec so it is decodable as a Vec<u8>.
Or implement Event codec so it is decodable as a Vec<u8>.
What would be the more handy for external tools ? EventRecord or Event or doesn't matter.

Off the top of my head I would say the Event itself, since that is the part that is "dynamic".
As long as the topic type T of EventRecord can be statically defined in external tools.

It seems scale-info metadata should solve this issue, we could also make event decodable as a Vec<u8> which is implemented in this PR https://github.com/paritytech/substrate/pull/9738 but it is an important breaking change. Considering scale-info metadata should already solve this issue, it seems the breaking change is not worth it.
So I'll close the PR, if more people ask for it maybe we can reconsider the PR.

I was pointed at this issue (and #9738) after wondering why we are doing a bunch of event decoding (and indeed have issues owing to our decoding not actually 100% working yet) in subxt. I can see that it would cause breakage and that would need to be managed and timed appropriately, but I think it has merit.
Decoding events is tricky and not guaranteed to be successful. Adding the byte length before the event data would make events more consistent with extrinsics (which fortunately do have this prefix iirc), reduce the chance of errors (we don't have to try and decode all events in places like subxt when users only care about handling a few specific ones), and perhaps most importantly reduce the fallout from an error happening (if it's easy to split events, any decode errors can be contained to one event and not screw up decoding of all future events).
I hope that the issue receives consideration in the future, prior to a 1.0 release.

@jsdw @ascjones can you not use scale-info to skip unwanted events?

@bkchr what did you have in mind?
As far as I am aware, given a block of SCALE encoded events, the only way that we can "skip" over an event is to use the type information contained within the metadata to attempt to decode the event. Since different events (even of the same type) can consume different numbers of bytes, attmepting to decode it byte by byte is the only way to know how many bytes the event will ultimately take up, and where the next event will begin.

@jsdw @ascjones can you not use scale-info to skip unwanted events?

Yes we can, that is what we already do. Though as @jsdw says it recursing the type definitions and consuming the bytes as we go.
Adding the len prefix would just mean we could delete all that code, and just skip over the len bytes instead.
So as discussed previously: not an absolute requirement, it would just mean a lot less code required by any clients who want to peek into the EventRecord stream of events.

But wouldn't the code for skipping just be something like using  decode_use_scale_info and throwing the result away?

We might as well refactor the while event system... The current one doesn't work for light clients. No one is using the event topic. If we need to make a breaking change, should really make sure it is light client friendly (and XCM friendly).


This is actually a solution to being able to login on Headless ssh windows

54
39
25
in settings.json of vscode add
"remote.extensionKind": {
"gencay.vscode-chatgpt": [
"ui"
]
}
this will set it to run locally instead over SSH or WSL
credit - https://stackoverflow.com/questions/58236172/visual-studio-code-how-to-run-extension-locally-on-my-laptop-when-connected-to
Im not sure how to add this to the settings of the extension so im leaving it here for someone smarter - tag me in the solution please!
if this documentation can get added to the readme im sure it would help a lot of people - i saw many similar issues in the issue log

54 39 25
in settings.json of vscode add
"remote.extensionKind": {
"gencay.vscode-chatgpt": [ "ui" ] }
this will set it to run locally instead over SSH or WSL
credit - https://stackoverflow.com/questions/58236172/visual-studio-code-how-to-run-extension-locally-on-my-laptop-when-connected-to
Im not sure how to add this to the settings of the extension so im leaving it here for someone smarter - tag me in the solution please!
if this documentation can get added to the readme im sure it would help a lot of people - i saw many similar issues in the issue log

This is working fine.

@Checkm3out Thanks for figuring this out and sending a PR for documentation, I merged it.

A small clarification for this, you only need to set it up in the user settings

NOT needed in the remote settings.


Name struct to avoid clang error/warning (issue #374)

This is just a partial commit for issue #374. On my environment clang makes error and no warning.
So the following errors/warnings remains:
soci4/include/soci/bind-values.h:91:39: error: C++98 requires an accessible copy constructor for class 'soci::details::use_type_vector::use_sequence<boost::fusion::vector<double, boost::optional<MyInt>, std::basic_string<char>, boost::fusion::void_,       boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, void>' when binding a reference to a temporary; was private [-Werror,-Wbind-to-temporary-copy]
and
soci4/include/soci/type-conversion.h:91:68: error: field 'ownInd_' is uninitialized when used here [-Werror,-Wuninitialized]         : use_type<base_type>(details::base_value_holder<T>::val_, ownInd_, name)

Thanks!


Xray package, mostly a copy of v2ray, but with better UDP support

Description of changes
Added xray as a package and a service
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release 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
[x] (Module addition) Added a release notes entry if adding a new NixOS module
[x] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1148

Please follow the contributing guide when naming your commits.


[BUG] Ray/grpc: failed to connect to all addresses

[x] I have checked that this bug exists on the latest stable version of AutoGluon
[ ] and/or I have checked that this bug exists on the latest mainline of AutoGluon via source installation

Describe the bug
We're running autogluon in kind pods. For some datasets, we get an error from ray.
Full stacktrace:
Preset alias specified: 'high_quality_fast_inference_only_refit' maps to 'high_quality'.
 Presets specified: ['high_quality_fast_inference_only_refit', 'optimize_for_deployment']
 Beginning AutoGluon training ... Time limit = 180s
 AutoGluon will save models to "/tmp/tmpb3di_03x/"
 AutoGluon Version:  0.4.0
 Python Version:     3.9.9
 Operating System:   Linux
 Train Data Rows:    67968
 Train Data Columns: 8
 Label Column: class
 Preprocessing data ...
 Selected class <--> label mapping:  class 1 = 1, class 0 = 0
 Train Data Class Count: 2
 Using Feature Generators to preprocess the data ...
 Fitting AutoMLPipelineFeatureGenerator...
     Available Memory:                    9338.36 MB
     Train Data (Original)  Memory Usage: 4.35 MB (0.0% of available memory)
     Inferring data type of each feature based on column values. Set feature_metadata_in to manually specify special dtypes of the features.
     Stage 1 Generators:
         Fitting AsTypeFeatureGenerator...
     Stage 2 Generators:
         Fitting FillNaFeatureGenerator...
     Stage 3 Generators:
         Fitting IdentityFeatureGenerator...
     Stage 4 Generators:
         Fitting DropUniqueFeatureGenerator...
     Types of features in original data (raw dtype, special dtypes):
         ('float', []) : 7 | ['date', 'period', 'nswprice', 'nswdemand', 'vicprice', ...]
         ('int', [])   : 1 | ['day']
     Types of features in processed data (raw dtype, special dtypes):
         ('float', []) : 7 | ['date', 'period', 'nswprice', 'nswdemand', 'vicprice', ...]
         ('int', [])   : 1 | ['day']
     0.1s = Fit runtime
     8 features in original data used to generate 8 features in processed data.
     Train Data (Processed) Memory Usage: 4.35 MB (0.0% of available memory)
 Data preprocessing and feature engineering runtime = 0.2s ...
 AutoGluon will gauge predictive performance using evaluation metric: 'balanced_accuracy'
     To change this, specify the eval_metric parameter of Predictor()
 AutoGluon will fit 2 stack levels (L1 to L2) ...
 Excluded Model Types: ['KNN']
     Found 'KNN' model in hyperparameters, but 'KNN' is present in `excluded_model_types` and will be removed.
     Found 'KNN' model in hyperparameters, but 'KNN' is present in `excluded_model_types` and will be removed.
 Fitting 11 L1 models ...
Fitting model: LightGBMXT_BAG_L1 ... Training model for up to 119.84s of the 179.8s of remaining time.
     Fitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy
 2022-05-09 06:36:54,038    WARNING services.py:1720 -- WARNING: The object store is using /tmp instead of /dev/shm because /dev/shm has only 67108864 bytes available. This will harm
  performance! You may be able to free up space by deleting files in /dev/shm. If you are inside a Docker container, you can increase /dev/shm size by passing '--shm-size=0.58gb' to
 'docker run' (or add it to the run_options list in a Ray cluster config). Make sure to set this to more than 30% of available RAM.
 2022-05-09 06:38:35,263    WARNING worker.py:1227 -- The autoscaler failed with the following error:
 Traceback (most recent call last):
   File "/usr/local/lib/python3.9/site-packages/ray/autoscaler/_private/monitor.py", line 331, in run
     self._run()
   File "/usr/local/lib/python3.9/site-packages/ray/autoscaler/_private/monitor.py", line 220, in _run
     self.update_load_metrics()
   File "/usr/local/lib/python3.9/site-packages/ray/autoscaler/_private/monitor.py", line 176, in update_load_metrics
     response = self.gcs_node_resources_stub.GetAllResourceUsage(
   File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 946, in __call__
     return _end_unary_response_blocking(state, call, False, None)
   File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
     raise _InactiveRpcError(state)
 grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
     status = StatusCode.UNAVAILABLE
     details = "failed to connect to all addresses"
     debug_error_string = "{"created":"@1652078315.254650079","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":315
 0,"referenced_errors":[{"created":"@1652078315.254648714","description":"failed to connect to all addresses","file":"src/core/lib/transport/error_utils.cc","file_line":165,"grpc_sta
 tus":14}]}"

To Reproduce
Training a tabular predictor with openml 151 dataset causes this issue in our training pod:
from autogluon import tabular
import pandas as pd

df  = pd.read_csv("data.csv")
predictor = tabular.TabularPredictor(
            label="class",
            problem_type="binary",
            path="./model",
            eval_metric="balanced_accuracy",
        )
predictor = predictor.fit(
            train_data=df,
            time_limit=training_config.get(180),
            presets=[
                "high_quality_fast_inference_only_refit",
                "optimize_for_deployment",
            ],
            excluded_model_types=["KNN"],
        )

The data file is attached to this bug report: data.csv
Installed Versions
autogluon 0.4.0

INSTALLED VERSIONS
------------------
date              : 2022-05-09
time              : 06:56:17.398029
python            : 3.9.9.final.0
OS                : Linux
OS-release        : 5.11.0-1028-aws
Version           : #31~20.04.1-Ubuntu SMP Fri Jan 14 14:37:50 UTC 2022
machine           : x86_64
processor         :
num_cores         : 8
cpu_ram_mb        : 31753
cuda version      : None
num_gpus          : 0
gpu_ram_mb        : []
avail_disk_size_mb: 513467

autogluon.common  : 0.4.0
autogluon.core    : 0.4.0
autogluon.features: 0.4.0
autogluon.tabular : 0.4.0
boto3             : 1.21.35
catboost          : 1.0.4
dask              : 2021.11.2
distributed       : 2021.11.2
fastai            : 2.5.6
lightgbm          : 3.3.2
matplotlib        : 3.5.1
networkx          : 2.7.1
numpy             : 1.22.3
pandas            : 1.3.5
psutil            : 5.8.0
ray               : 1.7.1
requests          : 2.26.0
scipy             : 1.7.3
sklearn           : 1.0.2
torch             : 1.10.2+cu102
tqdm              : 4.64.0
xgboost           : 1.5.2

it seems like the issue was due to insufficient memory of the pod


Debug Error when test by folder "leaves"

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

VS Code Version: 1.86.0
OS Version: Windows_NT x64 10.0.22631

Steps to Reproduce:

Add folder "leaves" and test golang code by debug button
Error Access is denied.

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


No validation on outputs' names

Apologies if this is a schema thing, but this seemed the most logical repository in my mind.
Right now when working in Visual Studio Code with the extension, I am allowed to create outputs with named keys that are not supported. Reading through the appropriate documentation it seems that the names are limited to the JavaScript identifiers specification, to be specific: ^[^0-9][\D\$_0-9]+$. Maybe this is obvious when you consider the case how you use it, but since we do so much other handholding and validation, why not warn on this as well?
Reproduce:
Create an output like:
"outputs": {
    "database-subnet": {
        "type": "string",
        "value": "[parameters('databaseSubnet')]"
    }
}

This passes azure cli validation, you can even deploy this and get the outputs defined in ARM, so the problem is a bit broader in scope even now that I think about it.

It depends on how you want to define problems. :)
If you want to use the outputs in another template you will be using something similar to:
"subnetResourceId": "[reference(variables('subnetResourceId'), '2018-05-01').outputs.public-subnet.value]"
If you thought you could use any identifier, this is the place where the problem will arise when you see that the name after outputs needs to be conforming. The moment you type it with a dash you will get a partial red coloured text, but it might not be clear just why it is wrong. And then you get to play the refactor dance. Not a huge problem, but annoying nonetheless. Especially since ARM's deployment swallows it without complaint on both validate and create.

To make sure I understand, Azure deployed without any problems with your last example, it's just the tool that is confused by the property notation with hyphens, correct?  In other words, what I'm hearing is that Azure has no problems with this, but the extension is confused?

Sorry for the delay @StephenWeatherford. Partially correct, Azure allowed me to deploy the template in the first place and those outputs got defined with those non-confirming names. But then trying to use these names in any way in another template fails validation because of the non-conforming names.

@bmoore-msft Thoughts on this?  Is there a way to legally reference an output from another deployment that has a hyphen in it?  If not, should Azure be allowing them?

Similar issue:
{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "<IP_ADDRESS>",
    "parameters": {
        "my-location": {
            "type": "string",
            "defaultValue": {
                "myprop": "myvalue",
                "my-prop": "my-value"
            }
        }
    },
    "resources": [
    ],
    "outputs": {
        "location": {
            "type": "string",
            "value": "[parameters('my-location').my-prop]" <<< doesn't work, but we do completion for it
        }
    }
}

ARM seems to handle things fine (for outputs) it seems like the template language doesn't though (for any property name that has a hyphen).  I wouldn't do anything in the extension for now, until we figure out what's going on with the parser.

If there is a hyphen in the output name, you can use this syntax:
*.outputs['my-hyphen-output']. So this works:
{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "<IP_ADDRESS>",
    "parameters": {},
    "variables": {},
    "resources": [
        {
            "name": "nestedDeployment1",
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2017-05-10",
            "properties": {
                "mode": "Incremental",
                "template": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "<IP_ADDRESS>",
                    "resources": [],
                    "outputs": {
                        "test-hyphen": {
                            "type": "string",
                            "value": "alex"
                        }
                    }
                }
            }
        }
    ],
    "outputs": {
        "my-output": {
            "type": "string",
            "value": "[reference('nestedDeployment1').outputs['test-hyphen'].value]"
        }
    }
}

That works for your example too @stephenweatherford:
{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "<IP_ADDRESS>",
    "parameters": {
        "my-location": {
            "type": "object",
            "defaultValue": {
                "myprop": "myvalue",
                "my-prop": "my-value"
            }
        }
    },
    "resources": [
    ],
    "outputs": {
        "location": {
            "type": "string",
            "value": "[parameters('my-location')['my-prop']]"
        }
    }
}

We can probably close this issue, but we need to get this doc'd @tfitzmac

Thanks for confirming @alex-frankel.


onChange called multiple times on initialize

Should setting initialValue cause the onChange event to be dispatched?  I was expecting to be able to set the initial value without having onChange trigger.  I'm currently trying to find out why onChange is getting called 3 times, the first time the onChange value is null, second and third times the values are the correct object.
Thanks,

initialValue is reactive so that you can change it externally. If you change it, then it makes sense to have onChange called in my view. The fact it happens on first set is a side effect of that decision.
I might look at some optimisations if it's producing duplicate calls on no change though.

Maybe it should behave like a native select element.  From what I understand, onChange is only called when the user interacts with the element. (  onChange is for UI change only, but onInput triggers for non-user initiated changes )
I'll try to determine what is causing the double trigger ( if we ignore the first 'null' value onChange event )

Note that the input event is not fired when JavaScript changes an element's value programmatically.

I've never particularly liked the different events approach of the native elements anyway 😄
I'll have a think. It might be reasonable to pass a reason parameter to onChange so the consumer can choose to ignore changes generated by initialValue change or not 🤔

I don't think adding a reason parameter will solve the issue.  There needs to be a way to set the initial value programatically without triggering the onChange event.  Many components like modularforms watch for onChange for inputs and expect an input event, and not a custom event as you suggest.

Ok.  To confirm, there is not way to set the initial value without triggering the onChange event?  Also, the onChange event for solid select has different behavior than native select onChange event?  Knowing this will help me find out why onChange is getting called 3 times when the form is first rendered, before the user has touched it.
For modularforms, if you use field.setValue, does it work?  I though SolidSelect passed one or more objects to the onChange callback, and modularforms would not know what to do with that object. ( modularform field has number or string types but not an object )
Also, how do you prevent modularforms from showing the form as 'dirty' as soon as it is populated, before the user has touched it?
I plan on creating a 'wrapper' element which will dispatch an input event and de-bounce the duplicate onChange triggers if needed.

I just tested native select and input elements.  The onInput and onChange events only dispatch on user interaction.  Setting initial values does not dispatch those events.  I would make sense for SelectSolid to have the same behavior if it is to be used as a form element.  If it was not designed to be used in forms, I will just create a wrapper element.

Yes and yes to the first points. Some details: the low level primitive createSelect can be used to build your own Select component and it does not trigger onChange on initialisation. The builtin Select component is then an opinionated implementation using that primitive and it currently does result in onChange on initialisation. In all cases, no native dom event is being raised by solid-select. It passes raw values around instead.
I don't use modularforms myself so I can't comment on how to integrate with it (I use my own custom form library that I build early on with SolidJS). Perhaps ask the modularforms folks how they support integrating with custom components that don't use native events.
For reference, in my own form logic I tend to use a blur event to determine if field is 'dirty'/'touched' rather than rely on the value being set.

Thanks for the additional info.  I guess it comes down to how the element is initialized.  Personally, I envision initializing an input element in the same way as initializing a variable or setting an initial state before state changes are tracked.  I think SolidJS works in the same way when creating a signal or store. ( I could be wrong, but I don't think they trigger a change notification to subscribers when they are first initialized )
There is also onUpdate in SolidJS... part of my confusion with SolidSelect was that onChange is the same event name as native select elements.  If it was named onUpdate, maybe it would have prevented that confusion on my part.

Signals in SolidJS set up the subscription on access, so they do effectively call with the initialised value (but perhaps not in the way you are thinking.

There is also onUpdate in SolidJS
I'm not familiar with this - can you share the link.

To illustrate why onChange is currently called - consider this example:
import { createEffect, createSignal } from "solid-js";
import { Select } from "@thisbeyond/solid-select";

export const ResetExample = () => {
  const [initialValue, setInitialValue] = createSignal("apple", {
    equals: false,
  });

  createEffect(() => console.log("initialValue", initialValue()));

  const [displayValue, setDisplayValue] = createSignal(undefined);

  // Change to false to see current behaviour and why it is needed for those
  // listening to onChange to receive the correct current value.
  let initialising = true;

  return (
    <>

          <Select
            initialValue={initialValue()}
            options={["apple", "banana", "pear", "pineapple", "kiwi"]}
            onChange={(value) => {
              if (initialising) {
                initialising = false;
                return;
              }
              console.log("on change!", value);
              setDisplayValue(value);
            }}
          />
          <button class="primary-button" onClick={() => setInitialValue(null)}>
            Reset
          </button>

Value is: {displayValue()}

    </>
  );
};

By skipping the first onChange (as you want to do) the value displayed is stale on initialisation.


Focus on heading and its "children" also when clicking a "child" of the heading

I understand that highlighting other (single) blocks isn't supported (yet), but it'd still be good if one wouldn't have to click the actual heading to trigger the focus. Instead, triggering on a click on any block that is a "child" (nothing is really a child of a heading - except inline blocks - but from a document semantic point of view...) of the respective heading would be very convenient.

Thanks for your suggestion, it is a great idea!
I already have some preliminary thoughts on how to implement this, but it may take some time since I am a little busy recently.
I will try my best to realize it in one month!

Hello!
I have released version 1.2.0, this version includes the support of the feature. Please give it a try!
If it has any bug or unexpected behavior, please reply in the thread!

Looks like everything works as expected, I am going to close the issue!

Sorry I didn't find the time to test this and report back. It's great that you implemented it though!

Thanks a lot for your appreciation and all your contribution to the project!


analyse build log from berkeley-schema-fy24

run make squeaky-clean all test in a new terminal and copy the put[put to a file
Then make a copy of that file, sort, uniquify, and discard all lines that don't include "warning" or "error"

cleaned up previous build logs as part of

https://github.com/microbiomedata/berkeley-schema-fy24/commit/68fffa4d7024bb1861cad08dd9f120932b6e1dab

see

https://github.com/microbiomedata/berkeley-schema-fy24/pull/112


An unexpected error occurs when launching Storage Explorer

Storage Explorer Version: 1.5.0
Platform/OS Version:  Linux Ubuntu 16.04
Architecture: x64
Build Number:20180828.2
Commit: ca058b20
Regression From:Previous release 1.4.1(20180822.1)
Steps to Reproduce:

Launch Storage Explorer using double clicking the executable "StorageExplorer".

Expected Experience:
Storage Explorer is launched successfully.
Actual Experience:
Pop up an unexpected error as below.

Do you get any additional messages if you launch from the command line?

This issue will no longer reproduces with the new launch feature. So we close it.


ERROR at build time : Multiple candidate to satisfy project requirements (IDFGH-12245)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
5.1.1
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
What is the expected behavior?
ESP IDF Version
5.1.1
Operating System
Windows 10
Condition
I have clone the project, and cant build it, because the "led strip" component is ambiguos for the builder.
Expected condition
Build and run it in my ESP32C6 to use with a zigbee lamp.
Detail about the error
Every time who I tried to build the project the console otput is the same:
 ERROR: Cannot process component requirements.  Multiple candidates to satisfy project requirements:

 requirement: "led_strip" candidates: "espressif__led_strip, led_strip"

I checked the idf_component.yml file , and his content is:
  ## IDF Component Manager Manifest File dependencies:
  espressif/esp-zboss-lib: "1.0.9"
  espressif/esp-zigbee-lib: "1.0.9"
  espressif/led_strip: "~2.0.0"
   ## Required IDF version
   idf:
     version: ">=5.0.0"

and the CMakeList.txt file  at project level is:
  # The following lines of boilerplate have to be in your project's CMakeLists
  # in this exact order for cmake to work correctly
  cmake_minimum_required(VERSION 3.16)
  include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  project(light_bulb)

I had see other similars errors online like this but mi conditions aparently are well defined.
Also visited the espressif Build pages here, and still cant find where is the problem.
Last, I tried another option via deleted the "led strip" dependency, the compiler runs fine (it don't said nothing about the ambiguos dependency) , but finally it throws a lot of errors because the component don't exist and also because it is the expected behaivor.
What is the actual behavior?
Every time who I tried to build the project the console otput is the same:
 ERROR: Cannot process component requirements.  Multiple candidates to satisfy project requirements:

 requirement: "led_strip" candidates: "espressif__led_strip, led_strip"

Steps to reproduce.
Clone the esp idf repo, open using VSCode the examples/zigbee/light_sample/HA_on_off_light  set the COM port, ESP32C6 clean and build.
Build or installation Logs.
[1/3] espressif/esp-zboss-lib (1.0.9)
[2/3] espressif/esp-zigbee-lib (1.0.9)
[3/3] idf (5.1.1)
CMake Error at C:/Users/juanc/esp-51/esp-idf/tools/cmake/component.cmake:250 (message):
  ERROR: Cannot process component requirements.  Multiple candidates to
  satisfy project requirements:

    requirement: "led_strip" candidates: "led_strip, espressif__led_strip"

Call Stack (most recent call first):
  C:/Users/juanc/esp-51/esp-idf/tools/cmake/build.cmake:574 (__component_get_requirements)
  C:/Users/juanc/esp-51/esp-idf/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:6 (project)

More Information.
I clone another repo, similar to esp-idf, and the problem is the same.

@juan4java Seems like there are two different versions of the same component somehow being build. Could you check...

the contents of the manage_components directory of your example? Does it contain both espressif__led_strip and led_strip?
If you do a full clean of the project (idf.py fullclean) and then rebuild the project, does the issue get resolved?

And another thing to try: you can remove the led_strip from the manifest, then run idf.py reconfigure. There should be a list of Component paths: printed. There you can find where the other version of led_strip is located.

Hi, thanks for both reply
@Dazza0

my  manage_components only contains espressif__led_strip and not another
I make clean before all build, also I have clonned another similar repo in a new path and the result was the same.

@igrr

I will try to run this option and see the results to reply you.

Updating :
How this was taking too many time, only for test the code, I decided put the files of espressif__led_strip dependency (only the .c and .h files ) in the main folder, and I declared it in the CMake file. Yes!, I know this can be a ugly solution, but this worked fine and finally I did can build it with out any error to test the code. I will try to fix in the correct way, becuase this must to run it using the dependencies.

I also have seen this issue in our pipeline (ESP-IDF 5.2), where we build quite a few apps. Our solutions seems to be to remove any files related to the component manager, like managed_components (not only in the current build folder) before starting a new app build. My hunch is that the component manager finds multiple instances and doesn't know which one too use.


Usage of websocketController along with httpController

Hi,
I was able to make httpController work in my project which is "httpTest" class defined in another .h. (in the picture)
Question:
But I was wondering if it is possible to make httpController work along with WebSocketController as seen in the picture.
When I run below program, I got run time error due to the registerController(wsT).
Long story short :
Can I use httpController work along with WebSocketController ? If yes how can I achieve it by dependency injection like below image ?
Note : please ignore syntax warnings

Thank you in advance!

@keremcc Thanks for your feedback, Would you mind providing a full demo with which I can reproduce the issue locally?

@an-tao  Thank you for quick reply.
When I test the program in isolated environment, I just figured out run time error. It was not related to drogon framework, the root cause was some other part of my program.
So just in case, I share a full working demo of httpController & websocketController with dependency injection.
link : https://github.com/keremcc/drogon_samples


Replace text feedback message with audio

User Story
As a UX designer,
I want to provide encouraging spoken audio when answering a question,
So that we reinforce that the user is doing what we want them to be doing (answering questions).

Also ideally we could load up a few different feedback phrases that get played at random.


Rejudge single submission

Wonder know what situation we need to use this function but not rejudge all the submissions of a problem

Judge error, or 魯小小student

What is  魯小小student? XD

It often occurs in tests.
A student that think his/her solution is correct, but our judge give it not accepted.
After the test, the student will ask TA to rejudge some of his/her submissions, then get the same result, finally give up reluctantly.

Zz

Fine

+1, @CHAHSINHOU, please test

test ok, going to merge.


Debounce Function runs twice

In the example the debounce func runs twice while it should only once.

Seems to be a bug in stackblitz, fixed now.