Add basicpublishingcredentialspolicies to Microsoft.Web 2019-08-01

…8-01
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

/azp run automation - sdk

Can one of the admins verify this patch?

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

@weidongxu-microsoft Can you mark for ARM approval again as we have added some more changes? Also, there are some additional changes that need breaking change approval.

The breaking change here is actually fixing a regression in the swagger for version 2019-08-01 where one enumeration ("SystemAssigned, UserAssigned") was accidentally excluded when publishing this version.
https://github.com/Azure/azure-rest-api-specs/blob/260aa3d5e9467700068787493861f92fc590800c/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/CommonDefinitions.json#L1316

@naveedaz
Thanks, the I no longer need this PR https://github.com/Azure/azure-rest-api-specs/pull/9375/files
Please note that WebApps.json defines 3 value enum with same "x-ms-enum" as "ManagedServiceIdentityType"
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/Microsoft.Web/stable/2019-08-01/WebApps.json#L21290
This will likely cause explicit or implicit problem when generating code on SDKs due to naming conflict. 2 different enum (one with 3 values, another with 4 values) going to take a same name of ManagedServiceIdentityType.

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk

@ravbhatnagar I see you are the ARM on-call for this week. I have addressed Chirag's comments so could you take a look and sign off please?

@ravbhatnagar gentle ping.

@KrisBash I see you are on-call for this week. Could you please take a look at this PR?

@weidongxu-microsoft Can you merge this please as it has been signed off?

@akning-ms
Hello Arthur, could you help merge this PR?
The BreakingChange is due to bug fix. The enum "SystemAssigned, UserAssigned" is always there, but was mistakenly removed in 2019-08-01

/openapi pipeline


skopeo ppa doesn't have libostree-1-1

 sudo apt install skopeo
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 skopeo : Depends: libostree-1-1 but it is not installable

@lsm5 do you maintain this PPA, or do you know who does?

Seems this is fixed now, thanks to whatever magic was worked!


Create Give Page

I'm not sure how everyone feels about grabbing text snippets from the third-party sites to fill the gaps a bit, but I wanted to do it at least for this screenshot.
It's the ones outlined in red:

If something like that is iffy, I'll go ahead and remove those blurbs for now.
Closes #161

Thanks.
We;ll probably adjust the copy on the HG Labs page, but what we have is fine for now.
I'll ping the other folks involved for feedback on the text snippets as they relate to their orgs.

If that creates an unnecessary bottleneck, I can just remove that and adding blurbs can become a smaller PR.

The page looks oustanding! I think this will make for a solid platform to build off of moving forward. Thank you so much for putting this together!

@JSn1nj4 no rush, but I figured to check in and see if we're feeling comfortable, or close to comfortable, about the state of this PR after the comments from Matt, Bogdan, and Zach.
It doesn't seem the organizers of the initiatives had much feedback on changing the existing text, so we can go live and always change the verbiage later once it's live people feel more compelled to share their feedback.

I think it's good to go.

@JSn1nj4 I see we have some default HTML title and meta descriptions in resources/views/give.blade.php
Let's update those to
Title
Tech Giving Opportunities around Greenville, SC
Meta Description
Contribute time or money to local Upstate, SC tech, maker, and tinker non-profits or open-source projects through with these HackGreenville partners.

@allella those are updated.
I also brought back the summary paragraph that I originally had commented out on the page as a placeholder. Figured the meta description would make a good page summary.
Does that sound alright?


refactor: rewrite to babel, es6 & eslint

I don't really know how strong is the need to support 0.10.x and 0.12.x, but I've refactored the code into es6 along with some babel for unsupported stuff.
summary of changes:

native classes
bound functions instead of doing that in the constructor
request-promise instead of promisify over request
pump wrapping streams, so that handlers dont leak in case of errors
bluebird 3
removed should from tests, used native assert + is, overall tests seem to still be sucky because they only validate type of the returned data. I'd say they need more work with .reflect() of the promise and more strict checks
jshint -> eslint because, well, eslint wins with es6
bufferlist for body parsing on the webhook server - since it's JSON, you don't want to convert it to utf-8 and then JSON.parse - that works just fine on a Buffer and is faster because you don't do 2 conversions
style remained in tact
moved all parts with try/catch to separate functions to avoid making those unoptimizable - there are 3 instances of those in each class, so maybe you would want to have a single function in a separate file
short hand properties instead of options || {}

I understand that this PR might not be desirable, but, in case you actually fill otherwise, or plan to upgrade it some day - I did the grunt work :)

This is actually interesting.

I started the repository back in 2015 where ES6 wasn't even popular. I were thinking to rewrite it to ES6, thanks @AVVS for the work!
I will take a closer look and merge it soon.
I would rather use XO but I don't mind ESLint as default in the proyect.
Kudos!

I've made some changes. @AVVS what do you think?

JSDoc can't parse class-properties, generate lib-doc.

Hi @yagop,
I made a pull request with some small changes to fit the JSDoc parser, so you don't need lib-doc anymore. See #94


Doc or docx format

Hi, for our internal review process, I am getting feedback that they would like a Word format to review.  Is it possible for this github action to produce a doc or docx format?  Or if not that, is it possible some other way like through the container?  Thank you!

Sorry for the late reply, this issue got lost somehow. Is this still a desired feature? If so, then I'd be happy to add it to our roadmap.

Yes please! It is still an issue at my organization.


Highlight universal satisfaction of a property in attribute list

The attribute selection list now prints all valid properties in each admissible branch. However, sometimes a property becomes universally valid/invalid by applying an attribute. We should somehow highlight this situation, as it might be important for the user.

This is now resolved thorugh #9.


Feature/mx 1663 primary source convenience function

Changes
rework wikidata and add primary source helpers

superceeded by https://github.com/robert-koch-institut/mex-common/pull/306


doc: add doc of setting up your pipeline

What type of PR is this?
/kind documentation
What this PR does / why we need it:
part of #493

Do you plan to add some other complex examples in other doc

this is just a doc for concept(Subdocument 1: Setting Up Your Pipeline), there stil need two doc pr about:

Subdocument 2: Practical Operation Guide

Subdocument 3: Supply Chain Security


"Error: [object Object]" during message streaming when error is via an SSE (cause/detail not accessible)

When hitting an error during the async iterator of a anthropic.messages.create(), the exception raised and associated error object doesn't have any detail, it just has an e.cause.message set to "[object Object]".
My example SSE that's occurring during streaming is:
{event: 'error', data: '{"type":"error","error":{"type":"overloaded_error","message":"Overloaded"}              }', raw: Array(2)}

The error SSE is then thrown using APIError.generate here: https://github.com/anthropics/anthropic-sdk-typescript/blob/ad92b0d536508954ee8b6c83e82bca30eefeb298/src/streaming.ts#L95
The errJSON is correctly being passed to generate, but because status isn't set (it's an SSE, not an HTTP response), we use castToError() to raise the APIConnectionError, with no other info:
https://github.com/anthropics/anthropic-sdk-typescript/blob/ad92b0d536508954ee8b6c83e82bca30eefeb298/src/error.ts#L52
castToError just returns new Error(errJSON)
https://github.com/anthropics/anthropic-sdk-typescript/blob/ad92b0d536508954ee8b6c83e82bca30eefeb298/src/core.ts#L977
But errJSON doesn't have a good toString, so our cause Error object has message "[object Object]" and no other properties. This means you can't handle/inspect the error cause correctly when catching the error during the async iterator.
An example error:
anthropic stream error Error: Connection error.
    at APIError.generate (\node_modules\@anthropic-ai\sdk\error.mjs:32:20)
    at Stream.iterator (\node_modules\@anthropic-ai\sdk\streaming.mjs:73:40)
    at process.processTicksAndRejections (\lib\internal\process\task_queues.js:95:5)
    at async [Symbol.asyncIterator] (\src\routes\api\oracle\+server.js:205:38)
...
    at async initiateResponse (/src/routes/api/oracle/+server.js:1410:17) {status: undefined, headers: undefined, error: undefined, cause: Error: [object Object]
    at castToError (fil…/node_modules/@anthr…, stack: 'Error: Connection error.
    at APIError.gene…/src/routes/api/oracle/+server.js:1410:17)', …}

And where I'm catching it:
try {
    for await (const messageStreamEvent of response) {
        // ...
    }
} catch (e) {
    console.error("anthropic stream error", e) // e.cause.message == "[object Object]"
}

Would it be possible to correctly format the error so that it's possible to identify at least the error type by inspecting .cause on the APIConnectionError?
Thanks for any help. Also happy to submit a PR if there's agreement on the best way to surface the error detail in the APIConnectionError object.

Thanks for the report, we'll take a look!

Running into the exact same issue here when running it on Vercel using Vercel AI SDK.

FWIW, my guess is that this is due to Vercel timing out your handler, but I agree the error message being hard to read makes this worse. @RobertCraigie care to ticket?

Thanks! I'm on a Pro plan with Vercel for 5 minute timeouts so I don't think that's actually the case for me

@rattrayalex fwiw, and I mentioned above, we have seen this error in plain old AWS Lambda, and have observed this not to be related to Lambda timeouts. (Just for my own edification, what's the relationship here with @stainless-api?)

Gotcha, that's helpful. We'll try to look into this, but a repro script would be very helpful. Can anyone share one?

what's the relationship here with https://github.com/stainless-api?

I work at Stainless, which Anthropic uses to build their SDKs.

I am seeing this too.
I'm running a NextJS app locally. Just randomly chatting with my app it throws this error maybe every 5 - 10 requests. The app has been working fine with Together AI's API (via the OpenAI SDK) using Llama 3 and 3.1 in the last few months. Since swapping over to Anthropic I'm now seeing this intermittent issue.
This is the output when the error is thrown:
APIConnectionError: Connection error.
    at APIError.generate (file:///Users/path/to/app/node_modules/@anthropic-ai/sdk/error.mjs:33:20)
    at Stream.iterator (file:///Users/path/to/app/node_modules/@anthropic-ai/sdk/streaming.mjs:52:40)
    ... 11 lines matching cause stack trace ...
    at async handleRequest (/Users/path/to/app/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/path/to/app/node_modules/next/dist/server/lib/router-server.js:377:13) {
  status: undefined,
  headers: undefined,
  request_id: undefined,
  error: undefined,
  cause: Error: [object Object]
      at castToError (file:///Users/path/to/app/node_modules/@anthropic-ai/sdk/core.mjs:695:12)
      at APIError.generate (file:///Users/path/to/app/node_modules/@anthropic-ai/sdk/error.mjs:33:52)
      at Stream.iterator (file:///Users/path/to/app/node_modules/@anthropic-ai/sdk/streaming.mjs:52:40)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async handler (webpack-internal:///(api)/./pages/api/chat.ts:269:30)
      at async K (/Users/path/to/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.dev.js:21:2946)
      at async U.render (/Users/path/to/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.dev.js:21:3827)
      at async DevServer.runApi (/Users/path/to/app/node_modules/next/dist/server/next-server.js:554:9)
      at async NextNodeServer.handleCatchallRenderRequest (/Users/path/to/app/node_modules/next/dist/server/next-server.js:266:37)
      at async DevServer.handleRequestImpl (/Users/path/to/app/node_modules/next/dist/server/base-server.js:791:17)
      at async /Users/path/to/app/node_modules/next/dist/server/dev/next-dev-server.js:331:20
      at async Span.traceAsyncFn (/Users/path/to/app/node_modules/next/dist/trace/trace.js:151:20)
      at async DevServer.handleRequest (/Users/path/to/app/node_modules/next/dist/server/dev/next-dev-server.js:328:24)
      at async invokeRender (/Users/path/to/app/node_modules/next/dist/server/lib/router-server.js:174:21)
      at async handleRequest (/Users/path/to/app/node_modules/next/dist/server/lib/router-server.js:353:24)```

I added logging to the streaming.mjs file where it iterates SSE messages, this was the output:
sse {
  event: 'error',
  data: '{"type":"error","error":{"details":null,"type":"api_error","message":"Internal server error"}             }',
  raw: [
    'event: error',
    'data: {"type":"error","error":{"details":null,"type":"api_error","message":"Internal server error"}             }'
  ]
}

I've also seen this one intermittently:
sse {
  event: 'error',
  data: '{"type":"error","error":{"details":null,"type":"overloaded_error","message":"Overloaded"}              }',
  raw: [
    'event: error',
    'data: {"type":"error","error":{"details":null,"type":"overloaded_error","message":"Overloaded"}              }'
  ]
}

I think the problem is that in streaming.mjs it calls throw APIError.generate(...) and passes the parsed JSON from sse.data. However, because it passes undefined as the status number the generate function just returns a generic error and calls castToError on the parsed data object. Because the parsed object is not an error, it then passes it to the Error constructor, which expects a string, hence [object Object].
I think this could be fixed if instead of 'undefined' it passes the status code value from response to the APIError.generate function. This should then correctly handle the parsed error message.
Want me to do a PR?

Could do something like this to serialize the object as JSON for use as the error message. Not an ideal fix but at least we'd be able to see what the error is.

We're also seeing this issue (using .messages.stream()) – is this still on the roadmap to be fixed?

@greg84 @jbergs-dsit (or anyone else on this thread) could you please provide a codesandbox or similar which reproduces the error?

It should replicate for you using this repo (see comment above): https://github.com/beginner-corp/claude-begin-demo

Thank you @ryanblock, we'll take a look soon!

I have not been able to consistently reproduce this. It happens when the API returns an error to a streaming response. We have seen it during times of instability, where the API was returning 500 or overloaded errors.
Please read the original comment from paulcalcraft, it describes exactly what is happening: Just need to extract some useful detail from errJson before the error is thrown.

we're working on a fix at https://github.com/stainless-sdks/anthropic-typescript/pull/79

@rattrayalex that appears to be a private repo?

@RobertCraigie can you elaborate a bit on how the error has been fixed?
Is e.g. the Connection Error not occurring anymore or is the error it throws now processable by thecastToError function?

Sorry it looks like it was closed prematurely before this commit was pushed.

This fix was released in v0.27.3, really sorry for the delay here!


Good suggestion

can you please add option to add models via download link itself (for old school people)
and theres another civit ai and hugging face extention to to download models vaes texture etc easily in automatic 1111 web ui
can you please include it in collab??
it makes easier switching models, loading stuff and all
ps image browser is also and easy pre loadable extension for noobs like us

I appreciate the suggestion, but I won't be able to take a look at it right now as I'm working on a project with a deadline. As soon as I finish, I'll take a look. I just wanted to let you know so that I don't leave you without a response.


NoSuperfluousPhpdocTags - Add option to remove entries only if all superfluous

 /**
  * @param mixed $arg1
  * @param int   $arg2
  */
 function foo($arg1, $arg2) { }

-/**
- * @param mixed $arg1
- * @param mixed $arg2
- */
 function bar($arg1, $arg2) { }

~The PR that will introduce this option should also enable it on the repository as discussed in #3793.~

maybe it should only remove the params and not the block itself? leaving that to the 'no empty doc block' rule?

Sorry the sample is misleading: yep, the fixer would only remove all annotations and leave an empty DocComment (then removed by no_empty_phpdoc).
This brings some questions though: what if all @param/@return annotations are superfluous but the DocComment also contains a summary, a description or e.g. @throws annotations? What if it contains annotations that are not PHPDoc like e.g. @dataProvider for PHPUnit?

I got weird behavior when using PHP-CS with @Symfony enabled: it removed non-superfluous PHPDoc entries too. It started with the recent release of v2.16.0.
Can you please provide another example which demonstrates the benefit of the rule? I would like to understand the meaning behind the rule and to see, if i made something wrong.

The benefit of the rule is to prevent duplicated information regarding function signatures, e.g.:
/** @param int $foo */
function foo(int $foo) {}

It should not remove non-superfluous PHPDoc tags though. Are you sure they were removed by the no_superfluous_phpdoc_tags rule? If so, could you please open a new issue with more details?

Thank you, for the quick response.
So by your example:
/** @param int $foo */
function foo(int $foo) {}

superfluous means that int $foo is already defined with type and name in the function head itself and therefore the information in the comment above is obsolete? OK, got it.
If that is right, the observed behavior with my code is intended and PHP CS Fixer is not faulty.


Add needs service for Github Issues

Configure and test sphinx-needs github service
see. GitHub services
Use this repo for testing.

As you can see this almost works 👍


listening-for-payments-cli doesn't explain how to distinguish customers

@katomm I read your https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-cli but there is major issue in that flow - you can't distinguish between individual customers in that model, you can only track what is current balance of that one address. This would work if you only ever had 1 customer.
How would the proper flow look? Each customer has dedicated address? If yes, then how would you generate a secondary address for the same wallet? And how would you send ADA out of it using cardano-cli? I was experimenting with that but ultimately failed every time - https://forum.cardano.org/t/how-to-properly-sign-transaction-from-non-base-address/74462
It would be of great help if that page could be expanded to cover a fully functional model instead of this trivial example that assumes only 1 customer ever. Thanks!

Hello @benapetr. Yes, you need to create one new address for every order (not customers) otherwise you were right you can not distinguish the transactions.
There are different ways how to generate many addresses and this should be definitely shown in the portal as well.

I think we can be a bit careful about amount of details on how HD wallets work, mixing with this page (maybe a seperate page can be linked at top about wallet basics on BIP32/39/44 schemes for actual example on derivations itself using cardano-addresses as an example?).

yes I don't mind if it's a separate page, but I think this should be definitely covered, because right now for someone who never implemented anything similar, it's not easy to understand how to implement fully operational "merchant" system, where you can track individual orders and manage them all under one wallet with multiple addresses.
For example one thing that is extremely unclear to me right now is how to actually USE the secondary addresses, when I follow the cardano-cli commands in example and sign the transaction that has --tx-in UTXO from secondary address, I get
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash "0dff37ed19839204f7a97c06d5ca7389de8b07fd3134f4602e710bd8"]))))])

so it seems that secondary addresses need dedicated signing keys? even if they belong to same wallet?

I have the same problem

For example one thing that is extremely unclear to me right now is how to actually USE the secondary addresses, when I follow the cardano-cli commands in example and sign the transaction that has --tx-in UTXO from secondary address, I get

For starters , what might be helpful is checking out HD Wallets and how derivation works:

The Root key above can be derived from cardano-addresses CLI (see README ).

Coming to the point, I see that there was already a place holder link as a note, the destination page needs to cover the above , so only the destination page needs to be created 🙂 .

We would love to see community to step up and compile the instructions to be included using above, rather than us depending on two-three individuals creating contents - before others add corrections/updates , if we really want to make the concept of developer-portal fully successful.


Kafka Pub/Sub: CA cert authentication broken > v1.8

Prior to Dapr 1.8, users could authenticate to Kafka using a CA certificate (metadata field caCert) with authType set to none.
This is not possible in Dapr starting v1.8.

Existing behavior could not be retained without breaking existing conformance tests, but as discussed we are restoring this behavior with a new auth type certificate which allows for certificate authentication.

Fixed in release-1.10


Using custom units in d3-format

I am trying to use Lakhs (10^5) and Crores (10^7) which are used in India for currency; instead of the SI units that d3 supports by default.
Is there a way to change the units from default in D3 to achieve this ?

Yes you can use the locale en-IN
https://github.com/d3/d3-format/blob/main/locale/en-IN.json

@Fil I want to use the units too, if that makes sense ... i.e 1,23,45,67 as 1.23 Cr for example. I am able to change the comma system, but I am not able to add my own units

One example is not enough to specify everything; you might want to create a function that will route the value to the correct format, depending on its magnitude.


Remember scroll position when going back

When opening an app from the home page and then going back the scroll position is currently lost (Firefox on Android and on desktop). This is especially annoying on mobile where there's more scrolling.

Yeah, already read up on that some days ago, as I had the same mobile annoyance :)


fix wrong path to hiddenconfig-template.properties

Related update added to endresult branch: https://github.com/SAP-samples/btp-kyma-day2-operations/pull/93


refactor(combsort): Implement MutableSorter trait for CombSorter

Implementing the MutableSorter trait for CombSorter
Standardized the tests by adding the descending test case to the macro and removing it from tests that use it

Hey, I moved the descending test to the sorting_tests macro, and you can’t have two tests with the same name. I could’ve changed the test name but that would’ve been redundant in the radix_sort case.


Sign out.

I can't sign out properly in Laravel 8.1
The page is reloading when I click the link, but I'm still logged in.

What does the network tab look like if you have that open when you try and logout?
And do you have any paths defined for Canvas in your .env file?

Thanks for bringing this up @SystemAdm. Let me know if you have any more issues.


I find XGBOD is really slow, is there a plan to speed up ?

Maybe need a support for n_jobs. https://github.com/yzhao062/pyod/issues/58#issuecomment-468001950

It seems possible to at least make the full n_jobs support by changing in XGBOD the creation of estimator list (before the xgboost) and adding the argument inside the unsupervised with n_jobs (which exist for most of them).

The speed bottleneck is on the training of multiple unsupervised models. This takes too much time to converge, especially on proximity-based models like LOF, kNN, etc.
I do not know whether there is a quick way other than parallelization. Even for parallelization, it may still less ideal for lots of reasons. As a result, I propose a new acceleration system called SUOD (https://github.com/yzhao062/SUOD), which will be introduced into the models in PyOD finally.


Invalid Arduino Board ID

Hello,
thanks for the great work integrating my favorite IDE with arduino! Unfortunately I'm having trouble setting it up correctly. I created a fresh project which immediately throws the error above. I'm using the board ID nano but it actually errors out on any board variant.
The CMakeLists.txt generated by this plugin:
cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(CMAKE_CXX_STANDARD 17)
set(PROJECT_NAME untitled1)

set(${PROJECT_NAME}_BOARD nano)
set(ARDUINO_CPU atmega328old)
project(${PROJECT_NAME})

# Define additional source and header files or default arduino sketch files
# set(${PROJECT_NAME}_SRCS)
set(${PROJECT_NAME}_HDRS User_Setup.h)

### Additional static libraries to include in the target.
# set(${PROJECT_NAME}_LIBS)

### Main sketch file
set(${PROJECT_NAME}_SKETCH untitled1.ino)

### Add project directories into the build
# add_subdirectory()

### Additional settings to add non-standard or your own Arduino libraries.
# For this example (libs will contain additional arduino libraries)
# An Arduino library my_lib will contain files in libs/my_lib/: my_lib.h, my_lib.cpp + any other cpp files
# link_directories(${CMAKE_CURRENT_SOURCE_DIR}/)

# For nested library sources replace ${LIB_NAME} with library name for each library
# set(_RECURSE true)

#### Additional settings for programmer. From programmers.txt
set(${PROJECT_NAME}_PROGRAMMER arduinoasisp)
set(${PROJECT_NAME}_PORT /dev/ttyUSB0)
# set(nano.upload.speed 9600)

## Verbose build process
set(${PROJECT_NAME}_AFLAGS -v)

generate_arduino_firmware(${PROJECT_NAME})

A search in the arduino-cmake project didn't give me anything useful, maybe someone here has an idea?

@l0rn, what OS and CLion version are you running on?
I tried it on OS X with CLion 2018.3 and 2019.1 and both work as expected.
If you are using Windows, you need to follow Arduino CMake installation procedure (https://github.com/francoiscampbell/arduino-cmake/tree/dbd4fe372b9a0120325b429b3ed23c311ab3dc66#installing-clion--arduino-ide--mingw). On other systems you only need to have Arduino IDE installed in order for Arduino CMake to work.

Thanks fo your reply and sorry for forgetting this crucial information. I am using arch linux having the arduino toolchain installed (1.8.9-1)
CLion Version:
CLion 2019.1.2
Build #CL-191.6707.69, built on April 18, 2019
JRE: 1.8.0_202-release-1483-b44 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.19.34-1-MANJARO

Using Arduino Support 1.4.4 from 21.12.2018

better late than never... arch linux seems to have a little deviance from standard.... this fixed it:
https://github.com/queezythegreat/arduino-cmake/issues/157#issuecomment-355550867

I'm still having this problem. Symlinking the libraries does not help, nor does manually specifying boards.txt. I am on Archlinux as well with both arduino and the arch arduino SDK installed.


ENG-5806: Adds Sidecar Credentials resource

Description of the change
Adds a new resource to the provider, responsible for generating sidecar credentials.
Type of change

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

Checklists
Development

[x] Lint rules pass locally
[x] The code changed/added as part of this pull request has been covered with tests
[x] All tests related to the changed code pass in development

Code review

[x] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
[x] Jira issue referenced in commit message and/or PR title

Testing
Tested running "go test -v -run=^TestAccSidecarCredentialsResource$" and through manual terraform configuration file. (Using a Service Account that includes all roles needed, which can be obtained running the create-keycloak-service-account.sh script)

I committed the changes to fix that, please let me know if anything else is needed, thanks!


Problems with custom class inheritance

When I create a custom class PHP hierarchy in CPP, it looks like the methods are not being overrided correctly. Take a look at this minimal example:
#include <phpcpp.h>

class MyBaseClass : public Php::Base{
public:
    Php::Value doStuff(){return getValue();}
    virtual Php::Value getValue(){return "Base Class Value";}
};

class MyDerivedClass : public MyBaseClass{
public:
    Php::Value getValue() override {return "Derived Class Value";}
};

extern "C" {
    PHPCPP_EXPORT void *get_module(){
        static Php::Extension extension("issue", "1.0");

        Php::Class<MyBaseClass> bc("MyBaseClass");
        bc.method("doStuff", &MyBaseClass::doStuff);

        Php::Class<MyDerivedClass> dc("MyDerivedClass");
        dc.extends(bc);

        extension.add(std::move(bc));
        extension.add(std::move(dc));

        return extension.module();
    }
}

Then in PHP I execute the following code:
<?php
	$derived = new \MyDerivedClass();
	echo $derived->doStuff()."\n";
?>

This code will print "Base Class Value" when in fact it should be printing "Derived Class Value" which is what I get if I create the same simple example in pure cpp without php extensions. Even though the cpp methods are not exposed to php, it still seems like the PHP-CPP "extends" method will somehow force the use of the base class methods.
At first I thought that maybe I could solve this by exporting the address of the function in the derived class, but not even this helps:
Php::Class<MyBaseClass> bc("MyBaseClass");

Php::Class<MyDerivedClass> dc("MyDerivedClass");
dc.extends(bc);
dc.method("doStuff", &MyDerivedClass::doStuff);

This will still print "Base Class Value"
Is this somehow desired behaviour or is it a bug? To me it seems like a bug...
Any ideas?

Sadly we'll have to re-open this issue, as the fix we provided turned out to cause some issues elsewhere.

I am utterly and totally confused... Is this fixed, partially fixed, totally broken?

@pwhelan By now it is finally fixed.

At some point in September this issue was fixed, but now that I updated to the newest master branch code, the issue is unresolved once again. It is not working for me any more.


Version bump (1.00.0)

Check if this PR fulfills these requirements:

[x] My changes respect the Kodi add-on development rules
[x] I have read the CONTRIBUTING document.
[x] I made sure there wasn't another one Pull Requests opened for the same update/change
[x] I have successfully tested my changes locally

Types of changes

[ ] New feature (non-breaking change which adds functionality)
[ ] Feature change (non-breaking change which change behaviour of an existing functionality)
[ ] Improvement (non-breaking change which improve functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

After the latest major developments that i have achieved, concerning:

implementation of msl profile switch
implementation of watched status synchronization with netflix in a two way mode

we can declare the first version
will not be without problems, the development of this part is quite difficult, especially due to lack of documentation, there are too many factors to take into account.
The bug fixes take time and a lot of testing by different devices and also different countries, i can't do always by myself then when problems are found will be solved
In case of Feature change / Breaking change:
Describe the current behavior

Describe the new behavior

Screenshots (if appropriate):

I would keep it simple and declare it v1.0.0 ;-)

Can you please rebase this PR?

it's not a problem to follow that kind of versioning
i do not rebase this branch beacause is needed to merge https://github.com/CastagnaIT/plugin.video.netflix/pull/486
I still have strange problems with ctx menus
"resume from"
"start from beginning"
when i keep enabled watched status sync, which is wasting my time
in my computer were working, then last night the HTPC wasn't working
i have to try updating kodi on HTPC, i don't know😕

i do not rebase this branch beacause is needed to merge #486

If you rebase this branch, at least it would include all commits since 10 days.

I still have strange problems with ctx menus

Hmm, I would expect issues with "reset position" and "mark as (un)watched", not with "resume from" or "start from beginning"?
Unfortunately this is because Kodi does not gives us the proper tools to make it work well. There are 2 options here, both requiring changes in Kodi:

An event handler that is called when "reset position" or "mark as (un)watched" is called
Timestamps for "resumetime" and "playcount", both in Kodi and at Netflix so asynchronous synchronisation is possible

The former is prefered over the latter though. Disabling the context menu items is another option.
In our add-on we have this marked as a known issue in Kodi that we currently cannot fix.

yes with "reset position" and "mark as (un)watched" also i have problems,
but i added a new custom menu in order to change the status.
I tried to propose hiding the non-working menus, only when the "override" is used
https://github.com/xbmc/xbmc/issues/17372
i have also attach a commit on how it could be implemented
but it wasn't accepted because they want to keep those menus even if they don't work, because of "coherence" between addons menus?!...
the only alternative is to review the entire system and also implement a python callback,
i see it as a complex thing and i don't think it will be fixed for Kodi 19, probably be broken for all the eternity
at least if these menus were hidden for the time being, we could have one thing cleaner and less confusion for the users, and in the future it could have been fixed with tranquility

@CastagnaIT Thanks for the heads up. I agree, let's get more stakeholders involved to make it clear we need a solution.
IMO video-on-demand add-on developers should unite around missing functionality in Kodi, because Kodi is no longer adapted to today's streaming needs. https://github.com/pietje666/plugin.video.vrt.nu/wiki/Kodi

sidenote: for the problem of "resume from" I've done over a dozen tests and happens randomly,
i also tried to exclude to set the "setInfo" in the listitem to be played and also exclude all background netflix operations, but they don't affect. I really don't know what the problem is...
I analyzed again the entire source code,
and i see nothing unusual here, I'm starting to think it's a Kodi bug

i have also rebased this branch


Remove old UI code

Left around the answer queue code for now since it still works.

This branch depends on #305 for some test fixes

This branch depends on #305 for some test fixes


Bcs monitor beta

[ ] I added CHANGELOG entry for this change.
[ ] Change is not relevant to the end user.

Changes

Verification

out of date


Redirecting user to the original referring URL after a successful login

We are using the Google provider and we need to redirect the user to the original referring url after login.
I was thinking about encoding extra data in the state parameter but Authomatic doesn't seem to provide any API for that. Also thought about storing the referer (from the request header) in the session.
Any recommendation on how to do that ?
thanks in advance
Fábio

One use case I see where allowing the user of the library to add information to the OAuth 2.0 state parameter is when you are opening multiple browser tabs with different URLs in the application at the same time (such as when you have multiple homepages set in your browser or someone sends you a list of links to view and you open them all at once).
Without custom state, you can only remeber the last referrer URL in the session, so when you have multiple browser tabs opening at the same time, you may well end up opening a single page that wins the race of storing the URL in the session. Therefore I suggest adding an option to append an arbitrary user provided string to the OAuth2 state parameter that would be returned in the login result to distinguish the tab that is being opened. The library would just concat the user provided string with the CSRF token and return the portion after CSRF token in the LoginResult. Verifying and handling of the custom state string would be left for the user. Since the length of the CSRF token is fixed, it can be easily extracted from the string for verification purposes (in case of variable length tokens, a length would have to be stored in the state as well).
Sure, you have to use the session as a fallback anyway if you use non-OAuth-2.0 providers, but some people, including me, don't use those.
I think the patch to Authomatic will be small and I'm willing to implement it if we agree on the API. An example of how this could be used:
def state():
    """called in Phase 1 when the provider generates the OAuth 2.0 state.
    The return value of this function will be appended to the generated CSRF token.
    """
    return sign(self.request.headers.get('referer', '/'), secret)
    # alternatively, you can store this in session if you don't mind polluting it with keys
    # you may not be able to remove:
    # key = 'redirect_{}'.format(self.session.get('counter', 0) + 1)
    # self.session[key] = self.request.headers.get('referer', '/')
    # return key

result = authomatic.login(WerkzeugAdapter(request, response), provider_name, state=state)
if result:
    # Phase 2
    if result.state and verify_signature(result.state):
        redirect_url = url_from_state(result.state)
    else:
        redirect_url = self.session['redirect_to']
    # Process login and redirect
else:
    # Phase 1
    referer = self.request.headers.get('referer', '/')
    self.session['redirect_to'] = referer

What do you think about such an addition?

+1
I'm having a similar issue with Django
Consider the view:
@login_required()
def secret_page(request):
    return HttpResponse('Super secret! The user must be logged in!')

When I go that view, Django redirects me to '...../auth/login/?next=/secret_page/'.
And also in this case, having params prevents stage 1 of the OAuth Flow from starting....
Is there a solution in the making for this?

@martin-sucha +1
I think state is the superior solution for pretty much the reasons you mention. However, since OAuth1 does not support it, the API can instead take in a callback_url that internally gets transformed to the right version i.e. using state for OAuth2 and oauth_callback for OAuth1 (though i'm not sure all OAuth1 providers support the callback - at least Twitter does, and I suspect most others do as well).
I've hacked together working versions of these (so theres at least a POC), but its not good enough for a PR.


Apply new Protocol

Is it possible to apply a new protocol with the help of the GUI packet editor or can i just use the existing ones? So i'd use specific protocols like 1722 or something like that and implement the corresponding fields for this protocol to dynamically change the fields with the help of the field engine.
Thanks for your advice and response.
Best Regards!

Hi,
Packet editor directly fetches metadata from TRex, so if you want to extend
existing protocol capabilities, you can go to trex-core and submit a pull
request, or edit your local trex.
ср, 25 мар. 2020 г. в 18:31, somedev42<EMAIL_ADDRESS>
Is it possible to apply a new protocol with the help of the GUI packet
editor or can i just use the existing ones? So i'd use specific protocols
like 1722 or something like that and implement the corresponding fields for
this protocol to dynamically change the fields with the help of the field
engine.
Thanks for your advice and response.
Best Regards!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cisco-system-traffic-generator/trex-stateless-gui/issues/122,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AINDXDP4QGJUDUJP34P6TBLRJHTQPANCNFSM4LTMFZXA
.


Convert Primer Brand to a monorepo

Summary
Conversion of Primer Brand to a monorepo per the ADR.
Part of https://github.com/github/primer/issues/1366
List of notable changes:

added the necessary configurations for an npm workspace
moved react, e2e, design-tokens and storybook into their own packages
published new package for @primer/brand-primitives
added custom workflow for publishing multiple packages
fixed previously broken start commands, now opens both docs and storybook, while running css module type generator in the background

Benchmarks
Before and after benchmarks for CI runs.

Single repo
Monorepo

CI / Install, lint, format, check and tests
2m
3m

CodeQL / Analyze (javascript)
2m
1m

Integration test / Astro - React starter
4m
6m

Integration test / Create React App
4m
8m

Integration test / Next.js
6m
5m

Integration test / Remix.run
3m
3m

UI test / Accessibility
3m
5m

UI test / Primitives diff
4m
2m

Visual regression tests
4m
6m

Preview / Build & Deploy
5m 7s
9m 7s

Release canary
1m
1m

What should reviewers focus on?

Reviewing ergonomic differences in moving to a monorepo
Checking that nothing critical has been missed out

Steps to test:

Checkout branch git checkout -b rezrah/npm-workspace origin/rezrah/npm-workspace
npm install && cd apps/docs && npm install (because docs is outside workspace for now)
npm run build
npm run lint
npm run format
npm run check
npm run test
npm run start (should open Storybook, Docs in the browser)

Supporting resources (related issues, external links, etc):

NPM Workspaces https://docs.npmjs.com/cli/v8/using-npm/workspaces

Contributor checklist:

[x] All new and existing CI checks pass
[x] Tests prove that the feature works and covers both happy and unhappy paths
[x] Any drop in coverage, breaking changes or regressions have been documented above
[x] New visual snapshots have been generated / updated for any UI changes
[x] All developer debugging and non-functional logging has been removed
[x] Related issues have been referenced in the PR description

Reviewer checklist:

[ ] Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
[ ] Check that tests prove the feature works and covers both happy and unhappy paths
[ ] Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Looking so good! 🥳 I'm so happy that npm workspaces is just working out-of-the-box 🔥
Couple of thoughts after playing around with it this afternoon:

One area to explore could be top-level configuration for things like prettier, tests, linting, TS, etc. In other words, instead of each workspace defining the config, there is a top-level config

This can help out a lot of for things like tests if you're wanting to run Jest in interactive mode and are working across workspace boundaries

One task that could be helpful in the future is a watch task that lets you work with built packages across workspaces

This is probably more relevant if moving things into apps where you might be using stuff from @primer/react-brand

Challenges

Is there a way to force the resolution of a package across the monorepo? For example, there must always be one version of React/ReactDOM
Another situation that comes up when installing create-react-app to apps is @testing-library/react which depends on React 18 but
One challenge I ran into was trying to use create-react-app inside of apps was that the lockfile doesn't seem to update despite the package.json changing. Sharing a link to a video for what I ran into: https://drive.google.com/file/d/19C9hc7ctwzj7XDJooq1QBlrwhGPtIWtG/view?usp=sharing (working on getting loom going for future videos!)

Quick tl;dr is that I was trying to use create-react-app and it runs into a problem with multiple versions of React
I switch to React 17 to match the project
For some reason, React 18 is still being installed despite the fact that package.json in the create-react-app app lists 17.0.2 as the range

Questions
These are mostly unrelated as I'm diving into packages and what-not! Feel free to defer if they would take too much time to answer 👀

For packages, are you all looking to use "exports" in package.json?
Are you considering using "type": "module" in any packages in the future? (This is coming up on the PRC side from consumers and was curious what you all were thinking)
Are you considering publishing ESM bundles along with the existing CommonJS?

Looking so good! 🥳 I'm so happy that npm workspaces is just working out-of-the-box 🔥
Couple of thoughts after playing around with it this afternoon:

One area to explore could be top-level configuration for things like prettier, tests, linting, TS, etc. In other words, instead of each workspace defining the config, there is a top-level config

This can help out a lot of for things like tests if you're wanting to run Jest in interactive mode and are working across workspace boundaries

One task that could be helpful in the future is a watch task that lets you work with built packages across workspaces

This is probably more relevant if moving things into apps where you might be using stuff from @primer/react-brand

Challenges

Is there a way to force the resolution of a package across the monorepo? For example, there must always be one version of React/ReactDOM
Another situation that comes up when installing create-react-app to apps is @testing-library/react which depends on React 18 but
One challenge I ran into was trying to use create-react-app inside of apps was that the lockfile doesn't seem to update despite the package.json changing. Sharing a link to a video for what I ran into: https://drive.google.com/file/d/19C9hc7ctwzj7XDJooq1QBlrwhGPtIWtG/view?usp=sharing (working on getting loom going for future videos!)

Quick tl;dr is that I was trying to use create-react-app and it runs into a problem with multiple versions of React
I switch to React 17 to match the project
For some reason, React 18 is still being installed despite the fact that package.json in the create-react-app app lists 17.0.2 as the range

Questions
These are mostly unrelated as I'm diving into packages and what-not! Feel free to defer if they would take too much time to answer 👀

For packages, are you all looking to use "exports" in package.json?
Are you considering using "type": "module" in any packages in the future? (This is coming up on the PRC side from consumers and was curious what you all were thinking)
Are you considering publishing ESM bundles along with the existing CommonJS?

Thanks for trying it out @joshblack! Love the feedback.

One area to explore could be top-level configuration for things like prettier, tests, linting, TS, etc. In other words, instead of each workspace defining the config, there is a top-level config

Prettier and ESLint configs are already in the monorepo root, or are you referring to something else? Jest config however lives in React for now, because the config was mostly React-oriented. I can look at hosting out anything generic to the top-level though. Leave that with me. Does that cover it?

One task that could be helpful in the future is a watch task that lets you work with built packages across workspaces

Great point. The start command is meant to do just this! But I just noticed it wasn't actually working so the latest commit contains fixes for the watchers. Right now, I'm parallelising the storybook, gatsby and css module type generator processes. I think that should cover most scenario's for development and Storybook has it's own HMR for React components. Is there anything I've missed?

Another situation that comes up when installing create-react-app to apps is @testing-library/react which depends on React 18 but

Thanks for the Loom demo, it's certainly a confusing issue.
I've already looked at bumping the React libraries to v18. Storybook was the only blocker during that attempt, but they've very recently shipped support for it so I may just give the upgrade another go.
One the other hand, I do wonder whether create-react-app and other e2e integrations should even resolve modules at a workspace level. My thinking is to keep them isolated and free of side-effects, like docs is currently. Reason being, they are meant to represent clean installations and it's harder to make them deterministic or representative of an end-user experience otherwise. Appreciate it goes against a workspaces inherent dependency resolution, but I see it as an intentional feature, rather than a bug. For context, the current integration tests for those frameworks are ephemerally generated, which gives higher confidence that the library will work e2e.

For packages, would there ever be a use-case to use "exports" in package.json?
Would there ever be a use-case to pubish ESM bundles along with the existing CommonJS?
Would there ever be a use-case to pubish ESM bundles along with the existing CommonJS?

Absolutely. We haven't needed to solve this yet, because Primer Brand is typically used in SSR sites first, so CommonJS provided the maximum compatibility, particularly with Next.js which only recently gained support for ESM under an experimental flag. Initially I went the ESM-first route.. but the e2e compatibility just wasn't there at the time.
The current Webpack build config is flexible and we can add support for a separate ESM bundle whenever we're ready. Same applies to code splitting. I just kicked this problem down the road for now.

There seems to be a peer dependency issue when following the install steps that you provided. This could then be mitigated using the legacy dependencies flag. After that issue there was another:
Can’t resolve ‘../../../../../../packages/react/lib/css/main.css’ in ‘/Users/jbowden/Documents/brand/apps/docs/src/@primer/gatsby-theme-doctocat/components’
I believe I have run into these issue before. But I am not sure the approach to resolve them.

There seems to be a peer dependency issue when following the install steps that you provided.

@JoshBowdenConcepts I've updated the description. The --legacy-peer-deps is an existing, known issue.

Can’t resolve ‘../../../../../../packages/react/lib/css/main.css’ in ‘/Users/jbowden/Documents/brand/apps/docs/src/@primer/gatsby-theme-doctocat/components’

Is this when running npm run build? I can't seem to reproduce this. the build and start commands will create the css bundle before trying to run Gatsby compiler. Maybe your webpack build failled?

Is this when running npm run build? I can't seem to reproduce this. the build and start commands will create the css bundle before trying to run Gatsby compiler. Maybe your webpack build failled?

This is when running the build command. And yes it seems that webpack has failed. I am not sure why I seem to be running into these issues more often than others haha


ARCore Camera Image is rotated by 90 degrees anti-clockwise in portrait mode but is the right way up when used in landscape mode

This is a problem as old as ARCore itself. Basically, if you record the ARCore camera image (I used renderscript and a helpful blog article to setup the YUV to ARGB conversion):
val cameraImage = arFrame.frame.acquireCameraImage()
val width = cameraImage.width
val height = cameraImage.height
val byteArray = Toolkit.toNv21(cameraImage)
byteArray?.let {
Toolkit.yuvToRgbBitmap(
        byteArray,
        width,
        height,
        YuvFormat.NV21
).let { bitmap ->
        saveBitmapToDevice(
            name,
            session,
            bitmap,
            context
)}}

And then save it as a bitmap, the saved image is rotated 90 degrees anticlockwise if it was recorded in portrait mode but it would be the right side if recorded in landscape mode. I am returning to ARCore and Sceneform development after several months and it seems the problem is still there.
However, I did notice arSession.displayRotation and I tried setting it to different Surface rotation values (ROTATION_270 and ROTATION_0) but that doesn't seem to work as well. It's not that big of a deal since I can set up the post-processing pipeline to rotate the images after they are recorded but it always struck me as odd why the images are like this and whether we can have an option to do something about it.

Hi!
It is only a guess but I think that ARCore doesn't care about the display orientation internally and it is only used for rendering. Therefore, the landscape orientation of the camera sensor is the default one.


Add enable auto merge workflow

Description
This is a preparation for tide removal. GitHub's auto-merge feature requires this to be enabled for each PR created. This workflow automatically enables auto-merge on every opened PR, so the user doesn't have to.
Related issue(s)

/kind enhancement


fix: fix deploy tab code indentation

#85  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @AngelOnFira and the rest of your teammates on  Graphite


cmd/link: combining dwarf failed: Unknown load command 0x80000018<PHONE_NUMBER>)

What version of Go are you using (go version)?

$ go version
go1.12.5 darwin/amd64

Does this issue reproduce with the latest release?

Tried to install the main package

What did you expect to see?
A successful linking and executable for the macOS platform.
What did you see instead?
The following error:
go install Output
# github.com/triztian/dwarfunk
/usr/local/Cellar/go/1.12.5/libexec/pkg/tool/darwin_amd64/link: /usr/local/Cellar/go/1.12.5/libexec/pkg/tool/darwin_amd64/link: combining dwarf failed: Unknown load command 0x80000018<PHONE_NUMBER>)

Notes
I've created the following repo to reproduce the issue:

https://github.com/triztian/dwarfunk

The subpackage github.com/triztian/dwarfunk/lib contains an objective-c file and successfully builds using the go build command:
go build ./lib

I've noticed that if I edit the objc.m file and remove the following line, then the go install command works.
Looking at the following CL, it seems like the command is not part of the list:

https://go-review.googlesource.com/c/go/+/119115/5/src/cmd/link/internal/ld/macho.go#147

Could it be that the the command has to be added and OR ed as depicted in the ruby-macho library?

https://github.com/Homebrew/ruby-macho/blob/master/lib/macho/load_commands.rb#L37

Problem appears to be here I think. Looks like the constant defined for LC_LOAD_WEAK_DYLIB is incorrect. I will send a patch.

Awesome, thank you for the quick response,  it probably has to be more like 0x80000018

Hi @triztian
I've made an attempt to adapt your reproducer as a testcase -- see https://golang.org/cl/178726. My first attempt is problematic in that I it contains code that doesn't work with older versions of MacOS, e.g. 10.11, since it refers to the UserNotifications framework.
I can add guards via #ifdef to insure that those constructs are conditionally compiled based on the OS version, e.g.
#import <Foundation/Foundation.h>
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__>101300)
#import <UserNotifications/UserNotifications.h>
#endif

however I can't use the same trick with the cgo directives. Something like
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__>101300)
#cgo darwin LDFLAGS: -framework Foundation -framework UserNotifications
#endif

doesn't have the desired effect, since cgo doesn't run the C preprocessor.
A question for you: is it possible to reproduce the same DWARF issue without using the newer framework (e.g. just using something from the Foundation framework)?
Thanks, Than

OK, I think I have a revised testcase that works.

@thanm I stumbled into the issue randomly because I was trying to use the UserNotifications framework from Go.
I don't have an alternative way to reproduce that issue. I could look into how we can get the compiler to produce a binary that specifically uses that MACH-O command.
Ah, from looking at the revised test case, did you try different frameworks randomly?
Thank you for looking into this issue!


FEATURE: route start next trick, hand, rubber

Introduced requirement by #274

[x] Trick #368
[x] Hand
[ ] Rubber

probably related to #276

I started to work on the Rubber. Expect to be done in two weeks due to lack of time.


setSwapAndLiquifyEnabled = breaks contract

https://github.com/Safemoon-Protocol/safemoon.sol/blob/0f0aef2f4e6ca00d6a46ca6ea60caa4d36c5fd6f/Safemoon.sol#L1069
This kinda broke out contract randomly but we couldn't figure out what the cause was. Suggestions?

depending on your implemention, which you have not included in your post so nobody can tell,
you might be using a PancakeSwap V1 address in your swapAndLiquify function instead of the necessary one for V2


Performance issue with big tables

I am currently using Sails for creating a javascript API and I was really happy about it. It was really fast to have a first working version on my staging server, no matter what the community says about associations and relational database using postgres adaptor though waterline, it worked perfectly for me.
I choose it because i though it would be better in term of performance than using grape api with rails.
But it turn out to be a nightmare when you use it with big databases.
I am using a this model.
here is the model
module.exports = {
tableName: 'mymodel',

adapters: 'postgresql-adapter',

autoPK: false,

attributes: {

    mymodel_id: {
        type: 'integer',
        primaryKey: true,
        autoIncrement: true,
    },

    english_name: {
        type: 'string',
        unique: false,
    },

    chinese_name: {
        type: 'string',
        unique: false,
    },

    logo: {
        type: 'string'
    },

    country: {
        model: 'country'
    },

    location: {
        type: 'string'
    },

    city: {
        type: 'string'
    },

    fees: {
        type: 'string'
    },

    mymodel_profile_english: {
        type: 'text'
    },

    mymodel_profile_chinese: {
        type: 'text'
    },

    link: {
        type: 'string'
    },

    url: {
        type: 'string'
    },

    address: {
        type: 'text'
    },

    acronym: {
        type: 'string'
    },

    mymodelrankkings: {
        collection: 'mymodelranking',
        via: 'mymodel',
    },

    mymodelsucursal: {
        collection: 'mymodelsucursal',
        via: 'mymodel'
    },

    mymodelltype: {
        model: 'mymodelltype'
    },

}

};
And it worked very well when i started the project because I had no data in my DB.
But after that I did migrate my old database on it with about 200 000 data for this table, Sails wasn't even able to start anymore.
I reduced the number of data to 5000 and it worked again but just to launch Sails server (even on production with forever) it took about 5 minutes, and each time I made a request on my model it is really long.
I got some experience with relational databases, i am not a pro but this table looks quite ok to me and should not cause any issue to a server with 4 CPU and 8G of RAM...
It is a pity, first time I was so happy about a complete user-friendly MVC javascript framework but I am about to give up and go back to Rails or Laravel ....
Did anyone already faced this issue, and, if yes, are there any ways to improve Sails' performance for that kind of use?

I would be interested to hear some benchmarks, or if you can pinpoint any particular waterline routines that take a long time.  In the adapter tests there is a set of benchmarking routines that can be used to test.
On the topic of your app not being able to start due to waterline– is it possible that you were starting your database with a migration strategy such as alter (rather than safe)?  That strategy is intended for development, and will start by pulling your entire table into memory.

Hello Devin,
Thank you for your answer.
I read a lot about "safe" and "alter" options and I set "safe" option on my staging server which is, I believe, the good behavior.
Regarding the test i am running them with Mocha and they were working before but since the migration they always end up like that:

"before all" hook:
Error: timeout of 30000ms exceeded. Ensure the done() callback is being called in this test.
Of course done() is called in each unit test and I played with the timeout but that never changed anything.
"That strategy is intended for development, and will start by pulling your entire table into memory."
This is exactly what I thought but as I noticed before my staging server in on 'safe' migration strategy.

For example,
find: function(req, res, next) {
var name = req.param('name');
if(name && name.match(/[\u3400-\u9FBF]/)) {
console.log('this is chinese');
var where = {
chinese_name: { 'like' : '%' + name + '%'},
}
} else if(name) {
console.log('this is english');
var where = {
english_name: { 'like' : '%' + name + '%'},
}
}
var options = {
limit: req.param('limit') || undefined,
sort: req.param('sort') || 'country DESC',
skip: req.param('skip') || undefined,
where: where || undefined
};
MyModel.find(options).populate('country').exec(function(err, result) {
     if (result === undefined) return res.notFound();

     if (err) return res.jsonp(err);

     res.jsonp(result);

});
}
Each time I call this endpoints with limit = 100 and skip = 0 that takes about 10 seconds to load... with just 5000 data in my table.

@apetitdev in your postgresql config set wlNext: { caseSensitive: true }. You also have to think about what you are looking for here.
With the query chinese_name: { 'like' : '%' + name + '%'} you will need to parse every single record doing a pattern match. So the more records the slower it will be. There may be a way to use indexes to speed this up but I'm not sure.


[DOCS] Host admin can set date when confirming or adding contribution

Context

What's changing?

Why are we changing it?

Who does this change impact?

How do users use it?

Is this change optional or mandatory?

Is this change being released incrementally as a beta? What's the schedule?

When will the project be ready for release/complete?

Docs Process

Overview

Changes to be made

Estimate of effort

https://www.loom.com/share/cc3ff282d44d4d26ab8560101f5fee22

Included in new documentation


Deprecate JsValue::from_serde and JsValue::into_serde

I've listed serde-wasm-bindgen as the replacement, and changed the section of the guide that talks about Serde to talk about serde-wasm-bindgen instead of the deprecated methods.
I didn't remove it entirely because I can imagine someone remembering it and trying to look it back up, only to find that it no longer exists, which would quite frustrating. I also added a footnote about the deprecated methods in case someone remembers the old way and wants to know what happened.
There were several examples using from_serde/into_serde, which I updated to use serde-wasm-bindgen or not use serde altogether.
The fetch example was a bit weird, in that it took a JS value, parsed it into a Rust value, only to serialize it back into a JS value. I removed that entirely in favour of just passing the original JS value directly.
Fixes #2770
Fixes tkaitchuck/aHash#95
This also indirectly 'fixes' issues about the deprecated functions:
Resolves #1258
Resolves #2017
Resolves #2539

😬😬😬 ... we went the other way (for a parser module compiled to WebAssembly), dropping serde-wasm-bindgen in favor of JsValue::from_serde ... effectively simply this change:
 pub fn parse(formula: &str) -> JsValue {
-    let serializer = serde_wasm_bindgen::Serializer::new().serialize_maps_as_objects(true);
     match native_parse(formula) {
         Ok(result) => {
-            result.serialize(&serializer).unwrap_or_else(|err| {
+            JsValue::from_serde(&result).unwrap_or_else(|err| {

and this significantly reduced per-parse call overhead; we saw our measured parse times on real-world data change from:

average: 92.6 μs,
99.9th percentile : 1.44 ms

to:

average 38.6 μs
99.9th percentile : 390 μs

Plus serde-wasm-bindgen has the rather terrible issue https://github.com/cloudflare/serde-wasm-bindgen/issues/28 ... still unaddressed, and completely breaks module loading on Safari 14 and earlier.
So, you know, not thrilled about this idea. :-)

@alexcrichton I've started this PR https://github.com/rustwasm/gloo/pull/242 to extract this functionality. If __wbindgen_json_{parse,serialize} were publicly exposed, then behavior would match exactly. I've documented the difference in my PR.

As far as I understand it, __wbindgen_json_{parse,serialize} is equivalent to js_sys::JSON::{parse,stringify} so those are already exposed. Or maybe I'm misunderstanding something?

Indeed! In that case I think it would be good to migrate the examples to that instead and to mention that as an alternative in addition to serde-wasm-bindgen

@hamza1311 I think they slightly different: in my PR for gloo, when I passed undefined to js_sys::JSON::stringify it panicked while __wbindgen_json_serialize didn't.

@hamza1311 I think they slightly different: in my PR for gloo, when I passed undefined to js_sys::JSON::stringify it panicked while __wbindgen_json_serialize didn't.

Looks like the intrinsic has a special case for undefined:
https://github.com/rustwasm/wasm-bindgen/blob/f197b0e104e904c9a10c1a5e22bea559f9e809e2/crates/cli-support/src/js/mod.rs#L3446-L3453
That should be able to be replicated in gloo pretty easily.

Oh, it's using a replacer function. I used that initially, but changed it
because I thought it be too slow. Yeah, it's easy to replicate.
On Wed, Aug 17, 2022, 2:37 PM Liam Murphy @.***> wrote:

@hamza1311 https://github.com/hamza1311 I think they slightly
different: in my PR for gloo, when I passed undefined to
js_sys::JSON::stringify it panicked while __wbindgen_json_serialize
didn't.
Looks like the intrinsic has a special case for undefined:
https://github.com/rustwasm/wasm-bindgen/blob/f197b0e104e904c9a10c1a5e22bea559f9e809e2/crates/cli-support/src/js/mod.rs#L3446-L3453
That should be able to be replicated in gloo pretty easily.
—
Reply to this email directly, view it on GitHub
https://github.com/rustwasm/wasm-bindgen/pull/3031#issuecomment-1218513773,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABEFG7ODLSNB6KCCUMRSWLVZVLTFANCNFSM56VQPJ2A
.
 That's similar to what I did - instead of calling JSON.stringify I return String::new() if the object is undefinied

@Liamolucko would you be up for rewording to indicate that js_sys::JSON is an alternative and leaving the examples as-is but updating them to use js_sys::JSON?

Okay, I've added a section to the guide page which talks about using JSON as an alternative to serde-wasm-bindgen. Currently it uses js-sys + serde_json directly, but it should probably be updated to use gloo-utils when rustwasm/gloo#242 is merged.
In my opinion, serde-wasm-bindgen is the better default, since the performance can swing either way and serde-wasm-bindgen has smaller code size. I agree that JSON should be mentioned though, since it can be much faster in some cases like @gthb's.
Also, I ran serde-wasm-bindgen's benchmark suite on a couple different engines and uploaded the results here, if you're curious exactly how it stacks up against JSON.

Also, I ran serde-wasm-bindgen's benchmark suite on a couple different engines and uploaded the results here, if you're curious exactly how it stacks up against JSON.

Just to add some clarification not reflected in graph titles - after various added optimisations over time, serde-wasm-bindgen should be faster than serde-json based approach for almost all cases, except when your data has a lot of strings.
Not much more we can do there, as having all strings serialized into one large string (JSON) on one side, passing that string once, and parsing it back on another side will be always faster than passing tons of small strings one-by-one (same overhead x N).
For other data types we can do a lot better than JSON though, and that's why twitter benchmark (lots of strings) looks so different than others.

I'm still seeing this issue after updating wasm-bindgen to latest 0.2.84.
I also upgraded getrandom on a private branch to use wasm-bindgen 0.2.84.
wasm-bindgen has deprecated JsValue::from_serde and JsValue::into_serde, but it still has serde-json as optional dependency. Is this the issue if I have other crates depending on serde_json?
Any help is appreciated.
On the error below I can see wasm-bindgen on latest version 0.2.84.
error: cyclic package dependency: package `ahash v0.7.6` depends on itself. Cycle:
package `ahash v0.7.6`
    ... which satisfies dependency `ahash = "^0.7.0"` of package `hashbrown v0.12.3`
    ... which satisfies dependency `hashbrown = "^0.12"` of package `indexmap v1.9.2`
    ... which satisfies dependency `indexmap = "^1.5.2"` of package `serde_json v1.0.93`
    ... which satisfies dependency `serde_json = "^1.0"` of package `wasm-bindgen v0.2.84`
    ... which satisfies dependency `wasm-bindgen = "^0.2.84"` of package `js-sys v0.3.61`
    ... which satisfies dependency `js-sys = "^0.3"` of package `getrandom v0.2.81 (https://github.com/tomasro27/getrandom?rev=ddcf36ef7ee401af102debb9c758703b1e574461#ddcf36ef)`
    ... which satisfies dependency `getrandom = "^0.2.3"` of package `ahash v0.7.6`

Did you remove the serde-serialize feature from wasm-bindgen in your Cargo.toml after the update?

@RReverser I did not have the serde-serialize feature, but from reading more on the ahash thread, the issue is probably that one of my dependencies directly or indirectly defines wasm-bindgen with the serde-serialize feature enabled.
Is that a fair assumption? meaning that I would need to track down any dependencies that use wasm-bindgen with serde-serialize in my dependency tree so that my project does not enable that feature indirectly.
Is there a way to force indirect dependencies not using serde-serialize feature on wasm-bindgen? or is the only fix to upgrade those dependencies?
Thanks!

For anyone that might find this helpful, you can run cargo metadata > metadata.json to generate a file with all the crates/dependencies on your project. Then find all usages of wasm-bindgen with the feature flag serde-serialize (make sure it is not a dev dependency, as that might be okay). After finding which crates depend on wasm-bindgen with the feature flag enabled, you will need to update those packages to the latest version that does not use the serde-serialize feature in their dependencies.

@tomasro27 FWIW for slightly simpler way you could also do cargo tree -p wasm-bindgen which will show you an inverted tree of where wasm-bindgen is used, along with any features.


Paideia DAO Proposal Discussion

need to understand scope
may need larger round-table style discussion (with other teams?)
one initial goal: need a way to generate income with MVP-only features

MVP?

optimistic governance
optimistic/standard voting
ability to airdrop
standard proposal
dao config: min. votes, min quorum, etc..
min tokens to create proposal (cost paideia tokens)
treasury assignment
consider using SigUSD vs Ergo as base currency (may need Paideia-SigUSD oracle)
.. takes donations
.. currently losing ergs for this

leave to later

adv tokenomics
version switching

brainstorming

potentially use json to capture and pass logic in blockchain
treasury wallet is similar to a multi-sig wallet
.. ergopad comes from those wanting to vote
.. if no agreement, what happens to tokens
.. to initiate dao, will have to load initially and distribute (>MVP)
..

waiting on some integrations, then trapper can move fwd


Non-descriptive error when using an invalid connection string key name

I used a connection string name in my function.json that did not exist in my app setting, and got the error *Error indexing method 'Functions.AvatarPhotoProcess'. Microsoft.Azure.WebJobs.Host: Value cannot be null. Parameter name: dataAccount. *
Repro steps

In function.json:

    {
      "type": "blobTrigger",
      "name": "image",
      "path": "avatar-input/{filename}.jpg",
      "connection": "functionfaff300ba605_STORAGE",
      "direction": "in"
    },

No app setting for functionfaff300ba605_STORAGE

Expected behavior
Popup saying that connection string functionfaff300ba605_STORAGE does not exist
Actual behavior
Error popup:

Function ($AvatarPhotoProcess) Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.AvatarPhotoProcess'. Microsoft.Azure.WebJobs.Host: Value cannot be null. Parameter name: dataAccount.
Session Id: 5d970591e0424c438a5933fefa795299
Timestamp: 2016-10-28T02:00:56.475Z

The portal also become unresponsive, I'm opening an issue for that

Note that this is a core SDK fix.

+1 on fixing this :) My first interaction with the VS Tools, it took me a while to figure out that the actual error was a missing connection string in appsettings.json (I didn't realize the actual error until I found this issue).

@soninaren this looks similar to the null ref on storage account issue that you are already looking at.

yes, i have the fix validated here https://github.com/Azure/azure-webjobs-sdk/commit/93ce37f6cdca62c5b4f9245dcb112352af8031ac

Fixed in here https://github.com/Azure/azure-webjobs-sdk/pull/946

Closing this one since we have an issue on core SDK https://github.com/Azure/azure-webjobs-sdk/issues/927


After using notificationreactive as the type in typescript, the content of the notification component is readonly

This function solves the problem (这个功能解决的问题)
How can I dynamically modify the content of a component
Expected API (期望的 API)
If I modify the value, I will prompt TS2540: Cannot assign to 'title' because it is a read-only property.
What should I do？

I think you should use like the follow code:
const notification = useNotification()
const instance =  notification.create({
          title: "Wouldn't it be Nice",
          description: 'From the Beach Boys',
          content: `1234`,
          meta: '2019-5-27 15:11',
          avatar: () =>
            h(NAvatar, {
              size: 'small',
              round: true,
              src: 'https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg'
            }),
          onAfterLeave: () => {
            message.success("Wouldn't it be Nice")
          }
        })
instance.title = 'xxxx'

If you want to use it in outside setup, refer to https://www.naiveui.com/en-US/os-theme/components/message#Q-&-A.

NotificationReactive type will fix.


Override allocator delegate for receive buffers

While the advantages of using pooling allocations are clear for everybody, there are projects that can't afford go that road just immediately (by the variety of reasons), but require some reasonable migration path. For example, in Finagle we decided to stay compatible with the Netty 3 at the first so we can safely migrate users maintaining the same behaviour and performance.
Simply speaking we had no choice, but to use unpooled allocators in the beginning and we're super excited about trying out RecvByteBufAllocator that supposed to override the receive buffer allocators. This sounded like what we wanted to do to be as-close-as-possible to the Netty 3 implementation, which uses some primitive polling for receive buffers.
Turns out RecvByteBufAllocator is not an allocator itself, but something that guesstimates a size and reuses and channel's allocator. Not exactly what we wanted since our default allocator is unpolled.
To make sure this whole story makes some sense, we forked AdaptiveRecvByteBufAllocator and made it use the allocator we pass in the constructor (default pooled allocator) instead of the one passed into an allocate function (unpooled allocator). Results were quite shocking - we save  a lot of CPU. So this is the game changer for us (and I hope somebody else).
In this ticket, I'm proposing to allow users the override the receive buffer allocator delegate passed to the RecvByteBufAllocator. We can use channel's allocator by default to be backward compatible, but allow users to pass their own thing.
Given that RCVBUF_ALLOCATOR is taken I assume we can use RCVBUF_ALLOCATOR_DELEGATE (the best name I can come up with) and point it to ALLOCATOR by default.
What do people think about that tiny change? Is that something Netty community (except for Twitter) would be interesting in?
I'm happy to open a PR with the change, just decided to start the thread before and get some feedback.

@vkostyukov I am not sure if I really understand :) Can you show me the change you did ?

Do you have benchmarks or profiling which you can share wrt CPU usage?

Ah sorry @normanmaurer I wasn't clear enough.
What I want to do is to use different allocator (different to channel's allocator) for receive buffers. So I'm proposing to add a new allocator (and a channel option) to a channel so it can be passed to RCVBUF_ALLOCATOR. This would allow us to distinct receive buffer allocators (which we want to be pooled) from everything else (which we want to be unpooled).

@vkostyukov so you want to use a pooled allocator for reading data off the wire and unpooled for everything else?

@johnou Sorry I don't have a benchmark, but we did test/canary this change on one of the production services at Twitter. We reliably reproduced the results on different hardware platforms: ~10% less CPU and 25% less p99 latency (maintaining the same throughput).

@vkostyukov I see... Just be aware that this may still "leak" pooled buffers to the user. As a received buffer may be received by the user.

Yes, that's a very good point @normanmaurer. We're safe here since we copy everything to the unpooled heap in the very first handler. But this is a very different story and problem deserves a blog post of something. We can chat more when you're in HQ this week :)

So what do people think? Can this be useful in general?
I totally get that our use case is somewhat special so not everybody mixing pooled/unpooled allocators in their pipelines/apps. That's why I decided to ask here is there are any other possible use cases for that so it deserves it's own channel option.
Even for the apps that end-to-end pooling/unpooling I can this distinction might be useful. Some example:

Disable leaks only for non-receive buffer allocators (unpooled)
Supply different area/cache sizes for receive and non-receive allocators (pooled)

Does it make any sense? Or is it just me trying to come up with some intrusive use case to justify the change?

@vkostyukov I am not sure why you need any changes for this in netty. Why not just do something like this:
public class MyRecvByteBufAllocator extends AdaptiveRecvByteBufAllocator {

    private final ByteBufAllocator allocator;

    public MyRecvByteBufAllocator(ByteBufAllocator allocator) {
        this.allocator = allocator;
    }

    @Override
    public Handle newHandle() {
        final MaxMessageHandle handle = (MaxMessageHandle) super.newHandle();
        return new MaxMessageHandle() {
            @Override
            public int guess() {
                return handle.guess();
            }

            @Override
            public ByteBuf allocate(ByteBufAllocator alloc) {
                return super.allocate(allocator);
            }

            @Override
            public void reset(ChannelConfig config) {
                handle.reset(config);
            }

            @Override
            public boolean continueReading() {
                return handle.continueReading();
            }

            @Override
            public void readComplete() {
                handle.readComplete();
            }

            @Override
            public int attemptedBytesRead() {
                return handle.attemptedBytesRead();
            }

            @Override
            public void attemptedBytesRead(int bytes) {
                handle.attemptedBytesRead(bytes);
            }
        };
    }
}

Then just set it via ChannelOption. RCVBUF_ALLOCATOR

Thanks @normanmaurer! This is nearly an exact copy of what I have right now (and it works just fine). I was just wondering if we need to have a generic way of doing that. Please, don't get me wrong, I'm totally happy to keep using this approach internally, but decided to check if people think this might be useful for a general case.

Actually, this version is much more clear than mine! I forgot I can call super.newHandler and had to fork the implementation since HandleImpl is private. Thanks a lot for the help on this, @normanmaurer! I think I can live with having this wrapped MaxMessageHandle - the change is super small now and doesn't seem to cause any maintenance burden. Thanks again!

@vkostyukov yay... happy to help :)

Turns out (thanks @kevinoliver!), there DelegatingHandle that makes it a pure joy to implement this!

@vkostyukov high-five to @kevinoliver

no, but really, need a :beer: for @normanmaurer. thanks!

late to the party ... but using DelegatingHandle sgtm. If we were to accept this upstream we would also need to ensure the "copy" semantics are also always used when this AdaptiveRecvByteBufAllocator is in use (to avoid leaks as mentioned by @normanmaurer) ... maybe easier / cleaner just to keep it at the higher level?


Added timestamp format to logger.

Addresses #42

Could you add the timezone, or time zone difference (+0000)

Builds still failing:
Traceback (most recent call last):
  File "/StashCache/bin/stashcp", line 333, in <module>
    main()
  File "/StashCache/bin/stashcp", line 295, in main
    logger.basicConfig(format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
UnboundLocalError: local variable 'logger' referenced before assignment


Add keybind support

We need wrapper support for this first

Implemented in 67dba43e216340c7ac37e4832e935f1bda15b5da (window open keybind) and 81784650c9ed720d69d548a32eadd3bb733f18c4 (escape to close)


Reuse the DominatorTree postorder travesal in BlockLoweringOrder

Rework BlockLoweringOrder construction to use the postorder traversal created by the DominatorTree. Additionally, construct fewer critical edge splits by identifying edges up-front that will need splitting, and otherwise allowing regalloc2 to place moves on either the entry or exit edges of a block. Identifying critical edges up-front often yields fewer critical edge splits than the previous algorithm, leading to lowering orders with fewer blocks overall. This change leads to small but measurable improvements in sightglass benchmarks for compilation on both bz2 and spidermonkey wasm.
The meat of this change is in the first commit, which both changes the block lowering order implementation and propagates a heuristic from the old implementation's postorder construction to the DominatorTree's implementation. This heuristic (reversing the children before pushing them on the work stack) is responsible for much of the test change fallout in this PR, but is important in that without it the new lowering order sees significantly more cache misses on the bz2 benchmark.

I'll review this in detail tomorrow, but one thing I think would be good to explore / understand (if only because I sometimes find that fully explaining why a problem occurred leads to uncovering other surprises, or bugs, or ... basically, Chesterton's Fence): what cases did the existing code not cover that this does?
I'm somewhat surprised because the existing implementation already was supposed to be creating lowered blocks only when necessary: its Orig / Edge / EdgeAndOrig / OrigAndEdge descriptors allow for merging the edge-block into either pred or succ, and for any non-critical edge (such that either pred or succ has at most one succ or pred, respectively), this merging should be possible. In other words, the problem description here "now we only create edge blocks for critical edges" is surprising to me because we were supposed to already be doing this. Was there a case missing or overly conservative, for example? Or is the new implementation not accounting for something?
I see that tests are failing with RA2 rejecting some lowered code ("disallowed branch arg", which occurs when the CFG forces edge moves to the pred side of an edge but the pred ends in a conditional: in this case, we have nowhere to put the moves for just one side of the conditional), which IMHO means we should be extra-careful in understanding exactly what the difference is and what new cases we are now allowing!

The RA2 error was from treating br_table with an empty jump table as an unconditional jump. I ported forward the workaround from the previous implementation, which was to mark blocks that end in br_table as having at least 2 outgoing edges.

There were a few different motivations for this PR, that came out of discussions with @jameysharp, and recent refactorings that get us to a state where we can now assume all branch instructions terminate basic blocks.
Starting with the latter first, I was idly investigating what it would take to have the output of BlockLoweringOrder::succ_indices return a single instruction along with a slice of the indices it branches to. This would allow simplifications in a few other places where we jump through hoops to assert that they are all the same instruction now. This was a pretty daunting refactoring with the previous implementation, as the LoweredBlock type makes use of the branch instruction in many places, and restructuring metadata used during the construction of the postorder traversal resisted multiple attempts by both me and @jameysharp.
As to the former, @jameysharp and I had been discussing how it would be nice to reuse the postorder  traversal that's cached by the DominatorTree to drive the block lowering order. This is nice for a few reasons: it's not unnecessarily recomputing the order which while cheap to compute is not nothing; it allows us to specify explicitly that we only split critical edges, which was easier for me to think about than the state machine in the current implementation.
Additionally this implementation allows us to avoid splitting edges for unconditional jumps leaving one block but targeting another that has multiple inputs, which in some cases does produce lowering orders with fewer critical edge nodes. One concrete case is the diamond from the test suite: an entry with a brif whose target blocks both branch to the same exit node. Previously that would introduce two edge blocks on the unconditional branches to the exit block, but with this implementation those introduced nodes are not necessary. Investigating how the LoweredBlock values are used by the RA2 interface is what led @jameysharp and I to believe that this would be a reasonable change to make, as it treats all LoweredBlock cases the same unless they are the pure Edge case.

One concrete case is the diamond from the test suite: an entry with a brif whose target blocks both branch to the same exit node. Previously that would introduce two edge blocks on the unconditional branches to the exit block, but with this implementation those introduced nodes are not necessary.

Hmm... so, as silly as it may seem in the minimal example, in general we do actually need separate edge blocks here, because of blockparams. Specifically, imagine that each edge from A to B assigned a different list of values to the blockparams in B: then RA2 needs a location to do that permutation for each edge. This is why the definition of edge-criticality in the existing code has to do with number of successors and predecessors, without collapsing.

One concrete case is the diamond from the test suite: an entry with a brif whose target blocks both branch to the same exit node. Previously that would introduce two edge blocks on the unconditional branches to the exit block, but with this implementation those introduced nodes are not necessary.

Hmm... so, as silly as it may seem in the minimal example, in general we do actually need separate edge blocks here, because of blockparams. Specifically, imagine that each edge from A to B assigned a different list of values to the blockparams in B: then RA2 needs a location to do that permutation for each edge. This is why the definition of edge-criticality in the existing code has to do with number of successors and predecessors, without collapsing.

I think that's still easier to implement in the context of these changes, as we're currently adding an edge block only for critical edges; it would be really easy to rephrase this to add an edge block when there's a critical edge, or the successor block has multiple predecessors.

I think that's still easier to implement in the context of these changes, as we're currently adding an edge block only for critical edges; it would be really easy to rephrase this to add an edge block when there's a critical edge, or the successor block has multiple predecessors.

That's possibly equivalent to the current code, but phrased in a (to me) more confusing way. Given a CFG with two edges from A to B, these edges are critical edges; no need to distinguish the special case with multiple preds. Strictly speaking I guess one needs to see the CFG as a hypergraph (every edge has an identity) -- and this is why the edges use branch instruction IDs to disambiguate.
That suggests a different fix to me: why not start with the current code, but use successor-index, rather than branch instruction, to disambiguate edges?
Given the above fix, I suspect this PR would produce exactly equivalent code to the current code. I'm interested to see whether this is actually the case though.

I'd really like to drop the "Treat br_table with an empty jump table as multiple block exits" workaround. The problem it's dealing with is that the input to such instructions is a register use that RA2 would have to account for when emitting moves between blocks. (I didn't understand that when looking at this with Trevor last week.) However in the only case where this can occur, that use is effectively dead: it can't have any effect on the execution of the program. I don't know if we should just make it illegal to have a br_table with an empty jump table (you can always replace it with a jump), or do a legalization pass at some point, but I don't like kludging the block-lowering order as a "solution".
Regarding the edge-splits that this PR removes compared to the existing implementation: The current implementation supports fusing EdgeAndOrig or OrigAndEdge pairs, but if both fusions are legal it picks only one instead of emitting something like EdgeAndOrigAndEdge. That's the case this PR improves on. This is mentioned in the module comment:
//! (note that the edges into CLIF blocks 1 and 2 could be merged with those
//! blocks' original bodies, but the out-edges could not because for simplicity
//! in the successor-function definition, we only ever merge an edge onto one
//! side of an original CLIF block.)

The key observation, I think, is that RA2 can't actually distinguish between Orig, EdgeOrig, and OrigEdge blocks. The only two kinds of blocks we hand it in machinst/lower.rs are either pure critical-edge splitting blocks without any original instructions in them, or original blocks where RA2 may safely add moves to the beginning and end as needed. This PR makes that distinction explicit.
I think you two are talking past each other regarding which edges are critical.
I think the case Chris is talking about is if there are only two blocks (A and B), and A has two edges to B. In that case, yes, both of those edges are critical: they're both edges from a block with multiple successors and to a block with multiple predecessors. As you pointed out, the two edges may have different block parameters so we can't in general place the appropriate moves in either A or B. Those predecessors and successors aren't distinct if we look only at block IDs, but they are distinct edges, and that's what this PR looks at.
The case which Trevor is talking about is when there are four blocks (A, B, C, D), with a conditional branch from A to either B or C, and then B and C both unconditionally branch to D. In that case there are no critical edges, even with block parameters. All of the moves can be attached to block B or C, because they each have exactly one predecessor and one successor. The existing implementation inserts unnecessary edge splits in this case.
I believe this PR already captures the definition that you intended, Chris. It's much simpler than the existing implementation, in my opinion, because it only needs to iterate over all the edges and decide whether each edge is critical or not. That decision is simple after counting all the predecessors and successors of each block.
The only tricky bit in this PR, I think, is in deciding where to insert the edge-splitting blocks in the pre-computed RPO. This PR places them immediately after their predecessors, if I remember correctly, but several other choices would be equally reasonable, I think. There's no "good" choice, as far as I can figure, but this is one choice that I think still produces a valid RPO, which is a reasonable heuristic.


Propose a system scheduler

@LeeHowes 's P2079 is a strong start here.

(note that the link goes to p2071 instead of p2079)

Fixed


Post Excerpt?

Hi
Thank you for your work in this Great theme I make some modification and everything work great, just i want add post excerpt and read more button in home page I modified the home page so I reduice the number of card and the size so there is place for excerpt,how I can achieve this.Thank you

Hi,
To add a post excerpt you can open the file loop.hbs with a code editor and look for this code:

  {{title}}

Then paste the following code just after that:
{{#if custom_excerpt}}

{{custom_excerpt}}

{{/if}}

You will need to provide your own styles for that text.
Lastly, I wouldn’t recommend to add a "read more" button since the whole card is already a link.


Need to wait for the futures to finish before trying to build model

I need to test this code for Python 3.6, but in 3.7 this will cause the code to fail because the statistics aren't available before it tries to build a model!

I am going to close this PR. It isn't necessary. Something very strange was happening yesterday that is no longer happening.


Scrolling up in calendar

Currently, you can't scroll up past the selected date.
This is issue with the library, follow https://github.com/wix/react-native-calendars/issues/588

Any predictions for adding the scroll back up after selecting a future date?