[RFC] get rid of that += and .eq()

replace m.d.<domain> += <target>.eq(<val>) with m.d.<domain>.<target> = <val>
implementation as runtime fix:
from nmigen.hdl.dsl import _ModuleBuilderDomain as b

def fix_semantix():
    def mysetattr(self, name, val):
        if name == "_domain":
            self.__dict__[name] = val
        else:
            if name in self._builder.__dict__:
                self.__iadd__(self._builder.__dict__[name].eq(val))
            else:
                raise Exception("couldn't find {} signal on the module".format(name))
    setattr(b, "__setattr__", mysetattr)

why?

more eye-pleasing cause you are used to it in other languages

pros: none, just a semantics fix
cons:

__setattr__ looks like a dirty hack that can create problems in the future
requires m.<target> = Signal(...) prior to m.d.<domain>.<target> = <value>

The left-hand side of .eq() can be more complex than just a signal name. For example, you can do:
m.d.sync += buf.word_select(idx, 4).eq(input)

This is not representable with the syntax you're suggesting.
(Aside from that, this proposal violates Python variable scoping in a way far more substantial than what nMigen already does, but that's a secondary issue compared to the one above.)

@whitequark how about this approach: https://github.com/m-labs/nmigen/issues/345? I created the issue in the wrong repository by mistake.

Personally, we find that this sort of change obscures important details about what's actually occurring when you assign a signal in a domain like this. You're adding a new assignment statement and the code itself should reflect that. Beyond the potential implementation issues, this fact becomes important because later assignments can override earlier assignments that have been added.

The proposal as submitted has a fatal issue: it makes a substantial amount of existing code unrepresentable.
The proposal as modified later has a fatal issue: the code style it proposes makes it impossible to reuse the decision trees built through If/Switch statements to drive both combinatorial and synchronous signals in the same statement body (or at least the same decision tree). This was one of the substantial issues with Migen that Amaranth aimed to address.


V8: Date/Time Attribut

The DateTime Attribut now returns a DateTime Object?
In 5.7 it returned a String.

Yes – but if you cast it as a string or get it as an attribute display value it should return a string like before.


[question / external tool] Is it possible to visualise how resources play with each other?

I know that this question rather fits better for StackOverflow, but the context (this gem / rails) made me post it here.
I've been using jsonapi-resources for a few months and now I'm looking for a tool that would help me generate diagram / UML how all resources interact with one another. There're tools out there that can generate graph from models, but I couldn't find a tool which is more generic.
Any help / hint will be appreciated.

Modyfing controllers_diagram.rb from railsroady I could achieve that, but for now it is rather a very dirt solution. I post the solution here till the end of the week.

https://gist.github.com/ryrych/e8c68c82db1faf1a5f94

It works provided that you have versioned API (e.g Api::V1::TaskResource). Play with it to suit your needs.


⚠ Bofrost.lu has degraded performance

In d4249f1, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1310 ms

Resolved: Bofrost.lu performance has improved in 85f8712 after 6 minutes.


Handle request processes exits that get sent exit signal

When a web request is being processes by Cowboy, and the request handling process get sent exit signal (as in with exit/2), it seems like the process is silently crashing without reporting anything to the logger.
It looks like Cowboy handles exits of these processes here using try/catch clause:
https://github.com/ninenines/cowboy/blob/master/src/cowboy_stream_h.erl#L289-L300
But it does only work if process exits on it's own. When it is being sent exit signal, it's not.
This is because the process is not trapping exits, and even that wouldn't catch all signals, i.e. kill wouldn't get detected.
I have to detect these exits, and I am currently doing that by setting up a monitor.
I am just wondering if that is not something Cowboy would want to be doing internally? Since it catches exits of these processes if they exit with exit/1, maybe it makes sense to add functionality to catch abnormal exits when these processes are sent a signal with exit/2 too?

What you linked to is only to add the stacktrace to exit reasons. The actual handling is at https://github.com/ninenines/cowboy/blob/master/src/cowboy_stream_h.erl#L127-L156
You are correct that it's missing a more general clause.

Right, so it's probably missing the clause of
info(StreamID, Exit={'EXIT', Pid, Reason})

Want me to give it a shot with a PR?

Sure.

I have created a PR. There's at least one issue with it (silencing crashes in tests that I don't know how to do properly). Other than that it seems to resolve the issue at least on my app.


Update aws related documents for 0.4 release

Try tutorials using AWS EKS and notice several documentation are outdated and need to update.

This change is

@sarahmaddox  Most of the changes are not specific to v0.4, only change is I change tf-serving aws prototype from tf-serving-aws to tf-serving-deployment-aws.
This change has been merge into kubeflow/kubeflow master today. https://github.com/kubeflow/kubeflow/pull/2097
Since kubeflow team is working on v0.4 release cut, I think corresponding website change can be merge into master and cut the release branch together with kubeflow main repo.

You're right. :)
/ok-to-test
/approve


venkat version of madlibs story

Please Check my Version

Changes Performed to Resolve Conflicts

Great! It looks perfect!


portico: Remove All plans tab at mobile scale.

This PR removes the tab for All plans at mobile scales below 460px, the point at which the All plans features-comparison table cannot comfortably fit within a narrow viewport.
Note that this does not attempt to catch edge cases like where All tabs might be selected and then the viewport shifts smaller (e.g., on an orientation shift from landscape to portrait.
Screenshots and screen captures:

460px wide, Before
460px wide, After

470px wide, Before
470px wide, After (no change)

Looks great, merged, thanks @karlstolley!


[ftxui] Update to version 4.0.0

[x] Changes comply with the maintainer guide
[x] SHA512s are updated for each updated download
[x] The "supports" clause reflects platforms that may be fixed by this new version
[x] Any fixed CI baseline entries are removed from that file.
[x] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

Upstream retracted the release due to the GCC incompatibility indicated by the pipeline failure (see ArthurSonzogni/FTXUI#578). I'll update this once the whole ordeal has been resolved.

Hi @BurningEnlightenment,
Thanks for your patch! I did one myself in parallel. I didn't realized you did it too:
https://github.com/microsoft/vcpkg/pull/29616
Indeed, there was 2 issues. I add to delete v4.0.0 several time to clean this up.
I think both issues were fixed. I rolled v4.0.0 to 2 other depending project and this was successful.
I think we can abandon this patch in favor of https://github.com/microsoft/vcpkg/pull/29614, if the build bot is green.

Yeah, sure. Rock on!


Enable bf16 quantization of models, and fix resetting args.audio in the microservice between runs

Description
Enable bf16 quantization of models, and fix resetting args.audio in the microservice between runs
Issues
https://github.com/opea-project/GenAIComps/pull/775
Type of change
List the type of change like below. Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would break existing design and interface)
[ ] Others (enhancement, documentation, validation, etc.)

Dependencies
https://docs.habana.ai/en/latest/PyTorch/PyTorch_Mixed_Precision/index.html
Tests
Tests on Xeon, Gaudi

@chensuyue @lvliang-intel Cleared all checks. Please review. Thanks.


Misc. updates

@reviewbybees

:+1:

Can I merge this? Or should I wait for at least one review from a CloudBees employee?


📃: add code snippet feature

🔴 Title :  code snippet feature
🔴 Tech stack : html,css , js
🔴 Objective : to have a code snippet feature
🔴 Summary : the user will paste the code and get a code snippet with cool effect.
📸 Screenshots

N/a

✅ Details to Include When Taking the Issue:
Name :
Participant Role (Specify the Open Source Program name, e.g., GSSOC, Hacktoberfest, etc.):
Gssoc-ext and hacktoberfest

Happy Contributing! 🚀
Wishing you all the best on your open source journey. Enjoy! 😎

@iamrahulmahato assign me this.


Can still tab to content even after modal is closed

As we talked about @NicholasLancey we will need to:

on close move this._content to this.wrapperOfContent
on open move this._content to this.modalContent

Looks good to me @NicholasLancey, thanks!
For context, @marlonmarcello, Nick and I chatted about how it might be  too opinionated to add the display: block property directly inline on the modal element, onOpen. As in, maybe it should be a CSS class which the dev can change to whatever they need it to be (perhaps display: flex, for example). That said, it's highly unlikely that a developer will need something other than display block for a modal, so I think we should leave it as it is, for readability's sake.

Fixed by #11


Cloudfront - get_distribution() does not return same config passed to create_distribution()

When passing in a fully-formed Cloudfront Distribution Configuration, the response back from create_distribution() does not contain all of the information passed in.  Calling get_distribution() with the Id passed back from `create_distribution() also exhibits the same issue (which makes sense...
I initially noticed the issue with the DistributionConfig.Comment  field missing from the response of get_distribution(), but it appears other items are missing as well, such as Aliases.Items, which I passed in with a list of 10 items, but the reply came back with an empty list.
The behavior I expected was that moto would, when passed a cf dist config in a call to create_distribution(),  simply copy what it's been given into the distribution created. But this is not what appears to be happening. Perhaps my expectations are incorrect, and if so, please reset them for me :)
I have attached test script here, as well as the mock distribution configuration I am using.  The output of the script looks like this:
$ /tmp/test-moto-cf.py
Comment taken from config file passed to create_distributions():
Comment from mock dist:            ---> Boring comment <---

Calling create_distributions() with config file
Should be a comment in the following line:
Comment from create_distributions: --->  <---

Assigning comment to response['Distribution']['DistributionConfig']['Comment']
Should be a really clever comment in the following line:
Assigned Comment:                  ---> A Really clever Comment <---

Should be a comment in the following line too:
Comment from get_distribution():   --->  <---

Thanks.
Paul
moto_cloudfront_test.zip

Hi @pll, the current Cloudfront implementation only supports a subset of input parameters for now. I'll mark it as an enhancement to also implement the others.
Considering the sheer number of parameters available, this might be a staggered effort - are the DistributionConfig.Comment and Aliases.Items fields the only ones you are missing for your usecase?

Hi @bblommers,
Thanks for the rapid reply!
I found a work-around, and possibly better field to trigger off of than DistributionConfig.Comment, for now. But I'll definitely need the DistributionConfig.Aliases structure. If you have to prioritize between the two, then Aliases gets my vote over Comment.
Out of curiosity, how is it that create_distribution() doesn't populate the entire DistributionConfig sub-structure with whatever data it's passed? Are subsequent calls within create_distribution() to create that structure, and moto just doesn't have those yet? (in my ignorance, I assumed whatever was passed into create_distribution() for a dist config would just be copied to to the DistributionConfig sub-structure. Clearly I'm wrong :)
Thanks again.
Paul

There's quite a bit of logic when we receive the input around setting sensible defaults, validation, etc. The output isn't always guaranteed to be the same as the input either. Converting the dict into Python-objects makes it much easier to program the logic around this.
For the majority of services, this isn't really an issue, as the input-structure is small and straightforward. If there are dozens of input fields, like with CF, it is much more time consuming to do the whole dict->object->dict conversion, so mapping the fields/parameters usually happens on an as-needed basis.

Thanks for the explanation.  I've tried digging into the moto code myself to see if I could figure it out, but it's a little beyond my skill level at this point.  Perhaps looking at diffs for this one change might be helpful.  I need a "moto hacking for dummies" intro :)
Thanks again!


[HOLD for payment 2023-10-09] 🟡 [$500] [Distance] - Hide the map scale control on Android

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open request money
Change the tab to distance
Select a start or finish distance

Expected Result:
The map should show the scale control as in the android app or it should be removed from the android too
Actual Result:
The scale control is hidden on the map of the web and mweb
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[x] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.70-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @jo-ui
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694616305506719
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010c8a9994720dfe80
Upwork Job ID:<PHONE_NUMBER>592622592
Last Price Increase: 2023-09-17
Automatic offers:

ZhenjaHorbach | Contributor | 26813126
jo-ui | Reporter | 26813129

Proposal
Please re-state the problem that we are trying to solve in this issue.
The problem we are trying to solve is the absence of a scale control on the Mapbox map displayed within the MapView component in a React Native application using the react-map-gl library. A scale control is a useful feature for users to understand the map's scale and distance between points, enhancing the user experience and providing valuable geographical context.
What is the root cause of that problem?
The root cause of this problem is that the ScaleControl component was not integrated into the existing codebase for the MapView component. The absence of this component is the reason why the scale control is missing from the map.
What changes do you think we should make in order to solve the problem?

To solve this problem, we propose the following changes:

Import the ScaleControl component from the react-map-gl library at the beginning of the MapView component file.
Insert the ScaleControl component within the Map component, allowing it to be displayed on the map.
Customize the appearance of the scale control by setting the maxWidth, unit, and the position props according to the desired design and unit preference.

These changes will add a scale control to the Mapbox map within the MapView component under src/components/MapView/MapView.web.tsx
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: Upwork link

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~0112ace296ad18280c

Proposal
Please re-state the problem that we are trying to solve in this issue.
The scale control is hidden on the map of the web and mweb
What is the root cause of that problem?
We are not rendering any ScaleControl component here in Map
https://github.com/Expensify/App/blob/c77814fd5e643cba78e8c8294370d78f633a59c5/src/components/MapView/MapView.web.tsx#L67
Hence this is the root cause
What changes do you think we should make in order to solve the problem?
We need to apply following changes:

import ScaleControl from 'react-map-gl'
Render this ScaleControl component anywhere in <Map />
We need to add position: "top-left", whereas maxWidth: "100" and unit: "metric" is set by default options

What alternative solutions did you explore? (Optional)
NA
Result:

![Screenshot_1694967815](https://github.com/Expensify/App/assets/47579287/03d3a619-3578-4030-91da-916aee69146f)

I posted in the Wave5 slack channel since this is related to distance requests.

Need to get these proposals reviewed ASAP assigning a new C+

@sobitneupane do you have time to review these proposals?

Proposal from @ZhenjaHorbach looks good to me.
@ZhenjaHorbach I believe we should enhance its appearance to make it more attractive using style prop in Scalecontrol.
🎀 👀 🎀 C+ reviewed

Hi, I'm jumping in here from the project team. For this issue, the correct solution is to remove it from all platforms. We didn't intend for it to be shown anywhere, so the bug is only that it's appearing on android, and so all we need to do is remove it there.
That was one of the alternatives in the original proposal, so I think we are fine to keep moving forward with @ZhenjaHorbach.

Sounds good let's go with @ZhenjaHorbach's alternate proposal

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[ ]  [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

https://github.com/Expensify/App/pull/25161

[ ]  [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

This is a small UI inconsistency.

[ ]  [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

N/A

[ ]  [@sobitneupane] Determine if we should create a regression test for this bug.

Yes.

[ ]  [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

Open request money
Change the tab to distance
Verify that scale control is not displayed in top left corner of the map.

Do we agree 👍 or 👎

No need for a regression test for a small cosmetic change IMO

Yeah we probably don't need a regression test for this.
Summarizing payouts for this issue:
Reporter: @jo-ui $50 (paid via Upwork)
Contributor: @ZhenjaHorbach $750 (paid via Upwork)
Contributor+: @sobitneupane $750 (payable via Manual Request)
Above payments include efficiency bonus 🎉
Upwork job: https://www.upwork.com/jobs/~010c8a9994720dfe80

@sobitneupane can you let me know once you've submitted the manual request? I'll close the issue once that's done.

@sobitneupane can you let me know if you need this to remain open, or if you are tracking outside of Expensify?
Switching this to a weekly for now to clean up my tasks list.

https://github.com/Expensify/App/issues/27620#issuecomment-1758961749
Requested payment on newDot.

$750 payment approved for @sobitneupane based on this comment.


⚠ Processors has degraded performance

In 77ffe07, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 50 ms

Resolved: Processors performance has improved in d16cb10.


Persistence of drawing type

When users switch between annotation groups, they have to re-select the drawing type (i.e. point, line, polygon) to make annotations. We should remember which drawing type is active to avoid these additional button clicks when switching between annotation groups.

This was added in PR #449.


README fixes

Changed lets (permit or allow) to let's (contraction of "let us"), combined sentence fragment with following sentence for improved readability, and changed it's (contraction of "it is") to possessive pronoun "its".

thanks, much appreciated ;)


Cannot make package with nodejs 16.3

Building codechecker master (8880695, codechecker_version_info.txt) on arch linux with nodejs 16.3 fails with the following error message (complete build_log.txt)
node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.
make[1]: *** [Makefile:85: /home/joki/git/codechecker/web/server//vue-cli/dist] Error 1
make[1]: Leaving directory '/home/joki/git/codechecker/web'
make: *** [Makefile:46: package] Error 2

It seems codechecker is using node-fibers, which is not maintained and does not support nodejs 16.x, node-fibers homepage. This seem like a likely reason.
Building with BUILD_UI_DIST=NO make package does work.

I have the same issue as @LesserBabka, on : macOS 10.14.6 (18G9216)
My error message is exactly the same (excepted for the current directory), and after looking into it, I agree with @LesserBabka's diagnostic : it seems that node-fibers makes the installation process fail on the make package step.
I tried to run npm@15 through nvm (github project) to enable fibers, to no avail.
I would really like to make CodeChecker run, as it seems that it is superior to plain scan-build thanks to its CTU capabilities.
Thank you !

I checked the package-lock.json file generated by the new npm version and fiber is a dependency of sass-loader:
"node_modules/sass-loader": {
  "version": "8.0.2",
  "peerDependencies": {
    "fibers": ">= 3.1.0",
  },
  "peerDependenciesMeta": {
    "fibers": {
      "optional": true
    }
  }
},

Checking the release notes of the sass-loader package it looks like they solved this problem in the 11.1.1 release.
Also from 11.0.0 release the minimum supported webpack version is 5 but we are using 4. So we also have to upgrade this package too.


@eessex => Be able to view article2 drafts

Thx for noticing this!
Closes https://github.com/artsy/publishing/issues/111

LGTM 👍


Bug: Error when using a choose action in first state/stateless machine

Description
When using a choose action in the entry action on the root of a machine, I get the following error

Curiously, when I add a choose action later on in the machine in a non-initial state, the error disappears
Expected result
Ability to use the choose action in entry action on root of machine without an error
Actual result
There is an error
Reproduction
https://github.com/xylophonehero/xstate-initial-choose-action
Additional context
No response

cc. @mattpocock @Andarist


Support for AWS Elemental MediaLive CDI input type

Please consider adding support for AWS Elemental MediaLive CDI input type.

This is already handled by this code: https://github.com/aws-solutions/aws-media-services-application-mapper/blob/main/source/msam/chalicelib/connections.py#L327

Current implementation satisfies requirements.


Sub Parameter Values Left Stale & New Parameter Created After Multi Byte Parameter Update

Checklist

[X]  I am not using Home Assistant. Or: a developer has told me to come here.
[X] I have checked the troubleshooting section and my problem is not described there.
[X] I have read the changelog and my problem is not mentioned there.

Deploy method
Home Assistant Add-on
Z-Wave JS UI version
9.9.1
ZwaveJS version
12.4.4
Describe the bug
When, using a HomeAssistant service, I send a multi byte value to a multi byte parameter that is listed in Z-Wave JS UI as separate sub parameters, Z-Wave JS UI adds a new parameter for that value update and leaves the sub parameters stale.  If a sub parameter is updated afterwards, the multi byte parameter will be stale.  Refreshing values will correct the sub parameters, but not the multi byte parameter.
To Reproduce
Review the end of the configuration parameters before and after taking the step mentioned in the description.  In the reproduction steps I took for creating logs for this issue, I used the following service call:
service: zwave_js.bulk_set_partial_config_parameters
data:
  parameter: "99"
  value: 25191679
target:
  entity_id: light.media_light

Expected behavior
The sub parameters should have their values updated from the multi-byte event, and if the multi-byte parameter should also exist, it should also update when notified of changes to the sub parameters and during refreshing values.
Additional context
Here is a screen snippet before sending the multi-byte parameter value:

Here is a screen snippet after sending the multi-byte parameter value:

Here are the logs:
zwave-js-ui-store.zip
Here are UTC timestamps to go with the logs (Node 12):
17:11 - Reinterview
17:17 - Send multi byte value - see that new property is created & old sub parameters aren't updated
17:25 - Refresh values - see that sub parameters are now all updated
17:26 - Send single byte value (with Z-Wave JS UI) - see that new property isn't updated
*I did more testing after 17:26 repeating the last two steps & sending the single byte value with the service, but didn't see any differences in behavior, the new multi byte parameter stayed the same as shown in the second screen snippet.

I don't think this is something related to Z-UI side, maybe an event missing from Z-Wave JS? It's not 100% clear what you are doing here as I never did such operation, @AlCalzone any idea?

Yeah this was supposed to be opened in the node-zwave-js repo

Sorry about that, makes sense now that I think about it. I see the sub-parameters in UI, but I guess they are technically exposed to HA, which puts them in node.  Should I close and re-open this, or can it be moved?

I'll move it, it's fine. If something is missing that the other issue template asks for, I'll get back to you.


Session optimizations

Change Description

Various changes after benchmarking and profiling the Session API code.
Change Type
Select ONE

[ ] Documentation

[x] Stability bug fix

[ ] Other

[ ] Other - special case

Consensus Changes

[ ] Consensus Changes

API Changes

[ ] API Changes

Documentation Additions

[ ] Documentation Additions

Are left and right pointers?

No.  They are std::optional types.


Add IterableEnum trait

Objective
Required from #7267
Solution

Add required things

Changelog

Add IterableEnum trait and derive
Add EnumIterator iterator

One thing i want to resolve before this gets merged:
Currently, an enum MUST have only Unit enum fields (so without any values). But @alice-i-cecile said i should try to implement it on bigger bevy_input enums. now, there are some but mostly they'll be like GamepadButtonType and have an ending Other(u32) variant which makes it not possible. Now my question: should i make it possible and then just iterate over the Unit variants?

One thing i want to resolve before this gets merged: Currently, an enum MUST have only Unit enum fields (so without any values). But @alice-i-cecile said i should try to implement it on bigger bevy_input enums. now, there are some but mostly they'll be like GamepadButtonType and have an ending Other(u32) variant which makes it not possible. Now my question: should i make it possible and then just iterate over the Unit variants?

We could add a #[enum(ignore)] for the variants that should be skipped.

We could add a #[enum(ignore)] for the variants that should be skipped.

Yes please.

We could add a #[enum(ignore)] for the variants that should be skipped.

Yes please.

I’ll try to understand how it works for bundles and then try it 😁

Why not use an existing one? For example https://crates.io/crates/enum-iterator

That would be too easy 🤧

That would be too easy 🤧

Then I'm definitely against this PR, even more so as it adds a new crate

That would be too easy 🤧

Then I'm definitely against this PR, even more so as it adds a new crate

Should i convert this PR to a import lib and put it in the input enums then?

Should i convert this PR to a import lib and put it in the input enums then?

I don't know, there are no details on why this macro is needed 🤷

Should i convert this PR to a import lib and put it in the input enums then?

I don't know, there are no details on why this macro is needed 🤷

alice had it on her todos and i asked if i could do it. the macro was planned all the time. but a crate will be better yes. now should i just close the PR or migrate my "code" to the crate?

alice had it on her todos and i asked if i could do it. the macro was planned all the time. but a crate will be better yes. now should i just close the PR or migrate my "code" to the crate?

I must say I don't see the link between stageless schedule and being able to iterate on KeyCodes... so I don't know...

alice had it on her todos and i asked if i could do it. the macro was planned all the time. but a crate will be better yes. now should i just close the PR or migrate my "code" to the crate?

I must say I don't see the link between stageless schedule and being able to iterate on KeyCodes... so I don't know...

alice just threw it out in the conversation

Closing in favor of enum-iterator

Alright, I'm on board. We can use enum-iterator :)


Make :path per-storage option as a global configuration option

This is an excellent gem and is used in RefineryCMS https://github.com/refinery/refinerycms .
As a user of Refinery, I would like to be able to set the path on S3, as indicated in the docs here https://github.com/markevans/dragonfly-s3_data_store like so:
    Dragonfly.app.store(some_file, path: 'some/path.txt', headers: {'x-amz-acl' => 'public-read-write'})

The problem is that Refinery does not call Dragonfly.app.store(...) but installs Dragonfly as an extension to ActiveRecord:
# refinerycms/images/lib/refinery/images/dragonfly.rb

          ActiveRecord::Base.extend ::Dragonfly::Model
          ActiveRecord::Base.extend ::Dragonfly::Model::Validations
          ...
          app_images = ::Dragonfly.app(:refinery_images)
          ...
          if ::Refinery::Images.s3_backend
            require 'dragonfly/s3_data_store'
            options = {
              bucket_name: Refinery::Images.s3_bucket_name,
              access_key_id: Refinery::Images.s3_access_key_id,
              secret_access_key: Refinery::Images.s3_secret_access_key
            }
            # S3 Region otherwise defaults to 'us-east-1'
            options.update(region: Refinery::Images.s3_region) if Refinery::Images.s3_region
            app_images.use_datastore :s3, options
          end

I propose to add a :global_path configuration option (similar to :root_path) that will have the following behaviour.  If :global_path is specified, it is used instead of generate_uid
# dragonfly-s3_data_store/lib/dragonfly/s3_data_store.rb
...
      configurable_attr :url_host
      configurable_attr :global_path
...

def store(temp_object, opts={})
    ...
    headers['Content-Type'] = mime_type if mime_type
    unless global_path.nil?
        uid = global_path
    else
        uid = opts[:path] || generate_uid(temp_object.name || 'file')
    end
    ...
end

I understand that it will be my responsibility to make sure the paths are unique.
Thanks!

that path option that can be used when using activemodel with storage_options (see README and http://markevans.github.io/dragonfly/models/#storage-options) - you can still use that with refinery
thanks


Unit tests for takeByTopology function

What this PR does / why we need it:
Sorting function in takeByTopology used wrong values.
Added test cases for those cases + fix.

@ConnorDoyle - I might be wrong but i think there was a small bug in sorting function.


Github now fetches email address by default

When I tried using the Github oauth provider, I didn't get the user's email when a new user would sign up. This is because by default Github doesn't give you the user's email address. However, you can get the email address from a separate API request.
This is an issue that was also present with Next-Auth. See: https://github.com/nextauthjs/next-auth/issues/374
Their Github oAuth provider now always returns an email address as noted at the bottom of their documentation page. See: https://next-auth.js.org/providers/github
My pull request adds a very basic code snippet and a type called GithubEmail to the Github provider. This way, the provider automatically fetches and returns the email of the user. I've tested it, and it works in my project!
The code I've added is a replication straight from the next-auth implementation of the same.
I think the Github oauth provider should always return an email address because most websites/apps don't have a username, and use email for all communication.
This is my first pull request to Lucia. Let me know if I'm doing anything wrong! :)

This is a deliberate decision. Lucia's OAuth integration is a barebone wrapper around the REST APIs and some people might not need access to the user's emails.


KubeDB helm installer can not use AppsCode OSS provision

Background
We want to install KubeDB and AppsCode broker using helm chart
Steps

helm install appscode/kubedb --name kubedb-operator --version 0.12.0 --namespace kube-system
helm install appscode/kubedb-catalog --name kubedb-catalog --version v0.1 --namespace  kube-system
kubectl create -f mongo-instance.yaml

apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
  name: mongodb
  namespace: demo
  labels:
    app: mongodb-service-broker
spec:
  clusterServiceClassExternalName: mongodb
  clusterServicePlanExternalName: mongodb
  parameters:
    metadata:
      labels:
        app: my-mongodb
    spec:
      version: "3.4-v3"
      storageType: Durable
      storage:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
      terminationPolicy: WipeOut

bash  svcat describe instance mongodb --namespace demo  get

Status:      OrphanMitigation - Error provisioning ServiceInstance of ClusterServiceClass (K8S: "d690058d-666c-45d8-ba98-fcb9fb47742e" ExternalName: "mongodb") at ClusterServiceBroker "mongodb-service-broker": Status: 500; ErrorMessage: ; Description: failed to create d690058d-666c-45d8-ba98-fcb9fb47742e obj "mongodb" in namespace demo: admission webhook "mongodb.validators.kubedb.com" denied the request: mongodbversions.catalog.kubedb.com "3.4-v3" not found; ResponseError:  @ 2019-07-02 01:53:16 +0000 UTC
Reason
Seems we don't install MongoDBVersions( and also other dbVersions)

Maybe we can fix this by :

Using helm hooks , in AppsCode broker pre-instal hook , deploy a job to install all versions.
Move all crd definition out of kubedb-operator , to hack/deploy/crds , including DB crd and DB versions crd
Move all versions definition into kubedb-operator .

Sorry , I missed step 2 .
I should Check this
Remember install appscode/kubedb-catalog in step 2.


500 status loop when sending message to group

On trying to send a message to a group, I get this:
WARN parseAndCheckLogin Got status code 500 - 1. attempt to retry in 4601 milliseconds...

It retries (quite a bit faster than the time interval listed - about 500 ms after the first send was attempted) again and again, and continues to get the 500 code, though the messages are all actually going through to the group. Messages to an individual are working fine. I first noticed this approx. 4 days ago.
Did Facebook change something? Are there any more log details I need to gather?

Mmmmh intersting find. This might be due to new fields in the body of the request that we're not sending, causing their servers to be like "wut wut, this requests makes no sen". It could also be the URL we use to send the request isn't quite right or something?
Have you had a chance to look at what the browser does?

I just tested via Web Browser, this is what the browser send to www.messenger.com/messaging/send/

We make the request to https://www.facebook.com/messaging/send/, so testing it there might be a little better. Can you check if the request is different in that case?
Based on this request, the main differences seem to be the source and __pc.
https://github.com/Schmavery/facebook-chat-api/blob/61ddf3ce02767ac5c04f93232567cc7e67fb1afe/src/sendMessage.js#L374
and we don't have the __pc field. Could try tweaking those in your local sendMessage.js and see if it helps.
Everything else looks abouut right afaict


chore: merge develop into main

Features

Split Account Settings and Profile views (#397)
Add alert for outdated course calendars on home screen
Synchronize course calendar design (#439)
Enhance Dashboard navigation and layout (#434)
Enable course progress tracking with collapsible sections (#446)
Introduce calendar synchronization and FCM for notifications (#466)
Integrate FullStory and analytics capabilities (#471)
Implement relative dates in UI (#505)
Add offline mode for xBlocks (#474)
SAML-based single sign-on (#447)
Migrate iOS build to iOS 18 (#525)
Introduce iOS Mobile Plugin Architecture (#528)

Fixes

Default discovery enabled (#433)
Multiple CoreData-related crash fixes (#516, #518)
Fix crashes for SE device header, alerts on iPad, and gallery privacy (#482, #521, #522)
Update EnrollmentsStatus value to recentlyActive (#529)
Offline file deletion improvements (#527)
Synchronize with upstream changes (#526, #533)
Adjust Facebook SDK version for compatibility (#537)

Chores & Maintenance

Theme enhancements and back button customization
Add settings button for dashboard list view
Localization updates and typo corrections
Fastlane upgrade for CI/CD (#534)

Tests

Add unit tests for DownloadManager, AllCoursesViewModel, and PrimaryCoursesViewModel (#532, #537)

Thanks for the pull request, @IvanStepanok!
What's next?
Please work through the following steps to get your changes ready for engineering review:
:radio_button: Get product approval
If you haven't already, check this list to see if your contribution needs to go through the product review process.

If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.

This process (including the steps you'll need to take) is documented here.

If it doesn't, simply proceed with the next step.

:radio_button: Provide context
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

Dependencies

This PR must be merged before / after / at the same time as ...

Blockers

This PR is waiting for OEP-1234 to be accepted.

Timeline information

This PR must be merged by XX date because ...

Partner information

This is for a course on edx.org.

Supporting documentation
Relevant Open edX discussion forum threads

:radio_button: Get a green build
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
:radio_button: Let us know that your PR is ready for review:
Who will review my changes?
This repository is currently maintained by @openedx/openedx-mobile-maintainers.  Tag them in a comment and let them know that your changes are ready for review.
Where can I find more information?
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

Overview of Review Process for Community Contributions
Pull Request Status Guide
Making changes to your pull request

When can I expect my changes to be merged?
Our goal is to get community contributions seen and reviewed as efficiently as possible.
However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

The size and impact of the changes that it introduces
The need for product review
Maintenance status of the parent repository

:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.


Calling requests on byte object (image download) fails with JSON can't serialize

When trying to download images only behind Cloudflare with request, a byte object is returned causing utils.py/write_json to fail with "JSON can't serialize". It looks like that is just part of the normal saving to json action, but for bytes causes an issue.
To reproduce:
@request(use_stealth=True)
def scrape_file(request: Request, url: str):
    response = request.get(url)
    logging.debug(f"Used Botasaurus Stealth Request to process {url} with {response.status_code}")
    file = response.raw
    return file

file = scrape_file("https://www.masterofmalt.com/whiskies/praban-na-linne/poit-dhubh-21-year-old-whisky.jpg")

Issue seems to be that write_json always fires and fails on bytes object.
Proposal: Ignore byte objects?
def write_json(data, path, indent=4):
    # if data is a bytes object, just ignore it
    if isinstance(data, bytes):
        return
    with open(path, "w", encoding="utf-8") as fp:
        json.dump(data, fp, indent=indent)

Discussed in https://github.com/omkarcloud/botasaurus/discussions/169

Originally posted by MaxKarpyza August  3, 2024
I tried bt. save_image and the Driver download_file function. In the first case, the code returned is not 200, in the second case, it does not save anything at all. How else can I save the file? Site for testing https://www.sushifuji.ru/ufa

Please use custom output fn, and save as you wish.

Ah! Thank you, could not find this. Finally found it here:
https://github.com/omkarcloud/botasaurus?tab=readme-ov-file#output-and-output_formats
@task(output=None)
def scrape_heading_task(data):


Proxy container logs

By default containers output logs to stdout. It would be great to access currently running container logs via url: /logs/<session_id>. This will allow to show logs in face and proxy running session logs via ggr.

Fixed in #103.


ci: add PHP 8.4 to the CD pipeline

PHP 8.4 has been released today 🎉
Let's create builds for it.


Added character:  to font:  #538

Added character 'T' to font 'Carlos'
Referenced Issues
Issue #538
closes #538

@AryanBakliwal for further PRs, please get it assigned before pushing your changes. Please follow the guidelines. It helps us avoid conflicts.
Rest assured, thanks for contributing.


Fix some typing

#* Parameterize ReduxReactClass by an action type, change type parameters order to make it uniform with React-bindings Spec: props goes first, then state, and actions come last, as they're addition here

Alter type signature of Middleware, to reflect the fact that it can be composed and thus next middleware in chain can receive different action type.

TODO: semigroupoid instance for Middleware - that seems to require Middleware to be newtype rather than type synonym, which has some ugly consequences...
Also, it's late already and I'm not 100% sure I've made everything right, but openened this PR so that you can play around/check. I've also modified Example app to include some (useless) different Action types showing how the composition works: https://github.com/BartAdv/purescript-react-redux-example/tree/wip

Thanks for putting together this PR! Looking good.
I will take a closer look and dig in this weekend.
Thanks again for working on this!

I've been digging into the changes and mainly I'd like to further discuss the changes to the Middleware type.
Is there a driving use-case that you have in mind for having the middleware call next with a different type of action from the type of the store's action?
I was thinking that perhaps the use-case could be if there was an external middleware published and a user wanted to incorporate it into their app. However, the user would still have to map between their action type and the external. Consider the following example.
data ExternalAction = External1 | External2

externalMiddleware :: forall eff action state. Redux.Middleware eff action state Unit ExternalAction ExternalAction
externalMiddleware _ next =
  case _ of
       External1 -> next External2
       External2 -> next External1

Then in your app you could have:
externalMiddlewareTo :: Redux.Middleware (Effect eff) Action State Unit Action ExternalAction
externalMiddlewareTo _ next = -- ...

externalMiddlewareFrom :: Redux.Middleware (Effect eff) Action State Unit ExternalAction Action
externalMiddlewareFrom _ next = -- ...

And compose them:
externalMiddlewareFrom `composeMiddleware` externalMiddleware `composeMiddleware` externalMiddlewareTo

I am not sure if the above is clear, but I suppose adding the extra action type parameter makes something like this possible. Whereas before, I don't believe something like this is would have been possible.
Do you think this would be the main use-case for adding the extra action type? Curious on your take.

I'll address other issues later on, but as for the driving use case for Middleware type I'll blatantly say - I don't have one. It was something that struck me when browsing redux docs - they use this to allow action to be function for example (redux-thunk) etc. So it's just to make it in line with what redux offers. But I'm pretty sure we don't need to rely that much on Middleware here, in PS, as we have Aff etc...

Thank you very much for making the updates. Looking good. Understood about the middleware. I am still thinking about this a bit.


Request to have an inference config file in xml format.

[ ] The relevant Azure service or technology.
machine-learning

[ ] A link to the published documentation article that you have feedback about.
https://github.com/MicrosoftDocs/azure-docs/blob/master/includes/machine-learning-service-inference-config.md

https://docs.microsoft.com/en-us/azure/machine-learning/reference-azure-machine-learning-cli#inference-configuration-schema

[ ] Clear, specific feedback that the author can act on.
Can we have a xml sample of inference config file too?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6013f381-38ac-acff-3d9e-b45c5e8420cc
Version Independent ID: 52a0e03a-fbf0-b679-79b4-06374ea96466
Content: Install & use Azure Machine Learning CLI
Content Source: articles/machine-learning/reference-azure-machine-learning-cli.md
Service: machine-learning
Sub-service: core
GitHub Login: @jpe316
Microsoft Alias: jordane

@gary918 Thank you for your feedback . We will investigate and update the thread.

@shashishailaj Sorry for the typo, I'm asking for a 'yml' format, not a 'xml' format of inference_config.json.

@gary918 Thanks for question, Here is the link  to define your machine learning pipelines in YAML.
https://docs.microsoft.com/en-us/azure/machine-learning/reference-pipeline-yaml

@gary918 We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@ram-msft Thanks for your reply. Actually I'm looking for the YML version of inference_config.json provided in https://github.com/MicrosoftDocs/azure-docs/blob/master/includes/machine-learning-service-inference-config.md.
Here's the content of inference_config.json:
{
"entryScript": "score.py",
"environment": {
"docker": {
"arguments": [],
"baseDockerfile": null,
"baseImage": "mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04",
"enabled": false,
"sharedVolumes": true,
"shmSize": null
},
"environmentVariables": {
"EXAMPLE_ENV_VAR": "EXAMPLE_VALUE"
},
"name": "my-deploy-env",
"python": {
"baseCondaEnvironment": null,
"condaDependencies": {
"channels": [
"conda-forge"
],
"dependencies": [
"python=3.6.2",
{
"pip": [
"azureml-defaults",
"azureml-telemetry",
"scikit-learn==0.22.1",
"inference-schema[numpy-support]"
]
}
],
"name": "project_environment"
},
"condaDependenciesFile": null,
"interpreterPath": "python",
"userManagedDependencies": false
},
"version": "1"
}
}
Any suggestions?

@gary918 Thanks for the details. Here is the sample yml file InferenceConfig_w_env.yml, please do change the values based on your settings.
sourceDirectory: ./data/sourcedirectory
entryScript: ./score.py
environment:
docker:
arguments: []
baseDockerfile: null
baseImage: mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04
baseImageRegistry:
address: null
password: null
username: null
enabled: false
sharedVolumes: true
shmSize: null
environmentVariables:
EXAMPLE_ENV_VAR: EXAMPLE_VALUE
inferencingStackVersion: null
name: ax-inline-env1
python:
baseCondaEnvironment: null
condaDependencies:
channels:
- conda-forge
dependencies:
- python=3.6.2
- pip:
- azureml-defaults
- inference-schema[numpy-support]
- pandas
- numpy
- tqdm
- scikit-learn
- matplotlib
name: azureml_d4aa2cd89a93d211303665e2475b0c0c
condaDependenciesFile: null
interpreterPath: python
userManagedDependencies: false
spark:
packages: []
precachePackages: true
repositories: []
version: '1'

@ram-msft  Got it. Thank you very much!


.clear role and .clear history does not work with session

below is a session named: hello.yaml, where I defined a role polish:
path: null
model: openai:gpt-3.5-turbo-16k
tokens: 303
messages:
- role: system
  content: |
    I am seeking your expertise as a language expert to refine and polish the text I provide. Please focus on improving the wording without adding any additional comments, and send the improved text directly back to me.
- role: user
  content: The TV business is in flux once again. As a result, the risky, rule-breaking shows that defined television in the early 21st century are giving way to less original fare.
- role: assistant
  content: The television industry is undergoing another period of transformation. Consequently, the daring and boundary-pushing programs which characterized television in the early 21st century are being replaced by less innovative content.
- role: user
  content: The TV business is in flux once again. As a result, the risky, rule-breaking shows that defined television in the early 21st century are giving way to less original fare.
- role: assistant
  content: The television industry is once again experiencing a period of transition. Consequently, the daring and rule-breaking shows that defined television in the early 21st century are now being overshadowed by less pioneering content.
- role: user
  content: The TV business is in flux once again. As a result, the risky, rule-breaking shows that defined television in the early 21st century are giving way to less original fare.
- role: assistant
  content: The television industry is undergoing another period of change. As a result, the adventurous and groundbreaking shows that defined television in the early 21st century are now being replaced by less innovative content.

.clear history not work:
step to reproduce:
aichat -s hello

.clear history
<Ctrl-D>

Expected behavior: the content of hello.yaml should be cleared.
Actual behavior: the content of hello.yaml unchanged.
.clear role not work:
step to reproduce:
aichat -s hello

.clear role

Expected behavior: the role has been cleared (and if needed, we can clear history before clearing role), and we can reassign a role
Actual behavior: get the following error: Cannot perform this action in session

.clear history is used to clear the repl history, which will be used in ctrl+r searches.
The role is used to generate frist message, It will not be will not be serialized and saved. Did you see the role field in the session file?
Only sessions with no messages can/should use the .clear role. There is no need to run .clear role in a session with messages.

.clear history is used to clear the repl history, which will be used in ctrl+r searches.
The role is used to generate frist message, It will not be will not be serialized and saved. Did you see the role field in the session file? Only sessions with no messages can/should use the .clear role. There is no need to run .clear role in a session with messages.

The role is used to define the prompt of the system, as the first message saved in the chat history

.clear history is used to clear the repl history, which will be used in ctrl+r searches.
The role is used to generate frist message, It will not be will not be serialized and saved. Did you see the role field in the session file? Only sessions with no messages can/should use the .clear role. There is no need to run .clear role in a session with messages.

The ideal behavior is,
suppose I am in a hello session, I would like to use another system prompt, for example change from the polish role to another role like code-expert,
In previous version of the conversation mode, what I did is .clear role firstly and then .role code-expert,
in current version it is not possible unless I first  .clear session and .session to start a new session.
And there’s no way to override an existed session unless I go to the session folder and manually delete the hello.yaml file.

Only sessions/conversations without messages can use .clear role .role <name> to switch roles, not sessions with messages. Previous versions also followed this rule.

session file is used to save meaningful context for reuse next time.
If you think a session need to clear messages or switch roles, you should use a new temp session by aichat -s /.session(no name).

If you want to override a session, use temp session first.
〉.session

temp）1 to 5, odd only                                        4089
1, 3, 5

temp）to 7                                                    4070
1, 3, 5, 7

temp）                                                        4047
> Save session? Yes
> Session name: demo

session file is used to save meaningful context for reuse next time.
If you think a session need to clear messages or switch roles, you should use a new temp session by aichat -s /.session(no name).

Thanks for your reply. The API design makes sense to me and thanks for your work for this great light weighted tool!


r-description issues

hello! very exciting to see that someone else has taken to parsing. There are all sorts of funky edge-y cases that i have been bumbling around parsing in various ways.
I am going to look into this further as I justed tried quickly.
Here is a "real" (and extremely popular) R package description. Trying to run the following panics:
const DPLYR_DESC: &str = r#"
Type: Package
Package: dplyr
Title: A Grammar of Data Manipulation
Version: 1.1.4
Authors@R: c( person("Hadley", "Wickham"<EMAIL_ADDRESS>role =
        c("aut", "cre"), comment = c(ORCID = "0000-0003-4757-117X")),
        person("Romain", "François", role = "aut", comment = c(ORCID =
        "0000-0002-2444-4226")), person("Lionel", "Henry", role = "aut"),
        person("Kirill", "Müller", role = "aut", comment = c(ORCID =
        "0000-0002-1416-3412")), person("Davis", "Vaughan", ,
<EMAIL_ADDRESS>role = "aut", comment = c(ORCID =
        "0000-0003-4777-038X")), person("Posit Software, PBC", role =
        c("cph", "fnd")) )
Description: A fast, consistent tool for working with data frame like
        objects, both in memory and out of memory.
License: MIT + file LICENSE
URL: https://dplyr.tidyverse.org, https://github.com/tidyverse/dplyr
BugReports: https://github.com/tidyverse/dplyr/issues
Depends: R (>= 3.5.0)
Imports: cli (>= 3.4.0), generics, glue (>= 1.3.2), lifecycle (>= 1.0.3),
        magrittr (>= 1.5), methods, pillar (>= 1.9.0), R6, rlang (>=
        1.1.0), tibble (>= 3.2.0), tidyselect (>= 1.2.0), utils, vctrs (>=
        0.6.4)
Suggests: bench, broom, callr, covr, DBI, dbplyr (>= 2.2.1), ggplot2,
        knitr, Lahman, lobstr, microbenchmark, nycflights13, purrr,
        rmarkdown, RMySQL, RPostgreSQL, RSQLite, stringi (>= 1.7.6),
        testthat (>= 3.1.5), tidyr (>= 1.3.0), withr
VignetteBuilder: knitr
Config/Needs/website: tidyverse, shiny, pkgdown, tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
NeedsCompilation: yes
Packaged: 2023-11-16 21:48:56 UTC; hadleywickham
Author: Hadley Wickham [aut, cre]
        (<https://orcid.org/0000-0003-4757-117X>), Romain François [aut]
        (<https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut],
        Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>),
        Davis Vaughan [aut] (<https://orcid.org/0000-0003-4777-038X>),
        Posit Software, PBC [cph, fnd]
Maintainer: Hadley Wickham<EMAIL_ADDRESS>Repository: RSPM
Date/Publication: 2023-11-17 16:50:02 UTC
Built: R 4.3.0; x86_64-pc-linux-gnu; 2023-11-20 12:40:25 UTC; unix
"#;

             let desc: RDescription = DPLYR_DESC.parse().unwrap();
             dbg!(desc);

results in
thread 'main' panicked at src/main.rs:53:58:
called `Result::unwrap()` on an `Err` value: "expected ':', got Some(NEWLINE)\nexpected ':', got Some(NEWLINE)\nexpected ':', got Some(NEWLINE)\n"

I choose this example as there is indeed some funky wrapping that goes into some of these outputs that the r tooling generates - you can see in the imports there are line wraps between dependencies as an example.
I've been ever so slowly experimenting with parsing some of this https://github.com/A2-ai/exp-rust-rparser-tools/blob/main/rparsertools/src/rust/src/dependencies.rs and would be interested to see if its possible to take advantage of all the work you've put in here.
Would love your thoughts/impressions of the above and if you have any future plans around the existing work to assess if this is something that we could join together.

Thanks for the bugreport! I haven't done a lot of tests with R description fields, but they seem to use deb822 with slightly different fields styles than Debian control files, which is highlighting some bugs here.
I've fixed an oversight in the lexer that meant some field names weren't considered valid - it should now strictly follow deb822.
The other issue appears to be that my reading of the R DESCRIPTION spec only allowed a single URL in the URL field, rather than a list separated by comma's. For the moment I've reverted this back to just a plain string that the consumer can parse further.
I've also added the description you provided as a unit test.

Would love your thoughts/impressions of the above and if you have any future plans around the existing work to assess if this is something that we could join together.

I'd like to get the parser correct and functional, but have no plans beyond that. I would like to add support for properly parsing R style relations (i.e. Imports/Depends/Recommends), in the same way that the debian-control package already does for Debian (see debian-control/src/lossy/relations.rs in this repo).
In general, I'd be keen to hear about DESCRIPTION files that the parser fails to deal with - either with PRs fixing said issues or without :)

The lossy parser now also supports parsing relations strings.

FWIW the R DESCRIPTION crate is now in its own repository at https://github.com/jelmer/r-description-rs


fix: Cannot add new events after calling close

Description
Open a socket, listen to messages, run socket.close();
Steps To Reproduce

Open a socket
Await the Connected state
Listen to messages (2-3 msgs / sec) and print(event)
Close socket

Expected Behavior
Socket closes peacefully.
Screenshots
I/flutter (27831): Bad state: Cannot add new events after calling close
I/flutter (27831): #0      _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:243:24)
I/flutter (27831): #1      _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
I/flutter (27831): #2      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
I/flutter (27831): #3      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
I/flutter (27831): #4      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
I/flutter (27831): #5      _HandleErrorStream._handleData (dart:async/stream_pipe.dart:253:10)
I/flutter (27831): #6      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
I/flutter (27831): #7      _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
I/flutter (27831): #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
I/flutter (27831): #9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
I/flutter (27831): #10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
I/flutter (27831): #11     _StreamController._add (dart:async/stream_controller.dart:648:7)
I/flutter (27831): #12     _StreamController.add (dart:async/stream_controller.dart:596:
Additional Context
Add any other context about the problem here.

Same issue

I have same issue

I have the same issue, there's a PR which attempts to fix it, https://github.com/felangel/web_socket_client/pull/18 , @felangel  any chance of this being reviewed and merged?

I have the same issue, there's a PR which attempts to fix it, #18 , @felangel any chance of this being reviewed and merged?

Yup sorry for the delay! I’ll try to get this merged this evening.


False negatives with Java 11 (but as-expected behaviour with Java 8)

Example source code can be found here . The package issue1 contains 4 simple classes Foo1A, Foo1B, Foo2A, Foo2B all containing a NP issue triggered by null flowing from a producer to a consumer with some minor variations. This can be verified by running the respective main methods in those classes.
public class Foo1A {

    public static void main (String[] args) {
        String value = provide();
        consume(value);
    }

    public static String provide() {
        return null;
    }

    public static void consume(String value) {
        String value2 = value.toLowerCase();
        System.out.println(value2);
    }
}

public class Foo1B {

    public static void main (String[] args) {
        consume();
    }

    public static String provide() {
        return null;
    }

    public static void consume() {
        String value = provide();
        String value2 = value.toLowerCase();
        System.out.println(value2);
    }
}

(the other two classes are similar, see full example )
When running infer v1.1.0 with the following command:
infer run -- mvn clean compile
using Java 8
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

all 4 issues are detected as expected.
However, when running infer with Java 11:
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

, then only the null dereference in Foo1B is correctly detected (src/main/java/issue1/Foo1B.java:15:). Using the parameter --java-version 11 does not fix this.

waiting for solve, please

This is likely due to changes in debug format with javac -g. Infer parses that output and changes in it lead to missed files.
In particular, this regular expression may need to be updated.


Should we do a release?

There has been a handful of new features since 0.5, including some API changes, that would be good to get out the door so people can update code that relies on a released version.
I was hoping to solve https://github.com/nipy/PySurfer/issues/91, but am at a loss for what the issue is.
Any objections to cutting 0.6 soon? @Eric89GXL, @agramfort, others?

Sounds reasonable to me, it would be a good idea to push out a release

+1 for release too. It's long overdue indeed.

Better late than never


UE4Editor Not Responding as soon as I launch generate_traffic.py

Right after I run the example script "generate_traffic.py" using the command "python generate_traffic.py" on the x64 Tool terminal, UE4Editor instantly freezes and it no longer responds. There is no errors displayed on the terminal. Also other scripts like "dynamic_weather.py" work fine.
I have tried reinstalling Carla but nothing changed. Let me know if you have any suggestions for solutions.
CARLA version: 9.0.13
Platform/OS: Windows 10
Python Version: 3.9.6
My PC Specs are:
CPU: Intel i7-8700
RAM: 32 GB
GPU: MSI RTX 3080

@Rusab, Are u trying on Linux(ubuntu). Carla does not recommended windows -
https://github.com/carla-simulator/carla#recommended-system


Events Path value

GODOT 2.1.4 stable, Windows 8.1
 tutorial  -- Points from 6 to 12
Global Id of my 2DNode is cat. Name of scene is cat.tscn
I have four files with same content.
When I set Events Path value to cat.esc I have two lines of dialog.
When I set Events Path value to cat1.esc I have two lines of dialog.
When I set Events Path value to old_man.esc I have ONLY first line of dialog.
When I set Events Path value to кириллица.esc I have ONLY first line of dialog.

Not a high priority at all. Juan told me on reddit, reported and voting to close.

@reduz

Sorry for the very long time response. I'll try to reproduce this problem first so we can determine whether this is a real bug or a misuse at some point.

I'm not able to reproduce this issue using https://github.com/flossmanualsfr/escoria/tree/2.1.4.

I have created changed the contents of old_man.esc to:
  :talk
  say cat "Hello young panda."
  say cat "Don't worry, you'll succeed."
  set_global introduced true
  stop

and copied the file to cat.esc, cat1.esc and кириллица.esc.

I have changed the name of the old_man node to "cat" and also set its global_id to "cat".

I load the scene, using the four different files as the "Event Paths" value, one after the other.

I see both lines of dialogue printed every time.
@skhello27: If you make your project available on GitHub, I'd be happy to take a look, as I'm not able to retrace the steps required to trigger the described behavior.

Do you set the property after loading the scene? maybe that's the problem,
the path has to be set when _ready() is called, that's where the esc is
loaded
On 6 December 2017 at 16:55, Eivind<EMAIL_ADDRESS>wrote:

I'm not able to reproduce this issue using https://github.com/
flossmanualsfr/escoria/tree/2.1.4.

I have created changed the contents of old_man.esc to:
 :talk
 say cat "Hello young panda."
 say cat "Don't worry, you'll succeed."
 set_global introduced true
 stop

and copied the file to cat.esc, cat1.esc and кириллица.esc.
I have changed the name of the old_man node to "cat" and also set its
global_id to "cat".
I load the scene, using the four different files as the "Event Paths"
value, one after the other.
I see both lines of dialogue printed every time.
@skhello27 https://github.com/skhello27: If you make your project
available on GitHub, I'd be happy to take a look, as I'm not able to
retrace the steps required to trigger the described behavior.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/escoria/issues/37#issuecomment-349756076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGVmPTb6paRjyR1U3ao519LDePrJ5cU4ks5s9vFEgaJpZM4QjjZr
.

I tested this with a node with events and no global_id. It worked, I never even considered having a global_id. When I set global_id to something completely different from both the file name and the node name, the events still worked.
Can this issue be closed from clobbering the list?


Remove singuliere from MAINTAINERS

I have been subject to hostile behavior from another Gitea maintainer.
Evidence were deleted by the Gitea owners and I will not provide names
to protect their privacy. This has been a recurring occurrence and I
do not want to be exposed to such behavior in the future, reason why I
will stop contributing to Gitea.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@e32ab42). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #19883   +/-   ##
=======================================
  Coverage        ?   47.28%
=======================================
  Files           ?      958
  Lines           ?   133383
  Branches        ?        0
=======================================
  Hits            ?    63070
  Misses          ?    62643
  Partials        ?     7670

Continue to review full report at Codecov.

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

@singuliere please don't go.
My comment deletions were to stop the fight from ongoing. I'd reached out to you on discord before things blew up but you had not logged on.

Please could you please contact me on discord or matrix.

Or you can close this PR. @singuliere

@singuliere I'm extremely sorry that you feel this way and that you have been made to feel this way, but I wish you had chosen to get in touch with me or any of the other owners instead of going down this path.
Leaving things to the point that there is an explosion does not give us any chances to fix things.
I'll merge this PR using my administrator powers. If you change your mind and decide you want to come back you'll be welcome to back. If you want to talk to us please do get in touch.


:recycle: res.warnings is an optional return

API calls to models such as facebook/blenderbot-400M-distill do not return any warnings, therefore the package throws an InferenceOutputError. With this commit, res.warnings can be either undefined or the said definition.

Thanks!


Report page: Highlight pathogen name on hover to show it's clickable

@tfrcarvalho moved into (a) .report-table section. Verified that hover-wrapper and link-tag are only in the report table sections / still working.


Add examples/echo

The echo example demonstrates how to have Pion
send back to the user exactly what it receives
using the same PeerConnection.
Relates to #560
Co-authored-by: Patrice Ferlet<EMAIL_ADDRESS>

Thanks a lot and sorry to not help more, I'm on a complex project that is taking all of my time. (Note, you're using my pro email, not my personnal, that's not a problem at all, but don't be surprise if I'm using another email/login sometimes :) )

@metal3d
Hey no worries at all about being busy :) The nice thing about Open Source is you can contribute to what interests you/have time for!
The most important thing is getting feedback. I can do the technical work, but is hard to know what peoples perception of the project is/what could be easier to use. So if you ever have ideas/features in the future would love to hear them.
thanks


feat: make parse_float_as_decimal work on negative numbers

Which issue does this PR close?
N/A
Rationale for this change
The option datafusion.sql_parser.parse_float_as_decimal does not work on negative numbers.
DataFusion CLI v31.0.0
0 rows in set. Query took 0.001 seconds.

❯ set datafusion.sql_parser.parse_float_as_decimal=true;
0 rows in set. Query took 0.001 seconds.

❯ select 1.1, -1.1;
+--------------------------+---------------+
| Decimal128(Some(11),2,1) | Float64(-1.1) |
+--------------------------+---------------+
| 1.1                      | -1.1          |
+--------------------------+---------------+
1 row in set. Query took 0.006 seconds.

The number -1.1 is parsed as a Float64 type, but it is expected to be of Decimal type.
This is because the expr SQLExpr::Value(Value::Number(n, _)) only contains unsigned numbers.
https://github.com/sqlparser-rs/sqlparser-rs/blob/7723ea56c5119c7d1a15233c18eb2aaf48b60dc0/src/tokenizer.rs#L53-L54
Negative numbers are parsed as UnaryOperator::Minus, but handling UnaryOperator::Minus is not compatible with the option datafusion.sql_parser.parse_float_as_decimal .
https://github.com/apache/arrow-datafusion/blob/19174e76656adec353f85ff468654ba210dc9cda/datafusion/sql/src/expr/unary_op.rs#L38-L51
What changes are included in this PR?

Make parse_float_as_decimal work on negative numbers
Parsing i64::MIN as an Int64 type, previously it was a Float64.

❯ select -9223372036854775808;
+-------------------------------+
| Float64(-9223372036854776000) |
+-------------------------------+
| -9.223372036854776e18         |
+-------------------------------+

Support parsing 0. as Decimal, previously raise an error.

❯ select 0.;
SQL error: ParserError("Cannot parse  as i128 when building decimal: cannot parse integer from empty string")

Are these changes tested?
Yes
Are there any user-facing changes?
No

Thanks @jonahgao


UEBA Module - Add anomalies support

UEBA module will cross reference the user entities with the Anomalies table to see if there are any relevant anomalies.


createdAtBlockNumber contains false data

I'm querying the following:
query {
  nfts(first: 1000, where: {
    createdAtBlockNumber_lt: 14323199,
    createdAtBlockNumber_gte: 14304318 }) {
    id,
    createdAtBlockNumber
  }
}

and my results look like this:
{
  "data": {
    "nfts": [
      {
        "id": "0x1a387136fcde3a82b0a6629fc64982de535cd406/1",
        "createdAtBlockNumber": "14316604"
      },
...
]

You can try it yourself here: https://api.thegraph.com/subgraphs/name/timdaub/web3musicsubgraph/graphql
However, at least for the first nft, I believe the createdAtBlockNumber field is incorrect. If we do some research on Etherscan for 0x1a387136fcde3a82b0a6629fc64982de535cd406, we find that this NFT was created at a different block: https://etherscan.io/tx/0xb1918ca04a829ff1712025a57e5cb42f0fb6cbab8a0955b3b5ed83fe27a90420 at block number 14323199

@TimDaub the above etherscan link you shared doesn't match the nft: 0x1a387136fcde3a82b0a6629fc64982de535cd406/1 -> https://etherscan.io/tx/0x21de92547f428615bbc62417270e3bda711b5a20e27fa0490332abb1a00b71ad which is at block 14316604.
is there another example you meant to refer to? it could be that the createdAtBlockNumber is being replaced on each transfer rather than just on the mint, though I'm not really maintaining this repo anymore.


[Change Request] page 255 "Cash Receipt Journal"

Describe the request
Hello, can you please move the variables GenJnlManagement, AccName, BalAccName to protected?
    var
        GeneralLedgerSetup: Record "General Ledger Setup";
        SalesReceivablesSetup: Record "Sales & Receivables Setup";
        ClientTypeManagement: Codeunit "Client Type Management";
        JournalErrorsMgt: Codeunit "Journal Errors Mgt.";
        BackgroundErrorHandlingMgt: Codeunit "Background Error Handling Mgt.";
        PrivacyNotice: Codeunit "Privacy Notice";
        PrivacyNoticeRegistrations: Codeunit "Privacy Notice Registrations";
        ApprovalMgmt: Codeunit "Approvals Mgmt.";
        ChangeExchangeRate: Page "Change Exchange Rate";
        GenJnlBatchApprovalStatus: Text[20];
        GenJnlLineApprovalStatus: Text[20];
        TotalBalance: Decimal;
        NumberOfRecords: Integer;
        ShowBalance: Boolean;
        ShowTotalBalance: Boolean;
        BalanceVisible: Boolean;
        TotalBalanceVisible: Boolean;
        IsPostingGroupEditable: Boolean;
        IsPowerAutomatePrivacyNoticeApproved: Boolean;
        OpenApprovalEntriesExistForCurrUser: Boolean;
        OpenApprovalEntriesExistForCurrUserBatch: Boolean;
        OpenApprovalEntriesOnJnlBatchExist: Boolean;
        OpenApprovalEntriesOnJnlLineExist: Boolean;
        OpenApprovalEntriesOnBatchOrCurrJnlLineExist: Boolean;
        OpenApprovalEntriesOnBatchOrAnyJnlLineExist: Boolean;
        ShowWorkflowStatusOnBatch: Boolean;
        ShowWorkflowStatusOnLine: Boolean;
        CanCancelApprovalForJnlBatch: Boolean;
        CanCancelApprovalForJnlLine: Boolean;
        IsSaaSExcelAddinEnabled: Boolean;
        CanRequestFlowApprovalForBatch: Boolean;
        CanRequestFlowApprovalForBatchAndAllLines: Boolean;
        CanRequestFlowApprovalForBatchAndCurrentLine: Boolean;
        CanCancelFlowApprovalForBatch: Boolean;
        CanCancelFlowApprovalForLine: Boolean;
        AmountVisible: Boolean;
        DebitCreditVisible: Boolean;
        IsSaaS: Boolean;
        JobQueuesUsed: Boolean;
        JobQueueVisible: Boolean;
        BackgroundErrorCheck: Boolean;
        ShowAllLinesEnabled: Boolean;
        EnabledGenJnlLineWorkflowsExist: Boolean;
        EnabledGenJnlBatchWorkflowsExist: Boolean;
        ApprovalEntriesExistSentByCurrentUser: Boolean;
        UseAllocationAccountNumber: Boolean;
        ActionOnlyAllowedForAllocationAccountsErr: Label 'This action is only available for lines that have Allocation Account set as Account Type or Balancing Account Type.';

    protected var
        CurrentJnlBatchName: Code[10];
        Balance: Decimal;
        ApplyEntriesActionEnabled: Boolean;
        ShortcutDimCode: array[8] of Code[20];
        DimVisible1: Boolean;
        DimVisible2: Boolean;
        DimVisible3: Boolean;
        DimVisible4: Boolean;
        DimVisible5: Boolean;
        DimVisible6: Boolean;
        DimVisible7: Boolean;
        DimVisible8: Boolean;
       GenJnlManagement: Codeunit GenJnlManagement;
        AccName: Text[100];
        BalAccName: Text[100];

Additional context
We would like use in a Page Extension.
Internal work item: AB#498101

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 15971.


EventLoopScheduler Scheduling Bug

Actions that are scheduled from within a scheduled action can be called out of order, which causes unpredictable behavior.

Got a code sample that shows the behavior?

This issue is related to this issue: https://github.com/reactphp/event-loop/issues/14
After taking a closer look, this could be resolved a different way than the existing #37.
Example that reproduces the behavior for me:
$loop = \React\EventLoop\Factory::create();
$scheduler = new \Rx\Scheduler\EventLoopScheduler($loop);

$o = \Rx\Observable::range(0, 10000)
    ->delay(200)
    ->flatMap(function ($x) {
        return \Rx\Observable::just($x);
    });

$lastItem = -1;
$itemCount = 0;

$o
    ->subscribeCallback(
        function ($x) use (&$lastItem, &$itemCount) {
            echo $x . "\n";
            if ($x !== $lastItem + 1) {
                throw new Exception("Out of order after " . $itemCount . " items");
            }
            $lastItem = $x;
            $itemCount++;
        },
        function ($e) {},
        function () use (&$itemCount) {
            echo "Completed with " . $itemCount . " items.\n";
        },
        $scheduler
    );

$loop->run();

The items quickly fall out of order (or possibly never happen because onCompletes are getting called prior to finishing onNexts). There are a few other examples, but they are caused by scheduled events that are not happening in the order expected.
PR #37 fixes the problem by grouping all actions scheduled during a scheduled action together with any other items scheduled for the same time. It stores them in an array and executes them in order at 1 scheduled time.
This can also be resolved by only scheduling one item at a time (using a recursive scheduler if you need to schedule more than one) and always scheduling each item separately (don't call onNext and onCompleted in the same scheduled action). I am not sure if they ran into this issue in RxJS, but it appears that they are generally following these rules. In https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/delay.js they materialize then timestamp recursively scheduling one item at a time using relative times. This option seems like it could be a better solution, but the guidelines would have to be followed when implementing things in the future (or if someone decides to use the scheduler). This only effects operators that schedule actions or create observables. Operators that are just pass-through (like map, etc.) would not need to worry about it.
Most of the project is already compliant with these guidelines (ReturnObservable, delay, and possibly others are not right now).

Here is a quick bit of code that triggers it:
$startTime = time();

$loop = \EventLoop\getLoop();

$scheduler = new Rx\Scheduler\EventLoopScheduler($loop);

$observable = new Rx\Observable\ArrayObservable(range(1, 10), $scheduler);

$selectManyObservable = $observable

    ->flatMap(function($value) {
        return  \Rx\React\Http::get("https://publicdata-airports.firebaseio.com/.json");

    }, $scheduler)

    ->flatMap(function($value) {
        $nodes = json_decode($value);

        $relatedNodes = [];
        foreach($nodes as $key => $node)
        {
            $relatedNodes[] = $key;
        }

        return new Rx\Observable\ArrayObservable($relatedNodes);

    }, $scheduler)

    ->flatMap(function($value){
        return \Rx\React\Http::get("https://publicdata-airports.firebaseio.com/{$value}.json");
    },$scheduler)

    ->map(function($value) use($startTime) {
        return time() - $startTime;
    },$scheduler);

$disposable = $selectManyObservable->subscribe($stdoutObserver, $scheduler);

$loop->run();


winrt_activation_handler help

https://github.com/microsoft/cppwinrt/blob/198a8270d16cead25edec4a63d8792b267539fd5/test/test/custom_activation.cpp
Tried the above example. Get compilation error
Error	C2079	'winrt::impl::producer<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>::vtable' uses undefined struct 'winrt::impl::produce<D,I>'	cppwinrt_custom_activation
The above test code as console app.
**** pch.h***
#pragma once

#include <windows.foundation.h>

#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>

#include <assert.h>

****** main.cpp ***
#include "pch.h"

using namespace winrt;
using namespace Windows::Foundation;

namespace
{
    struct custom_factory : implements<custom_factory, IUriRuntimeClassFactory>

    {
        inline static Uri mock_uri{ nullptr };

        Uri CreateUri(hstring const& value) const
        {
            assert(value == L"http://ignored.com");
            return mock_uri;
        }

        Uri CreateWithRelativeUri(hstring const&, hstring const&) const
        {
            throw hresult_not_implemented();
        }
    };

    int32_t __stdcall handler(void* classId, winrt::guid const& iid, void** factory) noexcept
    {
        bool expected = reinterpret_cast<hstring const&>(classId) == L"Windows.Foundation.Uri";
        assert(expected);
        assert(iid == guid_of<IUriRuntimeClassFactory>());

        *factory = detach_abi(make<custom_factory>());
        return 0;
    }
}

int main()
{
    init_apartment();
    Uri uri(L"http://aka.ms/cppwinrt");
    printf("Hello, %ls!\n", uri.AbsoluteUri().c_str());;

    custom_factory::mock_uri = Uri(L"http://actual.com");
    clear_factory_cache();

    // Set up global handler
    assert(!winrt_activation_handler);
    winrt_activation_handler = handler;

    // Windows.Foundation.Uri activation factory now returns mock object
    uri = Uri(L"http://ignored.com");
    assert(uri.Domain() == L"actual.com");

    // Remove global handler
    winrt_activation_handler = nullptr;
    clear_factory_cache();
}

The error message refers to cppwinrt_custom_activation but that declaration ever appears in the repro.

The error message refers to cppwinrt_custom_activation but that declaration ever appears in the repro.

That is just my console app/project name. Here is the full error message
Build started...
1>------ Build started: Project: cppwinrt_custom_activation, Configuration: Debug x64 ------
1>main.cpp
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6804,3): error C2079: 'winrt::impl::producer<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>::vtable' uses undefined struct 'winrt::impl::produce<D,I>'
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6488): message : see reference to class template instantiation 'winrt::impl::producer<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6501): message : see reference to class template instantiation 'winrt::impl::producer_convert<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(7697): message : see reference to class template instantiation 'winrt::impl::producers_base<D,std::tuple<winrt::Windows::Foundation::IUriRuntimeClassFactory>>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\main.cpp(9): message : see reference to class template instantiation 'winrt::implements<`anonymous-namespace'::custom_factory,winrt::Windows::Foundation::IUriRuntimeClassFactory>' being compiled
1>Done building project "cppwinrt_custom_activation.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

That is just my console app/project name. Here is the full error message
Build started...
1>------ Build started: Project: cppwinrt_custom_activation, Configuration: Debug x64 ------
1>main.cpp
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6804,3): error C2079: 'winrt::impl::producer<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>::vtable' uses undefined struct 'winrt::impl::produce<D,I>'
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6488): message : see reference to class template instantiation 'winrt::impl::producer<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(6501): message : see reference to class template instantiation 'winrt::impl::producer_convert<D,winrt::Windows::Foundation::IUriRuntimeClassFactory,void>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\x64\Debug\Generated Files\winrt\base.h(7697): message : see reference to class template instantiation 'winrt::impl::producers_base<D,std::tuple<winrt::Windows::Foundation::IUriRuntimeClassFactory>>' being compiled
1>        with
1>        [
1>            D=`anonymous-namespace'::custom_factory
1>        ]
1>C:\MyDevProjects\MyProjects\CppPatterns\cppwinrt_custom_activation\main.cpp(9): message : see reference to class template instantiation 'winrt::implements<`anonymous-namespace'::custom_factory,winrt::Windows::Foundation::IUriRuntimeClassFactory>' being compiled
1>Done building project "cppwinrt_custom_activation.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I can't repro this, but older Visual C++ compilers had a bug where they don't correctly resolve namespace types under certain conditions. I notice you are including <windows.foundation.h> - that will trigger the bug I'm thinking of. You should not need to include the ABI definition at all.

I can't repro this, but older Visual C++ compilers had a bug where they don't correctly resolve namespace types under certain conditions. I notice you are including <windows.foundation.h> - that will trigger the bug I'm thinking of. You should not need to include the ABI definition at all.

I use  Version 16.9.0 Preview 3.0
Added <windows.foundation.h>thinking i might help. But it does'nt work without either.
Attached the full project
cppwinrt_custom_activation.zip

I use  Version 16.9.0 Preview 3.0
Added <windows.foundation.h>thinking i might help. But it does'nt work without either.
Attached the full project
cppwinrt_custom_activation.zip

Oh, you have WINRT_LEAN_AND_MEAN defined. This won't let you implement this interface since it is exclusive to the Uri class. You can undef this and you should be good to go.

Oh, you have WINRT_LEAN_AND_MEAN defined. This won't let you implement this interface since it is exclusive to the Uri class. You can undef this and you should be good to go.

Thank you. That was it. That macro was added by the template.
Could you please expand on the reason ' This won't let you implement this interface since it is exclusive to the Uri class.'

Thank you. That was it. That macro was added by the template.
Could you please expand on the reason ' This won't let you implement this interface since it is exclusive to the Uri class.'

If you look at the metadata (e.g. winmd file) for the interface, it is marked with the ExclusiveToAttribute attribute. This means that, strictly speaking, there should only ever be one implementation of this interface and it must come from the class that the interface is exclusive to. The WINRT_LEAN_AND_MEAN macro takes advantage of this by eliding all of the scaffolding necessary to support implementations of interfaces that you are not normally meant to implement in order to reduce build time.

If you look at the metadata (e.g. winmd file) for the interface, it is marked with the ExclusiveToAttribute attribute. This means that, strictly speaking, there should only ever be one implementation of this interface and it must come from the class that the interface is exclusive to. The WINRT_LEAN_AND_MEAN macro takes advantage of this by eliding all of the scaffolding necessary to support implementations of interfaces that you are not normally meant to implement in order to reduce build time.

Great!! Thank you

Great!! Thank you


Internet Explorer 11 – no image at all

Not sure if it is a bug, maybe I also don't quite understand the internet explorer part.
What is happening?
I use the plugin with srcset and in IE11 I don't see any image at all.
There is the DOM element, with a srcset but no src attribute:
<img class="Hero__image Hero__lazy" alt=""
  data-src="https://cms.domain.ch/content/uploads/2019/02/beer2000x1500-720x540.jpg"
  data-srcset="https://cms.domain.ch/content/uploads/2019/02/beer2000x1500-2000x1500.jpg 2000w, https://cms.domain.ch/content/uploads/2019/02/beer2000x1500-1440x1080.jpg 1440w, https://cms.domain.ch/content/uploads/2019/02/beer2000x1500-1280x960.jpg 1280w, https://cms.domain.ch/content/uploads/2019/02/beer2000x1500-720x540.jpg 720w"
  data-sizes="(min-width: 1440px) 50vw, (min-width: 768px) 50vw, 100vw"
>

So IE 11 is not capable of interpreting srcset, but without a normal src there is nothing to fallback.
Which version of LazyLoad are you using?
"vanilla-lazyload": "^10.20.0",
In which browser(s) and browser version(s) are you experiencing the problem?
Internet Explorer 11
What are the steps to reproduce the problem?
Probably just use some code like:
<img class="lazy" data-src="/your/image1.jpg"
    data-srcset="/your/image1.jpg 200w<EMAIL_ADDRESS>400w"
    data-sizes="(min-width: 20em) 35vw, 100vw"
>

And then open up IE11.
I am aware of the Note about Internet Explorer part in your readme. But first if I log
    console.log('typeof window.CustomEvent: ', (typeof window.CustomEvent));
I get: typeof window.CustomEvent:  function.
So in IE11 it seems to be a function. Maybe this is related to some polyfills I am using anyway. Or some setup in my nuxt project.
The only error I get my console (using browserstack, IE11):
Script1002: Syntax error
File: vendors.app.js, Line: 6305, Column: 46

Which leads me to this:

const replaceExtToWebp = (value, condition) =>
Seems that arrow functions could be a problem?
So I guess your plugin is not IE compatible if relying on arrow functions?
Is there something I am overseeing?
Thank you.

Edit:
I saw that you recommend using version 8.17.0.
So I installed that package and now everything seems to be broken:
navigator is not defined

Edit 2:
I just keep posting some updates, maybe someone goes through the same process once.
I realized there are demos that I can just ran by calling al ink. For example
https://www.andreaverlicchi.eu/lazyload/demos/with_srcset_sizes.html
I realize that your images indeed have a src set. And you don't have a console error.
So I guess it has to do with the usage of the new version installed as npm package, which ships code that is not IE11 ready...

Solution:
Well I found a solution: I transpile the node_module in my webpack config from ES6 to something readable by IE11.
I now get an image.
I hope this is all good for now.

Hi @Jones-S, maybe I can be of some help here because I've got a live example which is 99% similar to what you need and, most importantly of all, is working (we recently brought it on the live servers).
Here's the code:
(function(w, d) {
    var b = d.getElementsByTagName('body')[0];
    var s = d.createElement('script');
    var v = !('IntersectionObserver' in w) ? '8.17.0' : '10.19.0';
    s.async = true;
    s.src = 'https://cdn.jsdelivr.net/npm/vanilla-lazyload@' + v + '/dist/lazyload.min.js';
    w.lazyLoadOptions = {
        elements_selector: '.lazy-img',
        callback_load: function(lazyImage) {
        lazyImage.parentElement.className += ' bgc-transparent';
        }
    };
    b.appendChild(s);
}(window, document));

Let me break it down for you (the way I would've liked someone to explain me at the beginning 😂): following the recipes you alredy know I loaded a different version based on the value of the v variable inside the IIFE function (meaning based on IntersectionObserver support). I've also mixed this recipe with another one listed on the plugin page to be able to lazy load the images again and have an instance with a callback available so I can fire the plugin again after the load event (we have products filters on the site linked above that load additional content via ajax).
Hope this clarifies and helps you and anybody coming across this. Bye. 😉

Guess this is solved by now.
Thank you @Jones-S for the updates and @vcoppolecchia
Or do I still need to fix anything?

No I think it's all good. For my case I like to not load the script in separately but rather include it into my minified js to have only one request.
Maybe it would be nice to mention that the npm package is not IE ready and it needs to go through some conversion to make it browser compatible in your readme, but other than that no fixes required. Thank you


postman boostrap failing in mapItemToFile

Hi,
tried to setup and experiment with postman-cli.

postman setup went alright
postman bootstrap failed in mapItemToFile

Here's the error I had:
node:9881) UnhandledPromiseRejectionWarning: TypeError: item.find is not a function
at mapItemToFile (/Users/myself/Workspace/postman-cli-sandbox/node_modules/@matt.ball/postman-cli/src/bootstrap.js:24:105)
at recurseCollectionForItems (/Users/myself/Workspace/postman-cli-sandbox/node_modules/@matt.ball/postman-cli/src/lib/recurse-collection.js:32:20)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
I added a little bit of logging. It seems that the item at stake is:
{
name: 'Random cat pictures',
_postman_id: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx',
protocolProfileBehavior: { disableBodyPruning: true },
request: {
method: 'GET',
header: [],
url: {
raw: 'https://aws.random.cat/meow',
protocol: 'https',
host: [Array],
path: [Array]
}
},
response: []
}
Its type is: 'request'
I guess the issue is coming from :
const scriptObj = (item.event && item.event.find((el) => el.listen === type)) || (!item.event && item.find((el) => el.listen === type))
But I could not really decipher what we are trying to do, so I did not investigate further.

Thanks for reporting @rucharnaud
What version of the CLI are you using? Any chance you can share the collection you are using? (remove any secrets, export from the app)

Hi @matt-ball ,
I'm using version 0.0.25
Here the collection I've been using:
Perso.postman_collection.json.zip
Regards,
Arnaud

Thanks for sharing.
@rucharnaud please try 0.0.26 and let me know if that fixes the issue!

Yes it does.
Thank you @matt-ball

Great! I'll close this out - feel free to open another issue if you run into other bugs/have a feature request.