proposal: Go 2: unmuddle syntax of if, conditional return, and several other removals

So, I already have submitted the suggestion of the conditional return using an optional semicolon separated conditional expression, and in the process of responding to Ian's reply, I thought of a bunch of other connected things. They are all removals:
Colon termination on switch/case sections - it serves no obvious purpose and violates the general rule that colons are used in definitions.
Fallthrough in switch/cases. If statements are shorter and neater, and fallthrough cases should be before non-fallthtroughs anyway (that will give you some debugging fun if you don't structure it that way). So just put if blocks before it for single response conditions.
Labels and goto. Why, oh why did they even get into the spec. Or at least, why are labels gofmt'd onto their own line. There is no ambiguity about one symbol and a colon after it before any statement. The colon is almost as unequivocal as a semicolon, except it imparts meaning to the preceding symbol.  It was necessary for basic with its line numbers and line editor, but not in modern full screen editors. Goto and labels seriously out of place.
(and just a few semi-nonserious suggestions):
Change the &, which is logically also an and, in the prefix unary for returning the reference, to @. This symbol is widely understood due to email URI's as indicating the location of something. The * is not quite so badly ambiguous, and really its use as multiply was probably a makeshift at the time due standard keyboard layouts, plus being a star it makes you think of points, and for its wildcard use, referring to something that fits in a slot. And with this you can eliminate the && as implicitly & is bitwise for integers and boolean for booleans. And the || was probably doubled because of the &&, so that can also now become singular and require both parameters be either integer or boolean.
Change the unary NOT operator to ! - there is no ambiguity because currently it can only be used in front of a boolean anyway, and you can't bitwise invert a boolean or more exactly, it's the same thing, logically speaking.
Connected with the above, we now have a freed up ^ symbol, which can be used as most languages do, as an exponential operator. It makes sense as an exponential operator because it's like 'just pretend the value after is a superscript'.
The last thing that just springs to mind is the 'func' keyword. Technically a function in mathematics produces a result. A procedure may not, and could also give you the result back anyway through indirection. But then 'function' means also a role as well as indicating operability. No I don't think I'd like to change func and likely nobody would, but strictly speaking, a non-returning thingy is a subroutine, to use procedural language.
There's another thing too. if there was a distinction between returning and non-returning functions, non-returning functions would be able to take pointer parameters, but returning functions really should not, unless they are methods, where it can be quite useful for one-parameter setting methods for a structure by passing through a pointer receiver. Continuing - on the base level of the source file, where functions are declared, EVERYTHING starts with a keyword. Any other thing than a keyword is either part of a declaration of something or inside brackets or on one line.
I think you could probably leave the 'func' out completely, and make a rule that if there is a return there can be no pointers going in. If you need to pass in pointers and want a return, you can use a procedure (non returning function). This would encourage more clean functions in go. This (generally) tends to catch more bugs on the way in than out (as in, you don't have to debug).
As for parsing, as I mentioned, the func is not needed to disambiguate a function. It does resemble a function call but function calls are not allowed at the top level of the source file. Brackets, like in a method, do not also exist without a keyword prefix. And lastly, only functions and things inside functions use paretheses. var, const, import, all use brackets.
Also, the thing about func, even if it is redundant for parsing, it looks cool and serves the other purpose of conceptually linking closures and functions, since they both use this keyword. Plus it makes a consistent rule that every line inside the root scope of a source file starts with a keyword or is inside brackets.
I don't think about this idea seriously at all but at the same time I think it's something that would be worth thinking about. I know, and I feel the same way, I don't want Go turning into a complicated, bug-encouraging hodge podge of me-too syntax changes as is the norm in the industry. So I am making some change suggestions that run completely the opposite way to most, and I think they keep with the spirit of the language. As an avid proporent and user of the language, a lot of the things in Go that are contrary to the programming language herd I have really become attached to. The strict parsing, the readability, the collection of best practices promoted to learners. I think paring a few things out of the language would go a long way towards improving efficiency, stopping common errors and so on. Adding things is necessarily going to mean complexity, unless it's done really carefully.
I hope you guys finalise upon at least one or two omissions. I am pretty strong about in particular fallthrough, and conditional return also, I am quite strong towards that as well. I have been doing a lot of work on code with multiple unrelated conditions and I ran the gamut of gotchas. Fallthroughs that have non-fallthroughs above them is a particularly nasty one and it's more pernicious for the fact it discourages the use of switch cases.

Colon termination on switch/case sections - it serves no obvious purpose and violates the general rule that colons are used in definitions.

One purpose it has is to prevent a semicolon from being inserted

Fallthrough in switch/cases. If statements are shorter and neater, and fallthrough cases should be before non-fallthtroughs anyway (that will give you some debugging fun if you don't structure it that way). So just put if blocks before it for single response conditions.

What's the point of switch/case if fallthrough doesn't exist?

And with this you can eliminate the && as implicitly & is bitwise for integers and boolean for booleans. And the || was probably doubled because of the &&, so that can also now become singular and require both parameters be either integer or boolean.

&& and & actually have two separate meanings. Because && is logical, the right side is not evaluated if the left side is false. Same with || and |, but the right side is not evaluated if the left side is true.

Change the unary NOT operator to ! - there is no ambiguity because currently it can only be used in front of a boolean anyway, and you can't bitwise invert a boolean or more exactly, it's the same thing, logically speaking.

I think it's good to separate logical and bitwise operators. Especially coming from C, the logical NOT ! operator is not the same as the bitwise NOT ~ operator.

Connected with the above, we now have a freed up ^ symbol, which can be used as most languages do, as an exponential operator.

This is just plain false. C, JS, Python, and Java ALL use ^ as the binary XOR operator. It is noteworthy that the ^ is just an XOR with a value that is all 1s.

The last thing that just springs to mind is the 'func' keyword. Technically a function in mathematics produces a result. A procedure may not, and could also give you the result back anyway through indirection. But then 'function' means also a role as well as indicating operability. No I don't think I'd like to change func and likely nobody would, but strictly speaking, a non-returning thingy is a subroutine, to use procedural language.

Functions in computer science have a different meaning than functions in mathematics. A "function" in the computer science sense nearly perfectly describes a function in Go.

I think you could probably leave the 'func' out completely, and make a rule that if there is a return there can be no pointers going in. If you need to pass in pointers and want a return, you can use a procedure (non returning function). This would encourage more clean functions in go. This (generally) tends to catch more bugs on the way in than out (as in, you don't have to debug).

Weren't you just talking about how all top-level declarations start with a keyword? Wouldn't this violate that principle?

As for parsing, as I mentioned, the func is not needed to disambiguate a function. It does resemble a function call but function calls are not allowed at the top level of the source file.

Yes they are. _ = functionCall()

Also, the thing about func, even if it is redundant

It's verbose sure, but it makes code more readable. Go makes several sacrifices which may add verbosity, but the extra verbosity makes code more readable. It's part of the design.

ah, it's because the parser does a lot of really simple preprocessing and in most cases needs several indicators to confirm the identity of a symbol. Determining type of the parameter requires a lot more processing. Well, to be honest I think it looks better that way, I wasn't very serious about removing them.
What's the point of a switch case for a fallthrough? Compare these two:
switch {
case condition:
    statement
    fallthrough
case condition2:
    statement2
case !condition1:
    other statement
}

versus:
if condition {
    statement
}
switch {
case condition2:
    statement2
case !condition2:
    other statement
}

Yes, they are the same length.
I am quite aware of the difference between boolean and bitwise logic operators. I also know that the boolean AND can be short-circuit evaluated. That is irrelevant. Ok, 45 years of C everyone is used to it and I wouldn't be serious if I said I thought this would be considered, but I also type on dvorak layout and my wrists have been eternally grateful since 2004 when I learned it. So I'll just leave it at that.
But in theory, and I'm talking ancient CPU engineering theory, Booleans, in space-squeezed systems, are often encoded many into one byte, and the bitwise operator... is operating on a bit, but it's a boolean. C very slightly extended this concept with assigning truth to 0 and nothing else. You can bitwise NOT in C from true to false and back. My point simply being that on the implementation level, there is no difference except booleans are not countable.
Hm I didn't know that about the ^ symbol.
It probably shows how old I am but CS did not always view it this way, and the entire functional programming community definitely opposes this view, that a function should be a black box. A procedure call does not produce a return so it can't cause side effects in the code its inside. I think that if a procedure has no return, ie it's not a function, pointers allow programmers to break this principle and it does not belong with non-returning functions. With methods, pointers can be used in combination with receiver in that way, but let's not forget that even in this case, passing pointers in the parameters raises the issue of nil variables that have to be tested before they can be used, as if they are nil there is nothing to resolve and nothing can happen.
Sure, it gives you the ability to use nil as an error condition but then what is the error interface for? I have ideas about how it could be improved, so that all variables have an error value implicitly, and it would help reduce the boilerplate of error handling a lot more than the numerous confusing schemes that make sense to people deeply embedded in try/catch syntaxes of java and other languages. Go definitely needs improvement here, that's a core resolution of the version bump.
I do understand pretty well that Go compiles so fast because its grammar is very linear, and enforces structure and this saves a lot of time parsing. So, yes, I wasn't really serious about removing func, but at the same time I wanted to point out that from the BNR form grammar perspective, the parsing looks simple, but that can hide complexity in the scanner. The reason, as I surmise it, for the uniform rule of top level blocks and lines all starting with a keyword, is that you can literally snip the source code into little pieces with an algorithm that a 4 year old could probably devise. Maybe I exaggerate a little but that's the point. It's fast because it's rigid and simple. I might even say that such a character of change is exactly what we DON'T want to be done for go 2. (I really hope the version upgrade won't cause a fork but hey, this is the teenies!)
I did not know that about function calls at top level. That also would be a very good reason to not remove the func :)
My ideas are quite off the wall, I know, but I think that such discussions are very helpful for clarifying the criteria for making the decision about what is in, what remains and what is taken out. The acute problem of Go at this time is pretty mild really, to be honest it's not that big a chore to do error handling, and I alluded to the fact that one can extend the error interface and effectively implement implicit error status. I have used this extensively in my own code though it was easier to figure out how to do it with simpler types (in this case, simply byte slices, with or without MMU fences around them to stop snooping. But with more complex types it became harder to do.
But man, that error handling library I wrote ( https://github.com/parallelcointeam/duo/blob/master/pkg/core/status.go ) as I have progressed implementing more parts of my application, I have tended to forget as it was weeks ago I first wrote that code, but a few days back as I was writing some higher level stuff I plugged the State type into it and a whole heap of bugs I was encountering because of error handling just evaporated.
I don't know if anyone else has proposed making implicit errors states for every type - there is only one case one might want to relax this - mainly it would be embedded programming with tight resources, which isn't a Go target platform anyway, but also you might not want the overhead when you are implementing mathematically intensive functions. But for that, I think my inclination would be towards that built-ins don't have it, and make a really simple way to put them on them. Or maybe better still, and actually I am more inclined even towards saying this: Go's error interface needs to be revamped. The use of a pointer to the error state string itself requires you to sometimes check for nil, but that's habit for anyone who's been using go for a while.
But what that little set of functions above (there is an interface in the same package in interfaces.go) Especially the 'SetStatusIf()' and 'OK()' methods, they make error handling almost blissful. I think that they could skip the major version bump if error handling is the main problem being addressed, just by changing the stdlib, to look something like my code.

I don't currently have time to read the whole thing, but in response to the following:

What's the point of a switch case for a fallthrough?

First of all, your statement is incorrect.
If condition1 is true and condition2 is false, then both statement and statement2 run in the first example, but in the second one, statement and other statement run.
Putting that aside, removing fallthrough vastly increases in complexity as more cases are added. Consider this:
switch {
case days > 0:
	str += days;
	if days == 1 {
		str += "day, "
	} else {
		str += "days, "
	}
	fallthrough
case hours > 0:
	str += hours;
	if days == 1 {
		str += "hr, "
	} else {
		str += "hours, "
	}
	fallthrough
default:
	str += minutes;
	if days == 1 {
		str += "min"
	} else {
		str += "mins"
	}
}

That was originally written in JS, so there may have been some errors when translating. There's not really an easy way to translate that to if/else statements without deep nesting or lots of code repetition

It is not difficult to convert between if and switch blocks. if you change to case, remove the final parenthesis and put a colon after the condition.
Also, what is the point of using those fallthroughs in that code. This is how I would write it:
if days > 0 {
    suffix := "day, "
    if days > 1 {
        suffix = "days, "
    }
    str += fmt.Sprint(days, suffix, " ")
}
if hours > 0 {
    suffix := "hours, "
    if days > 1 {
        suffix = "hours, "
    }
    str += fmt.Sprint(days, suffix, " ")
}
str += fmt.Sprint(minutes, " ")
suffix = "min"
if minutes >1 {
    suffix += "mins"
}
str += suffix

Yes, very badly translated because Go does not allow you to use the + operator (or +=) with different types on each side. I fixed it for you.
Now, you see, there is arguments both sides for whether in switch blocks fallthrough should be implicit or explicit. The thing is that the switch block has a very very readable syntax. I don't know what word would suit but having to devote a whole extra line, and a big long word, makes the if version more concise. It is of course a matter of preference which form you like.
The only reason they are comparable is because unlike the case, which uses a sort of label variant structure, does not force either a new line, OR a final empty bracket on its own. Single statement instead of only a block after if statements would move the benefit way in favour of if.
But the main reason I disagree with fallthrough not being implicit is because you can put them after a non-fallthrough, and then at the end the condition isn't tested. This can cause the most squirrelly kinds of bugs. If cases were implicitly fallthrough you would use cases instead of if. But then you have the problem, and likely reason for the implicit breakout, of having to add another line for each case.
So, in fact, implicit fallthrough would help you avoid this kind of mistake, would allow you to use switch instead of if, and get its nice readable syntax, and make it very clear when reading it that each case evaluates unless you escape the block. And you can purge 'fallthrough' from the parser completely, and the syntax of break would perfectly fit.
Then your code would look like this:
switch {
case days > 0:
    suffix := "day, "
    if days > 1 {
        suffix = "days, "
    }
    str += fmt.Sprint(days, suffix, " ")
case hours > 0:
    suffix := "hours, "
    if days > 1 {
        suffix = "hours, "
    }
    str += fmt.Sprint(days, suffix, " ")
default:
    str += fmt.Sprint(minutes, " ")
    suffix = "min"
    if minutes >1 {
        suffix += "mins"
    }
    str += suffix
}

Your if/else is an incorrect solution. Notice that if there is more than one day, then the hours and minutes get printed no matter what, even if they are zero. Don't ask me why it works like that, the client wanted the duration formatted that way. It is actually quite hard to design the code this way with if-else, unless you're willing to goto.

So, in fact, implicit fallthrough would help you avoid this kind of mistake

Implicit fallthroughs also silently fail in a lot of other areas. Consider the following, with implicit fallthroughs:
switch state {
case ErrState:
    icon = "error.png"
    break
case BusyState:
    icon = "busy.png"
case SuccessState:
    icon = "success.png"
    break
}

Notice that the BusyState fails silently and icon would end up being success.png rather than busy.png. Being a TA in CS classes, these kinds of errors happen a lot. The thing is, when you want fallthrough behavior, you know you want fallthrough behavior and consciously think about it. When you want to handle several cases, it's not intuitive to break after each case. It's much more intuitive, and less bug-prone, to have explicit fallthroughs.

Thanks.  This is a collection of different ideas with different effects on the language.  This would have been interesting at an earlier stage of the development of the language, but for most of these ideas it is too late.  At this point these ideas don't seem to solve real problems that are getting in people's way, they are more a different style of doing things that can already be done.

I basically agree :) For anyone who has already mastered most of Go there really isn't any sense of irritation about the limitations as the capabilities that are there are more flexible anyway.
The bigger problem is about getting people to write good code. Even some of the best golang projects have silly things in them. I'd guess that for those sooner or later tools will exist to make it easy, and right now, the only issue is it can sometimes be exhausting to fix badly formed code. But having said that, for example, adding a second, slightly different RPC endpoint to btcd (different only regarding mining block templates) took me about 3 hours, and required changes to about 10 files.


CZI: proposal information needed

Hi all
As many of you might be aware a few folks and I are working on a CZI EOSS proposal to tackle accessibility issues in the Jupyter ecosystem.
In the proposal we have to provide information regarding Existing support to the Jupyter ecosystem, esp:

List active and recent (previous two calendar years) financial or in-kind support for the software project(s), including duration, the amount in USD, and source of funding. Include in this section any previous funding for these software projects received from CZI (maximum of 250 words)

Since there are 4 proposals being worked on atm I was wondering if there was a way to have this information and share with the rest of the folks working on proposals.
For reference here is the Discourse item where we are keeping track of the proposals:
https://discourse.jupyter.org/t/coordinating-czi-eoss-applications-across-the-community/8472/13
cc/ @choldgraf @Carreau  and @minrk who I know are the respective PI's in the other proposals

Here are links to two to of the previous  Jupyter Related accepted CZI fundings

https://chanzuckerberg.com/eoss/proposals/jupyterhub-contributor-in-residence-program/
https://chanzuckerberg.com/eoss/proposals/real-time-collaboration-in-jupyter/

@choldgraf do you happen to have the full proposal for the contributor in residence?
From the RTC proposal the figures listed for funding are:
Helmsley Charitable Trust: Jupyter Sustainability. $1 million, 2019-2021.
* Alfred P. Sloan foundation grant: Enabling Safe Access to Sensitive Data. $1.68 million 2018-2021
* Eric and Wendy Schmidt and Schmidt Futures grant: Integrated Digital Information System Research.
$2.2 million, 2018-2020.
* Collaboration with employees from Bloomberg, Two Sigma, JP Morgan, Amazon, and others.
* Commercial funding for JupyterLab development from DE Shaw, Goldman Sachs, and others.
* “Jupyter meets the Earth: Enabling discovery in geoscience through interactive computing at scale”
NSF grant for $1.7 million for three years
* Previous six million dollar grant from Leona M. and Harry B. Helmsley Charitable Trust, Gordon and
Betty Moore Foundation, and the Alfred P. Sloan Foundation for four years

@trallard : https://drive.google.com/file/d/1U2r7sZLNn1qC7svzrIrybc5-sK5zWozw/view?usp=sharing

:broom: cleaning up here and closing this issue.
Happy hacking! :bowtie:


Sema: Effectively revert https://github.com/apple/swift/pull/70569

The fix caused a source break that is now captured as an additional test case in objc_async_conformance.swift.
Resolves rdar://121527977

@swift-ci please test


[1.x] Minor cleanup post release

Doing a bit of cleanup to the 1.x post the 1.23.3 release:

The changelog had contributor username accidentally cropped
The applyDocVersion task was not executed (not a major deal as we don't practically build docs from this branch, but let's keep things as much in sync as we can).

Messages

:book:

Thank you very much for making our website better :heart:!

  Generated by :no_entry_sign: dangerJS against 3014d77c25943d5bd1c521294e2c82dec99bb83e


OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb'

I'm having the same error that I have on PokemonGo-Map spcrit. Every time I want to run it the console just says:
OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb'
I'm using Python 2.7.10 32bit version supposedly.
Also I've pip installed, but I can't use the 'pip2' command just the 'pip' one, is that it?
And what about changing from master to dev? I didn't manage to do sth like that...

As there have been many updates since this issue was posted, I'm assuming this issue has been resolved. If I'm wrong, please reopen.


File => Exit menu entry does not work.

Describe the bug
Brain Simulator II can be closed by either the Alt-F4 key combination, or clicking the top right close icon, but the most explicit option of File => Exit does not work. It simply does nothing.
Application: Brain Simulator
Module/Network: N/A
To Reproduce
Steps to reproduce the behavior:

Start Brain Simulator II.
Choose File => Exit.
Notice no save prompt shows, and program remains open.

Expected behavior
Normally File => Exit should have the same behavior as Alt-F4 on the main window, or clicking the close icon top-right.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Windows 10 Pro  20H2
Version: 2021-04-24 master

Add any other context about the problem here.

This is fixed.


Fixes #1440

Updated Netflix Hystrix version to 1.5.7

@ahmednasir91 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@ahmednasir91 Thank you for signing the Contributor License Agreement!

Current coverage is 74.16% (diff: 100%)

Merging #1599 into master will decrease coverage by 0.06%

@@             master      #1599   diff @@
==========================================
  Files           193        193
  Lines          5937       5937
  Methods           0          0
  Messages          0          0
  Branches        893        893
==========================================
- Hits           4407       4403     -4
- Misses         1206       1209     +3
- Partials        324        325     +1

Powered by Codecov. Last update 1cd194a...82dd2eb


Sharing

How can I share the infos the apps gathers?

Yes, please! Thank you for this app as it is very helpful. The only thing lacking for me was a way to export the list. I was using this to build a whitelist of apps and it would be very handy if you could export all with at least the uID.


feat(WIP): anoncreds updates

This PR is a significant refactor of ACA-Py's handling of Anonymous Credentials, switching to the ledger-agnostic anoncreds-rs library instead of Indy specific libraries we've been using up until this point.
This PR is a work in progress. Given that ACA-Py has been built with Indy-isms and Indy specific libraries since the beginning, there's a lot that needed to be touched in order to move towards a more ledger-agnostic mentality. As of the time of opening this PR, it includes:

A pluggable interface for defining AnonCreds Method Plugins, enabling resolution or registration of AnonCreds objects on any ledger/network/resolvable location as long as there is a plugin that implements it.
A new set of Admin API endpoints for creating AnonCreds objects in a ledger-agnostic, plugin-friendly way
Replaced indy-shared-rs with anoncreds-rs (indy-shared-rs still getting installed but not used)
Added builtin plugins for:

Legacy Indy (Identifiers not using did:indy urls)

Supports registering and resolving Schemas and Credential Definitions; revocation objects are WIP

did:indy - Currently just stubbed out
did:web - Currently just stubbed out

A simple demo script (to be removed and replaced with proper Integration tests) demoing issuance and verification (without revocation currently) on Legacy Indy.

This can be run with docker-compose run tests && docker-compose down -v

We are actively working on:

Implementing revocation support through the new AnonCreds interface

Things that are very broken right now:

The old /schemas and /credential-definitions endpoints
Revocation
Endorsement

I think this is generally looking pretty good. You'll want to define the anoncreds test marker in setup.cfg. Before this is added to main I would like to remove the indy-credx support code, as there's no need to support both implementations. I see some references to anoncreds.sdk which seems like a string replacement error, those would be indy-sdk tests which we won't be removing just yet.
One general question I'm not sure about. When publishing Anoncreds objects, do we assume that the ID can be generated locally, or can it support a registry that determines the ID for you?

To answer @andrewwhitehead ’s question:

One general question I'm not sure about. When publishing Anoncreds objects, do we assume that the ID can be generated locally, or can it support a registry that determines the ID for you?

The AnonCreds v1.0 Spec. specifies that the objects DO NOT contain IDs that reference themself on the assumption that the IDs cannot always be generated locally — it depends on the AnonCreds Method.  So, for example, a CredDef contains a SchemaId, but does not contain a CredDefId for itself.
So — the implementation must support the case of the registry determining the ID for you.  It may be that the AnonCreds method does the actual calculation (such as with Indy), but the component calling the AnonCreds Method does not do that.

Closing in favor of #2276


Failed to minify

Failed to minify the code from this file:
./node_modules/grabity/node_modules/jsdom/lib/jsdom/living/generated/utils.js:73

Nothing I can do about that really. That's jsdom code

@zprager Do you really need to minify though? Also, have you successfully minified jsdom itself or any other projects dependent on it?

I'm going to close this for now. If you have any other related questions or comments, feel free to reopen the issue.


React to "You're going too fast!" message

After last update iOS pokemon asks me to click at "I'm a passenger" when I'm jump to different location too fast. I just switch my iPhone off, then I on it after 200 meter and I got this message.
I think Niantic can count "I'm a passenger" clicks and detect I'm bot if I don't click.
So we need to add reacting to this message if it's sending something to server when I click "I'm a passenger".
https://twitter.com/PokeWire/status/762809914586693632/photo/1

Well, you get this message only if you travel with more then 14km/h. I don't think anyone would set this option above this value because of egg hatching...

I use teleport when I see rare pokemons. Sometimes I teleport from my home location to far away places.

@mico than the not clicked dialog is the least of your problems, in terms of possibly being banned.

@licklake your argument is.... well, people do use snipping (teleporting) and that counts as 'moving too fast', since you switch locations very quickly (send information of your current position and the desired one to their servers). also, people do use speeds higher than 14km/h and yes, it does hatch eggs.


Is it valid for the PX4 project to use px4_sitl as the default target for running cppcheck, clang-tidy, etc

px4_sitl is the default target for running a lot of the security scanning tools (cppcheck, clang-tidy, lcov, tests). We need to determine if this is a valid approach for the PX4 project.
Acceptance Criteria

[ ] Determine why the px4_sitl target is used for cppcheck, clang-tidy, code coverage, and tests.

px4_sitl as a target for code scanning could be considered valid since it is pulling in what I would consider the "px4 framework" code. That is, code that is essential to running any px4 enabled firmware. Without that code you aren't flying with PX4.
This does exclude code that would be specific to different boards. This code would be drivers, mixers, board specific code.
Initial approach would be an additional make target. However, since px4_sitl targets POSIX and a firmware board would target NuttX, this might be a great effort depending on tooling.

Answered above.


6.0🍒[Observation] Optimize cancellation path to avoid excessive copies

Explanation: The existing code could potentially mis-optimize and create copies of the set for the cancellation tokens. This mutates it in-place to avoid those copies.
Radar: rdar://127018986
Scope: Only applies to the cancellation path inside of the Observation library
Risk: low - there are no functional changes in how the compiler is built
Testing: unit tests cover this particular case
Reviewed By: @glessard  in https://github.com/apple/swift/pull/73288

@swift-ci test


connectionPlugin 'hasNextPage' returns wrong result

I have a an array of 6 items: [0,1,2,3,4,5] paginated using a connection field.
The user requests first: 3, and my nodes() function returns [0,1,2,3].   (1 extra, as described in the docs). and the user gets [0,1,2] as promised.
The user then requests  first: 3, after: cursor:2, I return [3,4,5] (the +1 extra is missing, indicating that there is no next page, and should return hasNextPage: false, yet nexus returns hasNextPage: true.
I'm using the latest version:
"nexus": "^0.12.0-rc.13",

It appears as though the default has page functions assume there is either a first or last. This is not the case if one configures them to be optional.

Configure who to be optional?
my code:
  t.connectionField('allApps', {
    type: 'App',
    additionalArgs: {
      status: arg({
        type: 'Boolean',
        description: 'Returns only elenents with status blah',
        required: false,
      }),
    },

    extendConnection: t => {
      t.int('totalCount', () => APPS.length);
    },

    nodes(_, { after, first }) {
      const offset = after ? Number(after) + 1 : 0;
      const results = APPS.slice(offset, offset + first + 1); // return +1 because nodes() require it
      console.log(results);

      return results;
    },

  });
});

I’m realizing that my previous comment was incorrect. The plugin can’t possibly know that I’ve fallen back to a slice size if there is no explicit first argument. Please ignore.

I believe the issue is the >= in this line ought to be >: https://github.com/prisma-labs/nexus/blob/develop/src/plugins/connectionPlugin.ts#L830

The documentation also refers to a non-existent option, assumeExactNodeCount: https://github.com/prisma-labs/nexus/blob/develop/src/plugins/connectionPlugin.ts#L213

You should use a custom pageInfoFromNodes to determine the pageInfo based on how you prefer it to work. The >= is an intentional tradeoff for typical APIs where you're fetching the amount of rows you want given the pagination args, rather than amount + 1 just to fulfill the hasNextPage.
Agree the assumeExactNodeCount should also be removed from the commends - initially I had it, but realized it was probably too many options, when really we should encourage you just specify how you want it to work via pageInfoFromNodes .

As the current behaviour is a patch for legacy API, shouldn't you make than an opt-in and have the "correct" behaviour be the default? It seems excessive to have to implement pageInfoFromNodes.

@tgriesser is there any willingness to reconsider this decision? Making compatibility with legacy (REST) API the default behaviour at the expense of the "happy path" feels like an unfortunate tradeoff and will make usage much more verbose for simple cases.

Yes, I think I'm fine with making this change. Will take a look at merging #394 soon, just have been busy with some other things lately.


responsed Content-Type is set incorrectly when using stylesheet in html file.

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

css files in <link rel tag responsed as application/javascript
css files in <link rel tag responsed as application/javascript, and the css content can not be loaded in bowser.
It's ok when using 0.15.3, but when using versions above this, the error occurs.
project dir as:

html file as:

warging info as:

responsed info as:

Reproduction
Please provide a link to a repo that can reproduce the problem you ran into.
A reproduction is required unless you are absolutely sure that the the problem is obvious and the information you provided is enough for us to understand what the problem is. If a report has only vague description (e.g. just a generic error message) and has no reproduction, it will be closed immediately.
System Info

required vite version: 0.16.10
required Operating System: win10@2004 + wsl2
required Node version: 13.9.0
Optional:

npm/yarn version: 6.13.7
Installed vue version (from yarn.lock or package-lock.json)
Installed @vue/compiler-sfc version

Logs (Optional if provided reproduction)

Run vite or vite build with the --debug flag.
Provide the error log here.

In development mode, CSS file will be rewritten with?import to a js module that inserts a style.

Look like it is a bug.I can fix it.But wiil have an confilct with my worked pr.

@underfin yes, I think so. and please notice the changes at line 51~56 in the commit https://github.com/vitejs/vite/commit/f6a21b268b262ddbdd585288e599fed2b3a41ec6

thank you for your job.

A workaround until fixed is to recover it after compilation and reset the MIME type:
configureServer: ({ app }) => {
  app.use(async (ctx, next) => {
    await next();

    // Recover css files after compilation.
    if (ctx.path.endsWith('.css') && ctx.type == 'application/javascript' && ctx.body) {
      ctx.type = 'css';
      ctx.body = ctx.body.substring(ctx.body.indexOf('"')+1, ctx.body.lastIndexOf('"')).replace(/\\n|\\/g, '').trim();
    }
  })
}


Separate scope from effects?

This is the third time I've wanted to ask this.  The first two times, I found another way to do what I wanted, and maybe I would be able to do that again; but since it keeps happening I thought I'd at least ask.
The module Scope does two things:

It defines a notion of "scope state" that stores a visible namespace, an export namespace, and an export prefix, and functions that manipulate scope states.
It exposes these functions through an interface of algebraic effects.

Why not separate these two things into two modules?  Algebraic effects are great, but they don't do everything perfectly, and I think it's reasonable for a user to want to use scopes without them, managing the scope state themselves in a different way (e.g. explicitly or monadically).
Here are the three reasons I've wanted this so far:

Algebraic effects are great for combining with other algebraic effects, but not so great for combining with other kinds of monads, like a continuation monad, a nondeterministic choice monad, or a backtracking monad.  In my case, the fmlib_parse library uses a monad for parsing combinators that I believe uses some kind of continuations for backtracking.  It doesn't make sense to have algebraic effects be performed inside such monadic functions, so I wasn't able to write a parser that would parse a sequence of definitions, adding each of them to the scope as it went so that it would be available while parsing later definitions -- whereas the fmlib_parse monad does already include a monadic user state that is automatically backtracked across correctly.  In this case, I was fortunately able to convince the author of fmlib to implement a partial parser so that I can parse a single definition and stop, perform an effect to add it to the scope, and then restart the parser where it left off.  But combining with monads from other libraries seems like a general reason why one might want to use scopes without algebraic effects.
Especially in the absence of an effect system, it is easy to make mistakes regarding what effect handlers a given computation will be performed in the context of, and hence what scope it will be in.  In my case, my functions for pretty-printing a term do a lookup into the scope to find in-scope names for defined constants, while the error messages I report with Asai use these pretty-printing functions to mention the terms relevant to the error.  However, this led to Mutex errors when I started using scope sections.  I believe the issue was that the Asai effects carry a function formatter -> unit rather than a string, which is then executed by the Asai handler -- and the Asai handler is outside the new Scope handler put in place by section, so the lookups were going instead to the parent scope, which is locked during section.  I worked around this by refactoring my code so that the lookups, at least, happen before the data is packaged up into a formatter -> unit, but if I were managing scope state more explicitly I don't think such a bug could have happened in the first place.
Now I am thinking about how to support "undo" for an interactive ProofGeneral mode like Coq's that can make definitions and then retract them.  Like other kinds of backtracking, this seems like one of those places where purely functional code is the way to go.  If I could access the explicit scope state objects, I could store a (backwards) list of them, using the last one for lookups and adding an updated one onto the end every time a new definition is made, and then just peel a bunch off the end when I undo.  I am not sure how to do something like this when the only way to access scope state is through algebraic effects.  Maybe there is a way (and I'd be interested to hear suggestions), but I suspect that the non-effectual version will be more straightforward and less error-prone (for me, at least).

Ideally, the module containing the "pure" scopes should be called "Scope", and the module implementing lexical scoping should be called "Scoping". But the latter is taking the name "Scope" now. @mikeshulman Do you feel "ScopeData" is an acceptable name before we overhaul the whole thing?

I'm fine with ScopeData.  Thanks!

The comment in January suggested you would be open to a change like this.  If that's right, do you have a guess about when it might happen?  As in, "next month" vs "next year" vs "maybe someday"?  So I can decide whether I should come up with my own workaround when I'm ready to implement "undo".

@mikeshulman Thanks for the wake-up call. Sorry I was expecting "next month (Feb)" but something personal came in and dragged me all along. My personal issues are still not resolved but I should have more bandwidth after the semester ends (say, mid-May). My hope is that I can catch up with everything in June. There's really nothing difficult in implementing a pure "ScopeData" and then the current "Scope" on top of it... Once again I apologize for the huge delay in this project (and many other projects).

@mikeshulman Thanks for the wake-up call. I was expecting "next month (Feb)" but something personal is dragging me all along. My personal issues are still not resolved but I should have more bandwidth after the semester ends (say, mid-May). My hope is that I can catch up with everything in June. There's really nothing difficult in implementing a pure "ScopeData" and then the current "Scope" on top of it. Once again I apologize for the huge delay in this project (and many other projects).

I'm sorry to hear you're dealing with personal issues; I hope everything works out okay.  Thanks for the update; I'll wait for the summer then.

@mikeshulman Hi, I'm getting back on track, and here's one question when I was trying to pin down the API:
The Scope module actually uses more than the scoping effects. It also incorporates the name-modifying effects (shadowing, etc.) from the Modifier module.

I think I don't completely understand what the name-modifying effects are for.  It looks like they basically a way for the programmer to tell yuujinchou what to do when a name is not found or tries to shadow another one.  What is the reason for making these handled by effects rather than by ordinary functions in the module type Param that the programmer would specify when they implement it?

@mikeshulman Those can help implement suppression of warnings about shadowing, such as OCaml's open!. But other than dynamic warning suppression, I guess we were just trying to use effects everywhere.

Ok, so these effects are basically a Reader to avoid passing arguments around between functions.  I don't think that should cause any problems with what I have in mind, if you want to keep them as effects.

Thinking about this some more, and looking at the code again, I have an even simpler suggestion.  What Scope does with a pair of namespaces is not complicated and I could easily do it myself by hand, and I might even prefer that so that I can see and control more clearly what is going on.  Indeed, even if you implement a ScopeData, I might end up wanting to roll my own later anyway.
The one change on the Yuujinchou side that would make this a bit more natural would be for Modifier.Make to export versions of the Trie.union_* functions that automatically supply Perform.shadow as its merger argument, the way the Scope functions that call these functions do.  I think it makes sense to do this at the level of Modifier since anyone using the modifier engine is likely to want this behavior for merging, whether or not they are using Scope on top of it.

The one change on the Yuujinchou side that would make this a bit more natural would be for Modifier.Make to export versions of the Trie.union_* functions that automatically supply Perform.shadow as its merger argument, the way the Scope functions that call these functions do. I think it makes sense to do this at the level of Modifier since anyone using the modifier engine is likely to want this behavior for merging, whether or not they are using Scope on top of it.

That makes sense. I have to say I was a bit troubled by explicitly passing every function (after removing algebraic effects).

@mikeshulman I am marking this as "done", and I look forward to the code you are going to write.

I'll be sure to let you know when I write it!


Cell issue on Windows - the same value is added multiple times in a cell

Hi,
I have the following code which adds some nodes in the excel:
Node has 2 columns:

A name column
A value formatted like this:

`<script>val=“val_test”;</script>\n<script src=“url?[timestamp]"></script>`

let options = {
	stream: response,
	useStyles: true,
	useSharedStrings: true
};
let workbook = new Excel.stream.xlsx.WorkbookWriter(options);

 let worksheet = workbook.addWorksheet('Creatives');
convertToExcelFormat(nodes).forEach(node => {
	worksheet.addRow(node).commit();
});
await workbook.commit();

When on Windows exporting more than 30 nodes I am getting in the same cell:

for the first 5 nodes -  triple values like this:

<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>
<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>
<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>

for the next 5 nodes - double values:

<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>
<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>

the others are filled with the correct value:

<script>val=“val_test”;</script>
<script src=“url?[timestamp]"></script>

This is not happening in OSX.
I also tried to bypass the generation from the backend server and send the already generated xls from Mac to Windows - it works on Mac not working on Windows and also from Windows to Mac the same thing happens.
In my opinion this is not really a generation issue but this is caused by the symbols used in the Value column. Can this happen because of the quotes / other symbols? Did you encounter something like this previously? Why is this happening only for more than 30 rows?
Thank you!

The issue is related to the software used. It happens because on Windows I am using OpenOffice. It works with Microsoft Office / Google Online / Libre Office.


GUVNOR-2268 : Test Scenarios: Switch to using uberfire-extensions DatePicker

Part uno. Can be merged in as it is.
Part dos will remove the legacy date picker from kie-wb-commons and needs to be done after this.

Ok, found another location where the date picker is used. Please wait with the PR merge.

Ok, at first I only did the given section. Had to also do expect section.

drools-wb
(master) http://github.com/droolsjbpm/drools-wb/commit/c067b2379

Thanks @Rikkola !


runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions

Currently, the overriding object method definitions are
matched as vimFunctionError (:help builtin-object-methods,
v9.1.0148).
For example:
vim9script

class Test
	def string(): string
		return "Test"
	enddef
endclass

echo string(Test.new()) == Test.new().string()

Instead, let's introduce a new syntax group vimMethodName
and make these methods its members.  In order to emphasise
the link between the overriding methods and the overridden
functions for highlighting, vimMethodName is linked by
default to vimFuncName.

@dkearns, @h-east, please review.

Understood.  Next time around for the problem at hand, I'll
look for the old issue to comment on, otherwise file a new
one.  :)
I have applied the suggested changes and pushed them.

thanks!


Crash on AtomicObserver in ReactiveKit

Hi,
After updating pods, my app gets crashing randomly on AtomicObserver.dispose() in ReactiveKit. I think this problem was resolved in version 3.15.3 of ReactiveKit but when I update the pod for Bond, CocoaPods downloads the version 3.15.2 of ReactiveKit. How can I force CocoaPods to download latest version of ReactiveKit? I've tried putting both Bond and ReactiveKit in Podfile without success.
And here is the crash log:
Simultaneous accesses to 0x283da9e10, but modification requires exclusive access.
Previous access (a modification) started at ReactiveKit AtomicObserver.dispose() + 152 (0x10d0943bc).
Current access (a read) started at:
0    libswiftCore.dylib                 0x00000001965bbbe0 swift_beginAccess + 560
1    ReactiveKit                        0x000000010d093a58 AtomicObserver.on(_:) + 288
2    ReactiveKit                        0x000000010d0946b8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
3    ReactiveKit                        0x000000010d094964 ObserverProtocol.receive(completion:) + 612
4    ReactiveKit                        0x000000010d0cd6cc closure #2 in closure #1 in SignalProtocol.prefix<A>(untilOutputFrom:) + 748
5    ReactiveKit                        0x000000010d093a58 AtomicObserver.on(_:) + 484
6    ReactiveKit                        0x000000010d0946b8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
7    ReactiveKit                        0x000000010d094964 ObserverProtocol.receive(completion:) + 612
8    ReactiveKit                        0x000000010d0cd4c4 closure #1 in closure #1 in SignalProtocol.prefix<A>(untilOutputFrom:) + 328
9    ReactiveKit                        0x000000010d093a58 AtomicObserver.on(_:) + 484
10   ReactiveKit                        0x000000010d0946b8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
11   ReactiveKit                        0x000000010d0959b8 partial apply + 132
12   ReactiveKit                        0x000000010d093524 thunk for @escaping @callee_guaranteed (@in_guaranteed Signal<A, B>.Event) -> () + 20
13   ReactiveKit                        0x000000010d0ef668 thunk for @escaping @callee_guaranteed (@in_guaranteed Signal<A, B>.Event) -> (@out ()) + 36
14   ReactiveKit                        0x000000010d0ee89c Subject.on(_:) + 2524
15   ReactiveKit                        0x000000010d0f2278 ReplayOneSubject.on(_:) + 1048
16   ReactiveKit                        0x000000010d0f03c0 protocol witness for ObserverProtocol.on(_:) in conformance Subject<A, B> + 28
17   ReactiveKit                        0x000000010d0ed37c SubjectProtocol.send(completion:) + 636
18   ReactiveKit                        0x000000010d07cd70 DisposeBag.deinit + 252
19   ReactiveKit                        0x000000010d07cf68 DisposeBag.__deallocating_deinit + 60
20   libswiftCore.dylib                 0x00000001965bd4f0 <redacted> + 28
21   libobjc.A.dylib                    0x0000000188e0b2ac <redacted> + 352
22   libobjc.A.dylib                    0x0000000188e07d24 objc_destructInstance + 100
23   libobjc.A.dylib                    0x0000000188e0ed80 _objc_rootDealloc + 48
24   UIKitCore                          0x000000018d162d60 <redacted> + 152
25   UIKitCore                          0x000000018d59d278 <redacted> + 872
26   UIKitCore                          0x000000018cb6dfd4 <redacted> + 68
27   UIKitCore                          0x000000018cb5fc3c <redacted> + 96

Hi @madiguzel, I just released 3.15.3 to CocoaPods. Hope it fixes the problem.

Hi Srdan,
Thank you for your quick reply. I've just updated pods and got the new version of ReactiveKit (3.15.4). But the same crash still exists. And additionally, main thread checker complains about UI API calls from background thread and freezes the UI in debug mode for a while.
Here is the crash log:

Simultaneous accesses to 0x2807bbc10, but modification requires exclusive access.
Previous access (a modification) started at ReactiveKit`AtomicObserver.dispose() + 284 (0x10d3f844c).
Current access (a read) started at:
0    libswiftCore.dylib                 0x00000001965bbbe0 swift_beginAccess + 560
1    ReactiveKit                        0x000000010d3f7558 AtomicObserver.on(_:) + 448
2    ReactiveKit                        0x000000010d3f88d8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
3    ReactiveKit                        0x000000010d3f8b84 ObserverProtocol.receive(completion:) + 612
4    ReactiveKit                        0x000000010d431854 closure #2 in closure #1 in SignalProtocol.prefix<A>(untilOutputFrom:) + 748
5    ReactiveKit                        0x000000010d3f7558 AtomicObserver.on(_:) + 644
6    ReactiveKit                        0x000000010d3f88d8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
7    ReactiveKit                        0x000000010d3f8b84 ObserverProtocol.receive(completion:) + 612
8    ReactiveKit                        0x000000010d43164c closure #1 in closure #1 in SignalProtocol.prefix<A>(untilOutputFrom:) + 328
9    ReactiveKit                        0x000000010d3f7558 AtomicObserver.on(_:) + 644
10   ReactiveKit                        0x000000010d3f88d8 protocol witness for ObserverProtocol.on(_:) in conformance AtomicObserver<A, B> + 20
11   ReactiveKit                        0x000000010d3f9bd8 partial apply + 132
12   ReactiveKit                        0x000000010d3f6f1c thunk for @escaping @callee_guaranteed (@in_guaranteed Signal<A, B>.Event) -> () + 20
13   ReactiveKit                        0x000000010d45374c thunk for @escaping @callee_guaranteed (@in_guaranteed Signal<A, B>.Event) -> (@out ()) + 36
14   ReactiveKit                        0x000000010d452a3c Subject.on(_:) + 2472
15   ReactiveKit                        0x000000010d4566f4 ReplayOneSubject.on(_:) + 1036
16   ReactiveKit                        0x000000010d454414 protocol witness for ObserverProtocol.on(_:) in conformance Subject<A, B> + 28
17   ReactiveKit                        0x000000010d451504 SubjectProtocol.send(completion:) + 636
18   ReactiveKit                        0x000000010d3e0690 DisposeBag.deinit + 252
19   ReactiveKit                        0x000000010d3e0888 DisposeBag.__deallocating_deinit + 60
20   libswiftCore.dylib                 0x00000001965bd4f0 <redacted> + 28
21   libobjc.A.dylib                    0x0000000188e0b2ac <redacted> + 352
22   libobjc.A.dylib                    0x0000000188e07d24 objc_destructInstance + 100
23   libobjc.A.dylib                    0x0000000188e0ed80 _objc_rootDealloc + 48
24   UIKitCore                          0x000000018d162d60 <redacted> + 152
25   UIKitCore                          0x000000018d59d278 <redacted> + 872
26   UIKitCore                          0x000000018cb6dfd4 <redacted> + 68
27   UIKitCore                          0x000000018cb5fc3c <redacted> + 96
28   fastPay                            0x0000000104dfc258 outlined destroy of FormButton? + 24
29   libobjc.A.dylib                    0x0000000188df5078 <redacted> + 112
30   libobjc.A.dylib                    0x0000000188e07d24 objc_destructInstance + 88
31   libobjc.A.dylib                    0x0000000188e0ed80 _objc_rootDealloc + 48
32   UIKitCore                          0x000000018d162d60 <redacted> + 152
33   UIKitCore                          0x000000018d59d278 <redacted> + 872

Main thread checker issues:
UIControl.swift - Line 74
(UIControl.removeTarget(_:action:for:) must be used from main thread only

UIGestureRecognizer.swift - Line 128
UIView.removeGestureRecognizer(_:) must be used from main thread only

ProtocolProxyPropertyController.swift - Line 67 and 70
UITableView.delegate must be used from main thread only

Alright, looks like we'll have to dig a bit deeper to get this resolved. May I suggest you revert to the version you've been using before the update until then?

I rolled back to the version which I thought it was working. But it crashes, too. Some other pods have been updated in parallel. I think they caused that problem. I'll investigate and return back to you.

@srdanrasic My app is crashing a lot since I updated to Bond 7.6.1, with ReactiveKit 3.15.4, I believe the issue is in AtomicObserver line 70 private let disposablesQueue = DispatchQueue(label: "com.reactive_kit.atomic_observer.disposables", qos: .userInitiated) where the disposition of all bond's BNDControlTarget is not happening now on main thread check the below image:

I rolled back to the version which I thought it was working. But it crashes, too. Some other pods have been updated in parallel. I think they caused that problem. I'll investigate and return back to you.

@srdanrasic. I checked it again and found that the versions of frameworks below don't causes a crash.

Bond (7.6.1):

Differ (~> 1.4)
ReactiveKit (~> 3.14)

I just release 7.6.2 that should fix disposing on the non-main threads. @ibrahimkteish @madiguzel

@srdanrasic we just opened a Pull Request for that.

Still reproduces with 7.6.6  : <
Crash at the same place as @madiguzel

Sorry to resurrect this issue, but I'm seeing this stack trace in a macOS app using Bond 7.6.6 and ReactiveKit 3.16.2 - is it something I'm doing, or something that needs to be resolved upstream in RK?

Also discovered this bug in the 7.6.6 version. Surprisingly it only appears in Debug- and not in Release-Builds!

@svendr have you worked out what is triggering this? I haven't gone too deep on this one, but it's stopped me in my tracks. I'll have a chance to look at what's happening next week.

Actually, I've definitely fixed mine, and the problem was a legitimate access violation (fixed by declaring a captured closure parameter as unowned). Ignore me :+1:

@tonyarnold

@svendr have you worked out what is triggering this? I haven't gone too deep on this one, but it's stopped me in my tracks. I'll have a chance to look at what's happening next week.

Nope haven't spent more on this topic yet, as it only affects Debug-Builds. Your fix regarding the access violation sounds like a good hint, I'll check if we're having a similar issue


Add ability to add for generating changelog for specific release without tagging

Describe the feature
Hi!
Thank you for your awesome project!
I use the bumpp package for version upgrades. I like that I can manually choose version of my package.

It would be great to be able to generate a changelog for a release by tag, which would include the difference between the tag and the previous tag.
Like this:
// package.json
{
  "scripts" {
    "release:version": "bumpp package.json --execute=\"pnpm exec changelogen --output changelog.md --version %s" --tag --all",
  }
}

Additional information

[ ] Would you be willing to help implement this feature?

Looks like there is already optinon -r. Sorry


Translate default OG Image

Can we add translations for default OG image https://swr-card.vercel.app ?
From the code I can see there is a search param title witch generates dynamic cards on every page except home page. But what about default one, witch is slightly different and it has only english version.
Could we add another search param like ?lang=${locale} or maybe a rout /${locale} that will consume translations from TITLE_WITH_TRANSLATIONS constant in theme.config.js

Is there any solution to this in Nextra 2? @shuding

I think we can already do it with today's setup, it's just that we need to design multiple cards (it's not dynamic). The real tricky thing is when you share the homepage on social media, the crawler doesn't know about the actual viewer's language settings. For example when you share SWR's site on Twitter, people with different Twitter language settings still see the same card.

For example when you share SWR's site on Twitter, people with different Twitter language settings still see the same card.

It could share based on the URL locale, even if you load the page via the root endpoint without a locale id, the NEXT_LOCALE will be populated, or not? So by sending the URL like https://swr.vercel.app/es-ES/docs/getting-started should render a card with es-ES?
Twitter users not seeing the card in different languages shouldn't be a problem since most of the time you only share a non-English documentation link to someone that speaks that non-English language or to a community with speakers of that language


Load Barcodes From File

Hi Josh,
The new load barcodes from file is great.
I noticed if you add files from a set and do not print or clear them so they remain saved, if you do a physical items search, you can select items from a physical items repository search in Alma, but items selected using "select items" do not get added to the list of barcodes that were loaded from a file. If you scan in a barcode, the barcode is added to the list of barcodes that were loaded from a file.
Is it intended to work this way? Will it be possible to added items  from select items and be printed with the barcodes loaded from a file? (attaching a file)
Thanks,
Maggie
https://user-images.githubusercontent.com/81188041/114229189-7a627c80-9945-11eb-9665-06861a0f0f1b.mp4

Hi @MaggieMcGee - thanks for your question. The app currently works such that the selected option (scan, select, set) is what gets printed. We felt that mixing between them would cause inconsistent results and would be more confusing. So if you've selected "Scan", all of the barcodes in the scanned list will be printed.
Hope that makes sense.

Hi Josh,
To clarify, the recommendation is to only use one of the options to create a list of barcodes to be printed? Do you mean that if you choose to scan barcodes the next time you go in you cannot add barcodes from a set select items?
Testing, this all proves to be true, however, you can add a barcode from Scan to a set uploaded from a file.
Thanks,
Maggie

This is the correct understanding @MaggieMcGee . We tried to add some clarification to the documentation. Scanning barcodes from a file is part of the scanning option, so the behavior you describe sounds consistent.
Thanks!


can't open tensorboard while training

(You can navigate to http://<IP_ADDRESS>:6006)

Running on http://<IP_ADDRESS>:6006/ (Press CTRL+C to quit)
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /neon-animation/neon-animation-behavior.html HTTP/1.1" 200 -
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /neon-animation/web-animations.html HTTP/1.1" 200 -
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /iron-overlay-behavior/iron-overlay-backdrop.html HTTP/1.1" 200 -
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /web-animations-js/web-animations-next-lite.min.js HTTP/1.1" 200 -
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /paper-input/paper-input.html HTTP/1.1" 200 -
<IP_ADDRESS> - - [31/Jan/2017 23:25:27] "GET /paper-slider/paper-slider.html HTTP/1.1" 200 -
*** Error in `/home/menglin/anaconda2/envs/tensorflow/bin/python': double free or corruption (!prev): 0x00000000009f6a80 ***
Aborted (core dumped)

version is '0.12.head'

@dsmilkov could you please take a look at this issue?
I guess the reason is that I used the wrong version of bazel
Build label: 0.4.2

If you already have a suspect of the reason, can you try to fix it and come back please? Thanks.

Thanks for your advise. I may do that later. I don't know anything about bazel and it takes time to compile Tensorflow, so I'm not sure I should use a newer version or older version.  I expect someone who knows the library to help me. I'm pretty busy utils this Wednesday , I may try to fix it afterward.

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!


Update CreativeOneLineFizzBuzz.py

More context on this please. Why do you change the author of someone else's solution to yourself?


Remove constraints on stackalloc

This change reflects the following behavior.
This is illegal:
    public void M() {
        var p = stackalloc nint[3];
    }

Because a stackalloc expression used as an initializer is of type T* (an unsafe pointer type) which requires an unsafe context. However, these are legal:
    public void M() {
        Span<nint> p = stackalloc nint[3];
    }

and
    public void M() {
        var p = (stackalloc nint[3]);
    }

(Note the addition of parens)

I don't understand the following behavior:
This is illegal:
    public void M() {
        var p = stackalloc nint[3][1];
    }

I don't understand why. Perhaps because `nint[3] is parsed as a type. I get the error
•	error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('nint[]')
•	error CS1575: A stackalloc expression requires [] after type

Yet this is legal:
    public void M() {
        var p = (stackalloc nint[3])[1];
    }

Is this intended to replace or be related to #604? I can't quite get my head round it all.

I don't understand the following behavior:
This is illegal:
    public void M() {
        var p = stackalloc nint[3][1];
    }

[...] Perhaps because `nint[3] is parsed as a type. I get the error

I think that's correct. It's trying to stackalloc an array of 1 where the element is nint[3], which is a managed type.

Yet this is legal:
    public void M() {
        var p = (stackalloc nint[3])[1];
    }

This surprises me as well. I think this should be illegal as well. According to sharplab, the type is ref IntPtr, which should be pointing to an array of elements. That would seem to mean the compiler took a reference to a managed type.

I don't understand the following behavior:
This is illegal:
    public void M() {
        var p = stackalloc nint[3][1];
    }

I don't understand why. Perhaps because `nint[3] is parsed as a type.

According to the v7 grammar it is not illegal and parses as an element_access of a stackalloc_expression. nint is an unmanaged_type, not a type, which excludes array types.
Note that the syntactically very similar new nint[3][1] is illegal as it was deemed confusing to allow it in the original C# design (and they syntactic method of making it illegal is the root of why the C# grammar isn’t “ANTLR ready” – but I digress ;-)). Maybe the compiler in question is approaching stackalloc as it does new and therefore declares it illegal?
The parenthesised version (stackalloc nint[3])[1] (and the similiar new) is also legal and parses exactly the same as the unparanethised version.


No output from Http version

The Http builds of OmniSharp do not output anything to stdout, making it very difficult to diagnose errors.
The simple way to demonstrate is to download both the stdio and http versions of any build from the latest release, extract them both, then try to run them with no flags from a directory containing a .sln. The stdio build outputs nicely, nothing from the http build.
I have tested this in arch linux, using omnisharp-linux-x64.tar.gz and omnisharp.http-linux-x64.tar.gz using the run script. I have also tested in Windows 10 using omnisharp-win-x64.zip and omnisharp.http-win-x64.zip. I have also git pulled the latest version on Windows and built it in Visual Studio and tested with bin\Debug\OmniSharp.Http.Driver\net461\OmniSharp.exe vs. bin\Debug\OmniSharp.Stdio.Driver\net461\OmniSharp.exe. All with the same outcome.

Note that these Http builds all work - OmniSharp-vim can interact with them perfectly.

With debug mode (-v) I've got it:
 ~/.omnisharp/omnisharp-roslyn/run -s -v /home/jk/Downloads/test/test.sln
System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.
Parameter name: path
  at OmniSharp.Services.OmniSharpEnvironment..ctor (System.String path, System.Int32 hostPid, Microsoft.Extensions.Logging.LogLevel logLevel, System.String[] additionalArguments) [0x00062] in <eb3831daf0d34e89860cf96db22ea171>:0
  at OmniSharp.CommandLineApplicationExtensions.CreateEnvironment (OmniSharp.CommandLineApplication application) [0x0001d] in <eb3831daf0d34e89860cf96db22ea171>:0
  at OmniSharp.Http.Driver.Program+<>c__DisplayClass0_1.<Main>b__1 () [0x00000] in <ba01c1eaf26f46eb9acc819afdb3d192>:0
  at OmniSharp.CommandLineApplication+<>c__DisplayClass11_0.<OnExecute>b__0 () [0x0000b] in <eb3831daf0d34e89860cf96db22ea171>:0
  at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0
  at OmniSharp.CommandLineApplication.Execute (System.Collections.Generic.IEnumerable`1[T] args) [0x00042] in <eb3831daf0d34e89860cf96db22ea171>:0
  at OmniSharp.Http.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00028] in <ba01c1eaf26f46eb9acc819afdb3d192>:0
  at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <eb3831daf0d34e89860cf96db22ea171>:0

la /home/jk/Downloads/test                                                                                173 ↵
total 8.0K
drwxr-xr-x 4 jk users 4.0K Apr  4 07:07 example
-rw-r--r-- 1 jk users 1.7K Mar 30 14:54 test.sln


How to include ng-bootstrap

Here it is shown how to include ng-bootstrap, but it is rather bad style to directly inject the lib like this:
let additionalDeps: InjectableDependency[] = [       { src: 'ng2-bootstrap/bundles/ng2-bootstrap', inject: 'lib' },       { src: 'bootstrap/dist/css/bootstrap.css', inject: true },       { src: 'font-awesome/css/font-awesome.min.css', inject: true }     ];
What is the proper way to do this?
Angular: 2.0.0-rc.5
ng-bootstrap: 1.0.0-alpha.3

Most likely you'd want to include it in the SystemJS configuration.
For support requests you can use gitter or take a look at project's the wiki page in order to get more complete idea on how the it works.

I had the same issue and fixed it the following way:
Go to project.config.ts and add the lib:

this.SYSTEM_CONFIG_DEV.paths['@ng-bootstrap/ng-bootstrap'] =
<EMAIL_ADDRESS>this.SYSTEM_BUILDER_CONFIG.packages['@ng-bootstrap/ng-bootstrap'] = {
  main: 'index.js',
  defaultExtension: 'js'
};

Afterwards i extended the seed.config.ts with an extra line in the packageConfigPaths:

protected SYSTEM_CONFIG_DEV: any = {
defaultJSExtensions: true,
packageConfigPaths: [
/node_modules/*/package.json,
/node_modules/**/package.json,
<EMAIL_ADDRESS><EMAIL_ADDRESS>],...

@mgechev If there any way to edit this in the projet.config.ts?
Best,
Junus´
PS: Sorry for the bad formatting ;)

Yes, this is supposed to be in the project.config.ts. You can overwrite the properties in the constructor there.

I had some issues including ng-bootstrap in angular2-seed, what it worked for me was include
protected SYSTEM_CONFIG_DEV: any = {
defaultJSExtensions: true,
packageConfigPaths: [
/node_modules/*/package.json,
/node_modules/**/package.json,
<EMAIL_ADDRESS><EMAIL_ADDRESS>],...
as @JunusErgin mentions but with this lines ..
this.SYSTEM_CONFIG_DEV.paths['@ng-bootstrap/ng-bootstrap'] =
  `${this.APP_BASE}node_modules/@ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap`;

this.SYSTEM_BUILDER_CONFIG.packages['@ng-bootstrap/ng-bootstrap'] = {
    main: 'ng-bootstrap.js',
    defaultExtension : 'js'
}

As I spent a lot of time trying to make it work, here is the proper way to do it (without changing seed.config.ts).
Here is the needed lines in project.config.ts :
    this.SYSTEM_CONFIG_DEV.paths['@ng-bootstrap/ng-bootstrap'] =
<EMAIL_ADDRESS>
    this.SYSTEM_BUILDER_CONFIG.packages['@ng-bootstrap/ng-bootstrap'] = {
      main: 'index.js',
      defaultExtension: 'js'
    };

    this.SYSTEM_BUILDER_CONFIG.packageConfigPaths.push(
      join('node_modules', '@ng-bootstrap', '*', 'package.json')
    );

    // Add `NPM` third-party libraries to be injected/bundled.
    this.NPM_DEPENDENCIES = [
      ...this.NPM_DEPENDENCIES,
      { src: 'jquery/dist/jquery.js', inject: 'libs' },
      { src: 'bootstrap/dist/js/bootstrap.js', inject: 'libs' },
      { src: 'bootstrap/dist/css/bootstrap.css', inject: true }
      // {src: 'jquery/dist/jquery.min.js', inject: 'libs'},
      // {src: 'lodash/lodash.min.js', inject: 'libs'},
    ];

And it just works :)

I think you got a clear idea about adding an external dependency.I added material with my angular2 project.But the autocomplete feature is not available with it.So i would like to include md2, another dependency which covers all the missing items as of now by material. Can anyone help me integrate md2 with angular-seed?

@amalshehu All I know is from the wiki page.
If the wiki steps doesn't work for you, you should open a new issue for this specific issue.

Currently @ng-bootstrap can be added in tools/config/project.config.ts like this:
...
// Add packages
let additionalPackages: ExtendPackages[] = [{
  name: '@ng-bootstrap/ng-bootstrap',
  // Path to the package's bundle
  path<EMAIL_ADDRESS>}];

this.addPackagesBundles(additionalPackages);

Import it in src/client/web.module.ts like this:
...
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
...
@NgModule({
  imports: [
    ...
    NgbModule.forRoot()

If you're using a module (like in src/client/modules/shared/shared.module.ts for your bootstrap collapse navbar) do not forget to import it here as well!
...
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
...
const SHARED_MODULES: any[] = [
  ...
  NgbModule,

To add tests etc. see https://github.com/mgechev/angular-seed/wiki/Add-external-dependency
The installation guide from ng-bootstrap can be found here: https://ng-bootstrap.github.io/#/getting-started
I hope this helps!


[Question] Using FP8 quantization on a RedPajama-INCITE-Chat-3B-v1 model

❓ General Questions
I am trying to use the following command to attempt to use fp8 quantization on RedPajama-INCITE-Chat-3B-v1 (https://huggingface.co/togethercomputer/RedPajama-INCITE-7B-Chat).
mlc_llm convert_weight ./dist/models/RedPajama-INCITE-Chat-3B-v1/ \
    --quantization e4m3_e4m3_f16 \
    -o dist/RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC

However i get a key error on this command.
Traceback (most recent call last):
  File "/home/raghu/miniconda3/envs/mlc-chat-venv/bin/mlc_llm", line 33, in <module>
    sys.exit(load_entry_point('mlc-llm', 'console_scripts', 'mlc_llm')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/raghu/mlc-llm/python/mlc_llm/__main__.py", line 29, in main
    cli.main(sys.argv[2:])
  File "/home/raghu/mlc-llm/python/mlc_llm/cli/convert_weight.py", line 87, in main
    convert_weight(
  File "/home/raghu/mlc-llm/python/mlc_llm/interface/convert_weight.py", line 181, in convert_weight
    _convert_args(args)
  File "/home/raghu/mlc-llm/python/mlc_llm/interface/convert_weight.py", line 68, in _convert_args
    model, quantize_map = args.model.quantize[args.quantization.kind](
                          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'per-tensor-quant'

how do i fix this?
full error gist: https://gist.github.com/razetime/50b1d04a06c87b22409a98924b9f2bf7

hi @razetime fp8(e5m2, e4m3) requires per-tensor quantization support. Currently, there are two model types support it: llama and mixtral. Therefore, you may using Llama-2-7b-chat-hf for fp8 weight conversion.

was also considering this: https://huggingface.co/mistral-community/Mixtral-8x22B-v0.1/tree/main but i will try llama first.


Implement dynamic host fetching

Use Config file fetched from BE to extract urls to communicate with BE

Closed with PR: https://github.com/eu-digital-green-certificates/dgca-verifier-app-android/pull/50


Handle Google Play Store errors better

Just recently we did a release through the App Center distribute. Google's website said things could take 7 days so I waited but after 10 days it still did not appear. I decided to try and distribute it again from App Center but got the message "We are unable to publish the release as it is already active on a track."
Finally, by going to Distribute > Releases and click on the release I do not see any problems with the release. But, if I go to Distribute > Stores > Production then I finally see that there was an error with the deploy. It seems my only recourse is to delete the release and start over.
My request is two fold. First, if an error happens with the distribution to a store it needs to have a LOT more visibility. There was no indication of an issue on Google Play Console and I had to really dig into App Center to find out an issue.
Second, can you provide a way to either cancel or re-submit a release to the store instead of leaving it in a half state that I cannot recover from.

The error I got from Play Store was [a1cc8e78-6599-4e35-ab9f-412c78c2cd24] : Edit could not be committed due to an error. Release is not compliant with the Play 64-bit requirement.


[WFRP4e System] Attacking a larger creature

The +10 modifier when attacking a larger creature is correctly applied in melee attacks, but not in ranged attacks.From: Txus#5021wfrp4e: 4.0.2wfrp4e-core: 2.0.1

This is intentional


request to remove

i request to delete my server in here:
https://github.com/LunarClient/ServerMappings/pull/1824
and you close without response. why?

i request to delete my server in here: #1824 and you close without response. why?

Hey @games4681 we don't remove servers from the repo - rather you can make a PR adding the server to the inactive.json file if you would like it to not be referenced.


honour routes timeout if max stream duration is set with out stream duration

Commit Message: honour routes timeout if maxstream duration is set with out specifying max stream duration inside it.
Additional Description:
Risk Level: Low
Testing: Added
Docs Changes: N/A
Release Notes: N/A (There is already a bug fix mentioned for MaxStreamDuration in current.rst)
Platform Specific Features: N/A
Fixes https://github.com/envoyproxy/envoy/issues/15530

@mattklein123 @markdroth PTAL

@adamsjob FYI

Assigning over to @alyssawilk who I think reviewed the other timeout PRs.

@alyssawilk moved to refreshDurationTimeout. PTAL.

Alyssa knows this code a lot better than I do, so I'll let her review.

@alyssawilk can you PTAL when you get chance?

@alyssawilk Sorry for the delay. Fixed. PTAL. I have added a regression test for this and left a TODO to merge to DurationTimeout test later as I am having some issues with mock timer (even with existing tests)

@alyssawilk Can you PTAL when you get chance?

FYI this broke web sockets for us (by forcing them to terminate earlier), wondering if we can contribute more integration tests here to catch these sort of regressions.