StaticFileServer does not serve files to browser

I created a small webserver:
import Kitura
import KituraNet
import KituraSys

let router = Router()
let staticFileServer = StaticFileServer()

router.get("/*", middleware: staticFileServer);

let server = HTTPServer.listen(port: 80, delegate: router)
Server.run()

When I execute wget url.com/css/style.css the file gets loaded as expected.
When I call the website in the chrome the index.html is loaded but the css (<link rel="stylesheet" href="css/style.css">) fails to load.
The error I get is Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://url.com/css/style.css/".
I think the browser appends an / to the url. Which lets the StaticFileServer try to serve a directory.

Hi devgg,
Thanks for raising this issue, someone will take a look at it shortly.

The problem  here is the , if you change to
router.get("/", middleware: staticFileServer)
the code should work.
It happens because we remove the matched path from the requested path to get the file path, and for / the whole requested path matches.
We don't know the best way to solve this yet, but we will have a solution shortly.

Reviewed the code. Looks good.


[now alias] Improve alias support

This enables https://github.com/zeit/now-cli/pull/2747 from @nkzawa again.
We had to revert the previous one, because we didn't want to include it in the next stable release.
This further makes sure that we don't display https:// in front of a wildcard alias, since https://*.mydomain.tld is not a valid URL.

Codecov Report

Merging #2787 into canary will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           canary    #2787      +/-   ##
==========================================
- Coverage   13.91%   13.88%   -0.03%
==========================================
  Files         262      264       +2
  Lines       10603    10620      +17
  Branches     1365     1369       +4
==========================================
  Hits         1475     1475
- Misses       8979     8996      +17
  Partials      149      149

Impacted Files
Coverage Δ

src/util/alias/extract-domain.ts
0% <0%> (ø)

src/commands/deploy/latest.js
0% <0%> (ø)
:arrow_up:

src/util/certs/create-cert-for-alias.ts
0% <0%> (ø)
:arrow_up:

src/util/certs/get-wildcard-cns-for-alias.ts
0% <0%> (ø)

src/util/alias/is-wildcard-alias.ts
0% <0%> (ø)

src/commands/alias/set.ts
0% <0%> (ø)
:arrow_up:

src/util/domains/setup-domain.ts
0% <0%> (ø)
:arrow_up:

... and 2 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 e4a1813...83e611f. Read the comment docs.


checkobjmem checks against the memory size of the entire RasterStack when I only want to read one band

julia> sstr = read(rs.SST)
ERROR: required memory 235358208 is greater than system memory 38846464.
Use `lazy=true` if you are loading dataset, and only call `read` on a subset after `view`.
If you beleive this is not correct, pass the keyword `checkmem=false` or set `Rasters.checkmem!(false)`
and try again. These options may crash your system if the file is actually larger than memory.

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] _no_memory_error(f::Rasters.var"#217#218", bytes::Int64)
   @ Rasters ~/.julia/dev/Rasters/src/utils.jl:352
 [3] _checkmem
   @ ~/.julia/dev/Rasters/src/utils.jl:340 [inlined]
 [4] _checkobjmem
   @ ~/.julia/dev/Rasters/src/utils.jl:338 [inlined]
 [5] _checkobjmem
   @ ~/.julia/dev/Rasters/src/utils.jl:336 [inlined]
 [6] #read#276
   @ ~/.julia/dev/Rasters/src/read.jl:15 [inlined]
 [7] read(x::Raster{…})
   @ Rasters ~/.julia/dev/Rasters/src/read.jl:12
 [8] top-level scope
   @ REPL[138]:1
Some type information was truncated. Use `show(err)` to see complete types.

but rs.SST is just a 5000x5000 float64 grid.

Hmm maybe there is mistake in dispatch.

Do you have an MWE? I can't reproduce this

Ah unfortunately my only example involved quite a few hacks


Python 3.9.1 release reverts pex to 2.0.3

Should
requires-python = ">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"

be
requires-python = ">=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"

or is 3.9.1 (patch levels) actually to be blocked?

Your suggestion is correct, we should have been using <3.10.

Thanks for the report - there is a bit of churn dealing with the 2.1.23 release and https://github.com/pypa/pip/issues/9283 but I'll get this fix in the next release here today.

I'm encountering a similar issue with Python 3.8 but I'm seeing you've been building for 3.8 successfully. Is 3.8 also unsupported?

I'm encountering a similar issue with Python 3.8 but I'm seeing you've been building for 3.8 successfully. Is 3.8 also unsupported?

I was using 3.8 without issue.  I was then using 3.9 without issue, but a few days ago, deadsnakes repo (debian/ubuntu) packaged 3.9.1 (which I got from updates), and I just happened to be building a new virtual environment, and the issue came up.

I'll move to a separate issue

@mjuarez 3.8 has been supported for quite some time. Definitely file a new issue if you are having problems installing or running modern Pex in a Python 3.8 environment.


Enable protocol management section

Enabled the protocol management section, with a link in the top navigation bar.
Since the protocol section will become more and more rich with data related to each protocol, which will probably become the place where people will go to to get information related to covered protocols, I considered that it should be a public section in our application, so a proper link in the navigation bar was required and added.
Even though the PR has multiple changed files, it should be easy to follow commit by commit.
Changes
Covered protocols fetched from indexer, instead of hardcoded
An API call to GET /protocols will fetch the covered protocols, as well as past covered protocols.
In order to create a way for the protocol's metadata to be easily updated, and also have traceability, I decided to store the metadata in the frontend, so each change would require a separate PR and a regeneration of the JS files (explained below).
Generation of protocol metadata
All protocol metadata will be found in ./src/data/protocols/ directory. These get merged with the result of the GET /protocols API call, so they will all be available using the useCoveredProtocols() hook.
In order to make the metadata easy to update, it is located in ./meta/protocols.csv. The script found at ./scripts/GenerateProtocolMeta.ts parses the .csv file and creates the correct ./src/data/protocols/ directory structure. A npm script is available at npm run generate-metas that will trigger the regeneration of the metadata, in case an update is needed.
AllowanceGate component

Before, the component handled the render of the approval button, but after the approval it would render its children.
Now, the component handles the entire render process, including the action that is supposed to be executed after the approval .
New props

actionName (string) The name of the action(e.g Stake/Execute/Add balance);
action (fn) The action callback
onSuccess (fn) Callback after the action is successful (can be used to update the UI after a successful tx)

Enabled the protocol management section, with a link in the top navigation bar.

Since the protocol section will become more and more rich with data related to each protocol, which will probably become the place where people will go to to get information related to covered protocols, I considered that it should be a public section in our application, so a proper link in the navigation bar was required and added.

The navigation bar doesn't show up on my screen, is this still a valid statement?

Enabled the protocol management section, with a link in the top navigation bar.

Since the protocol section will become more and more rich with data related to each protocol, which will probably become the place where people will go to to get information related to covered protocols, I considered that it should be a public section in our application, so a proper link in the navigation bar was required and added.

The navigation bar doesn't show up on my screen, is this still a valid statement?

Nope, we decided against it, so the link has been hidden. Will update my original post.


feat: Implement navigation event and cancellation, closes #456

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Docs
[ ] New Binding issue #___
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change?

[ ] Yes, and the changes were approved in issue #___
[x] No

Checklist

[x] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
[ ] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
[ ] I have added a convincing reason for adding this feature, if necessary

Other information

[ ] There are likely code style issues with this
[ ] This is only fully implemented for Windows

Notable: the design approach taken is to:

Make WebContexts generic over user event types so that they can (potentially) store an EventLoopProxy

This is non-breaking, as a type alias of WebContextGeneric<()> is provided, named WebContext which effectively hides any generic functionality from consumers that do not need it.

WebContextBuilders are necessarily also made generic over the user event type, however this should have minimal impact
The EventLoopProxy is utilised to send a user defined event whenever a navigation occurs.
An "interface" is effectively defined by WebContextGeneric::with_navigation_event which requires as argument a closure that can construct the user event that is emitted whenever a navigation occurs, thus ensuring that any user defined events also include an event for navigation
Navigation events cannot be cancelled in "real time", ie: within the event loop. A lambda must instead be provided that is executed within the navigation event handler itself - what difference this makes is unclear, however it does not appear to be a major drawback from what I have seen
A basic example is included - it demonstrates some notable drawbacks, including: not preventing javascript that effectively rewrites a page (most noticeable when navigating to Twitter and then opening any other user's feeds) and it also does not prevent popups (a future PR or enhancement to this one could prevent this, on Windows at least)

I could move this code into the webview fairly easily I think, including using the same type aliasing trick to reduce breakage. The reason I picked the WebContext is because it was already being used for things like the webview data directory override, which has a similar execution.
I do think that the EventLoopProxy needs to be explicitly passed in - otherwise the feature is somewhat pointless as a user could write the callback and no event will be emitted. An alternative approach could be to eschew emitting events entirely, and simply take a callback that will be executed when the platform specific event occurs.

I've done some thinking about your suggestions and reworked the feature's implementation.
There WebContext is no longer generic over users events. As you suggested, users should now just move an event proxy into the callback closure.
WebView and WebViewBuilder can both now add the navigation callback.
There is only one callback, which is where users can define behaviour to execute when the event happens, and also whether to cancel the navigation or not - there didn't seem to much point in having the two closures as separate.
I'm still using WebContext to hold the callback, as holding it as a field on the WebView would still mean adding an additional parameter to all platform webview implementations, when webcontexts are already available to the WebView and are passed into all platform implementations.

I've removed all modifications to WebContext and instead stored the navigation handler in WebViewAttributes

https://github.com/tauri-apps/wry/pull/519/commits/0500e74cce6b324f1b3f691a83778ad6284565ed
Implements WebkitGtk navigation callback handling

Here's the one for macos but I suppose it won't be easy to implement if you are not familiar with c/objc ffi.
https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview?language=objc
I could do this after I'm done with ios/android support.

I don't really have any experience with objc ffi so if you could lend a hand after the Android port effort that would be great. I'll still try and give it a shot in my own time but I don't expect much

Just add the macos and it's working!
Now there are two remaining changes I would like to request:
One is switch the condition on returning bool. I think it's more intuitive for true to allow the url and false for not.
The other is make the callback be Box instead of Rc. Is there a place we still need multiple ownership?
I just need the agreement and I'll help pushing the commits. I know some might be busy on work days.

One is switch the condition on returning bool. I think it's more intuitive for true to allow the url and false for not.

Seems okay but I could see it the other way around too so we gonna have to document this. and If we want more clarity, we can use an enum
enum Navigation {
  Allow,
  Deny
}

The other is make the callback be Box instead of Rc. Is there a place we still need multiple ownership?

Box is fine.

I'm very happy with the result. Thank you @atlanticaccent for the help!


Job applicant and group applicant html is very wet

aleksanb commented on 2 Dec 2014: "The HTML generated by jobs/show and groups/applications is almost identical, resulting in consistency issues. They should be rewritten to use the same partial underneath."

groups/applications is no longer a single view.


setting style via variable

A case i found :
-style = get_flash(@conn, :email_error) && "" || "display: none"
.alert-box.warning.js-news-letter-error.text-center style=style data-alert="data-alert"
  .js-error-message= get_flash(@conn, :email_error)

renders to :

where the problems is style="display:" none="" which should be style="display: none"

@doomspork Should I fix it now, or wait until #16 is merged?

@Rakoth you can fix.  I'll release 0.5.0 with your fix and other features.  Once #16 is done I'll ship 0.6.0.


Partial support for observables subscribe method

Description
Looking at the proposal for observables the subscribe method either accepts an object with next/error/complete properties or 3 callbacks.
However, looking at XState source it seems that only the latter form is accepted.
https://github.com/davidkpiano/xstate/blob/7f5f7adc8c2a1ccb369cb795bdc4a962a9ea175b/packages/core/src/interpreter.ts#L1150
Even the subscribe of interpreted machine conforms to a standard.
https://github.com/davidkpiano/xstate/blob/7f5f7adc8c2a1ccb369cb795bdc4a962a9ea175b/packages/core/src/interpreter.ts#L329
Expected Result
The XState should support full observables according to spec.
Actual Result
I am using wonka library which is underlying stream lib for use in urql (GraphQL client). Unfortunately, it suffers the same problem and implements only the other half of the spec.
Reproduction
https://stackblitz.com/edit/react-ts-nbzjan?file=index.tsx
I had to use Stackblitz here because CodeSandbox have some weird issue with wonka

The current workaround is to invoke a callback instead.
https://stackblitz.com/edit/react-ts-9w4fpr?file=index.tsx

Can you make a PR for this? Would love to support the other subscribe signature.

I think I will wait for V5 with it. It's not immediate pain since there is a viable workaround.

XState v4 currently supports both observer objects and functions.


feat(elements): Add support for redirect_url URL parameter

Description
This PR adds support for ?redirect_url in Elements to both sign in and sign up.
Testing Instructions

[ ] While running theme builder, navigate to http://localhost:3000/sign-in?redirect_url=/404
[ ] Sign in
[ ] Confirm that you're navigated to http://localhost:3000/404?redirect_url=%2F404
[ ] Repeat steps for Sign Up

Notes
It really feels like this behavior should be delegated to clerk-js, possibly in the form of updating buildAfterSignInUrl to take in parameters such as redirect_url. Currently buildAfterSignInUrl only captures parameters when Clerk is initialized, not at the time of authentication.
Fixes SDKI-295
Checklist

[x] npm test runs as expected.
[x] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[ ] 🐛 Bug fix
[x] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

This doesn't work with absolute URLs, only relative.


Promoting Node.js QueueTrigger template

This should be in Core + Data Processing. I just tested it in PROD - it works great!

:shipit:

+1 - @soninaren merge when ready

I'll just push it

:+1:


Increase code coverage, including for tag generator

Overview
We need to increase code coverage for tag creator
Action Items
@kevinashworth will work on refactoring the code to meet code climate conditions.
Resources/Instructions

Progress: I have a version almost ready to go. My version may be a WIP but it is good enough to commit.
Blocks: Approval of PR #235 (or some other workaround if not approved).
Availability: Excellent.
ETA: 1-2 days after blocks.

Progress: I have a version almost ready to go. My version may be a WIP but it is good enough to commit.
Blocks: Approval of PR #235 (or some other workaround if not approved).
Availability: Excellent.
ETA: 1-2 days after blocks.

@kevinashworth Is this issue about the tag creator (the feature that creates the tags in the tag generator wizard?  Or is this about the whole tag generator.  If it is about the whole thing, please rename the issue to be

Increase code coverage for tag generator

instead of

Increase code coverage for tag creator

@kevinashworth Is this issue about the tag creator (the feature that creates the tags in the tag generator wizard?  Or is this about the whole tag generator.  If it is about the whole thing, please rename the issue to be

Increase code coverage for tag generator

instead of

Increase code coverage for tag creator

@ExperimentsInHonesty My PR improves code coverage throughout. It's meant to be a project-wide step forward. The tests are not genius-level to be frank, but rather simple and potentially brittle, but they get code coverage up from 50% to 80%, including in the Tag Generator, and then we can go from there.

@ExperimentsInHonesty My PR improves code coverage throughout. It's meant to be a project-wide step forward. The tests are not genius-level to be frank, but rather simple and potentially brittle, but they get code coverage up from 50% to 80%, including in the Tag Generator, and then we can go from there.

Progress:
Blockers: Approval of PR #235 (or some other workaround if not approved)
Availability: Excellent
ETA:

Progress:
Blockers: Approval of PR #235 (or some other workaround if not approved)
Availability: Excellent
ETA:

PR #235 was merged a few days ago, but did not auto-close this issue. Closing it now.


Binary file not opening

Hi I installed kinect studio and dotnet-runtime-3.1.16-win-x64 but still when I am trying to open the binary file I get this error
"must install .net core. Also where should I put MATWriter or is it necessary.

Hi sorry I installed the wrong version. Installing 3.1.0 solved the problem.


Add MiqUserRole to RBAC

fixes https://github.com/ManageIQ/manageiq-ui-classic/issues/135
For now just fix the mentioned issue.
Hide super_administator role for Users and Groups with tenant_admininistrator role
@miq-bot add_label rbac, bug
cc @martinpovolny
@miq-bot assign @gtanzillo

@gtanzillo : looks good to me.
@lpichler : thx!

nice fix libor

raise condition, I think bz for this already filed in https://bugzilla.redhat.com/show_bug.cgi?id=1418662

thanks @isimluk for BZ, @simaishi - so bugzilla is needed only for EUWE

yes, there's a 5.6 but linked above
there's also a 5.7: https://bugzilla.redhat.com/show_bug.cgi?id=1418297

ping @simaishi

Euwe backport details:
$ git log -1
commit 3c42361aa393418aef5189fe39176cca09e7be55
Author: Martin Povolny<EMAIL_ADDRESS>Date:   Wed Feb 1 11:01:28 2017 +0100

    Merge pull request #13689 from lpichler/add_miq_user_role_to_rbac

    Add MiqUserRole to RBAC
    (cherry picked from commit f9d354db60d84f2ab3bd67a79565bb3c0a62ed19)

    https://bugzilla.redhat.com/show_bug.cgi?id=1419686


Merged instrument datasets result in NaNs for non-identical time series.

A data request from multiple instruments with non-identical time series results in some variables becoming all NaNs.
Example:
nooi = OOI()
nooi.search(region="coastal endurance",instrument="ctd,nitrate",node="shallow profiler")
...
nooi.to_xarray()
nooi.to_dataframe()
...
nooi[1]["salinity_corrected_nitrate"][:5]
>>>[NaN,NaN,NaN,NaN,NaN]

I tried this out and I'm getting actual values. See screenshot below. Thanks.

Works properly as described above. Nitrate nbk can move forward now, yay!


Display which car is currently charging + separate counters for each car?

Since I charge several cars with RFID, I would like to know via entity which car is currently charging so that I can then build a separate meter for each car. Is that somehow possible?

A separate counter for each car is certainly something that you would have to implement in your HA automations/logic.
To get the ID of the connected car you could maybe set a charging manager variable from your charging rules that gets activated with the RFID. Then you can use this ID in a virtual meter (type expression) and read it with HA.
It's a little complicated but it should be possible.


ci: add github actions

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Demos cannot run on Windows 10

When trying to run on Windows 10 (cmd/conemu), I met the following error:
> go run unicode.go
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/gdamore/tcell/terminfo.LookupTerminfo(0x0, 0x0, 0x0, 0x0, 0xc8)
        C:/Users/[username]/go/src/github.com/gdamore/tcell/terminfo/terminfo.go:766 +0x1292
github.com/gdamore/tcell.NewTerminfoScreen(0x1c06a8, 0x24, 0xc042067df0, 0x4101c1)
        C:/Users/[username]/go/src/github.com/gdamore/tcell/tscreen.go:40 +0x67
github.com/gdamore/tcell.NewScreen(0xc04207c601, 0x1240000000030, 0x110, 0x110)
        C:/Users/[username]/go/src/github.com/gdamore/tcell/screen.go:203 +0x2d
main.main()
        C:/Users/[username]/go/src/github.com/gdamore/tcell/_demos/unicode.go:73 +0x3e
exit status 2

Seems stuck at the line when creating the screen object
s, e := tcell.NewScreen()

However WSL is fine (Ubuntu Bash/Conemu)
Grabbing using latest version of the library. Am I missing something?

Sounds like a bug. Try making sure you don’t have a TERM environment
variable set.
On Thu, Dec 14, 2017 at 9:26 PM mkishere<EMAIL_ADDRESS>wrote:

When trying to run on Windows 10 (cmd/conemu), I met the following error:

go run unicode.go
panic: runtime error: index out of range

goroutine 1 [running]:github.com/gdamore/tcell/terminfo.LookupTerminfo(0x0, 0x0, 0x0, 0x0, 0xc8)
C:/Users/[username]/go/src/github.com/gdamore/tcell/terminfo/terminfo.go:766 +0x1292github.com/gdamore/tcell.NewTerminfoScreen(0x1c06a8, 0x24, 0xc042067df0, 0x4101c1)
C:/Users/[username]/go/src/github.com/gdamore/tcell/tscreen.go:40 +0x67github.com/gdamore/tcell.NewScreen(0xc04207c601, 0x1240000000030, 0x110, 0x110)
C:/Users/[username]/go/src/github.com/gdamore/tcell/screen.go:203 +0x2d
main.main()
C:/Users/[username]/go/src/github.com/gdamore/tcell/_demos/unicode.go:73 +0x3e
exit status 2
However WSL is fine (Ubuntu Bash/Conemu)
Grabbing using latest version of the library. Am I missing something?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gdamore/tcell/issues/172, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPDfRG-4QZAPnPOMtCbQMzjA-eeIJPTks5tAgLqgaJpZM4RDB8W
.

Confirmed, TERM was not set in Windows
> echo $TERM
$TERM

In windows its %TERM%
On Thu, Dec 14, 2017 at 9:48 PM mkishere<EMAIL_ADDRESS>wrote:

Confirmed, TERM was not set in Windows

echo $TERM
$TERM

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/gdamore/tcell/issues/172#issuecomment-351919729, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABPDfYqspNyZMGfnHM9q7RqfB-7gn-ecks5tAgg3gaJpZM4RDB8W
.

  Windows platforms should default to using the Windows console stuff instead of terminfo anyway.   (Barring WSL stuff, the console in Windows doesn't really work with the terminfo layer as I need a working termios to set the terminal to raw mode.  That's not usually what you want in Windows anyway.)

I think this is a dup of #154   -- kind of.
I'll this on Windows soon and provide a fix.


Pagination & error on empty data set

I have an app where I display the pagination at an empty state. But for some reason, I get this error:
Error: [$parse:ueoe] Unexpected end of expression: selectPage(page
http://errors.angularjs.org/1.4.1/$parse/ueoe?p0=selectPage(page
    at REGEX_STRING_REGEXP (http://localhost:9000/bower_components/angular/angular.js:68:12)
    at Object.AST.consume (http://localhost:9000/bower_components/angular/angular.js:12872:13)
    at Object.AST.primary (http://localhost:9000/bower_components/angular/angular.js:12775:14)
    at Object.AST.unary (http://localhost:9000/bower_components/angular/angular.js:12748:19)
    at Object.AST.multiplicative (http://localhost:9000/bower_components/angular/angular.js:12735:21)
    at Object.AST.additive (http://localhost:9000/bower_components/angular/angular.js:12726:21)
    at Object.AST.relational (http://localhost:9000/bower_components/angular/angular.js:12717:21)
    at Object.AST.equality (http://localhost:9000/bower_components/angular/angular.js:12708:21)
    at Object.AST.logicalAND (http://localhost:9000/bower_components/angular/angular.js:12700:21)
    at Object.AST.logicalOR (http://localhost:9000/bower_components/angular/angular.js:12692:21) <a href="" ng-click="selectPage(page + 1, $event)" class="ng-binding">

Any ideas why this could be?

Any ideas why this could be?

Nope. But you can help us to help you be providing clear reproduce scenario, see:
https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md#you-think-youve-found-a-bug

Sorry for the delay. I'll try to reproduce in plunkr tomorrow.

Closing as we don't have reproduce scenario so we can't act upon this one.


Add a script to create a self-contained distribution tarball.

This should do it. The script is invoked as ./make-dist.sh in the toplevel source directory, and leaves the source tarball there as something like pd-faustgen-version.tar.gz. The script will grab the version number from the line starting with #define FAUSTGEN_VERSION_STR in src/faustgen_tilde.c, so it will work without a tag, but you have to make sure to keep that version number up-to-date. Also, you'll have to edit line 20 of the script if the format of that line changes in some way (e.g., if the macro name changes). Detailed instructions can also be found at the beginning of the script.

Note that you'll still need to add something to the Linux CI if you want to automatize tarball creation in some way, so that you can upload the resulting tarball when crafting a new release.
Caveat: I'm sure you know this, but never ever just recreate a distribution tarball and overwrite an existing, already released tarball with it. This is a package maintainer's worst nightmare. ;-) Once a release is done and dusted and the tarball uploaded, it's set in stone. Unless the tarball got corrupted in some way, that is, so that the tarball is unusable. Everything else requires a new release, even if you only have to change a single byte in the distribution tarball. ;-)

Great! Thank you! I have a few questions because I'm not sure of the workflow...
So each time, I push a new tag, it should create a new distribution tarball and upload it on the releases page. By default, the releases are marked as "draft" so I'm the only one that can see them before I publish them manually. This is extra security and it allows me to create a beta version (that I can remove thereafter) that are never public. But the tag is public, is that a problem to remove a tag if there is no release associated?

Sorry, it seems that I pushed on your branch... I don't know how this is possible??

Well, I don't know what you did, but you still need to merge the PR. You should see a "Merge" button somewhere on this page.

But the tag is public, is that a problem to remove a tag if there is no release associated?

No, you can overwrite or remove non-release tags to your heart's content. But, as I said, you should never mess with releases to keep the package maintainers happy.
In any case, my script won't be affected by changing tags, since it only looks for the version number in the src/faustgen_tilde.c file.

It seems that you accidentally pushed stuff to https://github.com/CICM/pd-faustgen/commits/dist-script-ci. That branch looks badly garbled now, so you probably want to get rid of it and/or redo it. In any case, you'll probably want to merge this PR first, as the stuff you did on that branch is based on it.

Also note that this PR goes into your dev/v0.1.2 branch since it is based on it. You then still need to merge that into your master branch.

@pierreguillot You also want to update Faust once more to the 2.27.2 release (https://github.com/grame-cncm/faust/releases/tag/2.27.2, https://github.com/grame-cncm/faust/commit/5c45bff8f7e83969426e7036b186b7715c3ecda0). Stephane messed up 2.27.1 by uploading it twice, exactly the thing I warned you should never do. ;-)

Note that this isn't strictly necessary, as the submodule is essentially just a hash, but I'd recommend it anyway, in order to avoid any potential confusion. The official faust package in Arch also uses 2.27.2 now. But if you already done the release, then never mind.


Question: netstandard2.0 release

Hey!
Thanks for creating this library. Would it be possible to lower the requirements of this library to netstandard2.0? That would make it possible to be included in C# source generators. (this lib comes so natural for source gen like libraries) I downloaded the code, downgraded to netstandard2.0 and it built fine so i can't think of anything that would prevent us from doing it.
Thanks!

I'm really sorry I didn't see your comment until now.. we can 100% do that (if you still need it)

I've (hopefully) resolved this and made a release that's both .NET STANDARD 2.0 and 2.1
It had been a few years since I updated the project so hopefully I got it right, please let me know otherwise.
The Nuget package is taking a while to get indexed so I'm still waiting to see if its fine or not... again, please let me know.
I went the route of supporting multiple .NET STANDARDS.. 2.0 and 2.1.. hopefully that worked?

Hi, Thanks for answering! :) Unfortunately I went with a totally different route with my library so my request is no longer applicable.


ARROW-8413: [C++][Parquet] Refactor Generating validity bitmap for values column

This change does the following:

Vectorizes computation for validity bitmaps with no repeated parents for all little-endian architectures
Vectorizes computation for validity bitmaps with repeated parents for AVX2 + architectures (really it requires BMI2)
Exposes some building blocks to do vectorized computation for all validity bitmaps in for parquet level data (more need to be handled for generating appropriate bitmaps and offset data for lists).  These will be added level_conversions.h in a future PR.
Replaces loops over bitmaps with SetBitsTo
Leaves a fallback for non BMI2/little-endian capable machines.

With AVX2 enabled this seems to improve benchmarks by 20% for nullable columns (BM_Read..) on my box. I didn't see any impacts in other benchmarkmarks.
See checklist for what is remaining.  If possible i'd like to get early feedback on naming and my approach to checking for BMI2.
Still needed:

[x] Still adding more focused unit tests for what I've added.
[x] Move the changes to Bitmap::ToString to there own PR.

CC @wesm @pitrou I think this is ready for review now.

@pitrou I think I addressed your comments.  One of them that went stale was the complexity for "AppendWord", I tried to remove parts that did not seem to affect performance on benchmarks for parquet column reading but I spent some time trying to maximize word level parallelism for the unaligned case, because I think at least for repeated fields I expect this case to be fairly common.
As a point of comparison using the AppendWord implementation I put in place for BigEndian shows much smaller improvements.  Really this should use CopyBitmap but I didn't want to start moving a move code then I needed to in bit_util.h for this PR. I opened
a JIRA (ARROW-8595) to track some improvements in that regard.
If more comments are needed or you think there is a cleaner way of writing the code, I'm happy for input.
@wesm do you want to look at the parquet specific logic/comments to make sure I captured them correctly?

I'll try to have a closer look tomorrow or Tuesday

@wesm wanted to make sure this is still on your radar

Yep sorry thanks for the nudge, will look today

I think this is fine to merge once most of the typos in the comments are fixed. A rebase will probably fix the Rust lint error

One problem with introducing more SIMD code is that we won't yet have a runtime dispatching strategy. We will need to go through all of our SIMD accelerations in this library and refactor things so that we can build a "fat" binary that includes both AVX2/BMI2-accelerated versions and the non-SIMD versions. That way we can reap the benefits of this work in portable packages like Python wheels / conda packages.

I did a little research and I think I might lean towards macros around FMV for clang/GCC that could enable fallback to a slow version for MSVC (or if we are ambitious maybe generating IF/DEFs accordingly.  I can't seem to find the JIRA that covered this.

What I've seen other projects do (have to dig for some examples) is to have files like
functionality_nosimd.cc
functionality_sse42.cc
functionality_avx2.cc

The appropriate compiler flags are set on the respective compilation unit.
Then query the CPU at runtime to determine its features and choose which variant to invoke. @cyb70289 expressed an interest in this recently, I think

Take a look at how this is currently being handled in NumPy

https://numpy.org/neps/nep-0038-SIMD-optimizations.html
https://github.com/numpy/numpy/pull/13516

I assume a lot of thought was put into this, and since it was done in 2019 it should provide a good guideline for what we should do

The 32-bit R failure seems like it could be real

@nealrichardson i'm not sure what the error is saying?  also 32-bit R didn't realize that is still a thing :)

Take a look at how this is currently being handled in NumPy

https://numpy.org/neps/nep-0038-SIMD-optimizations.html
numpy/numpy#13516

I assume a lot of thought was put into this, and since it was done in 2019 it should provide a good guideline for what we should do

This is very useful resource to learn, thanks @wesm. We definitely need a better simd code infrastructure if more simd optimization is to be added.

@emkornfield yeah everything is run twice, 32-bit and 64-bit, because Windows.
Usually when there's an failure with no clear error, it means that the process segfaulted. Based on the code that's running (https://github.com/apache/arrow/blob/master/r/R/parquet.R#L442-L449) and the output we do see before the crash, my guess is that ReadTable is crashing. What's odd is that that method is called, even with the same test file, several times in r/tests/testthat/test-parquet.R, and those don't crash.
One difference I notice is in how the file connection is opened; not sure how your patch would make that suddenly matter though. But you could try applying this diff and see if the failure goes away:
diff --git a/r/R/parquet.R b/r/R/parquet.R
index 8d363e4cb..1415a06da 100644
--- a/r/R/parquet.R
+++ b/r/R/parquet.R
@@ -439,7 +439,7 @@ ParquetFileWriter$create <- function(
 #' @export
 #' @examples
 #' \donttest{
-#' f <- system.file("v0.7.1.parquet", package="arrow")
+#' f <- ReadableFile$create(system.file("v0.7.1.parquet", package="arrow"))
 #' pq <- ParquetFileReader$create(f)
 #' pq$GetSchema()
 #' if (codec_is_available("snappy")) {
@@ -447,6 +447,7 @@ ParquetFileWriter$create <- function(
 #'   tab <- pq$ReadTable(starts_with("c"))
 #'   tab$schema
 #' }
+#' f$close()
 #' }
 #' @include arrow-package.R
 ParquetFileReader <- R6Class("ParquetFileReader",
diff --git a/r/man/ParquetFileReader.Rd b/r/man/ParquetFileReader.Rd
index 1e9f78f4d..3e052ae20 100644
--- a/r/man/ParquetFileReader.Rd
+++ b/r/man/ParquetFileReader.Rd
@@ -33,7 +33,7 @@ with columns filtered by a character vector of column names or a

 \examples{
 \donttest{
-f <- system.file("v0.7.1.parquet", package="arrow")
+f <- ReadableFile$create(system.file("v0.7.1.parquet", package="arrow"))
 pq <- ParquetFileReader$create(f)
 pq$GetSchema()
 if (codec_is_available("snappy")) {
@@ -41,5 +41,6 @@ if (codec_is_available("snappy")) {
   tab <- pq$ReadTable(starts_with("c"))
   tab$schema
 }
+f$close()
 }
 }

I might lean towards macros around FMV for clang/GCC that could enable fallback to a slow version for MSVC

FTR, it would seem unfortunate to do the work of SIMD-ifying code and then have it not be availabe on Windows (e.g. Python and R have a lot of Windows users). I'm not sure how much additional work is needed to get things to work on MSVC but it would be be good to have an OS-independent approach

For what it's worth, R on Windows uses mingw, not msvc

The separate .cc files might work as, we should probably cleanup macro naming so we can distinguish between min and max SSE instruction se to use (I imagine some people won't want code bloat).

@nealrichardson looks like a different error now?  I think I probably want to use the scalar version for 32-bit builds.  Is there an example in the code that provide the right compiler checks to do this?

@emkornfield that looks like the same R Windows 32-bit failure to me.
I'm not sure I understand your other question. Are you saying you want to use the old (status quo) code on 32-bit? That sounds like something you'd detect in cmake to me. If the C++ library needs to be built with different flags, the R Windows build script is in ci/scripts/PKGBUILD.

According to https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html the define is __MINGW32__. I checked an -m32 build on Linux and it runs fine

@emkornfield take a look at the small signature change I added in 0af944d.

I'm curious, what fixed the crash we observed on 32-bit Windows R?

@nealrichardson seems like the R CI integration doesn't run anymore.

Well, that's one way to fix it.

Looks like they stopped running in https://github.com/apache/arrow/commit/4116516f22b680b70ab32ea28c029cc47e8d8988#diff-2a0471f8b081b56e67bf646767021982

IMO we should revert this change: https://github.com/apache/arrow/commit/4116516f22b680b70ab32ea28c029cc47e8d8988#diff-2a0471f8b081b56e67bf646767021982
It seems only to obfuscate, and it seems it might not work.

@pitrou did you want to take another look?
@nealrichardson should I hold off until we an revert the change to see if the test still fails?

I see a slight slowdown here:

git master:

-------------------------------------------------------------------------------------------
Benchmark                                 Time             CPU   Iterations UserCounters...

-------------------------------------------------------------------------------------------
BM_ReadColumn<false,Int32Type>      3819328 ns      3816352 ns          740 bytes_per_second=10.2356G/s
BM_ReadColumn<true,Int32Type>      30445380 ns     30429672 ns           89 bytes_per_second=1.92555G/s
BM_ReadColumn<false,Int64Type>      7134237 ns      7128926 ns          397 bytes_per_second=10.9589G/s
BM_ReadColumn<true,Int64Type>      35230806 ns     35215688 ns           81 bytes_per_second=2.77309G/s
BM_ReadColumn<false,DoubleType>     7007725 ns      7001947 ns          394 bytes_per_second=11.1576G/s
BM_ReadColumn<true,DoubleType>     33062963 ns     33046208 ns           83 bytes_per_second=2.95514G/s
BM_ReadColumn<false,BooleanType>   12116716 ns     12113217 ns          232 bytes_per_second=825.545M/s
BM_ReadColumn<true,BooleanType>    33176910 ns     33163314 ns           84 bytes_per_second=904.614M/s
BM_ReadIndividualRowGroups         18253632 ns     18243651 ns          160 bytes_per_second=5.35289G/s
BM_ReadMultipleRowGroups           18032877 ns     18022962 ns          157 bytes_per_second=5.41843G/s

Rebased.

I don't understand the Windows GLib build failure. @kou

@pitrou what flags/CPU are you running this under?  I'll recheck on my box later.

It's a AMD Ryzen 9 3900X with gcc 7.5, with -DARROW_SIMD_LEVEL=AVX2.

(It seems that Windows GLib build failure has gone without any change.)

OK it seems like clang and GCC perform very differently.
Clang-8 new code vs master:

GCC 7.5 (inline with the results from @pitrou):

Interesting it looks like GCC 7.5 does better on the write path (GCC vs Clang on master):

@pitrou Doing some investigation it appears GCC 7.5 fails to auto-vectorize the comparison of levels.  GCC 8.3 does autovectorize.  Are we stuck with GCC 7.5 for releasing?

I have no idea :-) I simply use gcc 7.5 locally, but I guess we're not stuck with it. And gcc 10 was released AFAIK, so it's starting to get old as well.

Ok, here is with clang 9.0.

Before:

BM_ReadColumn<false,Int32Type>      3907221 ns      3904115 ns          179 bytes_per_second=10.0055G/s
BM_ReadColumn<true,Int32Type>      24519395 ns     24505645 ns           28 bytes_per_second=2.39103G/s
BM_ReadColumn<false,Int64Type>      7180572 ns      7174186 ns           98 bytes_per_second=10.8897G/s
BM_ReadColumn<true,Int64Type>      29619694 ns     29608069 ns           23 bytes_per_second=3.2983G/s
BM_ReadColumn<false,DoubleType>     7441291 ns      7434806 ns           86 bytes_per_second=10.508G/s
BM_ReadColumn<true,DoubleType>     30991035 ns     30975255 ns           24 bytes_per_second=3.15272G/s
BM_ReadColumn<false,BooleanType>   10626337 ns     10622931 ns           66 bytes_per_second=941.36M/s
BM_ReadColumn<true,BooleanType>    29892031 ns     29878906 ns           23 bytes_per_second=1004.05M/s
BM_ReadIndividualRowGroups         15414099 ns     15402186 ns           43 bytes_per_second=6.34042G/s
BM_ReadMultipleRowGroups           15087609 ns     15078640 ns           42 bytes_per_second=6.47646G/s

After:

BM_ReadColumn<false,Int32Type>      3858847 ns      3855927 ns          181 bytes_per_second=10.1305G/s
BM_ReadColumn<true,Int32Type>      17606021 ns     17594549 ns           38 bytes_per_second=3.33022G/s
BM_ReadColumn<false,Int64Type>      7164074 ns      7158771 ns           98 bytes_per_second=10.9132G/s
BM_ReadColumn<true,Int64Type>      22593565 ns     22579690 ns           29 bytes_per_second=4.32496G/s
BM_ReadColumn<false,DoubleType>     7399623 ns      7393991 ns           97 bytes_per_second=10.566G/s
BM_ReadColumn<true,DoubleType>     22415125 ns     22400757 ns           27 bytes_per_second=4.35951G/s
BM_ReadColumn<false,BooleanType>   10240053 ns     10236365 ns           68 bytes_per_second=976.909M/s
BM_ReadColumn<true,BooleanType>    22663603 ns     22651544 ns           31 bytes_per_second=1.29337G/s
BM_ReadIndividualRowGroups         11406811 ns     11398414 ns           61 bytes_per_second=8.56753G/s
BM_ReadMultipleRowGroups           11314315 ns     11305522 ns           56 bytes_per_second=8.63792G/s

As a sidenote, it seems BMI2 may be problematic on AMD CPUs:
https://twitter.com/trav_downs/status/1202793097962364928

As a sidenote, it seems BMI2 may be problematic on AMD CPUs:
https://twitter.com/trav_downs/status/1202793097962364928

Yea we need some benchmarks to see if the performance is worth it for AMD (I suspect it might make this patch break-even instead of an improvement) but don't have hardware to test.

I do have an AMD CPU, so I'll gladly test if you add some benchmarks :-)

@pitrou https://github.com/apache/arrow/pull/6985/commits/a36dc55efe3def27eef413b8e17567ec400a01ff adds a benchmark.  Should be cherry-pickable to a clean branch for comparison.
On my machine it shows ~2X speedup.
Before:
---------------------------------------------------------------------------------------------------------
Benchmark                                               Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------------
BM_DefinitionLevelsToBitmapRepeatedAllMissing        2314 ns         2314 ns       302395 bytes_per_second=844.019M/s
BM_DefinitionLevelsToBitmapRepeatedAllPresent        2333 ns         2333 ns       301106 bytes_per_second=837.088M/s
BM_DefinitionLevelsToBitmapRepeatedMostPresent       2458 ns         2458 ns       286182 bytes_per_second=794.611M/s

After:
---------------------------------------------------------------------------------------------------------
Benchmark                                               Time             CPU   Iterations UserCounters...

So the BMI2 instructions incur a large slowdown here (even catastrophic with gcc).

I would expect bad numbers with GCC 7.5 since we lose autovectorization and use BMI2.  Agree that clang-8 numbers still look pretty bad on AMD.  I guess this PR will have to wait until we can do runtime dispatch :(

@pitrou I updated this PR to require AVX512 for the use of BMI2 codepath.  I think this should prevent issues for AMD architectures (I don't believe there are any that support AVX512) until we can do runtime dispatch for this issue.

I'll kick the tires on this re: performance. Is this ready to merge otherwise?

As long as @pitrou is happy with my workaround to avoid inflicting pain on AMD processor users.
I think I need to fix one signed conversion bug to make CI happy.  I should be able to get to that tonight.

OK build is green (side note I don't think this will compile on s390x, not sure if that is a blocker).

Here are some benchmarks on my machine, with gcc 7.5:

ARROW_SIMD_LEVEL=AVX2:

BM_DefinitionLevelsToBitmapRepeatedAllMissing         934 ns          934 ns      3004804 bytes_per_second=2.04274G/s
BM_DefinitionLevelsToBitmapRepeatedAllPresent        1327 ns         1327 ns      1908147 bytes_per_second=1.4377G/s
BM_DefinitionLevelsToBitmapRepeatedMostPresent       1725 ns         1725 ns      1649108 bytes_per_second=1.10569G/s

ARROW_SIMD_LEVEL=SSE4_2:

BM_DefinitionLevelsToBitmapRepeatedAllMissing        1384 ns         1384 ns      2029778 bytes_per_second=1.37806G/s
BM_DefinitionLevelsToBitmapRepeatedAllPresent        2054 ns         2053 ns      1247469 bytes_per_second=951.163M/s
BM_DefinitionLevelsToBitmapRepeatedMostPresent       2124 ns         2124 ns      1303578 bytes_per_second=919.503M/s

ARROW_SIMD_LEVEL=NONE:

BM_DefinitionLevelsToBitmapRepeatedAllMissing         925 ns          925 ns      3025393 bytes_per_second=2.06245G/s
BM_DefinitionLevelsToBitmapRepeatedAllPresent        1505 ns         1504 ns      1881938 bytes_per_second=1.26785G/s
BM_DefinitionLevelsToBitmapRepeatedMostPresent       1725 ns         1725 ns      1598820 bytes_per_second=1.10599G/s

So it seems that gcc's SSE4.2 auto-vectorization may lead to suboptimal code, but that's not a problem for this PR.

@pitrou I think the C GLib build failure looks unrelated to me.  I fixed the  s390x build.

@wesm I expect your PR to get merged first but if it doesn't consider using PopCount methods in this one.

+1. I'm going to go ahead and merge this and then I'll rebase #7352


Easily run specs for all open files?

Hi, what's the easiest way to quickly run all specs which are open. For example, if I have 5 files open and 3 of them are in /spec, I'd like to append the filenames for these three files to the spec command.
(Sorry if this is the wrong place for support)

This plugin does not provide that feature. You can probably write a script to do that.

No worries. Will work on a script then. Thanks.


Add ability to include page.content on atom.xml

Feature Request
Summary
Add the ability to include page.content on atom.xml since currently, it is empty when put into an RSS reader
Motivation
It only shows the description without the <content> tag. This would benefit the user as it will actually show the actual content of the blog in the RSS reader.
Detailed Description
Either simply append:
<content type="html">{{ page.content | safe }}</content>

on atom.xml
or
add an option to opt-in to that

On it!


-bash: pyenv: command not found

I followed the instructions for installing. But after restarting my terminal, and trying to see the pyenv version, it's giving me this error.

This is some kind of problem with your environment. Are you using Linux? Make sure you've got those lines in .bashrc or .bash_profile (check out which one your system is using). You can debug it by loading it manually like source .bash_profile.
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

@guy881 that worked, however now when I close my shell I get the error: The terminal process "bash" terminated with exit code: 1. and when I open the shell I get the error
WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.

https://github.com/pyenv/pyenv/issues/1906


Add Eula and Privacy Policy screen

Description:
Why:
As a user, I want to be able to read and agree to my Health Authority's
Privacy Policy and EULA if they have them.
This commit:
Reintroduces the UI to accept the EULA as part of the activation flow,
and updates it according to the new design specs.
Note that we do not currently have a strategy for hosting a HA's EULA,
so actually shipping this work will be blocked on having a EULA to link
to externally.
Linked issues:
Fixes: Terms of Use (EULA & Privacy Policy)
Screenshots:

How to test:

On a fresh install, navigate through the onboarding screen
Expect to see the EULA and privacy policy before activating bluetooth or ENs

Looks great! I think some of the colors may be different, based on the mocks.


[Bug] Routes are not resolved correctly because of an incorrect regex

Some files in the pages directory are incorrectly resolved as routes.
For example:
src/pages/rockets.tsx --> /rock.tsx
This is because the periods (.) in the below regex are not escaped.
https://github.com/solidjs/solid-start/blob/596bc2e8c290cb5dc02f9b994a16836e0554ad69/packages/start/routes.js#L22-L24

Thanks for pointing this out. I observed this myself. Thanks for fix too in the PR.


Update semconv, adjust link-checks, and more

Updates semconv submodule

Brings in https://github.com/open-telemetry/semantic-conventions/pull/185

Adds Hugo build warning for pages containing external links to OTLP spec or semconv pages
Adjust-pages: enhances regex used to replace external links to OTel and OTLP pages; the regex now matches inline markdown links and markdown link-definitions
Fixes link in blog post to refer to local OTLP page
Note that semconv pages are still only in preview:
https://deploy-preview-3021--opentelemetry.netlify.app/docs/specs/semconv

There are no changes other than more instances of external spec-page links being replaced by local paths (the two changed files are expected):
$ (cd public && git diff -bw -I "(blob|tree)/v1.2" -I "href=\"/docs" -- . ':(exclude)*.xml') | grep ^diff
diff --git a/blog/2023/end-user-q-and-a-03/index.html b/blog/2023/end-user-q-and-a-03/index.html
diff --git a/docs/specs/otel/protocol/otlp/index.html b/docs/specs/otel/protocol/otlp/index.html

Merging now since semconv pages are still only in preview.


Proposal: change the type of handle in router methods

Currently, the type for handle parameter for httprouter.Router functions, for example httprouter.Router.Handle, is httprouter.Handle which is an alias of func(http.ResponseWriter, *http.Request, Params) . The parameter type should be func(http.ResponseWriter, *http.Request, Params) instead. So, it will be func (r *Router) Handle(method, path string, handle func(http.ResponseWriter, *http.Request, Params)).
With this change, I can alias it in my package and could still use the instances with httprouter.
Note that this is the pattern the net/http use. For example, although there's http.HandlerFunc type which is an alias of func(ResponseWriter, *Request), many of the functions, e.g., http.ServerMux.HandleFunc, are actually using the type of func(ResponseWriter, *Request) directly for their handler parameters instead of http.HandlerFunc.

An illustration here: https://play.golang.org/p/hgrdboGxvt
If you uncomment the last commented line, you'll get a compile error.

This shouldn't be an issue with Go 1.9+ anymore. Just use an alias: type myHandleFunc = pkgHandleFunc
Adjusted playground example: https://play.golang.org/p/pUt57Wu-LKn


Can't retrieve updated value from store in another component

I encountered a problem using nanostores/react using Astro framework. I can update my store by updating the value in my Header.tsx component and it's working fine. However, my issue is that I can't retrieve the updated value from the store in my Tab.tsx component.
This is my code:
tabStore.ts
import { atom } from 'nanostores'

export const $isTabActive = atom<string>('HOME')

export const updateTab = (name: string) => {
  $isTabActive.set(name)
}

Header.tsx
import { useStore } from '@nanostores/react'
import classNames from 'classnames'
import { $isTabActive, updateTab } from '../stores/tabStore'

const tabs = [
  {
    number: '00',
    name: 'HOME'
  },
  {
    number: '01',
    name: 'DESTINATION'
  },
  {
    number: '02',
    name: 'CREW'
  },
  {
    number: '03',
    name: 'TECHNOLOGY'
  }
]

export default function Header() {
  const tab = useStore($isTabActive)
  const onClickTab = (name: string) => {
    updateTab(name)
  }

  return (
    {tabs.map(({ number, name }, key) => (

 onClickTab(name)}>

          {number}
          {name}

    ))}
  )
}

Tab.tsx
import { useStore } from '@nanostores/react'
import { $isTabActive } from '../stores/tabStore'

export default function Tab() {
  const isTabActive = useStore($isTabActive)

  return (
    <>
      {isTabActive === 'HOME' ? (
        home
      ) : isTabActive === 'DESTINATION' ? (
        destination
      ) : (
        <></>
      )}
    </>
  )
}

Can you try a simple React project without Astro?
Maybe it is somehow connected with Astro server-side rendering? Like Tab is server-component and Astro do not send its JS code to client-side?

I have solved the issue. When you mentioned about server-component and since the Tab.tsx is a client-side component, I need to load the Tab component using client-side by doing this:
<Tab client:load />


cells not appearing

In an app I am building I am dynamically creating sections based on data I get back from my database. If I scroll all the way to the end, and then a section is dynamically created above it with different # of items that new section retains the scroll position of the section thats scrolled all the way to the end.
Is there a way to fix this so that all sections scroll to the first item when the section is created?

Do you have a sample code or sample project that can reproduce this issue?


Use version (StdUnittest) for the unittests that need it

because these unittests use symbols that are hidden behind version(StdUnittest).
Shall we use version(StdUnittest) for all unittests in phobos to speed up compilation?

I may be wrong with this, but I think the unit tests are best left as is. version(StdUnittest) is probably intended to avoid slowing compilation when unit testing client code, but I think unit test blocks in Phobos are skipped anyway. version(StdUnittest) in front of them just add bloat, and if you accidently unit test Phobos without -version=StdUnittest you probably want an error that you're not testing everything.

Ok, this PR anyhow fixes the compilation of pass when -version=StdUnittest is not given. Have anybody benchmark compiling an application with phobos with -unittest activated with all unittests in phobos tagged with version(StdUnittest). If not it's worth investigating how large of a speed that gives.

I may be wrong with this, but I think the unit tests are best left as is. version(StdUnittest) is probably intended to avoid slowing compilation when unit testing client code, but I think unit test blocks in Phobos are skipped anyway. version(StdUnittest) in front of them just add bloat, and if you accidently unit test Phobos without -version=StdUnittest you probably want an error that you're not testing everything.

Ok, this PR anyhow fixes the compilation to pass when -unittest is given but version(StdUnittest) is false. Some modules in this settings so I see no reason for other modules to not pass
Btw, have anybody benchmarked compiling an application with phobos with -unittest activated with all unittests in phobos tagged with version(StdUnittest)? If not it's worth investigating how large of a speed up that gives.

If this makes Phobos compilable without that version flag I favourably agree on this. Also making Phobos compilation faster is desired. Although adding this to every unittest seems bloated and a good advantage need to compensate it.

The primary purpose of version(StdUnittest) was to be able to test phobos features with declarations that cannot be declared at function scope (such as overloaded function declarations or templated functions; the latter seems to compile now, so I guess we could get rid of some of the use cases of StdUnittest). I don't know if other use cases arouse, but the general rule of thumb is to get rid of StdUnittest, not add more.

because these unittests use symbols that are hidden behind version(StdUnittest).

version(StdUnittest) is set automatically in the makefile when phobos is compiled with -unittest, so I don't see the point of this change.

Also making Phobos compilation faster is desired

Why would this change make phobos compilation faster?

The primary purpose of version(StdUnittest) was to be able to test phobos features with declarations that > Why would this change make phobos compilation faster?

It doesn't. It just make the module compile with -unittest but without version(StdUnittest) set. It just discovered this because my Emacs FlyCheck configuration used these settings.

@nordlow

version(StdUnittest) is set automatically in the makefile when phobos is compiled with -unittest, so I don't see the point of this change.

I still don't understand what is the motivation for this PR. Can you come up with a real life example where not having these versions is a problem?

@nordlow

version(StdUnittest) is set automatically in the makefile when phobos is compiled with -unittest, so I don't see the point of this change.

I still don't understand what is the motivation for this PR. Can you come up with a real life example where not having these versions is a problem?

It adds version(StdUnittest) to the unittests that fail to compile when StdUnittest is not defined. Provided -unittest is used.

I think that StdUnittest should, ideally, disappear from phobos. That might not be possible in all cases, but as rule of thumb we should strive to have as little as possible, not to add more.
Compilation of phobos with unittest is likely done using the existing makefiles and if anyone wants to mimic that behavior, then consulting the said makefiles is the way to go. Therefore, I am going to close this. Thanks anyway for the effort!


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-source-version-target/pull/186 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-source-version-target.git

Docs Build status updates of commit 3d4419a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

versioningArchiveSourceFolder/TOC.yml
:white_check_mark:Succeeded
View (sql-server-2014 || azuresqldb-current || azuresqldb-mi-current || azure-sqldw-latest || >= aps-pdw-2016 || >= sql-server-2016 || >= sql-server-linux-2017 || sql-server-previousversions || sqlallproducts-allversions)

versioningArchiveSourceFolder/docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


react-tinacms-github: Allow creating new file by saving form

I want to be able to save a new file to GitHub with a form plugin.
I figured I should be able to initialize the form (i.e. use useGithubJsonForm) with an empty GitFile (e.g. { fileRelativePath: "content/offerings/${slug}.json", data: {}, sha: "" } when the file doesn't exist yet, and clicking "Save" in that form should make a commit creating that file (instead of updating a preexisting file).
The first part works.. I can initialize the form with an empty file.
The problem comes when trying to save the form:
First off, I received a wrong error message in the browser, saying I was on a branch that doesn't exist. (I was on a branch that did in fact exist). With my first commit 7e3ba86 I fixed this, to show the [more] correct error message, "Content Not Found".
I think that commit is self-explanatory, so if I didn't explain well, please just look at it.
Second, I traced what was actually causing the error, and I found that it was a 404 not found error when trying to retrieve that file (which didn't exist yet) from GitHub.
This request (to retrieve the file from Github) happens when no sha is present, since the sha is required by GitHub API when updating an existing file. The request is just to get the sha of the file.
When the file is not found, instead of erroring, we should just continue with no sha, since in this case we know we must be creating (not updating) a file, and a sha does not apply (and is not expected by GitHub API) when creating a file.
I made this change with my second commit d13eb76.
With these changes was able to accomplish what I described in the first paragraph. I tested by publishing forked versions of react-tinacms-github and next-tinacms-github as @zen_flow/react-tinacms-github and @zen_flow/next-tinacms-github.
Thanks!

Good stuff!

Good stuff!

@dwalkr Big thanks for reviewing this and #1673 !!! Keep up the awesome work! :D

@dwalkr Big thanks for reviewing this and #1673 !!! Keep up the awesome work! :D


Adding enableInfiniteScroll={true} breaks example.

I replicated the Star Wars API example found in the External Data section of the documentation to test out the Infinite Scroll functionality.  Upon adding the option enableInfiniteScroll={true}, the component begins to auto-cycle through each "page" until it hits the end.  It does not seem to attach additional results to the existing results, nor does it seem to allow the user to trigger new results to be loaded upon scrolling.
Can you please clarify if there are additional changes/options that need to be added to correctly enable infinite scrolling?

Hey @JonathanWarrick - This is definitely something that needs a bit of clarification on the docs, so I'll put that on the TODO list.
There's not any modification of the total number of results that Griddle is aware of, so for something like infinite scrolling, Griddle needs to know about all previous values that should be rendered as well.
Maintaining the state of results that were loaded externally was something we did in our initial stab at allowing a callback function to load additional data, but that lead to some lousy side-effects and forced the user to follow some non-Reacty practices. To not completely drop support of maintaining a collection of data loaded externally, 'GriddleWithCallback' was created and everything is isolated in this wrapper component (but it doesn't sound like you're using that).
I put together a Fiddle to modify the Star Wars API example to load results 'infinitely' to hopefully demonstrate this a little bit more visually : http://jsfiddle.net/joellanciaux/m9hyhwra/2/
Let me know if that makes sense.

Hey @joellanciaux - Thanks for providing the JSFiddle; it was very helpful!
I played around with the example and was able to replicate the infinite scrolling just fine using an external request in my project; however, it seems that adding Flux into the mix causes some issues that leads to infinite loops.
I replaced the AJAX request in the getExternalData call with the following:

Instead of the AJAX request, the getExternalData function triggers an action.
The action handles the AJAX request and then dispatches to the dispatcher.
The dispatcher updates the store and emits a change event.
The component has a listener for said change event and updates the state accordingly.

The issue that I'm running into is that there are other change events that are also taking place simultaneously, impacting the component's state.  When one of these other events emits a change event, the getExternalData function triggers again and the cycle becomes infinite, even though these change events aren't actually mutating the state at all.  It seems to me that Griddle is watching for any change to the state and calling this function upon that change event, even if that event doesn't actually mutate the state at all.

I think I see what you're running into -- Because the request for additional data in the fiddle is being made in the 'componentDidMount' function, it fires off an action forever and ever.
What I'm thinking might be a good option is to define the 'external____' properties on Griddle and fire off your actions from those functions. The data, in this case, would then just be passed into the 'results' property.  At the moment, we're requiring just about every external property, but that's something we're planning on loosening up a little bit if a specific feature is disabled (such as filtering).
I'll see if I can put together something that resembles an example/fiddle in case I missed something. You might beat me to it, but I hope to have something put together by this weekend that will eventually make its way into the docs -- making things smooth for Flux is one of the higher goals we're shooting for.

Thanks for the further clarification @joellanciaux.  An example/fiddle would be greatly appreciated, as after some playing around with the external properties, I still can't get it completely working without removing all other events that trigger change events.

@JonathanWarrick I'm a little late, but I've put together a little bit of a test project which is, more or less, wiring up some sample Griddle data into Marty.js's Yeoman generator.
You should be able to snag it here : https://github.com/joellanciaux/GriddleMartyExample
To get started, you should be good just doing npm install, npm start, and then navigating to http://localhost:5000.
Let me know if that helps!

Hi @joellanciaux - Didn't have a chance to take a look at this until recently, but this is exactly what I needed, so thanks so much!  It also serves as a good introduction to Marty.js, which I hadn't had a chance to look at yet.
One of the differences between this approach and how I have my table implemented currently is the idea of keeping track of "pages" even when no pages exist for an infinite scrolling table.  Compared to my current implementation, this adds a little more overhead, but I understand that this keeps the component more flexible overall.
Thanks again for all the help and examples!

One additional clarification before I attempt to implement this in my own project (and a point that I think was throwing off initially) - does all of the data need to be loaded initially?  If I was able to pass the first 10 results from my AJAX call and also pass back the size of the entire dataset (to set the max page), I could make an additional AJAX call triggered by the scroll event and append those additional results on to the results array, correct?

@JonathanWarrick no problem at all (and sorry for the delay).
That's totally correct -- you don't need to have all of your data loaded off the bat. If you're running with something similar to the Flux example I created, I would put the loading/handling of data in the action creators. There's some good information to be found here :  http://stackoverflow.com/questions/26632415/where-should-ajax-request-be-made-in-flux-app
As far as the wrapper component goes, having the data in the 'results' property and the max page in the 'maxPage' property should be all that's needed (along with the various 'external' properties, such as 'externalSetPage').
Let me know if that makes sense.

I'm going to close this one for now -- please let us know if the example didn't cut it :) :+1:


When I try to create an environment in minikube, the Hashcorp vault authentication does not pass.

Describe the bug
When I try to create an environment in minikube, the Hashcorp vault authentication does not pass.
Hi.
https://hyperledger-bevel.readthedocs.io/en/latest/tutorials/bevel-minikube-setup/
I am attempting to deploy Hyperledger Fabric on minikube with this documentation.
However, I cannot access the Hashcorp Vault and am unable to complete the task.
When I check the logs as follows, I get this
 kubectl logs -n manufacturer-net fabric-ca-server-ca-0 -c ca-certs-init
curl: (7) Failed to connect to <IP_ADDRESS> port 8200 after 3129 ms: Couldn't connect to server
Vault token API call response: {"errors":["permission denied"]}
Error: Failed to obtain Vault token.
Error Details: permission denied

Is there anything else I need to do regarding Hashcorp Vault other than the following commands?
export VAULT_ADDR='http://<Your Vault local IP address>:8200' #e.g. http://<IP_ADDRESS>:8200
export VAULT_TOKEN="<Your Vault root token>"

# enable Secrets v2
vault secrets enable -version=2 -path=secretsv2 kv

Environment (please complete the following information):

WSL2

Hi @atomic-kanta-saski
To verify: can you open the vault from a browser, and check that the secretsv2 engine was created?
When you create the vault, use a local config.hcl file, where you tell it to add a ui
example (for a localhost instance):
ui = true
storage "file" {
  path    = "./bevel/data"
}
listener "tcp" {
  address     = "<IP_ADDRESS>:8200"
  tls_disable = 1
}
For your future info:
Once the playbook can access the vault, it wil create an ACL policy  in the vault if not already present.
 example: bevel-vault-mgmt-ca-<ORGNAME>-net-policy
If you recreated the cluster and used a different network.env.type name in the network.yaml, than you may need to manually update the policy to point to the new path, as the playbook only checks for its existance, not the value of the policy.
Example of policy if using network.env.type = dev
If i later changed it to dev2 to recreate everything, be sure to manually update this to ../data/dev2<ORGNAME>/*
for each of yhour orgs (each org has its own policy)
path "secretsv2/data/devmainorg/*" {      capabilities = ["list", "read", "create", "update"]    }    path "secretsv2/data/devmainorg/credentials/*" {      capabilities = ["list", "read", "create", "update"]    }

@michaelkhalsa
Thank you very much.
This issue has been resolved.
However, we are currently facing the following problem
When I run the following command
kubectl describe pod fabric-orderernode-orderer1-0 -n supplychain-net I get an error like this
Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  11m                   default-scheduler  0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
  Normal   Scheduled         11m                   default-scheduler  Successfully assigned supplychain-net/fabric-orderernode-orderer1-0 to minikube
  Warning  FailedMount       9m32s                 kubelet            Unable to attach or mount volumes: unmounted volumes=[orderer1-genesis-volume], unattached volumes=[orderer1-genesis-volume kube-api-access-rc4ds certificates scripts-volume datadir]: timed out waiting for the condition
  Warning  FailedMount       7m17s                 kubelet            Unable to attach or mount volumes: unmounted volumes=[orderer1-genesis-volume], unattached volumes=[scripts-volume datadir orderer1-genesis-volume kube-api-access-rc4ds certificates]: timed out waiting for the condition
  Warning  FailedMount       2m46s (x2 over 5m3s)  kubelet            Unable to attach or mount volumes: unmounted volumes=[orderer1-genesis-volume], unattached volumes=[kube-api-access-rc4ds certificates scripts-volume datadir orderer1-genesis-volume]: timed out waiting for the condition
  Warning  FailedMount       74s (x13 over 11m)    kubelet            MountVolume.SetUp failed for volume "orderer1-genesis-volume" : configmap "syschannel-genesis" not found
  Warning  FailedMount       29s                   kubelet            Unable to attach or mount volumes: unmounted volumes=[orderer1-genesis-volume], unattached volumes=[datadir orderer1-genesis-volume kube-api-access-rc4ds certificates scripts-volume]: timed out waiting for the condition

It seems to be caused by the configmap not being created.

@michaelkhalsa
thanks!
I have encountered a new problem.
The error is as follows.
TASK [/home/bevel/platforms/hyperledger-fabric/configuration/../../shared/configuration/roles/create/job_component : Helm install genesis] ***********************************************************************************************
task path: /home/bevel/platforms/shared/configuration/roles/create/job_component/tasks/main.yaml:39
fatal: [localhost]: FAILED! => {"changed": false, "command": "/root/bin/helm repo update", "msg": "Failure when executing Helm command. Exited 1.\nstdout: \nstderr: Error: no repositories found. You must add one before updating\n", "stderr": "Error: no repositories found. You must add one before updating\n", "stderr_lines": ["Error: no repositories found. You must add one before updating"], "stdout": "", "stdout_lines": []}

I am error that not a single helm has been added to the repository, is this a recognized error?
I changed my development environment from WSL to MacOS and the previous error has been resolved.


Update workflow

Signed-off-by: MUzairS15<EMAIL_ADDRESS>Description
This PR fixes #
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

Fixes failing build build github.com/layer5io/meshery-kuma: cannot load io/fs: malformed module path "io/fs": missing dot in first path element


docs: Add some API documentation

Pull Request Test Coverage Report for Build 39

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 86.913%

Totals

Change from base Build 38:
0.0%

Covered Lines:
191

Relevant Lines:
214

💛  - Coveralls

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


New spawn point is in the ground

Hey GO,   when Morvash and I logged in after updating to .3, we were put in the ground.  luckily we had our picks and were able to get out without dying but new worlds may not be as nice :)

Same as closed issue
https://github.com/GreatOrator/FallCraft/issues/34
This is because the spawn point is marked for the default map which is not yet available for testing.  Plans are to have a working map for testers as soon as possible.


Aurora - Online status issue

Seems like Discord updated some stuff regarding the online status. Now it's completely borked see:

aurora has been discontinued. Please use https://betterdiscord.net/ghdl?id=2917 instead :)


No internet after disconnect

Hello, I have script installed on CentOS server. I have problem with laptops with Archlinux [KDE and GNOME] and Ubuntu. When I disconnect from wireguard in GUI (network manager) I don't have internet. I must disconnect from my wifi network and connect again. I import my wireguard to GUI with command: nmcli connection import type wireguard file /etc/wireguard/wireguard.conf.
Any advice how to fix that?
Regards.

Client-side issue, so I am closing this.
I have zero experience with NetworkManager sorry.


Where did the helm-wrapper script go?

I can no longer run helm-wrapper? Where did it go? Was it replaced?

Also confused - helm-wrapper was removed with this commit:
https://github.com/futuresimple/helm-secrets/commit/b9c533fc889a44a0aa9c56ffc01c425933f58600#diff-88629586a25c07db6c7afb978d4f6cbc
What is the resolution for this? Now my helm installs/upgrades are not decrypting.

@nuthankumar @ianseyer 	Please read the (updated) documentation: https://github.com/futuresimple/helm-secrets/blob/master/README.md#helm-wrapper. The wrapper still exists but not as a separate script. The new commands are: "helm secrets install ..." and "helm secrets upgrade ...".

@mhyllander I am using helm secrets plugin version 2.0.2 and helm secrets install command not decrypting the secrets on the fly.
helm version as below;
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

@mhyllander when I give this a go on helm 3, I get:
$ helm secrets upgrade test --install --namespace test -f ./test.yaml -f ./test-secrets.yaml ../../helm/deploy --dry-run
Error: unknown flag: --client
helm upgrade: unrecognized option `--install'
helm upgrade: invalid option -- f
helm upgrade: invalid option -- f
helm upgrade: unrecognized option `--dry-run'
Error: plugin "secrets" exited with error

The plugin expected the secret in file secrets.yaml. You named it test-secrets.yaml


Deploy default profiles via the manager

What type of PR is this?
/kind feature
What this PR does / why we need it:
We now deploy the default profiles at the same time where the daemonset
gets deployed. This allows users to use them either in the
security-profiles-operator namespace (default) or in the provided
namespace.
Which issue(s) this PR fixes:

Fixes https://github.com/kubernetes-sigs/security-profiles-operator/issues/267
Does this PR have test?

None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?

Automatically deploy the default profiles in the correct namespace without having a need for an additional `kubectl apply` command.

/test pull-security-profiles-operator-test-e2e

Alright I have to fixup the e2e tests first…

@saschagrunert here's a fix https://github.com/kubernetes-sigs/security-profiles-operator/pull/271 although I think the latest hello-world image tag may have fixed it anyways

@saschagrunert here's a fix #271 although I think the latest hello-world image tag may have fixed it anyways

Thanks! Another issue was that we still have to remove the profiles before deleting the operator. Added this hint to the docs.


Exhaustiveness checking says a non-subtype is unhandled.

Example (inspired by from https://github.com/dart-lang/language/issues/3337):
sealed class Result<T, E> {
  const factory Result.value(T value) = ValueResult<T>._;
  const factory Result.error(E error) = ErrorResult<E>._;
}

final class ValueResult<T> implements Result<T, Never> {
  final T value;
  const ValueResult._(this.value);
}

final class ErrorResult<E> implements Result<Never, E> {
  final E error;
  const ErrorResult._(this.error);
}

void main() {
  test(const Result.value(1));
  test(const Result.error("e"));
}

void test(Result<int, String> r, [bool b = false]){
  switch (r) { // Result<int, String>' not exhausted, doesn't match 'ValueResult<dynamic>()'
    case ValueResult<int> v: print(v.value);
    case ErrorResult<String> e: print(e.error);
  }
}

The error message given by both the analyzer and dart2js (using DartPad, master channel) is:

The type 'Result<int, String>' is not exhaustively matched by the switch cases since it doesn't match 'ValueResult<dynamic>()'.

However, ValueResult<dynamic> is not a subtype of the matched element type of Result<int, String>, so that type should not need to be matched.
(If I do match it, I get told to also match ErrorResult<dynamic>.)
If I forward both type arguments to the subclasses:
sealed class Result<T, E> {
  const factory Result.value(T value) = ValueResult<T, E>._;
  const factory Result.error(E error) = ErrorResult<T, E>._;
}

final class ValueResult<T, E> implements Result<T, E> {
  final T value;
  const ValueResult._(this.value);
}

final class ErrorResult<T, E> implements Result<T, E> {
  final E error;
  const ErrorResult._(this.error);
}

void main() {
  test(const Result.value(1));
  test(const Result.error("e"));
}

void test(Result<int, String> r, [bool b = false]){
  switch (r) {
    case ValueResult<int, String> v: print(v.value);
    case ErrorResult<int, String> e: print(e.error);
  }
}

then the error goes away, so it's something about the Never which makes the exhaustiveness algorithm think that ValueResult<int> doesn't exhaust the ValueResult-subtypes of Result<int, *>.
I can see how ValueResult<int> might only seem to match Result<int, Never>, not all of Result<int, String>, but it exhausts all ValueResults that are actually subtypes of Result<int, *>, no matter the second operand, and exhausting ValueResult<int> by itself should exhaust it as a subtype of Result<int, *> too.
Maybe it's the "spaces" computation which gets confused.
In any case, saying that I should match ValueResult<dynamic>, which is not related to the second type argument of Result either, doesn't provoke confidence.

Maybe it's the "spaces" computation which gets confused.

Ah, yeah. I've had this in the back of my mind for a while. Take a look at this part of the exhaustiveness spec:

To expand a space s with type T, we create a new set of spaces that share
the same properties as s but with possibly different types and restrictions.
The resulting spaces are:

The declaration D of T is a sealed type:

For each declaration C in the library of D that has D in an
implements, extends, or with clause:

If every type parameter in C forwards to a corresponding type
parameter in D, then C is a trivial substitution for D.
Let S be C instantiated with the type arguments of T.
For example:
sealed class A<T1, T2> {}
class B<R1, R2> extends A<R1, R2> {}

Else (not a trivial substitution) let S be an overapproximation
(see below) of C.
TODO: Is the overapproximation part here correct?

If S exists and is a subtype of the overapproximation of T:

A space with type S.

Type S might not be a subtype if it constrains its supertype in
a way that is incompatible with the specific instantiation of the
sealed super type that we're matching against. For example:
sealed class A<T> {}
class B<T> extends A<T> {}
class C extends A<int> {}

Here, if we are matching on A<String>, then B<String> is a
subtype, but C is not and won't be included. That means that this
is exhaustive:
test(A<String> a) => switch (a) {
  B _ => 'B'
};

In cases where the relationship between a sealed supertype and its subtypes isn't just simple forwarding, the algorithm kind of gives up and takes a simpler conservative approach ("over-approximation").
@johnniwinther figured this all out on his own when implementing it since I didn't have anything approaching a complete design at the time (and what I had didn't cover generics at all). The approach is much better than I would have been able to come up with, but there might still be room to make it a little more sophisticated in cases like this.
At the time, I figured sealed classes hierarchies that (a) were also generic and (b) used the type parameters in non-simple-forwarding ways would be so obscure and rare as to not be worth worrying about. Unfortunately, I didn't realize that the obvious way to implement Option and Either types—probably the most common use of sum types!—happens to fall right into that set. :(

Let me see if I can read this. Take:
sealed class Result<R, E> {}
final class ValueResult<R> implements Result<R, Never> {}
final class ErrorResult<E> implements Result<Never, E> {}
void main() {
  Result<int, Error> r = null as dynamic; // Only here for the static errors.
  switch (r) { case ValueResult<int> _: ...; case ErrorResult<Error> _: ...}
}

When switching on (the type T) Result<int, Error>, we do:

Let D be the declaration of T, aka. sealed class Result<R, E>{}.
D is a sealed type.
For each declaration C which ... implements D (aka class ValueResult and class ErrorResult):

Not a trivial forwarding.
Let S be the overapproximation of C.

Those are ValueResult<Object?> and ErrorResult<Object?>

If S exists, which it does. (Is F-bounds why it can possibly not exist?)
And is a subtype of the overapproximation of T

That's undefined, overapproximation is defined on declarations, T is a type, should probably say D.
In which case its Result<Object?, Object?>.
And both are subtypes of that. (Again, is it F-bounds which can possilby make that fail?)

Then the space S (for the static types Value<Object?> and Result<Object?>).

Those spaces are, I think, the ones to exhaust in order to exhaust T.
So the switch (r) should exhaust ValueResult<Object?> and ErrorResult<Object?>, which it doesn't.
That explains the error message of not exhausting ValueResult<dynamic>.
And to solve that, we do need some kind of constraint solving, to know for which X, ValueResult<X> is enough to cover all instances of the intersection Result<int, Error> & ValueResult<Object?>.
This one looks easy (and we can possibly extend the "trivial forwarding" to trivally forwarding some parameters, and only overapproximate the rest), but that doesn't handle something more complicated, like:
sealed class Json<T> {
  T get value;
}
abstract final class JsonList<T> extends Json<List<T>> {
  final List<T> value;
  T operator[](int index) => value[index];
}
abstract final class JsonMap<T> extends Json<Map<String, T>> {
  final Map<String, T> value;
  T? operator[](String key) => value[key];
}
abstract final class JsonLiteral<T> extends Json<T> {
  final T value;
}

where we might need to solve Json<Iterable<int>> & JsonList <: JsonList<T> for T. (T = int is the optimal solution, and even this is in the easy end of complicated cases.)


Remove the usage of CAutoLock

CAutoLock hide a basic std::lock_guard usage.
Replace all occurences of CAutoLock by its standard definition
std::lock_guardstd::mutex
Signed-off-by: Miguel Gaio<EMAIL_ADDRESS>

This pull request is now managed with CodeReviewHub. Refresh.

:+1:

@cc6565 @louizo Please review. I will not merge patches without at least 2 review (excluding author).

:+1:

:shipit:


Sort Badges / Feed Detection

#86 introduced hiding/sorting buttons on Special:Badges with:
if ($("body.page-Special_Badges").length) {
    ...
}

Suggest moving to URL or Text detection to prevent badges showing on badge feed pages, such as https://www.wikitree.com/index.php?title=Special:Badges&b=coordinator.

I think I've already fixed this. (#177)  Are you using the latest version?


apm-agent-python and structlog - mapper_parsing_exception for event.dataset

Describe the bug: When using structlog and with elasticapm and the log processer elasticapm.structlog_processor, we have recently seen Logstash refuse our logger with the following error:
[2021-10-05T12:10:10,746][WARN ][logstash.outputs.elasticsearch][main][a2a92c7c0ddf765b1969e7e8d4a302b6deca976af4c80a2d9706ccdf2486267b] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"logstash-2021.10.05", :routing=>nil}, {"stage_environment"=>"prod", "service.name"=>"flow", "company"=>"<PayerCompany: Hidden Company Name [Parent Company: Hidden Company Name [CRN: DKXXXXXXXX]] [CRN: DKXXXXXXXX]>", "@version"=>"1", "host"=>"<IP_ADDRESS>", "sentry"=>"skipped", "timestamp"=>"2021-10-05T12:10:00.483890Z", "logger"=>"account_service.models", "event.dataset"=>"flow", "event"=>"PayerCompany change state request", "level"=>"debug", "port"=>58652, "new"=>"APPROVED", "override"=>false, "@timestamp"=>2021-10-05T12:10:10.462Z, "old"=>"APPROVED", "modline"=>"account_service.models:159"}], :response=>{"index"=>{"_index"=>"logstash-2021.10.05", "_type"=>"_doc", "_id"=>"ST1cUHwBFM723LU2e_JV", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"Could not dynamically add mapping for field [event.dataset]. Existing mapping for [event] must be of type object but found [text]."}}}}

We setup our structlog like this in the Django settings file:
processors = [
    structlog.stdlib.filter_by_level,
    structlog.stdlib.add_log_level,
    structlog.stdlib.add_logger_name,
    log_processors.add_module_and_lineno,
    log_processors.normalize_datatypes,
    log_processors.attach_environment,
    log_processors.timestamper,
    structlog_processor,  # this is the processor that seems to cause the error
    SentryJsonProcessor(level=logging.ERROR, tag_keys="__all__"),
    structlog.stdlib.PositionalArgumentsFormatter(),
    structlog.processors.StackInfoRenderer(),
    structlog.processors.format_exc_info,
    structlog.processors.UnicodeDecoder(),
    structlog.stdlib.ProcessorFormatter.wrap_for_formatter,
]

# Structlog
structlog.configure(
    processors=processors,
    context_class=structlog.threadlocal.wrap_dict(dict),
    logger_factory=structlog.stdlib.LoggerFactory(),
    wrapper_class=structlog.stdlib.BoundLogger,
    cache_logger_on_first_use=True,
)

If we remove structlog_processor all loggers are received by Logstash with no problems.
If we write a small customer log processor that strips the event.dataset (e.g. del event_dict["event.dataset"] it also works fine again.
To Reproduce

Setup structlog
Add the elasticapm.structlog_processor to the list of processors for structlog
Send a logger (e.g. logger.info("test")).

Environment (please complete the following information)

OS: Debian (slim)
Python version: 3.9.7
Framework and version [e.g. Django 2.1]: 3.2.8
APM Server version: 7.15
Agent version: N/A

Additional context
We use python-logstash-async for delivery of the logs to the logstash server.
requirements.txt (excerpts)
elastic-apm==6.5.0
elasticsearch==7.15.0
django-structlog==2.1.3
python-logstash-async==2.3.0
structlog==21.1.0
structlog-sentry==1.4.0

Looks like event has special handling in structlog (see https://github.com/hynek/structlog/issues/186#issuecomment-455136101) -- I'm just going to remove event.dataset from our structlog integration completely, it's not super important.


Maven artifacts aren't fully Java 8 compatible.

Current Behavior
Trying to use the workbench webapp on Java 8 gives:
java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer; 	org.eclipse.rdf4j.sail.nativerdf.datastore.HashFile.<init>(HashFile.java:125)
Expected Behavior
No error to occur.
Steps To Reproduce
OpenJDK 1.8.0_322 Temurin
Use tomcat 9 to run RDF4J workbench.
Version
3.7.5
Are you interested in contributing a solution yourself?
No response
Anything else?
Issue seems to be due to not using the new release argument for the maven-compiler-plugin.
See https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release and https://github.com/eclipse/jetty.project/issues/3244 for a similar issue.

We should check the Jenkins config. I vaguely remember setting the JVM used for release deployment to 11 for the 4.0 milestones, we may have forgotten to switch it back Java 8 for the patch release.

I'll take a closer look at adding that release argument, but for now I have created separate Jenkins jobs specifically for deploying releases using Java 8:

https://ci.eclipse.org/rdf4j/view/release deployment/job/rdf4j-java8-deploy-release-ossrh/
https://ci.eclipse.org/rdf4j/view/release deployment/job/rdf4j-java8-deploy-release-sdk/

We went with setting the compiler flags (using profiles for different JDK versions) in the end, so those separate Jenkins jobs are no longer necessary.

Will there be a 3.7.6 (re-)release of 3.7.5? 3.7.5 is un-usuable for me, and it contains a fix I need for my testing?


[$500] Cancel payment - No red dot in expense preview in main chat when payment cancellation fails

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

Version Number: v1.4.42-1
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:

Admin and member are in the same free workspace.
Admin and member have bank account set up.

[Member] Go to workspace chat.
[Member] Create a manual request.
[Admin] Pay the request with Expensify.
[Admin] Go to expense report > 3-dot menu > Cancel payment.
[Admin] Cancel the payment.
[Admin] Return to the main chat without dismissing the error.

Expected Result:
The expense preview in the main chat will display red dot.
Actual Result:
The expense preview in the main chat does not display red dot.
Workaround:
Unknown
Platforms:

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

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/0a8e4e11-ed67-4f90-a1c8-968aa5974820
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~018a0ba8089a65a1dd
Upwork Job ID:<PHONE_NUMBER>174920192
Last Price Increase: 2024-02-16

We think that this bug might be related to #wave5-free-submitters
CC @dylanexpensify

I think this will be fixed here cc @Gonals

I think this will be fixed here cc @Gonals

Yep. That should fix this. Self-assigning 😁


[HUDI-257] Fix Bloom Index unit-test failures

Due to test setup issue. Was able to repro the issue consistently and by adding initialization/cleanup step, the tests are passing consistently

@vinothchandar @n3nash : Going ahead and merging this change to master to kickstart RC2.


Update automation to use Tools for new project-sets instead of Sandbox

Describe the issue
We have a more secure and cleaner model to apply to new onboardees.
Additional context

Definition of done

Change the vending machine automation so that when a project set gets created, it assigns Tools accounts from the Tools OU instead of Sandbox ones.

Not relevant anymore


Fix indexes after tables with quotes

Sorry, I opened this PR by accident - let me know if you're interested in any of our improvements though.


prepending variables triggers errors

I get errors in my terminal when I run something like this:
~ ❯❯❯ TEST=1 echo
~ ❯❯❯ ^C
TEST=1:  comand not found
~ ❯❯❯
(explanation:  prepend a variable to a command and hit enter, in the returned prompt press Ctrl - C, it returns an error message)
This is caused by the 'command-not-found' module, if you disable it it doesn't happens

What's your question? command-not-found is sourced by Prezto but is not inside of Prezto; so, if it is causing problems, notify its developer.


Race condition in client manager

Unknown data race apparently between the clients manager test and the Golang test library itself?
Dunno, got flagged during an unrelated change: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/4704173585/attempts/1
=== FAIL: internal/dataplane TestAdminAPIClientsManager_NotRunningNotifyLoop (0.10s)
    testing.go:1446: race detected during execution of test

=== FAIL: internal/dataplane TestAdminAPIClientsManager_ConcurrentNotify (unknown)
    clients_manager_test.go:426: Test is done, stopping subscriber worker
==================
WARNING: DATA RACE
Write at 0x00c000154383 by goroutine 53:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1563 +0x82d
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.20.3/x64/src/runtime/panic.go:476 +0x32
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1629 +0x47

Previous read at 0x00c000154383 by goroutine 108:
  testing.(*common).logDepth()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:992 +0xc4
  testing.(*common).log()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:985 +0x84
  testing.(*common).Log()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1026 +0x5b
  github.com/kong/kubernetes-ingress-controller/v2/internal/dataplane.TestAdminAPIClientsManager_ConcurrentNotify.func1()
      /home/runner/work/kubernetes-ingress-controller/kubernetes-ingress-controller/internal/dataplane/clients_manager_test.go:426 +0x1b4

Goroutine 53 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1629 +0x805
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:2036 +0x8d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1576 +0x216
  testing.runTests()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:2034 +0x87c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1906 +0xb44
  main.main()
      _testmain.go:108 +0x2fc

Goroutine 108 (finished) created at:
  github.com/kong/kubernetes-ingress-controller/v2/internal/dataplane.TestAdminAPIClientsManager_ConcurrentNotify()
      /home/runner/work/kubernetes-ingress-controller/kubernetes-ingress-controller/internal/dataplane/clients_manager_test.go:417 +0x93d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.3/x64/src/testing/testing.go:1629 +0x47
==================

I believe this the reason for this is that we call t.Log() in a separate goroutine when the test has already returned and we're past the time the context's cancel has been called.
The actual data race seems to be between this write https://github.com/golang/go/blob/go1.20.3/src/testing/testing.go#L1563 and this read https://github.com/golang/go/blob/go1.20.3/src/testing/testing.go#L992.
There exist issues on the internet with non std lib logging libraries impacted by this "use case": https://github.com/uber-go/zap/issues/687.
#3896 should fix it by removing the log call.