Generate const/final to avoid unexpected changes at runtime

Changed generator to create const (or final if const is not possible) to avoid changing the values at runtime. This may also allow for more automatic optimizations by the compiler.

Thanks for the contribution!  However, I'm a little reluctant to accept this since I intentionally wanted to provide the flexibility to reassign the generated variables later if anyone wants to.  I suppose that for the const cases, anyone who wants reassignability could just use a separate variable.  However, making the result of Uint8List.fromList final removes the ability to reassign it to an empty Uint8List(0) and to garbage collect a potentially significant amount of data.
I'm willing to consider a configuration option to control the output though.  Let me think about this.
Also, changing the generated output will require running test/generate_sample_output.dart before tests will pass.


Does lda2vec modelling require cuDNN and HDF5?

Hi,
I read from the main page of this github that the only requirement for modelling is to have the CUDA support. At present, I'm trying to use code from the lda2vec_run.py file to run modelling. I have seen that there is a moment towards the end of the file where the output is saved to hdf5 but I can't find any documentation on whether CUDA + cuDNN and/or HDF5 is required to run an lda2vec model.
I ask because at present, despite installation of CUDA toolkit together with Visual Studio 2013 and setting environmental variables for Chainer, I cannot correctly import cuda to chainer.
My code is this:

import chainer
from chainer import cuda
from chainer import serializers
import chainer.optimizers as O
import numpy as np
from lda2vec import utils
from lda2vec import prepare_topics, print_top_words_per_topic
from lda2vec_model import LDA2Vec
gpu_id = int(os.getenv('CUDA_GPU', 0))
cuda.get_device(gpu_id).use() # tu jest w tej chwili problem
print "Using GPU " + str(gpu_id)

I get an error as follows:

RuntimeError                              Traceback (most recent call last)
 in ()
20
21 gpu_id = int(os.getenv('CUDA_GPU', 0))
---> 22 cuda.get_device(gpu_id).use() # tu jest w tej chwili problem
23 print "Using GPU " + str(gpu_id)
24
C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\chainer\cuda.pyc in get_device(*args)
159             continue
160         if not isinstance(arg, numpy.ndarray):
--> 161             check_cuda_available()
162             if isinstance(arg, cupy.ndarray):
163                 if arg.device is None:
C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\chainer\cuda.pyc in check_cuda_available()
80                '(see https://github.com/pfnet/chainer#installation).')
81         msg += str(_resolution_error)
---> 82         raise RuntimeError(msg)
83     if not cudnn_enabled:
84         warnings.warn(
RuntimeError: CUDA environment is not correctly set up
(see https://github.com/pfnet/chainer#installation).cannot import name core

I would be grateful for help and any clarification.

It doesn't require CUDA, but the code isn't written to handle that case. CPUs are just extremely slow for lda2vec, and I wouldn't recommend it. That said, a quick fix is to remove that line that calls the GPU env cuda.get_device and to remove later lines about model.to_gpu


Support for Ingress Resource

Is there any plans for, or is there currently any work going on, for adding support for Ingress Resources, instead of the loadbalancer addon?

It would be really cool with the ingress resource!
I checked it up, and we should probably use this controller: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx
I've never experimented with ingress, but soon I'll check it out
In the first place, I'll send a PR to kubernetes/contrib that cross-compiles all their ingress images to arm, arm64 and ppc64le, instead of implementing it in this repo

Let me know if there's anything I can do to help.
/Lars

14 maj 2016 kl. 14:24 skrev Lucas Käldström<EMAIL_ADDRESS>It would be really cool with the ingress resource!
I checked it up, and we should probably use this controller: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx
I've never experimented with ingress, but soon I'll check it out
In the first place, I'll send a PR to kubernetes/contrib that cross-compiles all their ingress images to arm, arm64 and ppc64le, instead of implementing it in this repo
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub


Add minimum chance required for universities

Users don't know what chance they need to get into universities of their choice.
Minimum chance neede to get into some top universities.
Feature originally suggested by naveen_v on fastai forums

Hi! Is someone working on it or can I try ?

No one is working on it. @lelmedda Feel free to try.

i just wanted to ask if you have scraped data already?

Him no I did get a chance to work on it.
Best regards,
On Tue, Oct 1, 2019 at 10:40 AM saswat<EMAIL_ADDRESS>wrote:

i just wanted to ask if you have scraped data already?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BBloggsbott/masters-chance-of-admit/issues/1?email_source=notifications&email_token=ALHQGYQS2OX7BFACREQB6GDQMNOMVA5CNFSM4HA4HR62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEABQF5Y#issuecomment-537068279,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALHQGYSI4L5ODWBDJUHUYIDQMNOMVANCNFSM4HA4HR6Q
.

you made anything from which i can proceed or something?

@saswat01 Maybe this thread could help.

Hi, is anyone still working on this?


How can i use svg file in node_modules packages?

now my svg files is under my project src file. it goes right .
can i delete it , and quote svg file in node_modules package?
how to do ?

i changed another project .and it does work. what i do :
in main.js i import svg inside  node_modules package .
in vue.config.js ues svg-sprite-loader to pack path :node_modules/xxx/src/icons  .
am i right?

i changed another project .and it does work. what i do :
in main.js i import svg inside  node_modules package .
in vue.config.js ues svg-sprite-loader to pack path :node_modules/xxx/src/icons  .
am i right?


No class for recording status callback

A strongly-typed class for the recording status callback is missing from this library. https://www.twilio.com/docs/voice/twiml/record#attributes-recording-status-callback

@Daniel15 are you up to contribute the class?


feat(simplify): prevent mjml-style from breaking css and relax type safety

https://github.com/Faire/mjml-react/pull/38 is a rather big change that makes it difficult to migrate from mjml-react v2 to mjml-react v3. The original goal of v3 was to pick up support of mjml-react and migrate to typescript. Admittedly, we got a bit carried away and added features that make it more difficult than necessary to migrate.
This PR reverts the changes in https://github.com/Faire/mjml-react/pull/38 and makes the mjml-style backwards compatible with v2 of mjml-react. In doing so, we hope that it is easier for users to migrate to v3 of mjml-react.
We plan to start a v4 alpha branch to still allow users who want these cutting edge features, such as the type safety.

My understanding is that feat will result in a 3.1.0 release. Is that your understanding?
Should we do a revert of this and release as a 4.0.0-alpha-1 so anyone who's upgraded to version 3.0.0 can upgrade to the get typesafety?

Yes that was my plan. I'm realizing is probably a good idea to have that 4.0.0-alpha-1 setup before moving forward with this PR, and maybe to add a migration note into the README. I will work on setting that up, unless there are any objections.

sounds good to me


feat: upgade to postcss7

[ ] https://github.com/csstools/postcss-preset-env/issues/58
[ ] examples

It seems that postcss-preset-env now fully updated for postcss7

Thank you for the reminding, will update.

Codecov Report

Merging #3679 into dev will decrease coverage by 35.06%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##              dev    #3679       +/-   ##
===========================================
- Coverage   97.48%   62.41%   -35.07%
===========================================
  Files          18       18
  Lines        1232     1232
  Branches      335      335
===========================================
- Hits         1201      769      -432
- Misses         30      356      +326
- Partials        1      107      +106

Impacted Files
Coverage Δ

lib/core/middleware/error.js
0% <0%> (-97.57%)
:arrow_down:

lib/core/middleware/nuxt.js
3.27% <0%> (-96.73%)
:arrow_down:

lib/builder/generator.js
0% <0%> (-93%)
:arrow_down:

lib/core/meta.js
14.63% <0%> (-82.93%)
:arrow_down:

lib/core/renderer.js
55.55% <0%> (-44.45%)
:arrow_down:

lib/core/nuxt.js
55.83% <0%> (-38.34%)
:arrow_down:

lib/common/utils.js
78.03% <0%> (-21.97%)
:arrow_down:

lib/builder/builder.js
76.84% <0%> (-19.48%)
:arrow_down:

lib/builder/webpack/base.js
85.93% <0%> (-12.5%)
:arrow_down:

lib/common/nuxt.config.js
87.5% <0%> (-12.5%)
:arrow_down:

... and 4 more

Continue to review full report at Codecov.

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


Reserved a certain amount of incoming slots for full nodes

Basically, we don't want light clients to occupy all of our inbound slots.

Issue still relevant and important.


feature/FPHS-188

Added the ability to add a email subject in the share view controller

looks good


Format timestamp for facts table (#2780)

Pull request opened by the merge tool on behalf of #2780

Merged in 7a38749e2acdc7a44fc64fc30502d7ba3f79cf0d


[Feature Request] Add a "File" menu item to "Open containing folder" or "Open in text editor"

Feature Request
Description:
Add a menu item to the "File" menu. Two options for the button:

"Open containing folder": clicking the button would launch either the system File Explorer (Windows Explorer, Nemo, etc.)
"Open in text editor" button: clicking the button would launch the default .txt editor.

Reasoning:
Sometimes I want to do a very quick find-and-replace in a todo.txt file that's already open in Sleek. Being able to open it would be very helpful.
Implementation Details:
The "Open containing folder" button would probably be easier to implement cross-platfom, and gives a bit more flexibility. The "Open in text editor" button would also accomplish my goal though.

@DeflateAwning have you already checked the context menu of the file tabs? Here you will find a button, that should reveal the todo file in your file manager.

I hadn't seen that feature yet. I still feel like the button also belongs in the File menu, but this is great knowing that it exists. Thanks!

I still care about this issue and do not want the bot to close it


Migrate tool incorrectly treats result of emulated function calls as nullable

When running dart migrate, the return values of invocations of emulated function classes (classes that implement call) are incorrectly treated as nullable.
This only happens when calling emulated functions directly but not when using .call(...), and also doesn't affect normal function types.
As a result, functions that return the result of these calls and variables that are initialized with the result of these calls are marked as nullable.
Reduced test case: https://gist.github.com/greglittlefield-wf/3b8cb36ae407a8485b1f5029db0e9c62
Screenshot of migration tool

After running the migration and opting into null-safety, showing that the static type of the call is indeed int and not int?.

The function return value case can be worked around by adding /*!*/ hints comments, but unfortunately there's nothing that can prevent the tool from updating the var case.
We also have many of these types of calls in our libraries (via the invocation of OverReact UiProps classes as builders), so having to manually add the hints and update the typings on variables seems like it would be pretty tedious.
For example,
// The over_react code:
var content = Dom.div()();

// gets migrated to:
ReactElement? content = Dom.div()();

Tested and reproduced in Dart SDK versions 2.13.0 and 2.14.0-176.0.dev

I took a stab at fixing this; here's the CL: https://dart-review.googlesource.com/c/sdk/+/220125

As of 1c7fe7196dd7a542f7f91cd6ea2ac81e1a13146c, the null safety migration tool has been removed from active development and retired. No further work on the tool is planned.
If you still need help, or you believe this issue has been closed in error, please feel free to reopen.


Parallelize benchmarking

With the large scale of our datasets (potentially 10^8 BBs), we will need a reasonably fast way to benchmark basic blocks. Parallelizing this is an obvious first step. This needs a couple things implemented on the LLVM side:

[x] Shared memory names (used for memory annotations) need a name that is also based on the thread ID rather than just the process ID.
[ ] There needs to be an option to pin a benchmarking process to a specific core within llvm-exegesis.

(There might be more on the llvm-exegesis side).
Then, we need to do the following:

[ ] Implement parallel benchmarking using LLVM threading primitives.
[ ] Validate that running on multiple threads doesn't impact results (using validation counters).
[ ] Ship it.

Doing this outside of the process with ray seems to work much better.


fixes for router

Describe the bug
A clear and concise description of what the bug is.

Fix bid version invalid error at the router
setup sanity check of supported router bid during setup at the router

Fixes #1679
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'

Additional context
Add any other context about the problem here.

stuck by CI/CD


/wallet address not persisting

          @Steveantor would you please post your wallet address here?

Originally posted by @ubiquibot[bot] in https://github.com/ubiquity/bounty-bot/issues/110#issuecomment-1484045913

Another hotfix that is an essential feature.

/assign

Ok I had a deep debug on this. bountybot supabase project has been paused temporarily.

@0xcodercrane would you please post your wallet address here?

I don't need to post my address because its not a bounty lol

/wallet 0x00868BB3BA2B36316c2fc42E4aFB6D4246b77E46

@0xcodercrane you should be mindful to close these as not planned if they aren't meant to be paid out (or else the permit could be generated when autoPay is enabled by default again.)


[FB Messenger] Getting 400 "Bad Request" error when sending messages to Messenger channel?

Bot Info

App ID: 424cfe9b-956f-4bf6-b62d-bc461a1e8d66

SDK Platform: Node.js

SDK Version: 3.11.0

Active Channels: FB Messenger

Deployment Environment: ngrok

Issue Description
Had a bot working locally with ngrok. all of a sudden I begin to receive errors with my bot.
I receive incoming messages, but only on reply I get the following error. Something is now broken with the callback for the bot to send a message back to Facebook.
Error: Request to 'https://facebook.botframework.com/v3/conversations/xxxxxxx' failed: [400] Bad Request
    at Request._callback (/dev_env/instabot/v/app/node_modules/botbuilder/lib/bots/ChatConnector.js:532:46)
    at Request.self.callback (/dev_env/instabot/v2/app/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:192:7)
    at Request.<anonymous> (/dev_env/instabot/v2/app/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:189:7)
    at IncomingMessage.<anonymous> (/dev_env/instabot/v2/bot/app/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:291:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:186:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

This error is in my development environment only. I have a production bot, on a different page, and have not seen this issue.
I attempted to upgrade to latest version of bot framework which did not fix.
It seems that this is a real issue, either between MS and FB.  An additional note is that the First and Last name were no longer being passed on the broken page.
I set up a new Facebook page and created a new fb app with the exact same code and it works as expected.
I'm documenting this because it sucks to spend 3 hours troubleshooting a random problem, it's something that the team at MS should look into, also if it happens in a prod environment I would be F*CKED...
Code Example
var restify = require('restify');
var builder = require('botbuilder');

// Create bot and add dialogs
var connector = new builder.ChatConnector({
    appId: 'xxxx',
    appPassword: 'xxxxx'
});
var bot = new builder.UniversalBot(connector);
bot.dialog('/', function (session) {
    console.log( session.message.text)
    session.send('Hello Universe');
});

// Setup Restify Server
var server = restify.createServer();
server.post('/', connector.listen());
server.listen(process.env.port || 4040, function () {
    console.log('%s listening to %s', server.name, server.url);
});

Reproduction Steps

Send message to bot.

Expected Behavior
Bot returns "Hello Universe"
Actual Results
Error: Request to 'https://facebook.botframework.com/v3/conversations/xxxxx' failed: [400] Bad Request
    at Request._callback (/dev_env/instabot/v/app/node_modules/botbuilder/lib/bots/ChatConnector.js:532:46)
    at Request.self.callback (/dev_env/instabot/v2/app/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:192:7)
    at Request.<anonymous> (/dev_env/instabot/v2/app/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:189:7)
    at IncomingMessage.<anonymous> (/dev_env/instabot/v2/bot/app/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:291:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:186:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Also seeing this, but with Skype. WebChat seems to work fine.

Error: Request to 'https://smba.trafficmanager.net/apis/v3/conversations/xxxxxxxx/activities' failed: [400] Bad Request
--
  | at Request._callback (/opt/app-root/src/node_modules/botbuilder/lib/bots/ChatConnector.js:532:46)
  | at Request.self.callback (/opt/app-root/src/node_modules/request/request.js:186:22)
  | at emitTwo (events.js:106:13)
  | at Request.emit (events.js:191:7)
  | at Request.<anonymous> (/opt/app-root/src/node_modules/request/request.js:1163:10)
  | at emitOne (events.js:96:13)
  | at Request.emit (events.js:188:7)
  | at IncomingMessage.<anonymous> (/opt/app-root/src/node_modules/request/request.js:1085:12)
  | at IncomingMessage.g (events.js:292:16)
  | at emitNone (events.js:91:20)
  | at IncomingMessage.emit (events.js:185:7)

Same problem from today, i have:
Error: Request to 'https://facebook.botframework.com/v3/conversations/1588505027902870-1453809838200948/activities/mid.%24cAAVwyFuNfTFl7j8j4lfvPnbch7_k' failed: [400] Bad Request
at Request._callback (D:\home\site\wwwroot\node_modules\botbuilder\lib\bots\ChatConnector.js:532:46)
at Request.self.callback (D:\home\site\wwwroot\node_modules\request\request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (D:\home\site\wwwroot\node_modules\request\request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (D:\home\site\wwwroot\node_modules\request\request.js:1085:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)

Not sure if 100% the same, but I also try to connect from NodeJS code, and DirectLineJS to send activity to my SkypeBot via valid configured DirectLine channel, and I provide valid conversationId, but DirectLine API can't find the conversation.
I debugged DirectLine, and I guess, it's because it's kinda virtual chat, that is why it's ok for me for now. But just in case here is debug from Heroku:
2017-11-15T22:36:30.293915+00:00 app[web.1]: Error: Request to 'https://directline.botframework.com/v3/conversations/19%3A0e...........2%40thread.skype/activities' failed: [400] Bad Request

2017-11-15T22:36:30.293928+00:00 app[web.1]:     at Request._callback (/app/node_modules/botbuilder/lib/bots/ChatConnector.js:532:46)
2017-11-15T22:36:30.293929+00:00 app[web.1]:     at Request.self.callback (/app/node_modules/request/request.js:186:22)
2017-11-15T22:36:30.293930+00:00 app[web.1]:     at emitTwo (events.js:126:13)
2017-11-15T22:36:30.293930+00:00 app[web.1]:     at Request.emit (events.js:214:7)
2017-11-15T22:36:30.293931+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/request/request.js:1163:10)
2017-11-15T22:36:30.293932+00:00 app[web.1]:     at emitOne (events.js:116:13)
2017-11-15T22:36:30.293932+00:00 app[web.1]:     at Request.emit (events.js:211:7)
2017-11-15T22:36:30.293933+00:00 app[web.1]:     at IncomingMessage.<anonymous> (/app/node_modules/request/request.js:1085:12)
2017-11-15T22:36:30.293933+00:00 app[web.1]:     at Object.onceWrapper (events.js:313:30)
2017-11-15T22:36:30.293934+00:00 app[web.1]:     at emitNone (events.js:111:20)

I have feeling, that I'm doing smth wrong, recently started with bots.  But almost 3 weeks, I strugling with either 401, or 404, or 400 or CORS or smth else. And looks simple task - send a request to Bot API -> Bot send a message to channel chat.

@dundas Can you login to https://dev.botframework.com/bots/ and go to your bot page and refresh and check the logs in the health tab and send a screen shot to better debug the error.

@Aashish-Amber it's empty. And in case u don't believe me:

Here is my JS code for simple DirectLine usage
// https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-direct-line-3-0-send-activity
    function sendAnActivity_via_DirectLine_directly(){
        $.ajax(`https://directline.botframework.com/v3/directline/conversations/${conversationId}/activities`, {
            method: 'post',
            data: {
                "type": "message",
                "from": {
                    "id": "user1"
                },
                "text": "eat"
            },
            _contentType: 'application/json', // if provided, no response at all
            _crossDomain: true,
            beforeSend: function(xhr){
                xhr.setRequestHeader('Authorization', 'Bearer ' + secret);
                // xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            },
            _headers: {
                'Content-Type': 'application/json',
                'Access-Control-Allow-Origin': '*',
                // 'Access-Control-Allow-Methods': 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
                // 'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token',
                // 'Access-Control-Allow-Credentials': 'true'
            },
            complete: function(xhr, textStatus) {
                // console.log(xhr, textStatus)
            },
            success: function(data, textStatus, xhr) {
                // console.log(data, textStatus, xhr)
            },
            error: function(xhr, textStatus, errorThrown) {
                console.log(xhr, textStatus, errorThrown);
                // {
                //   "error": {
                //     "code": "BadArgument",
                //     "message": "Unknown conversation"
                //   }
                // }
            }
        }).then(function(){

        });
    }
    sendAnActivity_via_DirectLine_directly();

Request<EMAIL_ADDRESS>Request Method:POST
Status Code:404 Not Found
Remote Address:<IP_ADDRESS>:443
Referrer Policy:no-referrer-when-downgrade

Request Headers:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.9,pl;q=0.8,uk;q=0.7,ru;q=0.6
Authorization:Bearer gUY0MKhYruE.cwA.2xY.DPOqHvqTInccLalhYb35U0KSUhDON_T7SItaR-vnVYQ
Cache-Control:no-cache
Connection:keep-alive
Content-Length:40
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Host:directline.botframework.com
Origin:http://localhost:8080
Pragma:no-cache
Referer:http://localhost:8080/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3265.0 Safari/537.36

Response Headers:
HTTP/1.1 404 Not Found
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 90
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.0
Access-Control-Allow-Origin: *
Request-Context: appId=cid-v1:91e46abb-4ce5-4d98-9375-02378f649011
X-Powered-By: ASP.NET
Strict-Transport-Security: max-age=31536000
Date: Thu, 16 Nov 2017 09:37:39 GMT

Form Data / payload:
type:message
from[id]:user1
text:eat

@alundiak The direct line is a channel, and so is skype.  The direct line channel cannot be used to connect to the skype channel.  Please open a new issue.
@dundas You might need to re-configure the facebook channel for your bot:
{"error":{"message":"Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons.","type":"OAuthException","code":190,"error_subcode":460,"fbtrace_id":"EnJYLsXtpqR"}}


PhysX integration

Add PhysX integration.
Some work in progress:

Feature has been merged into dev. The code is located within the examples folder and not shipped directly with the library.
However, as it is header only, it can easily be copied into downstream code.


[zsh] Replace perl with awk

Unlike awk, which is even defined in POSIX, perl is not pre-installed on all *nix systems. This awk command is functionally equivalent to the original perl command.
If extended_history is enabled, the history widget will display: (EDIT: rejected)
12  2022-04-02   echo "older command"
123  today'16:30  echo "today's command"

This is great! perl isn't present on Alpine Linux distributions out of the box.  It would be great if I didn't have to install that.

@jirutka That's incredible! That solves my exact problem! Thank you so much for making that happen 🙇

FWIW, awk version and perl version are not identical.
echo $'3 echo -e "foo\tbar"\n2 echo -e "foo bar"\n1 echo -e "foo   bar"' | awk '{ line=$0; $1=""; if (!seen[$0]++) print line }'

echo $'3 echo -e "foo\tbar"\n2 echo -e "foo bar"\n1 echo -e "foo   bar"' | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++'

FWIW, awk version and perl version are not identical.

Fixed.

is it really a bug?

Yes. Printing foo\tbar is definitely not the same as printing foo bar.
I'm okay with simply replacing perl with awk, but I don't want anything beyond that because my goal here is keeping the three implementations (for bash, zsh, and fish) as similar and simple as possible.

Hm, okay, I removed the second commit.
For the record, the commit was:
From: Jakub Jirutka<EMAIL_ADDRESS>Date: Sat, 2 Apr 2022 02:18:55 +0200
Subject: [PATCH] [zsh] include date or time in Zsh history if available

If extended_history is enabled, the history widget will display:

     12  2022-04-02   echo "older command"
    123  today'16:30  echo "today's command"
---
 shell/key-bindings.zsh | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 88a9a9e..d883eeb 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -97,8 +97,23 @@ bindkey -M viins '\ec' fzf-cd-widget
 fzf-history-widget() {
   local selected num
   setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
-  selected=( $(fc -rl 1 | awk '{ cmd=$0; sub(/^\s*[0-9]+\**\s+/, "", cmd); if (!seen[cmd]++) print $0 }' |
-    FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
+  local awk_filter='{ cmd=$0; sub(/^\s*[0-9]+\**\s+/, "", cmd); if (!seen[cmd]++) print $0 }'  # filter out duplicates
+  local n=2 fc_opts=''
+  if [[ -o extended_history ]]; then
+    local today=$(date +%Y-%m-%d)
+    # For today's commands, replace date ($2) with "today", otherwise remove time ($3).
+    # And filter out duplicates.
+    awk_filter='{
+      if ($2 == "'$today'") sub($2 " ", "today'\''")
+      else sub($3, "")
+      line=$0; $1=""; $2=""; $3=""
+      if (!seen[$0]++) print line
+    }'
+    fc_opts='-i'
+    n=3
+  fi
+  selected=( $(fc -rl $fc_opts 1 | awk "$awk_filter" |
+    FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n$n..,.. --tiebreak=index --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
   local ret=$?
   if [ -n "$selected" ]; then
     num=$selected[1]

Merged, thanks!
(We're still using perl in the bash script.)

Great work! Thanks very much to both of you!


chore: release 1.2.61

:robot: I have created a release *beep* *boop*
1.2.61 (2022-02-02)
Features

images-imports: added reference docs (8d6ef61)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/werf/werf/releases/tag/v1.2.61 :sunflower:


Customize title view on iOS 7.1

Hi man!
I user your lib, it's so great control... I customize a UIView and embed this view in title view (self.navigationItem.titelView= customview). It's working on iOS 8 but not in iOS7.1. Can you help me!
Best regard,
Nguyen

First of all, it's titleView, not titelView.
Did the menubar work at all in iOS 7? I also had issues under iOS 7, though I'm not sure if they are related. Have a look at #210 and see if that might help.

@nvnguyenit This lib doesn't do anything with title or titleView. Does this issue happen if you use a standard UINavigationController?

Can you confirm that the PR by @timbodeit fixes the issue? If yes, I'll merge it and push a new version

@aryaxt Correct. It doesn't touch title or titleView directly. These attributes are however a part of the navigationItem, that iOS-Slide-Menu does some work with.
I'm not saying, that I'm sure my PR will resolve @nvnguyenit s issue ... but it sure sounded a bit similar to the problems, that I was experiencing.

@aryaxt thanks for your time, i have fixed it. It conflict with another custom control i use. Sorry man, your control still good!

@aryaxt Guess this issue can be closed.
Still wouldn't mind if took a quick look at my pull requests, though ;)


Enforce no local editing of files that are maintained elsewhere

Problem description
We want reference docs to be maintained in their code repos, along with
the code they are referencing. We want to periodically bring them up to date
in this repo using automated processes.
Two things need to happen:

Create a manifest of directories and files that should not be the target of pull requests in this repo: Done in PR #209.
Enforce that manifest using CI, on each pull request

The automated refreshing of the reference docs in this repo is out of scope for this issue, but
a second issue can be filed as a follow-up to this one.
/cc @thaJeztah @stevvooe @mikedougherty @johndmulhausen

We did this by removing those files from our repo and getting them at build time.


Code coverage analysis

Adds coverage analysis to our testing infrastructure and adds the codecov badge to the README.

Codecov Report

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

@@            Coverage Diff            @@
##             master     #464   +/-   ##
=========================================
  Coverage          ?   86.62%
=========================================
  Files             ?       68
  Lines             ?     5885
  Branches          ?     1225
=========================================
  Hits              ?     5098
  Misses            ?      618
  Partials          ?      169

Continue to review full report at Codecov.

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

I see this tool is used in several repos; what's the best tutorial/document I can use to learn more about it?
This looks GTG


Define prioritisation criteria for new additions to the Design System

What
Create criteria the Design System team can use to prioritise new components and patterns and / or iterations to existing styles, components and patterns.
Why
The current community backlog has an outdated priority list. We should have a set of open criteria which we review the list with.
Who needs to work on this
Designers, Community Manager, Service Designer, Product Manager
Who needs to review this
Product Manager, Designers, Delivery Manager
Done when

[x] Run an ideation on potential criteria, cadence and process
[ ] Draft scoring system
[ ] Team review of scoring system
TBC

I have investigated which survey tool to use. Smart Survey and Google Forms were our options as they are the approved ones for GDS. I used the information from the user research wiki to help determine which will be the better choice.
I have chosen to use Smart Survey as Google Forms is a limited survey tool. It does not allow you to design surveys with more complex routing or question filtering. It is also not appropriate for cross-government surveys. Some government departments do not support Google Apps.
Please let me know if this course of action doesn't seem appropriate.


Tips for making this work with GLSL Lint

I have found that you can make this work with https://marketplace.visualstudio.com/items?itemName=dtoplak.vscode-glsllint
Just use the following script replacing the script_to_run to path to glslangValidator. Only downside is that all errors are printed 2 lines below.
#!/bin/bash

# The script you want to forward the arguments to
script_to_run="/opt/homebrew/bin/glslangValidator"

# Generate a filename based on the current timestamp
timestamp=$(date +%Y%m%d%H%M%S)
log_file="/tmp/glslangValidator_log.txt"

# Log the input arguments
echo "[$timestamp] Input arguments: $@" > "$log_file"

# Concatenate the specified lines to the standard input
echo -e "#version 100\n#extension GL_GOOGLE_include_directive : require\n$(cat)" | "$script_to_run" "$@"

Hi @Swoorup ! Sorry, what do you mean by "making this work"? I use Shader languages support for VS Code extension for example and as you can see, it's linting correctly my shader files:

Hi @Swoorup ! Sorry, what do you mean by "making this work"? I use Shader languages support for VS Code extension for example and as you can see, it's linting correctly my shader files:

Yeah not a question. Just a tip to using the extension I linked. Afaik that extension only supports hlsl linting/validation? The one I linked uses glslLangValidator

Got it, thanks! I would say, if you have a chance to chose, I would go with "Shader languages support for VS Code" since from what I see on the marketplace, their readme claims this extension should work with HLSL, GLSL and Cg shaders and I haven't had any problems using it with WebGL. However, you might consider installing WGSL if you need to work with WebGPU. I haven't tested it deeply myself though.


Add proper Python3 support to the generator

This pull request attempts to port nanopb_generator.py to a python2 and python3 compatible version.
Arch Linux already defaults to python3 and Ubuntu and Debian are forthcoming.  My Arch Linux install had a python-protobuf build for python3, but not for python2.  As a result, none of the hacks to force python2 worked.
I've tested this against the unit tests and it seems good for both python2 and python3.
Test systems for python3: Arch Linux up to date as of today

clang 3.6.2-4
cmake 3.3.2-2
protobuf 2.6.1-1
python 3.4.3-3
python-protobuf 3.0.0a3-2
scons 2.3.6-1

Python 2 testing was in a docker container running Ubuntu:14.04:

cmake  <IP_ADDRESS>-0ubuntu3
gcc 4:4.8.2-1ubuntu6
protobuf 2.6.1 (built from source as 2.5.x in apt has issues with oneof it appears)
python 2.7.5-5ubuntu3
python-protobuf 2.6.1 (built and installed via pip)
scons 2.3.0-2

All of the ASCII string vs unicode stuff is a complete headache and I'm not convinced it's 100% correct in python2, but all unit tests at least pass.

Ah, protobuf now builds also against python3; yeah, time to add support to nanopb also.
I'll look into this after 0.3.4 is out (next week). I'll have to build a python3 based container to run the tests on.

Probably the most important thing is to make sure that I didn't break python2 support on accident.  My testing suggests not.

Yeah, I trust the tests to catch most breakages (I'll of course review the changes also). But continuous python 3 testing machine will be needed to make sure that I won't break python 3 support in the future :)

But continuous python 3 testing machine will be needed to make sure that I won't break python 3 support in the future :)

I created a pull request for an automated build system that attempts to test both python2 and python3 and a number of compilers.  Check out #170


ARG: Add option to enforce granularity

It would be nice if there was an option for the ARG rules that would force ignore comments to apply just to the particular unused arguments. Often I want to take note in the code that one or two are intentionally ignored but the others should definitely not be. When this option exists there should be another rule added that would allow you to actually ignore the entire function/method.
Example from https://github.com/pypa/hatch/pull/1031, an implementation of PEP 517:
def build_wheel(
    wheel_directory: str,
    config_settings: dict[str, Any] | None = None,  # noqa: ARG001
    metadata_directory: str | None = None,  # noqa: ARG001
) -> str:

Can you expand on this a bit, or give an example of what you mean? (Do the ignore comments in your example above not work as expected?)

No I mean I want to enforce the example from above rather than allowing the comment to apply to the entire function

If I plug that into the playground, I see that the second two arguments are ignored, while the first is flagged with ARG001. I'm really sorry because I suspect I'm still just misunderstanding the ask!

Ahh got it, thanks!


fix: report errors on main to setFailed

:tada: This PR is included in version 1.3.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


adapty.activate() function crashes the app when API key is invalid

Description
When an invalid API_KEY is provided to adapty.activate(API_KEY) function, it doesn't throw an error and the whole app crashes.
When the correct api key is provided, it works without any issues. (Please check the video)
Expected Behaviour: .activate function throws an error, and it's caught by my code in the app
Actual Behaviour: No error is thrown, instead whole app crashes. Possibly due to unhandled exception in the sdk
Why it's critical?: For any reason, app might not get the correct credentials for adapty, which would cause whole app to crash and make it unusable
https://github.com/adaptyteam/AdaptySDK-React-Native/assets/22727931/760ff2bd-8b8f-4e9f-aaca-c02eaeb80452
This hook is in the main entry point of the application, App.ts:
  useEffect(() => {
   function setUpAdapty() {
      adapty
        .activate("IncorrectKey", {
          customerUserId: "TestUser",
          logLevel: "error",
        })
        .then(() => {
          Alert.alert("✅ Adapty activated");
        })
        .catch((e) => {
          Alert.alert("❌ Adapty activation failed");
          console.log({
            e,
          });
        });
    }

    setUpAdapty();
  }, []);

Version
v2.9.1
What platforms are you seeing the problem on?
iOS
System info
System:
  OS: macOS 14.3
  CPU: (8) arm64 Apple M1 Pro
  Memory: 129.89 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.0
    path: ~/.nvm/versions/node/v18.17.0/bin/node
  Yarn: Not Found
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.14.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.4
    wanted: 0.73.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: true
  newArchEnabled: false

----
Expo Details--
expo version: 50.0.6
eas-cli version: 7.1.3 (darwin-arm64 node-v18.17.0)

hi @jamcry, thank you!
It's not actually a crash, but a debug-only assertion at the native iOS level


minor-cpu: unable to find destination due to unconditional branch followed by memory access

Bug description
L1:
    ....
    j L3
L2:
    lw a1, 0(a0)
    ....
L3:
    ....

The program above can lead to an error when using MinorCPU. The reason is, that the memory access is started after the unconditional jump. If a0 does not point to a valid memory region, an error is thrown in BaseXBar::findPort.
https://github.com/gem5/gem5/blob/b279e40cb788087bab9926fa92484f57ab1e8978/src/mem/xbar.cc#L333-L370
src/mem/xbar.cc:368: fatal: Unable to find destination for [0:0x4] on system.membus
Use --debug-flags=PortTrace to see the port trace of the packet.

Affects version
Gem5 development branch, Commit SHA: b279e40cb788087bab9926fa92484f57ab1e8978
gem5 Modifications
No modifications.
To Reproduce
I pushed a minimal working example in https://github.com/robhau/gem5/tree/minor_cpu_bug_minimal_working_example

Set path to multilib RISC-V compiler in firmware/Makefile
bash execute.sh

Firmware code:
.global start
.type start,@function
start:
    .option push
    .option norelax
    la gp, __global_pointer
    .option pop
    la sp, __stack_top
    li a0, 0
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    add a0, a1, a2
    li a1, 1
    j L2
L1:
    lw a2, 0(a0)
    lw a3, 4(a0)
    lw a4, 8(a0)
    j exit
L2:
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    li a0, 0
    lui a0, 0x80000
    j L1

exit:
    wfi
    j exit

Makefile:
CC=/opt/riscv-multilib2/bin/riscv64-unknown-elf-
CC_FLAGS = -march=rv32imafc -mabi=ilp32f -mfdiv -mdiv
CC_FLAGS += -O3 -ffreestanding -Wall -ffreestanding -nostartfiles
CC_FLAGS += -Wl,-T,linker.ld
firmware.elf: start.s
	$(CC)gcc $(CC_FLAGS) start.s -o firmware.elf
	$(CC)objdump -D firmware.elf > firmware.txt

clean:
	rm firmware.elf

linker file:
OUTPUT_ARCH(riscv)
MEMORY
{
    rom(rx) : ORIGIN =  0x80000000, LENGTH = 0x8000000
    ram(!rx) : ORIGIN = ORIGIN(rom) + LENGTH(rom), LENGTH = 0x8000000
}

ENTRY(start)

SECTIONS
{
    . = ORIGIN(rom);
    .text :
    {
        *(.text)
        . = ALIGN(4);
    } > rom

    PROVIDE(__stack_top = ORIGIN(ram) + LENGTH(ram));
    PROVIDE(__global_pointer = ORIGIN(ram) + LENGTH(ram) / 2);
}

disassembly of compiled firmware:

firmware.elf:     file format elf32-littleriscv

Disassembly of section .text:

80000000 <start>:
80000000:	0c000197          	auipc	gp,0xc000
80000004:	00018193          	mv	gp,gp
80000008:	10000117          	auipc	sp,0x10000
8000000c:	ff810113          	addi	sp,sp,-8 # 90000000 <__stack_top>
80000010:	4501                	li	a0,0
80000012:	00c58533          	add	a0,a1,a2
80000016:	00c58533          	add	a0,a1,a2
8000001a:	00c58533          	add	a0,a1,a2
8000001e:	00c58533          	add	a0,a1,a2
80000022:	00c58533          	add	a0,a1,a2
80000026:	00c58533          	add	a0,a1,a2
8000002a:	00c58533          	add	a0,a1,a2
8000002e:	00c58533          	add	a0,a1,a2
80000032:	00c58533          	add	a0,a1,a2
80000036:	00c58533          	add	a0,a1,a2
8000003a:	00c58533          	add	a0,a1,a2
8000003e:	4585                	li	a1,1
80000040:	a029                	j	8000004a <L2>

80000042 <L1>:
80000042:	4110                	lw	a2,0(a0)
80000044:	4154                	lw	a3,4(a0)
80000046:	4518                	lw	a4,8(a0)
80000048:	a825                	j	80000080 <exit>

8000004a <L2>:
8000004a:	4501                	li	a0,0
8000004c:	4501                	li	a0,0
8000004e:	4501                	li	a0,0
80000050:	4501                	li	a0,0
80000052:	4501                	li	a0,0
80000054:	4501                	li	a0,0
80000056:	4501                	li	a0,0
80000058:	4501                	li	a0,0
8000005a:	4501                	li	a0,0
8000005c:	4501                	li	a0,0
8000005e:	4501                	li	a0,0
80000060:	4501                	li	a0,0
80000062:	4501                	li	a0,0
80000064:	4501                	li	a0,0
80000066:	4501                	li	a0,0
80000068:	4501                	li	a0,0
8000006a:	4501                	li	a0,0
8000006c:	4501                	li	a0,0
8000006e:	4501                	li	a0,0
80000070:	4501                	li	a0,0
80000072:	4501                	li	a0,0
80000074:	4501                	li	a0,0
80000076:	4501                	li	a0,0
80000078:	4501                	li	a0,0
8000007a:	80000537          	lui	a0,0x80000
8000007e:	b7d1                	j	80000042 <L1>

80000080 <exit>:
80000080:	10500073          	wfi
80000084:	bff5                	j	80000080 <exit>
	...

Disassembly of section .riscv.attributes:

00000000 <.riscv.attributes>:
   0:	4341                	li	t1,16
   2:	0000                	unimp
   4:	7200                	flw	fs0,32(a2)
   6:	7369                	lui	t1,0xffffa
   8:	01007663          	bgeu	zero,a6,14 <start-0x7fffffec>
   c:	0039                	c.nop	14
   e:	0000                	unimp
  10:	7205                	lui	tp,0xfffe1
  12:	3376                	.insn	2, 0x3376
  14:	6932                	flw	fs2,12(sp)
  16:	7032                	flw	ft0,44(sp)
  18:	5f31                	li	t5,-20
  1a:	326d                	jal	fffff9c4 <__stack_top+0x6ffff9c4>
  1c:	3070                	.insn	2, 0x3070
  1e:	615f 7032 5f31      	.insn	6, 0x5f317032615f
  24:	3266                	.insn	2, 0x3266
  26:	3270                	.insn	2, 0x3270
  28:	635f 7032 5f30      	.insn	6, 0x5f307032635f
  2e:	697a                	flw	fs2,156(sp)
  30:	32727363          	bgeu	tp,t2,356 <start-0x7ffffcaa>
  34:	3070                	.insn	2, 0x3070
  36:	7a5f 6d6d 6c75      	.insn	6, 0x6c756d6d7a5f
  3c:	7031                	c.lui	zero,0xfffec
  3e:	0030                	addi	a2,sp,8
  40:	0108                	addi	a0,sp,128
  42:	0b0a                	slli	s6,s6,0x2

Terminal Output
Only with debug flag Exec
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version DEVELOP-FOR-24.0
gem5 compiled May 14 2024 12:52:02
gem5 started May 14 2024 13:21:00
gem5 executing on rh, pid 470668
command line: build/ALL/gem5.opt --debug-flags=Exec -r --outdir=cpu_minor configs/control_hazard.py

False
Global frequency set at<PHONE_NUMBER>000 ticks per second
src/arch/riscv/isa.cc:276: info: RVV enabled, VLEN = 256 bits, ELEN = 64 bits
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
src/cpu/minor/execute.cc:166: warn: No functional unit for OpClass SimdUnitStrideSegmentedLoad
src/cpu/minor/execute.cc:166: warn: No functional unit for OpClass SimdUnitStrideSegmentedStore
system.remote_gdb: Listening for connections on port 7000
src/sim/simulate.cc:199: info: Entering event queue @ 0.
Memory Usage: 448876 KBytes

Debug flags Exec,Minor
546875: system.cpu: T0 : 0x8000003e @start+62    : c_li a1, 1                 : IntAlu :  D=0x0000000000000001
 656250: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 656250: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 671875: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 671875: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 687500: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 687500: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 703125: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 703125: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 703125: system.cpu.execute: Attempting to issue [tid:0]
 703125: system.cpu.execute: Trying to issue inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j) to FU: 0
 703125: system.cpu.execute: Issuing inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j) into FU 0
 703125: system.cpu.execute: Reached inst issue limit
 703125: system.cpu.execute: Stepping to next inst inputIndex: 1
 703125: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
 718750: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 718750: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 718750: system.cpu.execute: Attempting to issue [tid:0]
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 0
 718750: system.cpu.execute: Can't issue as FU: 0 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 1
 718750: system.cpu.execute: Can't issue as FU: 1 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 2
 718750: system.cpu.execute: Can't issue as FU: 2 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 3
 718750: system.cpu.execute: Can't issue as FU: 3 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 4
 718750: system.cpu.execute: Can't issue as FU: 4 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 5
 718750: system.cpu.execute: Can't issue as FU: 5 isn't capable
 718750: system.cpu.execute: Trying to issue inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) to FU: 6
 718750: system.cpu.execute: Issuing inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) into FU 6
 718750: system.cpu.execute.scoreboard0: Inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) depends on execSeqNum: 0
 718750: system.cpu.execute: Memory ref inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) must wait for inst 0(exec) before issuing
 718750: system.cpu.execute: Pushing mem inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw)
 718750: system.cpu.execute.scoreboard0: Marking up inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) regIndex: 12 final numResults: 1 returnCycle: 49
 718750: system.cpu.execute: Reached inst issue limit
 718750: system.cpu.execute: Stepping to next inst inputIndex: 1
 718750: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
 734375: system.cpu.execute.lsq.storeBuffer: StoreBuffer step numUnissuedAccesses: 0
 734375: system.cpu.execute: [tid:0] thread_interrupted?=0 isInbetweenInsts?=1
 734375: system.cpu.execute: Attempting to commit [tid:0]
 734375: system.cpu.execute: Committing micro-ops for interrupt[tid:0]
 734375: system.cpu.execute: Trying to commit canCommitInsts: 1
 734375: system.cpu.execute: Trying to commit from mem FUs
 734375: system.cpu.execute: Issuing mem ref early inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) instToWaitFor: 0
 734375: global: ExecContext setting PC: (0x80000042=>0x80000044).(0=>1)
 734375: system.cpu.execute: Initiating memRef inst: 0/1.1/2/19.19 pc: 0x80000042 (c_lw)
 734375: system.cpu.execute.lsq: Pushing request (load) addr: 0x0 size: 4 flags: 0x2 lineWidth : 0x40
 734375: system.cpu.execute.lsq: Setting state from NotIssued to InTranslation for request: 0/1.1/2/19.19 pc: 0x80000042 (c_lw)
 734375: system.cpu.execute.lsq: Submitting DTLB request
 734375: system.cpu.execute.lsq: Received translation response for request: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) delayed:0
 734375: system.cpu.execute.lsq: Setting state from InTranslation to Translated for request: 0/1.1/2/19.19 pc: 0x80000042 (c_lw)
 734375: system.cpu.execute.lsq: No forwardable data from store buffer
 734375: system.cpu.execute.lsq: Trying to send request: 0/1.1/2/19.19 pc: 0x80000042 (c_lw) addr: 0x0
src/mem/xbar.cc:368: fatal: Unable to find destination for [0:0x4] on system.membus
Use --debug-flags=PortTrace to see the port trace of the packet.
Memory Usage: 448876 KBytes

Expected behavior
The memory access should be canceled after the unconditional jump.
If i remove li a1, 1 from start:, it works.
Host Operating System
Ubuntu 22.04.4 LTS
Host ISA
X86
Compiler used
for gem5:
g++ version 11.4.0
linker: mold version 1.0.3
for firmware:
RISC-V GNU Compiler Toolchain (riscv64-unknown-elf-gcc version 13.2.0, GNU objdump version 2.42)

If i remove li a1, 1 from start:, it works.

Comment because it get lost in the text wall.

This is a weird issue to happen on a in-order CPU. Is it possible this is a just RISCV issue (eg the instruction wrongly mislabelled) ?
I am looking at the line:
 703125: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
And I don't understand why a jump instruction should be sent to the LSQ

Hi, thank you for your comment 😄.

Is it possible this is a just RISCV issue (eg the instruction wrongly mislabelled) ?

I do not think that the instruction is mislabelled, because at 0x80000040 there is also a jump instruction in the disassembly.

I am looking at the line:
 703125: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
And I don't understand why a jump instruction should be sent to the LSQ

In getCommitingThread(), for head_inflight_inst it is checked if the instruction is not in the LSQ or if there is a response for the instruction. This results in the debug message.
https://github.com/gem5/gem5/blob/65b86cfac98338153936b6b308368f8edf961d3d/src/cpu/minor/execute.cc#L1686-L1751
The c_j lies at address 0x80000040. The program counter is set from 0x80000042 to 0x80000044, I guess because it increases before we reach the jump instruction.
734375: global: ExecContext setting PC: (0x80000042=>0x80000044).(0=>1)
Can this cause problems?

Hi @robhau

Hi, thank you for your comment 😄.

Is it possible this is a just RISCV issue (eg the instruction wrongly mislabelled) ?

I do not think that the instruction is mislabelled, because at 0x80000040 there is also a jump instruction in the disassembly.
80000040: a029 j 8000004a <L2>

By mislabelled I don't mean mis-decoded. Basically in gem5 an instruction is defined (labelled) with some StaticInstFlag which are used by the CPU model to understand which kind of instruction it is dealing with (see https://github.com/gem5/gem5/blob/stable/src/cpu/StaticInstFlags.py). Is the instruction defined with IsUncondControl?

I am looking at the line:
 703125: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
And I don't understand why a jump instruction should be sent to the LSQ

In getCommitingThread(), for head_inflight_inst it is checked if the instruction is not in the LSQ or if there is a response for the instruction. This results in the debug message (line 1712)
https://github.com/gem5/gem5/blob/65b86cfac98338153936b6b308368f8edf961d3d/src/cpu/minor/execute.cc#L1686-L1751

You are getting the condition wrong:
                (!inst->inLSQ || (lsq.findResponse(inst) != NULL));
Checks if there is a response in the LSQ only if the instruction is in the LSQ. So for whatever reason the Jump instruction gets added to the LSQ. This looks wrong to me. I would suggest you to debug the matter with GDB

Hi @giactra

Hi @robhau

Hi, thank you for your comment 😄.

Is it possible this is a just RISCV issue (eg the instruction wrongly mislabelled) ?

I do not think that the instruction is mislabelled, because at 0x80000040 there is also a jump instruction in the disassembly.
80000040: a029 j 8000004a <L2>

By mislabelled I don't mean mis-decoded. Basically in gem5 an instruction is defined (labelled) with some StaticInstFlag which are used by the CPU model to understand which kind of instruction it is dealing with (see https://github.com/gem5/gem5/blob/stable/src/cpu/StaticInstFlags.py). Is the instruction defined with IsUncondControl?

Thank you. The instructions are not mislabed.
Jumps (32 Bit format):
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L4878-L4881
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L4872-L4876
Compressed Jumps (16 bit format, used here):
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L351-L353
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L215-L218
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L451-L457
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/arch/riscv/isa/decoder.isa#L471-L474

I am looking at the line:
 703125: system.cpu.execute.lsq: No matching memory response for inst: 0/1.1/2/18.18 pc: 0x80000040 (c_j)
And I don't understand why a jump instruction should be sent to the LSQ

In getCommitingThread(), for head_inflight_inst it is checked if the instruction is not in the LSQ or if there is a response for the instruction. This results in the debug message (line 1712)
https://github.com/gem5/gem5/blob/65b86cfac98338153936b6b308368f8edf961d3d/src/cpu/minor/execute.cc#L1686-L1751

You are getting the condition wrong:  (!inst->inLSQ || (lsq.findResponse(inst) != NULL));
Checks if there is a response in the LSQ only if the instruction is in the LSQ. So for whatever reason the Jump instruction gets added to the LSQ. This looks wrong to me. I would suggest you to debug the matter with GDB

Thank you for the clarification ☺.
I quoted the wrong code section. findResponse is called in evaluate():
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/minor/execute.cc#L1554-L1571

Could the branch target predictor be the problem?
The branch predictor predicts taken, because it is an unconditional branch.
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/pred/bpred_unit.cc#L120-L163
After that, the branch target buffer is looked up. However, there is a miss, because we this is the first time this jump is executed
and the branch type is not considered.
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/pred/bpred_unit.cc#L164-L190
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/pred/simple_btb.cc#L129-L144
Therefore, hist->targetProvider stays TargetProvider::NoTarget. This results in an untaken branch.
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/pred/bpred_unit.cc#L289-L293

Could the branch target predictor be the problem?
The branch predictor predicts taken, because it is an unconditional branch.
https://github.com/gem5/gem5/blob/3b7307182f272756bd805ca2d5f4af79efa639a0/src/cpu/pred/bpred_unit.cc#L120-L163
After that, the branch target buffer is looked up. However, there is a miss, because we this is the first time this jump is executed and the branch type is not considered.

I thought about this at the beginning (wondering why an unconditional branch was predicted as not-taken). However the following reasoning convinced me there's something more to it:

If we are missing in the BTB, there are only two things we can do. One is stalling the front-end, the other is to predict a NT branch. I think always going for the second (even in the counter intuitive case of an unconditional branch) is a reasonable approach.

A CPU should recover anyway from a misprediction as early as possible. In the O3CPU this happens after decode for a direct unconditional branch: https://github.com/gem5/gem5/blob/stable/src/cpu/o3/decode.cc#L712. This doesn't seem to be handled in MinorCPU. Instead this seems to be solved altogether when committing the branch: https://github.com/gem5/gem5/blob/stable/src/cpu/minor/execute.cc#L284C16-L284C27

My suspicion is that the load is issued before the branch commit, therefore before it can resteer the pipeline.
While we should solve it (maybe be adding a similar check as the one we have in the O3CPU?) it seems to me a "niche" corner case. It only happens when virtual memory is disabled (at boot) and therefore we are allowed to send an invalid request down the memory subsystem. Normally (with virtual memory on) the MMU would return an exception to the translation request, and no memory reference would go out of the LSQ.
Let me know if it makes sense to you

Thank you @giactra, makes sense to me.

A CPU should recover anyway from a misprediction as early as possible. In the O3CPU this happens after decode for a direct unconditional branch: https://github.com/gem5/gem5/blob/stable/src/cpu/o3/decode.cc#L712. This doesn't seem to be handled in MinorCPU. Instead this seems to be solved altogether when committing the branch: https://github.com/gem5/gem5/blob/stable/src/cpu/minor/execute.cc#L284C16-L284C27

Adapting the handling from O3CPU sounds good. Can we add it right after inserting a decoded instruction into the output buffer of the decode stage?
https://github.com/gem5/gem5/blob/dad5c7b6f7434ec7668192edffad83bc31a1d5f7/src/cpu/minor/decode.cc#L247C1-L248C32

While we should solve it (maybe be adding a similar check as the one we have in the O3CPU?) it seems to me a "niche" corner case. It only happens when virtual memory is disabled (at boot) and therefore we are allowed to send an invalid request down the memory subsystem. Normally (with virtual memory on) the MMU would return an exception to the translation request, and no memory reference would go out of the LSQ.

Since we only carry out bare metal simulations, we run into this problem quite often 😅.


Feature/results

Fix the text output for (result summary)
Make sure the date is formated nicely in the summary report
Make sure the 'more info' link works in the summary report
Make sure the severity flag works in the summary
Updated ResultWrapper mock.

NOTE: this is still waiting on improvement to the aggregated api/results endpoint.

Scan submitted to Checkmarx

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

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

Creating new update to results reporting, this is out of date.


NSwag.CodeGeneration.CSharp it is impossible to get response.Content with out json deserialization

Can you support auto/manual/custom response content processing?
It is impossible (ClientTemplate.tt, line: 310) to get raw response content. Generated client code trying to deserialize content as json formatted string and fails.
I have an issue when trying to get response with content type text/html, text/plain.

Have you tried to set the response.schema.type to 'file'?

No, bcs it is deffinetly not file :) we use swagger for client generation, and api documentation (swagger api is dev UI, https://github.com/Rebilly/ReDoc in future for clients) so i just cant say that method for page rendering or license ID (plain guid) is a file in swagger doc.

Can you post a sample swagger spec/controller code and the wrong and expected output?

ok, tomorrow will post example here

Controller:
        [HttpGet]
        [Route("test", Name = nameof(CustomController) + nameof(Get2))]
        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(string))]
        [SwaggerResponse(HttpStatusCode.InternalServerError, Type = typeof(ErrorData))]
        [SwaggerResponseContentType("plain/text")]
        public IHttpActionResult Get2()
        {
            return Content(HttpStatusCode.OK, Guid.NewGuid().ToString("D"), new TextPlainFormatter());
        }

Plain text formatter:
public class TextPlainFormatter : MediaTypeFormatter
    {
        #region Constructors

        public TextPlainFormatter()
        {
            SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/plain"));
        }

        #endregion

        #region Override members

        public override bool CanWriteType(Type type)
        {
            return type == typeof(string);
        }

        public override bool CanReadType(Type type)
        {
            return false;
        }

        public override Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext)
        {
            return Task.Factory.StartNew(() =>
            {
                var writer = new StreamWriter(writeStream);
                writer.Write(value);
                writer.Flush();
            });
        }

        #endregion
    }

Swagger:
{
  "swagger": "2.0",
  "info": {
    "version": "1.0",
    "title": "Alpha",
    "description": ""
  },
  "host": "localhost",
  "schemes": [
    "http"
  ],
  "paths": {
    "test": {
      "get": {
        "tags": [],
        "summary": "summary",
        "description": "description",
        "operationId": "CustomControllerGet2",
        "consumes": [],
        "produces": [
          "text/plain"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        },
      }
    }
  },
  "definitions": {}
}

Client:
//----------------------
// <auto-generated>
//     Generated using the NSwag toolchain v9.12.6284.27589 (NJsonSchema v8.11.6284.26855) (http://NSwag.org)
// </auto-generated>
//----------------------

namespace MyNamespace
{
    #pragma warning disable // Disable all warnings

    [System.CodeDom.Compiler.GeneratedCode("NSwag", "9.12.6284.27589")]
    public partial class Client
    {
        private string _baseUrl = "http://localhost";

        public string BaseUrl
        {
            get { return _baseUrl; }
            set { _baseUrl = value; }
        }

        partial void PrepareRequest(System.Net.Http.HttpClient request, string url);
        partial void PrepareRequest(System.Net.Http.HttpClient request, System.Text.StringBuilder urlBuilder);
        partial void ProcessResponse(System.Net.Http.HttpClient request, System.Net.Http.HttpResponseMessage response);

        /// <summary>summary</summary>
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        /// <returns>OK</returns>
        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        public async System.Threading.Tasks.Task<string> CustomControllerGet2Async(System.Threading.CancellationToken cancellationToken)
        {
            var urlBuilder_ = new System.Text.StringBuilder();
            urlBuilder_.Append(BaseUrl).Append("/test");

            var client_ = new System.Net.Http.HttpClient();
            try
            {
                using (var request_ = new System.Net.Http.HttpRequestMessage())
                {
                    PrepareRequest(client_, urlBuilder_);
                    var url_ = urlBuilder_.ToString();
                    PrepareRequest(client_, url_);

                    request_.Method = new System.Net.Http.HttpMethod("GET");
                    request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
                    request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("text/plain"));
                    var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
                    try
                    {
                        var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
                        foreach (var item_ in response_.Content.Headers)
                            headers_[item_.Key] = item_.Value;

                        ProcessResponse(client_, response_);

                        var status_ = ((int)response_.StatusCode).ToString();
                        if (status_ == "200")
                        {
                            var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
                            var result_ = default(string);
                            try
                            {
                                result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<string>(responseData_);
                                return result_;
                            }
                            catch (System.Exception exception)
                            {
                                throw new SwaggerException("Could not deserialize the response body.", status_, responseData_, headers_, exception);
                            }
                        }
                        else
                        if (status_ != "200" && status_ != "204")
                        {
                            var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
                            throw new SwaggerException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null);
                        }

                        return default(string);
                    }
                    finally
                    {
                        if (response_ != null)
                            response_.Dispose();
                    }
                }
            }
            finally
            {
                if (client_ != null)
                    client_.Dispose();
            }
        }

    }
}

Related: https://github.com/NSwag/NSwag/issues/420

This scenario is currently not supported. Currently, the client supports either JSON deserialization or file stream responses (response.schema.type == file). But we should support this, or at least treat this as stream response...

For now, you can add the method to the ProtectedMethods setting (makes it protected and adds "Core" postfix) and implement it yourself in a partial class.

yeah. Thank you :)

Hi, I have the same\similar issue; however the GET response is in "application\xml" and needs to be deserialized into the appropriate object.  I am unsure if this falls under the same enhancement or as a new one.
Thank You

Related to https://github.com/NSwag/NSwag/issues/420

Added ContentTypes to SwaggerResponseAttribute: https://github.com/NSwag/NSwag/commit/8ef23ef4a65bfb19dfd1fa6d6733f85f8ba9e5b8
What do you think (check out the tests)?

As always, test with the CI artifacts: https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/2195/artifacts

@BlackGad
Your api operation would look like:
[HttpGet]
[Route("test", Name = nameof(CustomController) + nameof(Get2))]
[SwaggerResponse(HttpStatusCode.OK, ContentTypes = string[] { "plain/text" })]
[SwaggerResponse(HttpStatusCode.InternalServerError, Type = typeof(ErrorData))]
public IHttpActionResult Get2()
{
    return Content(HttpStatusCode.OK, Guid.NewGuid().ToString("D"), new TextPlainFormatter());
}

I think it is not good idea to allow different content types on different responses.
In reality when u call some method u will expect exactly specified content type (does not matter it is OK or bad request).
Also i do not use NSwag server part(use Swashbuckle bcs of swagger UI) so i have my specific attributes and document generator.
To rule different content types there is standard HttpConfiguration MediaTypeFormatters exist.
For u,i think, it is better to add annotation attribute(allow multiple) SwaggerResponseContentType(mime) and somehow use it (replace default mimes or just expand them)

I need somehow rule client code through standard swagger document specification (or documented vendor extensions).
It would be great if u will introduce virtual(partial) method process response to customize and deserialize(prepare) response content(basic response with stream as input argument). By default leave Json deserialization.

and yeah, i am agree with person from different issue post - for u it is better to add extension points, do not try to handle all use cases it is just impossible :)

Btw: NSwag server side also has swagger ui integrated... The problem is that an error may be json and the 200 is text...

Maybe we can split the Get() method into Get() and virtual ProcessGet() or (like ProtectedMethods and ProcessGetCore() and you implement ProcessGet()) so that you can override the processing or the whole Get()

Btw: NSwag server side also has swagger ui integrated... The problem is that an error may be json and the 200 is text...
no it is uncommon situation. Basically it is content negotiation mechanism.
Look https://en.wikipedia.org/wiki/List_of_HTTP_header_fields Accept request header, and response Content-Type header.
External systems pass this header to make sure that response will be understandable.

If u are asking my opinion than
Your current implementation:
...
 var status_ = ((int)response_.StatusCode).ToString();
                        if (status_ == "200")
                        {
                            var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
                            var result_ = default(Cinegy.Web.Http.Contracts.SuccessData);
                            try
                            {
                                result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Cinegy.Web.Http.Contracts.SuccessData>(responseData_);
                                return new Response<Cinegy.Web.Http.Contracts.SuccessData>(status_, headers_, result_);
                            }
                            catch (System.Exception exception)
                            {
                                throw new ResponseException("Could not deserialize the response body.", status_, responseData_, headers_, exception);
                            }
                        }
...

My implementation would be look like this:
 protected async virtual Task<T> ExtractResponseContent<T>(HttpResponseMessage response)
        {
            if (response.Headers.Contains("content-type"))
            {
                var contentTypeHeader = response.Headers.GetValues("content-type").FirstOrDefault();
                var mediaType = MediaTypeHeaderValue.Parse(contentTypeHeader);
                if (string.Equals(mediaType.MediaType, "application/json", StringComparison.InvariantCultureIgnoreCase) ||
                    string.Equals(mediaType.MediaType, "text/json", StringComparison.InvariantCultureIgnoreCase))
                {
                    var responseData_ = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
                    return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseData_);
                }
            }

            throw new NotSupportedException();
        }
...
  if (status_ == "200")
                        {
                            try
                            {
                                var result_ = await ExtractResponseContent<Cinegy.Web.Http.Contracts.SuccessData>(response_).ConfigureAwait(false);
                                return new Response<Cinegy.Web.Http.Contracts.SuccessData>(status_, headers_, result_);
                            }
                            catch (System.Exception exception)
                            {
                                throw new ResponseException("Could not deserialize the response body.", status_, string.Empty, headers_, exception);
                            }
                        }
...

Same code for all errors
code above was not tested!
than i could override ExtractResponseContent in my generated client and support additional/new content types.
Also u force to accept
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
It is also not right in general situation. U can use this if only application/json(text/json) was specified in swagger document (produces section). Otherwise it must be one of well known types.

It is easy to support any text specific types (content will be wrapped to simple text) also all xml types can be wrapped into XElement.
Example:

MIME: text/ANYTYPE, Swagger response type: string - just read content as string with appropriate encoding.
MIME: application/json, Swagger response type OBJECT - read content and deserialize
MIME: application/xml, Swagger response type OBJECT- read content and return deserialized xml (it is complex task, there is a lot of different deserializers so leave to user customization)

It was my personal opinion

NSwag server side also has swagger ui integrated

I saw, but it was lack of functionality when i've started to implement swagger generation. Maybe in future i will review my decision and implementation.

What functionality is missing?

:) i am not ready to answer u right now.
As long as I remember:

Multiple versions support (1 hosted UI with several APIs with several versions)
Flagged enumeration handling
Something that i forget :)

But I am afraid that my customization is way to complex. I can describe u cases in details if u interested in.

1 hosted UI with several APIs with several versions
By default Swashbuckle also dont support this but i handle this with some reflection hacks.

Duplicate: https://github.com/NSwag/NSwag/issues/731

@RSuter Are there any showstoppers to merge the ContentTypes code? It looks good to me.
I disagree with @BlackGad that all responses should be of the same type. As you indicate yourself, an error response could contain JSON while an OK response could contain something else. Very relevant here is https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#response-object, I need to be able to specify the MIME types when type is "file".

The branch is very old, I have to check how to merge it...
Also this has change has to be implemented here: https://github.com/RSuter/NSwag/pull/994

Such extensions can also be implemented with a custom operation processor, like:
https://github.com/RSuter/NSwag/blob/master/src/NSwag.SwaggerGeneration.WebApi.Tests/OperationProcessors/SwaggerOperationProcessorAttributeTests.cs

Please support response type of string:
      responses:
        200:
          schema:
            type: string

This should just return the response string instead of trying to decode json.

This was broken with 13.#


Trouble understanding why subs map gets deleted entirely upon remaining element count = 1

https://github.com/btvoidx/mint/blob/6c4a9741de82075c7574c578f9bcfeffd6652932/context/mint.go#L103
sorry if this is intended but i really don't understand the underlying idea behind this, should it be like if len(e.subs[key[T]{}]) == 0 { instead?
package main

import (
	"fmt"
	"time"

	"github.com/btvoidx/mint"
)

func main() {
	e := &mint.Emitter{}
	type A = string
	off := mint.On[A](e, func(s string) {
		fmt.Println("Hello World", s)
	})

	mint.On[A](e, func(s string) {
		fmt.Println("Bye World", s)
	})

	mint.Emit[A](e, "foo")

	time.Sleep(5 * time.Second)

	off()

	time.Sleep(5 * time.Second)

	mint.Emit[A](e, "bar")

	time.Sleep(5 * time.Second)

	fmt.Println("???")
}

Not sure if I understand your code correctly but I was expecting another 'Bye World bar' since I only off the first listener.
If I dump the above into the playground I get:
OUTPUT

Bye World foo
Hello World foo
???

Program exited.

Uhh, yep. That is a problem. Thank you so much for catching that. Tests are passing, so I never noticed. Will fix.
I guess at some point I wanted to delete the map straight away if it had only one key remaining, but got it mixed up.


machine won't reconnect after I bump it (rancher-agent)

Rancher Version: master 11/10
Comments
Machine went down and after i tried to restart it would not reconnect.

It should reconnect now :)
The agent was exiting and hitting Dockers exponential backoff behavior.  Now the rancher doesn't exit on failure.

Version - master 11/22
Verified fixed


Implement parallel IO for the restart files

Duh

Currently the 337_parallelize_restart_output branch successfully writes parallel restart files, so long as the number of processes is a factor of the total number of cells.

So is the next priority then allowing the model to start from an arbitrary restart file?? (maybe specified from command line)?

Well, first I'm trying to fix the part where it hangs if the number of processes is not a factor of the total cell count. But yes, being able to start from a restart file is after that. Although that is something that could be worked on while a run is going.

OK, good point re: being able to address that while a run is going.
For future reference, it looks like we have stubs in place for starting from a restartData file. In Cohort.cpp, there is a void Cohort::set_restartdata_from_state() function (that is working I believe) and then the skeleton on void Cohort::set_state_from_restartdata().


Bump to version 0.4.5

Codecov Report

Merging #40 (687d426) into main (d8b1b1b) will decrease coverage by 0.38%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main      #40      +/-   ##
============================================
- Coverage     81.51%   81.13%   -0.38%
+ Complexity      117      115       -2
============================================
  Files            10       10
  Lines           265      265
  Branches         34       34
============================================
- Hits            216      215       -1
- Misses           33       35       +2
+ Partials         16       15       -1

Impacted Files
Coverage Δ

...n/com/datadog/android/bridge/internal/BridgeRum.kt
73.08% <0.00%> (-1.28%)
:arrow_down:

...n/com/datadog/android/bridge/internal/BridgeSdk.kt
86.81% <0.00%> (ø)


Changes to spouse example setup

deepdive do articles defaults to bash script
CoreNLP requires JDK 1.8 (issue was raised on this too)

@henryre Thanks for suggesting the edits!  To make it work completely from scratch, we need some revisions.  We may need to add/revise commands to keep things simple though.  Why don't we first make the docs complete as I pointed out, then simplify it in a later PR?

Sounds good

Whoa what a throwback

:) Glad we didn't merge this earlier prematurely as it provided strong motivation for improving other parts.


ci: Adding linting steps to travis

As a start for getting CI working, add tox and linting. Also, disable
the deployhook step on merge to master until a couple bugs are worked out.
As is the deployhook misses some image pulls, has the wrong URL and
may or may not actually work just yet in the new cluster
(testing coming soon!) I am sure that it will deploy the wrong images
without modification, if it succeeds in deploying images.
Bug: T256689

Actually, I'm going to close this one and add a couple more steps. There's no reason not to run a 'helm lint' etc.


WhenRepeated - Support logging rules with multiple targets

Resolves #2722 (Abuses the knowledge that targets are added sequentially for each logging-rule).
Also a small performance optimization for logging rules with multiple targets, that shares the same filter.

Thanks for the quick fix!

The workaround is to have a logging rule for each target. But it gives some overhead
Sent from my Samsung device
-------- Original message --------
From: melmears<EMAIL_ADDRESS>Date: 16/05/2018 09:38 (GMT+01:00)
To: NLog/NLog<EMAIL_ADDRESS>Cc: Rolf Kristensen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [NLog/NLog] WhenRepeated - Support logging rules with multiple   targets (#2726)
Thanks for the quick fix!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/pull/2726#issuecomment-389424796, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnBiEa1ZHb_o7HV0-MyGgcD9uN0krks5ty9dkgaJpZM4UAYCW.

The workaround is to have a logging rule for each target. But it gives some overhead

that's the workaround in the current release, isn't?

Yes while waiting for this fix to be released
Sent from my Samsung device
-------- Original message --------
From: Julian Verdurmen<EMAIL_ADDRESS>Date: 16/05/2018 10:26 (GMT+01:00)
To: NLog/NLog<EMAIL_ADDRESS>Cc: Rolf Kristensen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [NLog/NLog] WhenRepeated - Support logging rules with multiple   targets (#2726)
The workaround is to have a logging rule for each target. But it gives some overhead
that's the workaround in the current release, isn't?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/pull/2726#issuecomment-389437846, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnA8iggTLgJMq1fuOKWS5j8Ie2U-Iks5ty-KogaJpZM4UAYCW.


ThemeProvider and GlobalStyles in latest version 4

Thought I'd report some findings I've had trying to switch to version 4.
Love styled-components and hoping this is just me doing something wrong, but just in case I'll report it here.
I have a server rendered React app using Express + Apollo Server and styled-components.
I've run into some issues;

<ThemeProvider /> breaks React Apollo during SSR (queries are not run on the server).
They run fine when I remove ThemeProvider (and <GlobalStyles />)
<GlobalStyles /> needs to be wrapped inside a styled.X component for it to work with HMR / React Hot Loader. If it is moved outside HMR will not work. If <GlobalStyles /> is inside the styled component it reports this error;

"The global style component sc-global-3461151225 was composed and rendered multiple times in your React component tree. Only the last-rendered copy will have its styles remain in "

I downgraded to version 3.4.5 and now queries run as expected again on the server with <ThemeProvider /> and injectGlobal.
Thanks for all the awesome work you do!
Environment
System:

OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 472.64 MB / 16.00 GB
Shell: 5.3 - /bin/zsh

Binaries:

Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm

Reproduction
Here's a repo to illustrate the HMR issue, unfortunately I don't have Apollo set up there to test the queries; https://github.com/mhaagens/styled_globalstyles_hmr
Steps to reproduce
Wrap <ThemeProvider />around your top level app and use <GlobalStyles /> for global styling.
Expected Behavior
Apollo Queries should run as normal on the server.
HMR should work.
Actual Behavior
Apollo Queries stop running on the server.
HMR does not work if <GlobalStyles /> isn't wrapped in a styled component.
If it is wrapped HMR works, but it reports errors.
Downgrading to 3.4.5 solves the query issue and HMR isn't supposed to work AFAIK.

<GlobalStyles /> needs to be wrapped inside a styled.X component for it to work with HMR / React Hot Loader.

Hmm, that's strange. During the beta we definitely tested cGS with a vanilla element root and it was working. I wonder if it's a strange interaction with apollo

I tried running your example repo and it just brought me to a file directory page. Is there supposed to be an index to look at?

hello, I am experiencing the exact same problem in a very similar stack, the new v4 release is breaking SSR on a nextjs app that uses apollo as well.+

I am having similar issues with NextJS and Apollo. I have also narrowed it down to ThemeProvider rendering the components twice. (double console logs on page refresh).

Yeah its easily reproduceable at least with nextjs and apollo. For now reverted back to 3.4.10 where its working properly. My repo above is a good way to test the issue I guess..its minimal basicaly a combination of with-apollo and with-styled-components from the nextjs examples folder.

https://github.com/joaogarin/styled-v4-next-withapollo

Yeah its easily reproduceable at least with nextjs and apollo. For now reverted back to 3.4.10 where its working properly. My repo above is a good way to test the issue I guess..its minimal basicaly a combination of with-apollo and with-styled-components from the nextjs examples folder.

@joaogarin i've tried to update "react-apollo": "2.3.0" and it's working well with styled-component v4, and the issue solved 💃

Going to close based on @NourSammour's comment and since there's nothing to be done on our side.

But the issue with HMR persists?
Started from scratch, still the same problem.
Repo here;
https://github.com/mhaagens/broken_hmr_styled
Try to update the state, then change the styles in Wrapper (styled component). The state will be reset.
If I remove the Wrapper then everything works as expected in terms of HMR, but then GlobalStyles will no longer hot reload.

Update:
HMR works if you remove the <Wrapper> around the app and add a prop to the <GlobalStyle /> component. Then state is persisted between hot reloads.

So I think part of the issue is that HMR without react-hot-loader totally wipes away the component and makes a new copy without running the unmount cycle of the first version until after the second is mounted. The loss of internal state means global styles will have super inconsistent results since the lifecycle order is all messed up.
I'm vaguely curious why adding a prop changes that...
With RHL it should definitely work though since it makes more of an effort to gently migrate the React tree. If it doesn't then let me know and we can diagnose.

I am experiencing a similar issue with injectGlobal with version ^4.1.3 and get the error below. This is fixed when rolling back to 3.4.5 as @mhaagens suggested.
Failed to compile
./src/Styles/index.js
Attempted import error: 'injectGlobal' is not exported from 'styled-components'.

Look at the v4 migration guide, that API was replaced...
On Mon, Dec 24, 2018 at 11:06 AM cristiano<EMAIL_ADDRESS>wrote:

I am experiencing a similar issue with injectGlobal with version ^4.1.3
and get the error below. This is fixed when rolling back to 3.4.5 as
@mhaagens https://github.com/mhaagens suggested.
Failed to compile
./src/Styles/index.js
Attempted import error: 'injectGlobal' is not exported from 'styled-components'.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/styled-components/styled-components/issues/2158#issuecomment-449755575,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAiy1jMDHroKtDQi1Jsi4kAvDxalnFNxks5u8QmAgaJpZM4X7ApW
.

Thanks @probablyup, I've followed the migration guide and using createGlobalStyle worked perfectly.
Also the fact that the guide complements examples with incorrect ones it's great! 🎉


use json-deserializer instead of serde-json

this uses the much faster "json_deserializer" crate to convert to Val.
Some benchmarks show a nearly 100% decrease in processing time on datasets with large string values. For example, the Yelp dataset.
I know you could get this down quite a bit more using simd_json and parallel processing, but there are some compatibility issues involved with that, making it a little less portable. Maybe it could be behind a cli flag? jaq '.text' --simd?
For reference, the same query using polars takes ~6.7 seconds.
(pl
  .scan_ndjson("./yelp_reviews.json")
  .select(["text"])
  .collect()
  .write_ndjson("/dev/null")

Main branch
time cat ./yelp_reviews.json | target/release/jaq '.text' > /dev/null
# cat  0.12s user 1.92s system 4% cpu 46.184 total
# jaq  42.99s user 3.07s system 99% cpu 46.183 total

Feature branch
time cat  ./yelp_reviews.json | target/release/jaq '.text' > /dev/null
# cat 0.11s user 1.70s system 6% cpu 26.012 total
# jaq  22.91s user 2.94s system 99% cpu 26.011 total

JQ
time cat  ./yelp_reviews.json | jq '.text' > /dev/null
# cat 0.10s user 1.06s system 0% cpu 2:15.14 total
# jq 134.44s user 0.63s system 99% cpu 2:15.14 total

Hi @universalmind303, thanks for your work!
Unfortunately, as mentioned in a comment, this does not work with JSON values spanning multiple lines.
Do you know of any JSON deserializer other than serde_json that works lazily and is fast?

Note that your approach works fine on newline-delimited JSON files à la JSON Lines.
It would be possible to use your approach only when finding a file with suffix ".jsonl", but I would find it better if the performance could be improved for all files.


Truncate large payloads to ensure we don't drop them

This has been supported for a while now with Rollbar\Truncation\StringsStrategy


feature request: flatten users

Added in this release:
https://github.com/adswerve/google_analytics_flattener_ga4/releases/tag/v1.3.0


Added 2 servers + sorted alphabetically.

Servers shouldn't be sorted manually.
The BetterDiscord interface does it automatically!

@DoNotSpamPls It does not.


Add link for Angular using Crcomlib instead of CH5 components

Found this while trying to work out how to use crcomlib directly in Angular;
https://github.com/jeff-vogt/crcomlib-ng

Done and added