squid:S1166 - Exception handlers should preserve the original exception

This pull request is focused on resolving occurrences of Sonar rule
squid:S1166 - Exception handlers should preserve the original exception.
This pull request removes 60 minutes of technical debt.
You can find more information about the issue here:
https://dev.eclipse.org/sonar/rules/show/squid:S1166
Please let me know if you have any questions.
George Kankava

Changes Unknown when pulling ae811564267c60a0d76352fce35e3181485f533b on DevFactory:staging/exception-handlers-should-preserve-the-original-exception-fix-1 into ** on clun:master**.


Cannot read property 'src' of undefined

I added a new page 'About Me` by making a new post and turning it into a static page. That worked.
But navigating to that page and the click back on Home page always gives me this error:

It also fails to load the Blog Cover.
I tried creating other pages always with the same result.
If i try the same thing on casper theme there is no error, so it must be something about Ghostium, but i can't figure out what it is!

Fixed by commenting out this part:
   ` //s.src = '//' + disqus_shortname + '.disqus.com/count.js';`

Everything seems to work even without it.


Add --username and --password options to publish command.

Thanks! Looks good to me!
Could you rebase your PR to resolve the current conflict in the CHANGELOG.md file?

@sdispater Please check if I've done everything correctly with the conflict. Thanks!

@moigagoo You still need to rebase like you did in #74

@sdispater Sorry, I gave up and opened a new PR: https://github.com/sdispater/poetry/pull/83


Released binary seems to use non-standard hardcoded OpenSSL paths

I was trying this project out today in my search for a better ACME client and couldn't seem to get past an error stating https://acme-v01.api.letsencrypt.org/directory: The OpenSSL library reported an error: The OpenSSL library reported an error: error:14007086:SSL routines:CONNECT_CR_CERT:certificate verify failed:ssl_clnt.c:1026: . The binary appears to be statically linked and is using paths to your home directory instead of the default system paths for SSL certificates. Given that OpenSSL is statically linked I'm not sure how useful releasing a binary is, since different distributions all have different places where they keep their CA bundles.
open("/home/onur/code/libressl/etc/ssl/cert.pem", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/onur/code/libressl/etc/ssl/certs/2e5ac55d.0", 0x7fffc81ce740) = -1 ENOENT (No such file or directory)
stat("/home/onur/code/libressl/etc/ssl/certs/ef954a4e.0", 0x7fffc81ce740) = -1 ENOENT (No such file or directory)
stat("/home/onur/code/libressl/etc/ssl/certs/b3964d1c.0", 0x7fffc81ce740) = -1 ENOENT (No such file or directory)

Thanks for reporting.
Looks like my always wanted statically linked binary builds idea died. I removed binaries, and no idea how to bind cert.pem to a statically compiled libssl build. You can still install and use acme-client with cargo.


F5 collectors should have a dedicated function for creating the authentication token

See #152 for more details

No longer needed.


suggestions regarding readME doc.

For people who used Google Fit or its API, or even with an Android development experience in the past might be able to pick this Repository fairly easily.
But many of them did not have that background since react-native itself as well as this Repo mainly attracts front-end dev who has JavaScript experience.
Besides the general setup pain ( this is the problem with google fit itself ), another important thing is to pre-installed **Google Fit** on your device, most functions reply on that.
Even though the readMe did mention it's for interacting with Google Fit, and one function did mention it does not require google fit to be installed, it's not that obvious (at least for me).
IMO the requirement of installing google fit should be emphasized and placed near the top of the page, which can ease most issues regarding fetching empty data after successfully auth.
And there is also a REST API from Google Fit that can retrieve user data from any platforms, but the API we are using here is the Androids API. It could be slightly misleading sometimes. I do see the potential if we can also make use of REST API in the future.
@StasDoskalenko  Nevertheless, this is a great repo and just some of my personal feelings after using it.
By the way, people who have trouble with finding the debug.keystore file.  it's located in your project folder android/app/debug.keystore, you need it to get your Dev SHA for setting up the authentication in google cloud console. You might also need Separated keystore for Production.
(Production keystore Ref: https://reactnative.dev/docs/signed-apk-android#generating-an-upload-key).

@aboveyunhai thank you so much for this info! I will add this to Readme.


slow Transposed Convolution (conv_transpose, conv_general_dilated?)

I'm having massive slow down when using transposed convolution layer.
I noticed this problem when I was converting tf models to haiku models. And I tested on flax and the result was the same.
I'm guessing some issues in conv_general_dilated or in conv_general_dilated, but I could not find by myself.
I've attached some test code using flax. I think conv and tranposed conv layers should take almost the same time, but transposed conv layer takes 4-5 times more.
https://colab.research.google.com/drive/1BSHfyB5hrUs_tVcoBJlBPVU4zpesgAxk?usp=sharing

Are you running this on CPU, GPU or TPU?

I'm running on GPU. I haven't tested on TPU.

I looked into it and it looks like a blind spot in cuDNN. Tracing GPU execution indicates that the regular convolution uses a different algorithm than its transpose in the 3D case (winograd vs implicit GEMM), which seems to be the reason for the slowdown. After replacing 3D convolutions with 2D convolutions the chosen kernels still use different algorithms (winograd vs FFT), but the overall runtime ends up being almost equal (0.18s vs 0.19s). I don't think there's anything we can do to fix this, except hope that NVIDIA will write more kernels for 3D transposed convolutions 😕
I'll close this since there doesn't seem to be any action we can take, but please feel free to reopen if you have any reason to suspect that it is an error on our (or XLA's) side.

@apaszke
Thank you for checking this problem!
I will use NN upsampling and convolution instead.

I cannot see the original notebook above since it's been removed since, but at least in the case of 1d convolution this problem still persists and I believe it is not a cuDNN blind spot.
Transpose convolutions using both cpu and gpu backends are significantly slower than regular convolutions in Jax (so likely not a CUDA problem).  Additionally, here is an example comparing them to their Torch counterparts; regular convolutions are just as performant between the two frameworks but transpose convolutions are much slower when using Jax.
https://colab.research.google.com/drive/19g_VmTrK0bScC6p5sqbuND7n0FVi4GqW?usp=sharing


Parallel merge sort (#6162)

Which issue does this PR close?

Closes #6162
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Will run benchmarks prior to merge
Are there any user-facing changes?

I plan to review this carefully tomorrow morning

I think we should merge it


Fixes #1998 cookiecutter recommended feed should use HTTPS by default

Fixes #1998 cookiecutter recommended feed should use HTTPS by default
Changes fwlink constants to be HTTPS

👍


.Center(xVal, yVal) doesn't exist

.Center(xVal, yVal) property doesn't exist in public enum Property
(despite documentation)

Thanks for the catch, looks like I forgot to come back and add that in after writing that part of the docs. I'll get that in the 0.9.0 release today with fixes for your other two issues.

Great! 👍

Fixed in 0.9.0 I just pushed out.


Create docker client mock

dockertest provides functionalities to test code written in both sync and async syntax where testify's mock only useful for testing sync code. Meaning by async syntax please see go-application's event-oriented package API to get an idea.
Tests that are hangs out are totally due to programmer error but I understand and agree on the difficulty of having this kinda possibility while creating new tests. We can drop the async testing support to avoid this case after being sure of that we don't have any code logic that cannot be synchronised and we're sure that we'll not have any code in async syntex, in future.
I'm strongly against of directly using testify/mock while creating unit tests, even if we use it we should still keep something similar to these ProvideX and LastX methods. These APIs provides a nice abstraction and they're more user friendly while creating new tests. For example while writing unit tests for api or service package I don't like to use low level API's from testify/mock.
As a result I don't see any advantage of using testify/mock other then solving tests that are hangs out but this can be achived by dockertest too by removing async testing support. The reason of why we use these channels is to make async testing possible but if programmer misuses them it can block the tests. The reason why I adopted this method is go-application only can be tested this way due to its async API. And I followed the same pattern in here core too but it seems that having this async testing feature doesn't make sense for core. I might consider to drop this async testing feature of dockertest which can reduce to complexity while writing tests for complicated features of core.
We can close this PR and open an issue about reducing complexity on dockertests and it can be assigned to me.

some example based on our code and how it can benefits compare to the mock that we have could be nice. Now we already have some mock so we need a good reason to change it.
I like the idea to use mock. I definitely prefer that is already known by many people instead of a custom mocking system. It's always better to use existing standards but I would love to have a comparison with an actual test before and after this.
I think the best use case would be the delete network in the container package. This one need to do some calls to docker to delete the network and also to listen to the stream of events from docker. I think it's the most complex use that we have right now.
https://github.com/mesg-foundation/core/blob/3dbd069af961501674e0b5fc641f6e79ff9728c7/container/network_test.go#L70-L95

@antho1404 I also would like to see testify/mock for unit test equivalent of this integration test. Because it is a complex tests.

func TestDeleteNetwork(t *testing.T) {
  var (
    namespace = []string{"namespace"}
    m         = dockermock.NewCommonAPIClientMock()
    id        = "id"
  )

  // New() calls - can be extract to setupNewClient(t *testing.T) for other tests
  m.On("NegotiateAPIVersion", mock.Anything).Once()
  m.On("Info", mock.Anything).Once().
    Return(types.Info{}, nil)
  m.On("SwarmInit", mock.Anything, mock.Anything).Once().
    Return("", nil)
  m.On("NetworkInspect", mock.Anything, mock.Anything, mock.Anything).Once().
    Return(types.NetworkResource{}, nil)
  m.On("NetworkCreate", mock.Anything, mock.Anything, mock.Anything).Once().
    Return(types.NetworkCreateResponse{}, nil)
  c, _ := New(ClientOption(m))

  // DeleteNetowrk() calls
  m.On("NetworkInspect", mock.Anything, Namespace(namespace), types.NetworkInspectOptions{}).Once().
    Return(types.NetworkResource{ID: id}, nil)
  msgC := make(chan events.Message, 1)
  msgC <- events.Message{ID: id}
  errC := make(chan error)
  m.On("Events", mock.Anything, mock.Anything).
    Return((<-chan events.Message)(msgC), (<-chan error)(errC))
  m.On("NetworkRemove", mock.Anything, id).
    Return(nil)
  require.Nil(t, c.DeleteNetwork(namespace))

  m.AssertExpectations(t)
}

This is one with DockerMock usage.

I kind of like it, this example is a bit longer but still really easy to understand and we can definitely extract some parts in other functions (the setupNewClient function you propose).
I like the event driven approach, the On().Once().Return()

I'm also going to do some more experimenting on testify/mock and hopefully send some feedbacks today.

experimenting with https://github.com/mesg-foundation/core/pull/506

I'm pretty happy with testing/mock as I experiment it creating unit tests for service package. With testing/mock we can conditional have return values depending on different arguments for same methods. This is a very important thing and needed a lot for our cases, while testing complex methods.
Asserting method call counts and arguments are also nicely covert with testing/mock and can be made in a simple way.

What should we do with this PR?
Mocking docker is useful only to test really quickly that we didn't break our codebase. But anyway, it will be tested against the real docker engine in integration test.
I feel it's a lot of code for unit testing and we may want to run integration test to be sure.

@NicolasMahe the point of this package was to slowly replace dockertest and I think we will eventually do this (maybe not now) we can close this PR (and reopen if needed), merge it and start using in new tests or keep it open

Why not generating the mock from the interface with Mockery?

@NicolasMahe It was before I know about mockery


Just FYI

Violet Blue has some tweets about this https://twitter.com/violetblue/status/740445576643383296 (and https://twitter.com/violetblue/ in general)

Added. Thanks! If you happen to know where I could get more information on the plagiarism allegations other than https://web.archive.org/web/20160605152831/http://comments.gmane.org/gmane.comp.security.otr.devel/1546, let me know. I haven't seen anyone offer specifics yet.

I don't, I'm sorry. I know Meredith Patterson and her spouse were directly affected; Quinn Norton might also know details? But I haven't seen anything particularly useful being posted.

There is this tweet from 2013 (which would have been well AFTER Sassaman's suicide, and well before the current round of horrors): https://twitter.com/travisgoodspeed/status/302231453670977536

Yes, that's the conversation I'd found dated around the same time (mid-Feb 2013) as https://web.archive.org/web/20160605152831/http://comments.gmane.org/gmane.comp.security.otr.devel/1546. If I'm not mistaken that one looks like it ruled in Appelbaum's favour, not Nadim's. Norton has only said this https://archive.is/5Sywt so far. I'm just surprised more people haven't written about it in more detail if it was so prolific, reason being that it's much easier to document as evidence than the other allegations at the moment.


Add groups to dependabot

🗣 Description

This PR adds groups to dependabots config.
Also, a commit that fixes a comment snuck in.  ¯_(ツ)_/¯
💭 Motivation and context

Minimize PRs as I wake this repo up.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>5
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.4%) to 14.725%

Totals

Change from base Build<PHONE_NUMBER>:
-0.4%

Covered Lines:
115

Relevant Lines:
609

💛  - Coveralls


Integrate llvm/llvm-project@27ac46e6bea2

Updated to llvm/llvm-project@27ac46e6bea2

Used LLVM MathExtras.h to replace MLIR one
Updated applySignatureConversion usage

Updated to openxla/stablehlo@dd48ec5

chlo.minimum_broadcast_shapes op was removed
https://github.com/openxla/stablehlo/pull/2287
chlo.dynamic_reshape op was removed
https://github.com/openxla/stablehlo/pull/2286
Added batching dims to scatter dims
https://github.com/openxla/stablehlo/pull/2259

Updated to llvm/torch-mlir@77d7f64

(Replaced by https://github.com/iree-org/iree/pull/17662)


next.js > 13.4.3 breaks next-auth + next-intl integration

Description
Since Next.js upgrade to > 13.4.3 this started to happens:
./node_modules/next-auth/next/middleware.js
Module parse failed: Identifier 'NextResponse' has already been declared (3:6)
| "use strict";
| const NextResponse = require("next/dist/server/web/spec-extension/response").NextResponse;
> const NextResponse = require("next/dist/server/web/spec-extension/response").NextResponse;
| var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
| Object.defineProperty(exports, "__esModule", {

Confirmed that works properly with 13.4.2 at least.
Mandatory reproduction URL (CodeSandbox or GitHub repository)
Not possible
Reproduction description
Steps to reproduce:

Switch to folder next-intl/examples/example-next-13-next-auth
npm add next@latest ( or<EMAIL_ADDRESS>)
npm run dev ( or npm run build )

Expected behaviour
Compilation pass and pages can be accessed / loggedin

Same issue as here: https://github.com/nextauthjs/next-auth/issues/7650.
Fixed by installing latest canary.


[Bug]: Digital clock is not responsive

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
Digital clock is not responsive
Expected behavior
It should be responsive
Add ScreenShots

On which device are you experiencing this bug?
Android, iPhone
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[ ] I'm a SSOC'24 contributor
[X] I have starred the repository

@agastya3636 you can start working on this


Experinemtal parser generates inconsistent operation enum naming

Description
Description
The experimental OpenAPI parser is generating inconsistent naming patterns for operation enums compared to the previous parser.
Previous:
export const Operation = { 	EQUALS: "Equals", 	NOT_EQUALS: "NotEquals", 	IN: "In", 	NOT_IN: "NotIn", 	GREATER_THEN: "GreaterThen", 	LESS_THAN: "LessThan", 	BETWEEN: "Between", 	EMPTY: "Empty", 	NOT_EMPTY: "NotEmpty", 	NONE: "None", } as const;
Current:
export const Operation = { 	EQUALS: "Equals", 	NOTEQUALS: "NotEquals", 	IN: "In", 	NOTIN: "NotIn", 	GREATERTHEN: "GreaterThen", 	LESSTHAN: "LessThan", 	BETWEEN: "Between", 	EMPTY: "Empty", 	NOTEMPTY: "NotEmpty", 	NONE: "None", } as const;
This breaks existing code that references these enum values and introduces inconsistency in the naming convention.
Expected Behavior
Operation enum values should maintain consistent underscore-separated naming (e.g., NOT_EQUALS) as in the previous parser.
Current Behavior
Operation enum values are generated without underscores (e.g., NOTEQUALS), breaking existing code references.
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response

Yep! https://github.com/hey-api/openapi-ts/issues/1244


Add support for Arch Linux

Uses cronie package and service.
Waiting on confirmation this is OK before I look into the CLA stuff.

+1

Closing this in favor of #49


Make vizviewer command easy to copy and paste

Small usability improvement to make it faster / more convenient to open generated report file by copy pasting a single line in one go in the terminal.

Codecov Report

Merging #144 (e7d31dc) into master (4815724) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #144   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           22        22
  Lines         2219      2218    -1
=========================================
- Hits          2219      2218    -1

Impacted Files
Coverage Δ

src/viztracer/report_builder.py
100.00% <100.00%> (ø)

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 4815724...e7d31dc. Read the comment docs.

This looks fine to me. A quick tip: if you just want to open the report right after tracing, you can use --open for viztracer.


[QST] Warning: PipeableCallCheckWarning: Failed to detect AST node calling mutate, assuming a piping call.

Question about datar
When I run the following code
# with pandas backend
from datar import f
from datar.dplyr import mutate
from datar.tibble import tibble
# or
# from datar.all import f, mutate, filter, if_else, tibble

df = tibble(
    x=range(4),  # or c[:4]  (from datar.base import c)
    y=['zero', 'one', 'two', 'three']
)
df >> mutate(z=f.x)

I get the following warning PipeableCallCheckWarning: Failed to detect AST node calling mutate, assuming a piping call.
I want to understand what is the meaning of this warning.
My session info is the following:
-----
datar               0.15.3
datar_pandas        0.5.3
pipda               0.13.1
session_info        1.0.0
-----
Python 3.10.9 (main, Mar  1 2023, 18:23:06) [GCC 11.2.0]
Linux-6.2.0-37-generic-x86_64-with-glibc2.35
-----
Session information updated at 2023-12-06 13:49

Also when I run datar.get_versions() this is the information I get:
python      : 3.10.9 (main, Mar  1 2023, 18:23:06) [GCC 11.2.0]
datar       : 0.15.3
simplug     : 0.3.2
executing   : 2.0.1
pipda       : 0.13.1
datar-numpy : 0.3.2
numpy       : 1.26.2
datar-pandas: 0.5.3
pandas      : 2.1.1

What's the environment where you ran your code, python file, python REPL, ipython, jupyter, etc?

I am using Visual Studio Code version 1.84.2 (user setup) and running it in a conda environment.

I am going to reproduce what I exactly did and also I attach a screenshot. I apologize in advance if the problem is not related to the module.
luifrancgom@luifrancgom-HP-Compaq-6200-Pro-SFF-PC:~/Documents$ conda activate base
(base) luifrancgom@luifrancgom-HP-Compaq-6200-Pro-SFF-PC:~/Documents$ python
Python 3.10.9 (main, Mar  1 2023, 18:23:06) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datar import f
>>> from datar.dplyr import mutate
>>> from datar.tibble import tibble
>>> df = tibble(
...     x=range(4),  # or c[:4]  (from datar.base import c)
...     y=['zero', 'one', 'two', 'three']
... )
>>> df >> mutate(z=f.x)
/home/luifrancgom/anaconda3/lib/python3.10/site-packages/pipda/utils.py:89: PipeableCallCheckWarning: Failed to detect AST node calling `mutate`, assuming a piping call.
  warnings.warn(
        x        y       z
  <int64> <object> <int64>
0       0     zero       0
1       1      one       1
2       2      two       2
3       3    three       3

Thank you for your help.


Different offset for different elements

I have a use case where I need a different :offset depending on which link is clicked. I've tried dynamically setting a data property depending on currentTarget but it doesn't seem to work. Is there a way to do this I'm unaware of? If not this would be a really helpful implementation.

Nevermind, I didn't realise I had to set the :scrollOffset as well.


Fix reset form state bug

Fixes #133
Let me know if I missed any style guide points, and if the test seems sufficient.

Looks good, and all the tests pass. Thank you!


mini.files: use :w to save filesystem changes

Contributing guidelines

[X] I have read CONTRIBUTING.md
[X] I have read CODE_OF_CONDUCT.md

Module(s)
mini.files
Description
If you set the buftype to acwrite it makes it so that read/write events are handled by autocmds. Then, you can use BufWriteCmd and BufReadCmd to handle simulated read/write events.
This way, you could have :w from the mini.files buffer do the same thing as pressing = from the same buffer.

For what it's worth, I've got it working in my own config like so:
vim.api.nvim_create_autocmd('User', {
  pattern = 'MiniFilesBufferCreate',
  callback = function()
    vim.schedule(function()
      vim.api.nvim_buf_set_option(0, 'buftype', 'acwrite')
      vim.api.nvim_buf_set_name(0, require('mini.files').get_fs_entry(0, 1).path)
      vim.api.nvim_create_autocmd('BufWriteCmd', {
        buffer = 0,
        callback = function()
          require('mini.files').synchronize()
        end,
      })
    end)
  end,
})

Technical details. Saving buffer means using certain approach at adding name to buffer which I don't think I'd like to add, as it increases complexity for not much benefit (together with previous points).

With buftype=acwrite it doesn't matter at all what the buffer name is as long as it isn't blank. It just has to have any name, and then your BufWriteCmd autocmd handles "writing" the buffer, which in this case isn't a file so you don't actually need the buffer name.

For what it's worth, I've got it working in my own config like so:
vim.api.nvim_create_autocmd('User', {
  pattern = 'MiniFilesBufferCreate',
  callback = function()
    vim.schedule(function()
      vim.api.nvim_buf_set_option(0, 'buftype', 'acwrite')
      vim.api.nvim_buf_set_name(0, require('mini.files').get_fs_entry(0, 1).path)
      vim.api.nvim_create_autocmd('BufWriteCmd', {
        buffer = 0,
        callback = function()
          require('mini.files').synchronize()
        end,
      })
    end)
  end,
})

Yeah, but a more logical way of introducing working :w instead of duplicating = is to synchronize only buffer's changes. Which doesn't cover all use cases properly and means more code.

I don't think having this functionality (synchronization only of current buffer after :w or on BufWritePost event) meets reasonable threshold for "features/complexity" trade-off.
Together with mentioned earlier points, I think I'll close this as not planned.

For what it's worth, I've got it working in my own config like so:
vim.api.nvim_create_autocmd('User', {
  pattern = 'MiniFilesBufferCreate',
  callback = function()
    vim.schedule(function()
      vim.api.nvim_buf_set_option(0, 'buftype', 'acwrite')
      vim.api.nvim_buf_set_name(0, require('mini.files').get_fs_entry(0, 1).path)
      vim.api.nvim_create_autocmd('BufWriteCmd', {
        buffer = 0,
        callback = function()
          require('mini.files').synchronize()
        end,
      })
    end)
  end,
})

I had to tweak it because it failed on opening an empty directory. Instead of using the current cursor entry to name the buffer, i use the buffer number.
This is the result
vim.api.nvim_create_autocmd('User', {
        pattern = 'MiniFilesBufferCreate',
        callback = function(ev)
          print('MiniFilesBufferCreate')
          vim.schedule(function()
            print("scheduled")
            vim.api.nvim_buf_set_option(0, 'buftype', 'acwrite')
            vim.api.nvim_buf_set_name(0, tostring(vim.api.nvim_get_current_win()))
            vim.api.nvim_create_autocmd('BufWriteCmd', {
              buffer = 0,
              callback = MiniFiles.synchronize,
            })

            -- close with <esc>
            vim.keymap.set("n", "<Esc>", MiniFiles.close, { buffer = ev.buf })
          end)
        end,
      })


Make 'test' the default tactical env to refer to

Change description
Make 'test' the default tactical environment to refer to (tactical Vault paths + S2S instance). The change is required because other services that send-letter depends on use test s2s by default.
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

Can't be merged in until S2S refreshes microservice keys from Vault


Decrease Memory Consumption in GBT

User would like to train 3000 trees, while 3000 trees are all loaded into memory in master/workers.
To save memory, no need to save all 3000 trees in memory.

Close this issue as 3000 tree are about 10M size and even 5000 trees can be trained well


adding Unify code generation diff check

Added Unify code generation diff check job:

Clones the Unify SDK
Regenerates all the ZAP generated files using working branch of ZAP
Checks for git diff (fails if there is a diff)

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.70%. Comparing base (efae34c) to head (ec83e62).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1416      +/-   ##
==========================================
- Coverage   66.86%   66.70%   -0.16%
==========================================
  Files         191      193       +2
  Lines       20689    20852     +163
  Branches     4532     4572      +40
==========================================
+ Hits        13834    13910      +76
- Misses       6855     6942      +87

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


:sparkles: Implement skim() and skimmable()

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (baa58f4) 79.91% compared to head (e64313f) 80.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   79.91%   80.88%   +0.96%
==========================================
  Files          10       10
  Lines         473      476       +3
  Branches      108      109       +1
==========================================
+ Hits          378      385       +7
+ Misses         78       73       -5
- Partials       17       18       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Strange global block expression and value return bug.

const assert = @import("std").debug.assert;
const mem = @import("std").mem;

pub const Info = struct {
    version: u8,
};

pub const diamond_info = Info {
    .version = 0,
};

// If we change this to initalize with `Info { .version = 1 }`, everything works
pub const pearl_info = blk: {
    var res = diamond_info;
    res.version = 1;
    break :blk res;
};

fn getInfo(gamecode: []const u8) Info {
    if (mem.eql(u8, gamecode, "ADAE"))
        return diamond_info;

    return pearl_info;
}

// If `getInfo` is not used, `diamond_info` and `pearl_info` are correct
test "Test Ok" {
    assert(diamond_info.version == 0);
    assert(pearl_info.version == 1);
}

// Somehow the global data for `diamond_info` changed when calling `getInfo`
test "Test Fail 1" {
    const info = getInfo("ADAE");
    assert(diamond_info.version == 0);
    assert(pearl_info.version == 1);
}

// Just to show that the result of `getInfo` is also messed up
test "Test Fail 2" {
    const info = getInfo("ADAE");
    assert(info.version == 0);
}

Ugh this must have been annoying to troubleshoot. Sorry about that. Having a look.

I've reduced the test case further:
const assert = @import("std").debug.assert;

pub const Info = struct {
    version: u8,
};

pub const diamond_info = Info {
    .version = 0,
};

pub const pearl_info = blk: {
    var res = diamond_info; // I'm guessing that here we copy a pointer to ConstExprValue but we should actually copy the value, not the pointer
    res.version = 1;
    break :blk res;
};

test "Test Fail 1" {
    assert(pearl_info.version == 1);
    assert(diamond_info.version == 0);
}

const assert = @import("std").debug.assert;

pub const Info = struct {
    version: u8,
};

pub const diamond_info = Info {
    .version = 0,
};

comptime {
    var res = diamond_info;
    res.version = 1;
    assert(diamond_info.version == 0);
}


Previously deleted folders don't get watched

Describe the bug
Previously deleted folders get completely ignored by chokidar
Versions (please complete the following information):

Chokidar version: 3.4.3
Node version 15.5.0
OS version: 5.10.3-arch1-1 (Arch linux with kernel 5.10)

To Reproduce:
chokidar config:
chokidar
      .watch('.', {
        ignored: /.+\.(css)/,
        cwd: this.config.pagesDir,  // relative path
      })

(i also tried wit polling and fsEvents)
Reproducing is very easy:

watch over a folder with chokidar
create a folder (triggers event)
create a file in the folder (triggers event)
delete the folder without deleting the file first (triggers both events)
recreate the same folder with the same name (triggers event)
create a file with a random name in it (does not trigger any event)

even changing the file name does not trigger any event
am I missing something?
const chokidar = require('chokidar');
const fs = require('fs');
// One-liner for files and directories starting with 'test'
chokidar.watch('.', {}).on('all', (event, path) => {
  console.log(event, path);
});

fs.mkdirSync('folder')  // triggers event
fs.writeFileSync('folder/test.txt', 'testing 1'); // triggers event
fs.rmdirSync('folder', { recursive: true }) // triggers two events
fs.mkdirSync('folder') // triggers event
fs.writeFileSync('folder/test.txt') // SHOULD trigger an event DOES NOT trigger any event
// In a comment describe expected output versus observed problem

Expected behavior
Should trigger an event when a file is created in a folder that has previously been deleted and recreated

Have you tried using master?

Have you tried using master?

Hey thanks for the suggestion, yeah it works by installing version 3.4.4

Hey thanks for the suggestion, yeah it works by installing version 3.4.4


Surname Formatting

Special override for surname formatting (currently just using Title Case) to support correct formatting of Mc surnames (ie McHenry rather than Mchenry).

v<IP_ADDRESS>


Feature request: allow disabling certain checks

I want to start applying the tool to nixpkgs. For that I would like to disable certain checks or only enable one to keep the changes small and for example only remove extra ().

Understood. For now, I'll add a config file option, to enable/disable lints. In the future, I think I'll add a way to selectively ignore issues with a comment such as:
#statix ignore
("hello")

I think we want to add which issue should be ignored to the comment like shellcheck does.

Oh yeah, I intend to support two syntaxes:
# skip all issues on next line
#statix ignore

# skip specific issues on next line
#statix ignore: useless_parens, empty_let_in

With the latest release (v0.4.1), you can disable checks with a configuration file. Please see https://github.com/nerdypepper/statix#configuration. Feel free to reopen or create a new issue if there are bugs with the new flag!


Grunt: use chokidar instead of grunt-contrib-watch

grunt-contrib-watch has some serious flaws, especially when using vagrant-boxes. Developers should not have to work for their tools, the tools should work for them!
grunt-contrib-watch is based on gaze
grunt-chokidar is a fork of grunt-contrib-watch (pretty much compatible) based on chokidar
What this change does:

Use grunt-chokidar instead of grunt-contrib-watch
Work around problems like not catching file-added events.
Use the option spawn: false to speed up tasks, by eliminating the ~500ms delay, which comes when spawning tasks instead of just running them. I have tested this for a whole day of frontend-work without issues. Notable speed-up!
Rename the chokidar-task to watch, so no compatibility-issues arise

Why chokidar over gaze:
stolen from the chokidar project-page

Node.js fs.watch:

Doesn't report filenames on OS X.
Doesn't report events at all when using editors like Sublime on OS X.
Often reports events twice.
Emits most changes as rename.
Has a lot of other issues
Does not provide an easy way to recursively watch file trees.

Node.js fs.watchFile:

Almost as bad at event handling.
Also does not provide any recursive watching.
Results in high CPU utilization.

Chokidar resolves these problems.

What will be broken:
Nothing

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/#/issues/SW-15093.
Please use this issue to track the state of your pull request.

Thank you for your PR.
We decided to decline this pull request, because there are not enough benefits for replacing the existing task runner in the standard. In first hand the grunt watcher is just a recommendation. All developers should feel free to use the task runner of their choice, either if it's grunt, gulp or whatever.

Hello Philipp, please re-review this PR. This does not change the Task-Runner. This PR just replaces the standard file-watcher with a file-watcher which is more reliable.
The only thing which changes in terms of functionality:
Reliable Less- & JS-Compilation on file-creation and deletion

This is in no way a replacement for grunt.
This changes no workflows.
This improves developers life by not having to restart grunt each time a file is deleted or created.

Hello,
we have to do some further tests and come back to this PR in a future sprint.

Hey @screeny05,
testing chokidar for some time now. Your main argument about the auto detection of new files is nonsense, because you have to add the files to the system before they get used. New JS and CSS files have to be added to the Theme.php file and new LESS files are added by importing them in the all.less file. Tracking new files which are not used by the system makes no sense at all.
One advantage I have to admit is the performance increase. The chokidar does the task up to 2 seconds faster. That is defenetly an advantage. I did the tests now on Ubuntu (Vagrant), Ubuntu (VM) and Windows. I will let some of our Mac guys test the thing too. If everything works fine it could be added to the next patch release.


Know if device is larger or lower than breakpoint

Hi!
Is there any way to know if device size is larger or lower than specific breakpoint? I want to render something conditionally if device width > DEVICE_SIZES.MD and it would be useful to have something like isDeviceLarger and isDeviceSmaller helpers.
I did not find way in Readme or maybe I'm missing something?
Thank you for this lib anyway, it's really useful!

Hi @matziol, I am assuming you are talking about conditional rendering not styling. If you are talking about styling then you can use: minSize and maxSize to do what you are talking about. https://github.com/khevamann/rn-responsive-styles#simple-media-queries
If you are talking about rendering which I am assuming then there is no current way. I will consider adding that as it wouldn't be too difficult, I just want to keep the API as clear and simple as possible. Maybe an additional helper that uses useDeviceSize internally. I will think about this some more and get back to you hopefully tomorrow.

Yes, I'm talking about conditional rendering.
I figured a way to achieve what I want and currently using helper that looks like this:
import { minSize, DEVICE_SIZES } from 'rn-responsive-styles';
/**
 *
 * @param deviceSize size provided by `useDeviceSize` hook
 * @param minimumSize the minimum size that meets the rule
 * @returns true if deviceSize >= minimumSize, false otherwise
 */

const isDeviceMinimumSize = (deviceSize: DEVICE_SIZES, minimumSize: DEVICE_SIZES) => {
	const largerBreakpoints = minSize(minimumSize).split('+');
	if (largerBreakpoints.length < 1) {
		return false;
	}

	return largerBreakpoints.includes(deviceSize);
};

export { isDeviceMinimumSize };

I'm using it in component like:
export const ExampleComponent = () => {
  const deviceSize = useDeviceSize();
  const isDeviceMinLarge = isDeviceMinimumSize(deviceSize, DEVICE_SIZES.LG);
  const isDeviceMinMedium = isDeviceMinimumSize(deviceSize, DEVICE_SIZES.MD);

  return (
    <View>
      {isDeviceMinLarge && (
        <Text>I am only on large or extra large screen</Text>
      )}
      {isDeviceMinMedium ? (
        <Text>I am on medium, large and extra large screen</Text>
      ) : (
        <Text>I am on sizes below medium - small and extra small!</Text>
      )}
    </View>
  );
};

Hope it'll be helpful!


Create CONTRIBUTING doc

Mikko suggested (here: https://github.com/recastnavigation/recastnavigation/issues/123#issuecomment-162223614) that we should have a CONTRIBUTING.md doc along with a code of conduct.
For the code of conduct, Mikko's suggestion of the todo group template looks good to me:
http://todogroup.org/opencodeofconduct/
I suggest we use this, and add it as either "CODE_OF_CONDUCT.md" (goes well with the all caps README and CONTRIBUTING docs) or "Conduct.md" (my preference) in the root. These seem to be the two usual names for it in other open source projects.
For the CONTRIBUTING doc, Mikko suggested something like this one by facebook:
https://github.com/facebook/react/blob/master/CONTRIBUTING.md
However, of all the docs I've seen, I actually like the angular.js one the best:
https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md
I propose we take this, and remove or adapt the irrelevant bits to suit our project.

Personally I don't think codes of conduct add much value - they should really go without saying. To me it seems like it's just something that everyone adds to their open source projects to be politically correct. "Be respectful" - oh, okay, I will now that there is a document that says I should. :smile:
To be clear I have no problems with adding one, I just don't see the value in them, so I can't really comment on that particular one.
For the contribution document:
The Angular one is a little long, but I suppose that would be reduced since R&D is a bit smaller of a project. For commit message format I think we should use something like the .NET foundation, which can be seen here; it also looks quite a bit simpler than Angular's.

I agree. I don't think we necessarily need everything the angular doc has, but a lot of it is relevant.  It also provides a nice framework for us to model future additions and modifications after.  Having conventions like "squash commits before submitting PR's" and the like in a centralized location is great to refer people to, rather than just addressing these things on a case-by-case basis.
A code of conduct is something I think is best to have and not need.  It's easier to refer someone to a document that they implicitly agreed to than address their behavior individually.  There's not a lot of downsides to having one, and if it never gets used, (which it probably won't) all the better.  :smile:

Sounds good to me. :1:

@Janiels rules written on the wall save a lot of trouble when things go south. Something as simple as "hey you, don't do that, it is against our rules, see here" is way more effective (no speculation needed) and easier (all community members can do that) than trying to explain why some behavior is bad. Gladly, I have had only a handful of incidents over the years (mostly bad behavior towards me). It's a good thing to have and a positive signal to a potential contributor that things are handled nicely here.

@memononen I see. It's probably just because I'm inexperienced being on this side of the fence. :)

Code of Conduct seems to be a trending topic across OSS world, I find http://www.infoworld.com/article/3026196/open-source-tools/are-codes-of-conduct-dangerous-to-open-source-software-development.html and the linked https://github.com/domgetter/NCoC very interesting

What is NCoC
No Code Of Conduct is a groundbreaking new idea. Designed to help you find communities and projects that will not get stuck endlessly debating how members should behave in their communities, only to be found to never be fully resolved to anyone's liking.

This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.

Hmm. Not totally sure I agree with the linked viewpoints. The NCoC literally says "Whatever you do, don't make a scene", which is a somewhat outdated approach to discrimination to say the least. And the chap in the infoworld article seems to be claiming that codes of conduct are another form of repression which is rather facetious. If he's genuinely fearful of losing his job over CoC violations he's probably done something really quite bad.
To be clear, we're going to be sensible in managing this project (no 'endless debates'), and will adopt a CoC document that we can point to should anything happen that would be a "grey area" without the doc. We won't be aggressively ramming it down anyone's throats. As in the good bit of the NCoC, "we're all adults". That's all.
My point of view is that I don't 100% understand the value of such a document, but that as a white middle class male I probably wouldn't. If it helps someone else and all I have to do is add the doc, and continue trying to be a nice tolerant guy, then that's a good tradeoff.

I had pretty much what @hymerman said in my mind when I suggested having the CoC. IMHO, it is the right side to err in case of no strong opinions :)

NCoC seems a bit...brash.  Lets just use the auto-generated one that @hymerman linked and save the brain cells for other things :stuck_out_tongue:


Error when running on windows

Getting an error on line 123.
D:\Downloads\OpenSea-NFT-Stealer-master>python opensea.py invisiblefriends
Beginning download of "invisiblefriends" collection.
Traceback (most recent call last):
File "D:\Downloads\OpenSea-NFT-Stealer-master\opensea.py", line 123, in
data = json.loads(scraper.get(f"https://api.opensea.io/api/v1/assets?order_direction=asc{token_ids}&limit=50"
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Same issue on Linux

@sj-dan any thoughts on how we can resolve this? Thanks!

@sj-dan any thoughts on how we can resolve this? Thanks!

This kind of error just means that you're not getting the JSON response. It could be for a number of reasons. The most probable it could just be Cloudflare misbehaving. Unfortunately, there's no 1 way to solve this error, and most the time it goes away on its own after a bit.


SQLite database produces a lot of storage writes

Expected behavior
System.db is not a huge database. It should be humble and not eat up to much resources, it's just a small database.
Actual behavior
With default settings SQLite does a lot of storage reads and writes.
Steps to reproduce the problem
I've looked onto my nodes (node process only, excluding ArangoDB) and they write about 310MB per hour on average and read 4GB per hour on average (and it's all about system.db). Which is quite a lot for a database which total size is 1GB-2GB.
I tried to follow this guide (https://phiresky.github.io/blog/2020/sqlite-performance-tuning/), but it seems that only one option available for me is to change journal_mode. All other options seem to stay changed only within one connection, so they can be configured within node code only.
I've tried to set journal_mode to WAL (instead of default DELETE) and the total amount of writes done by system.db dropped about 2x-3x. Which is quite substantial.
So my request is to check on SQLite options as there are simple ways how its resource consumption can be optimized significantly. Like changing journal_mode to WAL (or maybe MEMORY, depends on backup process) or running "PRAGMA optimize". Increasing cache size from default 2MB also could help (PRAGMA cache_size), as well as switching from FULL synchronous to NORMAL.
Disclaimer
Please be aware that the issue reported on a public repository allows everyone to see your node logs, node details, and contact details. If you have any sensitive information, feel free to share it by sending an email to<EMAIL_ADDRESS>

Also running things like
vacuum;
reindex;
pragma optimize;
on regular basis can reduce read IOPS workload generated by node.
I've just ran them on nodes with system.db 1GB-2GB and read IOPS dropped about 2x.

This issue is not relevant because it was for v5 and current version of OT-node is v6.


Fix MethodKeyRt override & Error enhance

What is the purpose of the change

Fix java.lang.ArithmeticException
Error enhance when calc metrics

Brief changelog
 THROW-EXCEPTION  java.lang.ArithmeticException: / by zero
                    at org.apache.dubbo.metrics.data.RtStatComposite.lambda$initStats$19(RtStatComposite.java:90)
                    at org.apache.dubbo.metrics.data.RtStatComposite.lambda$export$20(RtStatComposite.java:204)
                    at io.micrometer.core.instrument.internal.DefaultGauge.value(DefaultGauge.java:40)
                    at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$newGauge$3(PrometheusMeterRegistry.java:230)
                    at io.micrometer.prometheus.MicrometerCollector.lambda$collect$0(MicrometerCollector.java:81)

Verifying this change

Checklist

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Add some description to dubbo-website project if you are requesting to add a feature.
[ ] GitHub Actions works fine on your own branch.
[ ] If this contribution is large, please follow the Software Donation Guide.

@songxiaosheng PTAL

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e26a22d) 70.39% compared to head (1aae5cf) 70.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##              3.2   #13580      +/-   ##
==========================================
- Coverage   70.39%   70.38%   -0.01%
==========================================
  Files        1604     1604
  Lines       69957    69967      +10
  Branches    10093    10096       +3
==========================================
+ Hits        49246    49248       +2
- Misses      16082    16098      +16
+ Partials     4629     4621       -8

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Integration test cases https://github.com/apache/dubbo-integration-cases/pull/4


--using_facts_from is not properly reset

While tracking a recent regression in hacl-star, I found that a --using_facts_from option that was set in a dependency wasn't properly reset and caused some subsequent queries to fail:
module M
type t = | T: n:int -> t
#reset-options "--using_facts_from Prims" // Works if this line is commented out
#reset-options "--z3refresh"
let x : v:t{T?.n v == 0} = T 0

I did some digging; didn't solve the problem, but hopefully this helps the next person.
First of all, the option is definitely correctly set back to its default value (you can easily check with M-x fstar-list-options).
There are only two references to the option: https://github.com/FStarLang/FStar/blob/master/src/typechecker/FStar.TypeChecker.Env.fs#L183-L185 and https://github.com/FStarLang/FStar/blob/master/src/typechecker/FStar.TypeChecker.Tc.fs#L1464. The former looks more suspicious than the latter.

Actually that call looks fine (and it's only referenced in one place).
It's also curious that this bug manifests even if you backtrack over the #reset-options "--using_facts_from Prims" and then comment it out, so whatever state is getting messed up is backtracked.

Thanks @mtzguido for the fix!
I found a workaround in the meantime: use #set-options instead of #reset-options to set --using_facts_from.

Sorry, this was my bad. The weird handling you see there is because while using_facts_from is not just an option, but a part of the environment which needs to be updated. When using #reset-options, we need to take its new value explicitly and inject it into the environment. I had simply forgotten to check that if the option is is not present, we should reset the current set of facts from the current environment.

I found a workaround in the meantime: use #set-options instead of #reset-options to set --using_facts_from.

I believe #set-options wasn't taking using_facts_from into account as it should have :(... just fixed that too. Pushing to master when CI allows.

Fix now in master.
@tchajed: I tried to trigger an error in the interactive mode by backtracking over the #reset-options, but couldn't find anything wrong (after the fix, of course). Could you check if something is wrong and reopen if so?

I don't think there's anything wrong, it just surprised me in my debugging that backtracking over the #reset-options worked; given the fix this isn't surprising, since the old Env.env is part of the state that's restored. The bug was actually with how the state is manipulated (specifically, how an unset using_facts_from list is handled), not in backtracking.

Incidentally this bug would have been prevented if we didn't use Unset to represent List [] for the using_facts_from option - maybe we should do that?

Ah, I misread, I thought you meant backtracking wasn't working properly. Thanks!

No strong preference for me, but note that it requires a small change in Tc.fs, since when the option is present we append a ([], false) which represents "and nothing else".

@mtzguido @tchajed This would be a nice change; AFAICT, this is the only option that behaves this way (have a special Unset state that means something different from [])
Something like this?
diff --git a/src/basic/FStar.Options.fs b/src/basic/FStar.Options.fs
index dc260aa..8e0f4f0 100644
--- a/src/basic/FStar.Options.fs
+++ b/src/basic/FStar.Options.fs
@@ -186,7 +186,7 @@ let defaults =
       ("use_native_tactics"           , Unset);
       ("use_eq_at_higher_order"       , Bool false);
       ("use_hints"                    , Bool false);
-      ("using_facts_from"             , Unset);
+      ("using_facts_from"             , List []);
       ("verify"                       , Bool true);
       ("verify_all"                   , Bool false);
       ("verify_module"                , List []);
@@ -290,7 +290,7 @@ let get_use_eq_at_higher_order  ()      = lookup_opt "use_eq_at_higher_order"
 let get_use_hints               ()      = lookup_opt "use_hints"                as_bool
 let get_use_native_tactics      ()      = lookup_opt "use_native_tactics"       (as_option as_string)
 let get_use_tactics             ()      = not (lookup_opt "no_tactics"          as_bool)
-let get_using_facts_from        ()      = lookup_opt "using_facts_from"         (as_option (as_list as_string))
+let get_using_facts_from        ()      = lookup_opt "using_facts_from"         (as_list as_string)
 let get_verify_all              ()      = lookup_opt "verify_all"               as_bool
 let get_verify_module           ()      = lookup_opt "verify_module"            (as_list as_string)
 let get___temp_no_proj          ()      = lookup_opt "__temp_no_proj"           (as_list as_string)
diff --git a/src/typechecker/FStar.TypeChecker.Env.fs b/src/typechecker/FStar.TypeChecker.Env.fs
index 4ec701f..15b674f 100644
--- a/src/typechecker/FStar.TypeChecker.Env.fs
+++ b/src/typechecker/FStar.TypeChecker.Env.fs
@@ -190,8 +190,8 @@ let initial_env type_of universe_of solver module_lid =
     use_bv_sorts=false;
     qname_and_index=None;
     proof_ns = (match Options.using_facts_from () with
-               | Some ns -> [(List.map (fun s -> (Ident.path_of_text s, true)) ns)@[([], false)]]
-               | None -> [[]]);
+               | [] -> [[]]
+               | ns -> [(List.map (fun s -> (Ident.path_of_text s, true)) ns)@[([], false)]]);
     synth = (fun e g tau -> failwith "no synthesizer available");
     is_native_tactic = (fun _ -> false);
     identifier_info=BU.mk_ref FStar.TypeChecker.Common.id_info_table_empty;
diff --git a/src/typechecker/FStar.TypeChecker.Tc.fs b/src/typechecker/FStar.TypeChecker.Tc.fs
index 885ee4d..c9d6a07 100644
--- a/src/typechecker/FStar.TypeChecker.Tc.fs
+++ b/src/typechecker/FStar.TypeChecker.Tc.fs
@@ -1492,11 +1492,11 @@ let add_sigelt_to_env (env:Env.env) (se:sigelt) :Env.env =
      | ResetOptions _ ->
         // `using_facts_from` requires some special handling..
         begin match Options.using_facts_from () with
-        | Some ns ->
+        | [] ->
+            { env with proof_ns = [[]] }
+        | ns ->
             let proof_ns = [(List.map (fun s -> (Ident.path_of_text s, true)) ns)@[([], false)]] in
             { env with proof_ns = proof_ns }
-        | None ->
-            { env with proof_ns = [[]] }
         end
      | _ -> env)
   | Sig_new_effect_for_free _ -> env


[13pt] Dockerfile.prod: make a lighter version

We currently have a Dockerfile what we use for all docker images. Make a new Dockerfile.prod that is for EC2 Prod machine and fargates, that will be lighter. aka.. remove Jupyter and I believe there are others. Tools in docker for dev only not needed in prod enviros.
We will need to talk about if this is worth having two docker images, but we did along time ago.

Rob and I decided to not move forward with this.


add and document MIRI_LIB_SRC env var to set the source from which Miri builds the standard library

This is just an alias of XARGO_RUST_SRC, but avoids exposing how exactly we use xargo.

@bors r+

:pushpin: Commit e51810df2c11e2a58de77d4b304f78d93851fca9 has been approved by oli-obk

:hourglass: Testing commit e51810df2c11e2a58de77d4b304f78d93851fca9 with merge 2170d7a7c9ee7c7ee943acf6d7db928b9587cb39...


double converted to int

{"price":830.1}  -> double price;
{"price":830.0}  -> int price  ？

This is a dart issue documented in the project caveats section:
Dart automatically casts doubles without decimals (like 10.0) to int. Use doubles with at least one decimal number.

Thank you

@javiercbk #36 , that fixed ,but you json formatter still convert json like:
{
    "numberO": 1.0,
    "numberT": 1
}

to
{
    "numberO": 1,
    "numberT": 1
}

please check again. thank you.

I think this is an issue with the JSON formatter.
I format the json in order to easily pin point warnings for the user, but it seems that the formatter is removing that trailing zero

@javiercbk yes, it's JSON formatter's issus. maybe this JSON formatter is unnecessary， you can remove it...


[WIP]Added calculation of the flavor

Coverage decreased (-1.1%) to 97.044% when pulling e0e11d4fca5dbb9f6623f95c905b8098ddaba068 on aljesusg:flavor_in_data into f581cb6e5c7f37e3bd2bcb18e9cbda6bb94645e1 on miq-consumption:master.

Coverage decreased (-1.1%) to 97.044% when pulling e0e11d4fca5dbb9f6623f95c905b8098ddaba068 on aljesusg:flavor_in_data into f581cb6e5c7f37e3bd2bcb18e9cbda6bb94645e1 on miq-consumption:master.

Coverage decreased (-0.4%) to 97.767% when pulling 14449243ba4db4c1fe400fa5952fa911bd0116f8 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.4%) to 97.767% when pulling 14449243ba4db4c1fe400fa5952fa911bd0116f8 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.4%) to 97.767% when pulling 14449243ba4db4c1fe400fa5952fa911bd0116f8 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.4%) to 97.767% when pulling 14449243ba4db4c1fe400fa5952fa911bd0116f8 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.1%) to 98.015% when pulling 8acfaf679c4cdda443a044699716417a68a96f15 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.1%) to 98.015% when pulling 8acfaf679c4cdda443a044699716417a68a96f15 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.

Coverage decreased (-0.1%) to 98.015% when pulling 30342c0834015830980a5000bdbca568b8e61204 on aljesusg:flavor_in_data into 1fa010fd44f2bc92acedbc3ded82914e08f26adb on miq-consumption:master.


Animation does not continue after pause and reversal

Describe the bug
If I pause and reverse the animation during a reversing state and play it back, the animation restarts instead of continuing at the current progress.
To Reproduce
Steps to reproduce the behavior:
Visit codepen for code example: https://codepen.io/om-ab-n/pen/XWoOZOd

Click "play".
Wait untill animation is finished (box on the right side)
Click "play" (animation is reversed)
Directly interrupt the animation and click "pause".
Click "reverse"
Click "play"

Expected behavior
After Step 6 the animation should continuing from the paused progress and should not restart from 0.
However, it works in the non-reversing direction.

I can verify.
Please note that there is a v4 coming sometime.

This is fixed in V4.


hash algorithms and HashAlgorithm in the PSA

The current mechanism of specifying hash algorithms via an enum that describes a fixed (and resonably small) set of possible hash functions seems inadequate.  Some targets may support things like CRC functions with arbitrary polynomial coefficients, and some may even support arbitrary user-defined functions.
Allowing the language to express architectures that could support such things is tricky.
One possibility is to keep the current enum HashAlgorithm, but allow an architecture to define extern functions that return a HashAlgorithm that does not necessarily correspond to any named member of the enum:
extern HashAlgorithm crc_poly<T>(in T coef);  // CRC with arbitrary polynomial coefficients

This works out through type checking -- the return value of such a function can be provided to an extern function or constructor that expects a HashAlgorithm, but feels a bit hacky to me.
Another possibility is just making HashAlgorithm an extern.  It would be nice to allow predefined instances of the extern in its namespace (currently not allowed by the language) and possibly factory methods that return instances (like constructors, but using names).  Something like:
extern HashAlgorithm {
    HashAlgorithm();

    static HashAlgorithm() crc32;   // default 32-bit crc
    static HashAlgorithm() crc16;   // default 16-bit crc
    static HashAlgorithm crc<T>(in T coeff);   // crc with arbitrary polynomial
    static HashAlgorithm() identity;

    abstract O hash<O, T>(int T data);    // user-defined hash function
};

I'm here using static like it is used in C++ -- to define class instances and methods.

The hard requirement in P4 is for all values with type extern to be evaluated at compile-time.
They are allocated statically by the compiler. If the factory method is evaluated at compile-time then probably we could make this work.

Yes, the idea is that all of these things should be evaluated at compile time.  Maybe const is a better descriptive work than static?
The only potentially runtime evaluated thing above is the abstract hash method.

Still, if you do this, how do you allow architectures to add new HashAlgorithm implementations to this list?


History stream errors for encrypted hypercores

This one is puzzling, to say the least. at the end of this issue, you can find an isolated test to replicate it.
NOTE: the same errors occur when using this PR of Hypercore.
none of the following issues occur if you comment line 9 to disable encryption.
What I am trying to achieve
Listen to a Hyperbee's feed, and log the changed key whenever the feed emits append event:
clone.on('append', async () => {
   // Check that the clone is setup correctly
    console.log({
      name,
      valid:
        cloneDB.feed.peers.length > 0 &&
        (encryptionKey ? !!cloneDB.feed.encryption : true),
    });

    const stream = cloneDB.createHistoryStream({
      reverse: true,
      limit: 1,
    });

    stream?.on('data', (data) => console.log('Data at: ' + name, data));
    stream?.on('error', (err) =>
      console.log('Error at: ' + name + ':\n', err),
    );
});

What happens
There are two cases:
1- Replicating an encrypted Hyperbee and creating a HistroyStream whenever the core emits append.
Two errors are thrown then it works fine :
{ name: 'ONE', valid: true }
{ name: 'ONE', valid: true }
Error at: ONE:
 TypeError: Cannot read properties of undefined (reading 'keys')
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:253:37)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: ONE:
 Error: Groups are not supported
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:29:13)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:469:18)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)
{ name: 'ONE', valid: true }
Data at: ONE { type: 'put', seq: 2, key: 'foo', value: 'update number: 1' }
{ name: 'ONE', valid: true }
Data at: ONE { type: 'put', seq: 3, key: 'foo', value: 'update number: 2' }

2- It gets worse if I try to do the same for two Hyperbees from the same Hypercore (literally the same object or two sessions of the same core), all logs are errors, here is an example:
{ name: 'ONE', valid: true }
{ name: 'TWO', valid: true }
{ name: 'ONE', valid: true }
{ name: 'TWO', valid: true }
Error at: TWO:
 RangeError: Could not decode varint
    at Object.read [as decode] (/Users/ward/code/play/hyperbee-tests/node_modules/varint/decode.js:17:13)
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:24:24)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:232:18)
    at new Pointers (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:36:29)
    at inflate (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:67:10)
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:249:20)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: ONE:
 Error: Groups are not supported
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:29:13)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:469:18)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)
Error at: ONE:
 RangeError: Could not decode varint
    at Object.read [as decode] (/Users/ward/code/play/hyperbee-tests/node_modules/varint/decode.js:17:13)
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:24:24)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:232:18)
    at new Pointers (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:36:29)
    at inflate (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:67:10)
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:249:20)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: TWO:
 Error: Groups are not supported
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:29:13)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:469:18)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)
{ name: 'ONE', valid: true }
{ name: 'TWO', valid: true }
Error at: TWO:
 TypeError: Cannot read properties of undefined (reading 'keys')
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:253:37)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: ONE:
 Error: Groups are not supported
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:29:13)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:469:18)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)
{ name: 'ONE', valid: true }
{ name: 'TWO', valid: true }
Error at: TWO:
 TypeError: Cannot read properties of undefined (reading 'keys')
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:253:37)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: ONE:
 Error: Decoded message is not valid
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:446:39)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
{ name: 'ONE', valid: true }
{ name: 'TWO', valid: true }
Error at: TWO:
 Error: Unknown wire type: 7
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:35:9)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:232:18)
    at new Pointers (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:36:29)
    at inflate (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:67:10)
    at BlockEntry.getTreeNode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:249:20)
    at HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HistoryIterator.open (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/iterators/history.js:16:5)
Error at: ONE:
 Error: Unknown wire type: 6
    at exports.skip (/Users/ward/code/play/hyperbee-tests/node_modules/protocol-buffers-encodings/index.js:35:9)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/lib/messages.js:469:18)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:416:21)
    at Object.decode (/Users/ward/code/play/hyperbee-tests/node_modules/compact-encoding/index.js:432:14)
    at Hypercore._decode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:789:23)
    at Hypercore._decryptAndDecode (/Users/ward/code/play/hyperbee-tests/node_modules/hypercore/index.js:630:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HyperBee.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:354:21)
    at async Batch.getBlock (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:525:9)
    at async HyperBee.getRoot (/Users/ward/code/play/hyperbee-tests/node_modules/hyperbee/index.js:342:13)

I am happy to offer any more context if needed.
Here is the code to replicate this bug:
import Corestore from 'corestore';
import Hyperbee from 'hyperbee';
import RAM from 'random-access-memory';

let key;
let originStore;

let encryptionKey;
// Commenting next line will resolve all issues
encryptionKey = Buffer.alloc(32, 'hello world');

{
  const store = new Corestore(RAM);

  const origin = store.get({
    name: 'origin',
    encryptionKey,
  });
  await origin.ready();

  const originDB = new Hyperbee(origin, {
    keyEncoding: 'utf8',
    valueEncoding: 'utf8',
  });

  let count = 0;
  setInterval(() => originDB.put('foo', 'update number: ' + count++), 1000);

  key = origin.key;
  originStore = store;
}

{
  const store = new Corestore(RAM);

  const s = store.replicate(true);
  s.pipe(originStore.replicate(false)).pipe(s);

  await test('ONE');
  // Try commenting next line
  await test('TWO');

  async function test(name) {
    const clone = store.get({
      key: key,
      encryptionKey,
    });
    await clone.update();

    const cloneDB = new Hyperbee(clone, {
      keyEncoding: 'utf8',
      valueEncoding: 'utf8',
    });

    clone.on('append', async () => {
      // Check that the clone is setup correctly
      console.log({
        name,
        valid:
          cloneDB.feed.peers.length > 0 &&
          (encryptionKey ? !!cloneDB.feed.encryption : true),
      });

      const stream = cloneDB.createHistoryStream({
        reverse: true,
        limit: 1,
      });

      stream?.on('data', (data) => console.log('Data at: ' + name, data));
      stream?.on('error', (err) =>
        console.log('Error at: ' + name + ':\n', err),
      );
    });
  }
}

package.json
{
  "type": "module",
  "dependencies": {
    "corestore": "^6.0.1-alpha.17",
    "hyperbee": "^1.8.3",
    "random-access-memory": "^4.1.0"
  }
}

Doesn't look like a Hyperbee bug, seems it's just getting encrypted blocks (due to some bug) which makes Hyperbee throw (as it should)

That makes sense, but I made sure that I check the validity of Hypercores every time in on('append') and the encryption seems to be fine. Moreover, catching these errors at #53, resulted in the correct behavior, meaning, that it didn't stop the decrypted blocks and valid history to be fetched correctly.
If you know where should I look next I would be happy to follow that lead instead of #53

Having multiple, inflight replicator requests for the same encrypted block results in a bug as the block is then decrypted multiple times: https://github.com/hypercore-protocol/hypercore-next/blob/b113b082e087f0ea796e7dc163862ddf3a5d61dc/test/encryption.js#L173-L186

@kasperisager nice catch, can you capture that in a hypercore test?

@mafintosh That is a Hypercore test 😄

The example code works on my end with the changes from the above PR ☝


Build script failes on Windows using P4est_jll artifact

The build.jl currently fails to find the libp4est library on Windows. This appears to be because P4est_jll creates the .dll files in the artifact directory bin (with a different name from libp4st!) and creates a .dll.a in in lib. The .dll.a files are then not recognised by Libdl.find_library.
A workaround is to modify build.jl as
...
if (cmp(P4EST_LIB,"") == 0)
# Check P4EST_LIB (.../libp4est.so file) exists
    P4EST_LIB = string(Libdl.find_library(P4EST_LIB_NAME,[P4EST_LIB_DIR,P4EST_ROOT_DIR]),".",Libdl.dlext)
    if P4EST_ARTIFACT && (cmp(P4EST_LIB,string(".",Libdl.dlext)) == 0) # Fix for finding dll on Windows
        P4EST_LIB = P4est_jll.get_libp4est_path()
    end
end
...

instead of
...
if (cmp(P4EST_LIB,"") == 0)
# Check P4EST_LIB (.../libp4est.so file) exists
    P4EST_LIB = string(Libdl.find_library(P4EST_LIB_NAME,[P4EST_LIB_DIR,P4EST_ROOT_DIR]),".",Libdl.dlext)
end
...

Hi @zjwegert , thanks for the issue! Unfortunately I do not have access to a windows machine, so you'll have to walk me throught it.
My first impression is that if we are using an artifact, we probably always want to be using the function P4est_jll.get_libp4est_path() to find path. Unfortunately with P4est_jll on linux I cannot seem to have access to that function. Is it something that might be limited to some versions of the artifact?

What do you think @amartinhuertas

@zjwegert can you check the PR branch works on windows?

@zjwegert can you check the PR branch works on windows?

Done! Works on my machine.


Exception on running firehose sample

Unfortunately it looks like it may be a race condition in the 3rd party library
System.ArgumentException: The IPFS codec name 'codec-1' is already defined.
   at Ipfs.Registry.Codec.Register(String name, Int32 code)
   at Ipfs.MultiCodec.ReadMultiCodec(Stream stream)
   at Ipfs.Cid.Read(Byte[] buffer)
   at FishyFlip.Tools.Cbor.CborExtensions.ToCid(CBORObject obj)

It's known, you can ignore it. It doesn't break the underlying code.

For now, we can handle it by outputting the error to the logger so the rest of the object can come through, and you can still act on the error by passing in an ILogger to the underlying Firehose class.
https://github.com/drasticactions/FishyFlip/commit/1c280a3736fc4091d1cc909d2d5a60647d54059c
Since Cid is nullable, your code should already be handling cases where it could be null. I would need to look further if there's something I'm missing by not registering the types in advance, or if it is a race condition in the Ipfs library.


Test Active Virtualenv

Hi
I have installed your plugin, but it doe not appear to be running. I ammended the statusline in my vimrc to try and get some feedback from vim that it had indeed activate the env.
This is my statusline
set statusline=%<%f\ %h%m%r%{virtualenv#statusline()}%=%-14.(%l,%c%V%)\ %P
However after selecting my VirtualEnvActivate test2
I have nothing showing in my statusline, is there anyway to test to provide useful feedback?

I'm going to assume that this is no longer a problem. Please reopen if not, and I'll explore further.


Full backup echoes 'Starting quick sync'

I think you meant 'Starting full sync'.

Good catch! Thank you for fixing it, @ghirlekar :) Merged.


Add trip short name

Checklist

[ ✓] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
[✓ ] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
[ ✓] The description lists all applicable issues this PR seeks to resolve
[ ✓] The description lists any configuration setting(s) that differ from the default settings
[ ✓] All tests and CI builds passing

Description
Added a trip_short_name field (Closes #569 ) to the timetable editor (by adding object in timetable.js). Also added tests to end-to-end.js to enter a value in trip_short_name.

Codecov Report

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

@@             Coverage Diff             @@
##              dev     #588       +/-   ##
===========================================
- Coverage   43.89%   15.80%   -28.09%
===========================================
  Files         315      315
  Lines       17270    16100     -1170
  Branches     5269     4896      -373
===========================================
- Hits         7581     2545     -5036
- Misses       8443    11570     +3127
- Partials     1246     1985      +739

Flag
Coverage Δ

#end_to_end_tests
?

#unit_tests
15.80% <ø> (ø)

Impacted Files
Coverage Δ

lib/editor/selectors/timetable.js
0.00% <ø> (-62.36%)
:arrow_down:

lib/manager/components/validation/TripsChart.js
0.00% <0.00%> (-80.40%)
:arrow_down:

...nager/components/validation/ServicePerModeChart.js
0.00% <0.00%> (-78.27%)
:arrow_down:

lib/common/util/map-keys.js
25.00% <0.00%> (-75.00%)
:arrow_down:

lib/manager/components/HomeProjectDropdown.js
0.00% <0.00%> (-72.73%)
:arrow_down:

lib/editor/util/objects.js
14.89% <0.00%> (-72.35%)
:arrow_down:

lib/editor/components/map/TextPath.js
0.00% <0.00%> (-70.00%)
:arrow_down:

...b/manager/containers/ActiveFeedVersionNavigator.js
0.00% <0.00%> (-70.00%)
:arrow_down:

lib/editor/components/timetable/HeaderCell.js
0.00% <0.00%> (-68.97%)
:arrow_down:

lib/manager/components/DeploymentPreviewButton.js
15.78% <0.00%> (-68.43%)
:arrow_down:

... and 260 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 336295d...13607e7. Read the comment docs.

Re @binh-dam-ibigroup's comments: I found the trip_short_name field at this example: https://support.google.com/transitpartners/answer/6377422?hl=en.
The GTFS spec outlines trip_short_name as "Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, leave this field empty. A trip_short_name value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations."
As @landonreed said, it's mostly reserved for vehicle numbers so perhaps '801' doesn't represent a great example. The MBTA uses three digits such as '005' for their commuter rail trip_short_names - perhaps this would be a better example to use. Let me know and I will update.

@landonreed, I updated the width to be 120 for this and kept the 801 placeholder.

Checklist

[ ✓] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
[✓ ] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
[ ✓] The description lists all applicable issues this PR seeks to resolve
[ ✓] The description lists any configuration setting(s) that differ from the default settings
[ ✓] All tests and CI builds passing

Description
Added a trip_short_name field (Closes #569 ) to the timetable editor (by adding object in timetable.js). Also added tests to end-to-end.js to enter a value in trip_short_name.

@philip-cline FYI, the markdown way to add checks is to write it as [x].
Example:

[x] checked
[ ] unchecked


Change config later?

Hi there, maybe thats wrong here, but..: how do I open up the AP again to maybe change the Wifi or MQTT config?

or lets ask otherwise: I did not get the point yet to change the mode of the OS to normal, only that I cannot access the config page anymore and that the AP is closed ? Is there a way to open the AP up again? :)

After entering the credentials, the WiFi and MQTT connection is established after a reboot. You can then test these. Only when everything works does one switch to NORMAL mode. The way back is via an MQTT command (see README). Otherwise, you have to go through the installation process again.


How To Change Admin URL

I had installed YOURLS on my domain and my admin panel is at myurl.com/admin now  for security i want to change my admin URl to something like myurl.com/myself or like so.
Is it possible to do?? if yes then how???
Another thing i want to know as i had installed YOURLS on my domain what are the security features i need to enable via .htaccess file or any other  file or like so

The two referenced commits appear to focus solely on changing the "/admin/" portion of the URI.  Unless I'm mis-reading these, they would not allow a different URI altogether.  I see #1174 (closed), but I feel there is an important use case for this functionality.
I'd like to host admin functions on an HTTPS URI, to prevent authentication information from being passed in the clear.  However, hosting a separate SSL host for all redirection would be unnecessary overhead.

@philhagen - Now that SSL is no longer such a large overhead, and with Google pushing Encryption Everywhere do you think there is still a need to split host the admin files like this?
As an experiment, I installed two copies of YOURLS on different servers, but they shared the same network database.
Admin Server
I did not add any .htaccess file entries, effectively disabling the YOURLS forwarding on that server.  I also changed the /admin directory to something like /Top-Secret.
This allowed me to do the admin functions here and write the information into the database. Data is stored as a keyword and the forwarded URL in the database.  I can think of no reason this could not have been HTTPS.
Redirect Server
On the second server, I loaded the second YOURLS, pointing to the same DB.
On this server, I disabled the admin area (delete or rename the files).  This server did the actual redirection.  I see no reason why this server could not be HTTP.
It worked but it brings me back to why?  The major URL shorteners are moving to https for everything, shouldn't we? Advances in SSL have brought the overhead.down to virtually nothing, and major sites are all going this way.  Encryption Everywhere is really mainstream now!
Pop VeKind

I would only suggest that forcing administrators to make this move is a bit heavy-handed.  I think the way Google is doing this with Chrome is really unfortunate and unnecessary.  Google is a provider, not a standards body.  Not bashing G specifically here, but if moving to HTTPS everywhere is a good thing overall (and it very well may be), then the discussions should be made with the various standards bodies and not driven by commercial entities with browser (or service) market share.
I do still see a broader value in splitting the URLs, as it would provide administrators with flexibility to run the service as their requirements dictate rather than driving their requirements by the code's capabilities.

@philhagen - To quote from Star Wars, "I feel your pain!"
I actually agree with your view on Google et al.  But after 50+ years of writing computer programs, I can tell you that industry is in full control (used to be the government, but they have been supplanted).
Internet History - Off Topic!
The reality is, Google has the power to get its way and with everyone following the piper, it will be a very difficult job for those who do not.  Early adopters will be rewarded, just as Google is rewarding higher page rank for people using https right now.  Remember history.  Back in the day, my friend Jon Postel from USC was really Iana.  One day he realized the root servers were being taken over by the government, so he switched the servers! Within hours the men in black appeared.  The root was switched back, and within months, Jon was dead.  Funny how things just happen!  Point being, those with the power got their way.  Most people today do not even realize that the internet is actually designed to run without any root server (kind of puts the ICANN root out of business!).  Google has great pull at ICANN.
Consider historically that "standards bodies" are largely backward compatible.  More than a decade ago the inventor of the Internet protocol in the URL publicly apologized for the separator :// and stated that a single / is what he would use if he did it again.  https://vekind.org would become https/vekind.org saving two unnecessary characters in the URL. He went on further to say that popular protocols could be further reduced to a single character with a fall back to the colon-slash-slash format.  When is the last time you typed something besides http:// or https:// the above example would be something like s/vekind.org.  In a URL shortener that would save seven characters!  This simple idea, which many, or most, agree with, has been in a standards body for more than a decade!
Well enough politics, let's look at a solution.
Change Admin URL
Under your last stated circumstances, the split admin solution would mean you would need 14 instances of YOURLS.  Seven on the HTTP servers and seven on the HTTPS servers.  Sounds sort of ridiculous, I agree.
Questions:
Do you use seven databases or just use seven different prefixes?

In other words, If your seven instances of YOURLS are working on seven different physical servers, all using localhost as the DB address, what I am about to suggest likely won't work.
Did you see YOURLS Multisite (AKA: YOURLS-PV) #2306
If you follow the offsite link there you will see a Proof-Of-Concept site that that is running six domains into one instance of YOURLS-PV.  These six YOURLS sites share the same DB with different prefixes, but the configuration will allow different DB's on a per-site basis. the same Proof-Of-Concept demonstrates the /admin directory was easily renamed.
Farther down the same page are links to a production site I am building using YOURLS-PV.  These links demonstrate the added feature that YOURLS-PV will happily run side-by-side with WordPress on the same document root.
Problems:
The main problem is this is a hack - a drop-in work-alike replacement for YOURLS.  and it is not extensively tested.  I tried for months to write this as a multisite plugin.  It appears by the closed issues that many others have had this idea before me.  YOURLS is designed as a stand-alone, one domain per YOURLS, program.  This is why it does not play nice with WordPress or with multisite.  A plugin would be almost the size of the YOURLS program itself.
However, YOURLS-PV is about 99% YOURLS!  It is just a lot of tiny little critical code changes to many parts of the code that makes the difference.  My goal is not to replace YOURLS with YOURLS-PV.  My goal is to prove the safety and effectiveness of YOURLS-PV and merge it into the YOURLS core project - but it needs more testing!
Problem with Split HTTPS Admin...
YOURLS-PV is a slight modification of YOURLS and therefore like YOURLS, expects the /admin directory (or the renamed directory) to be on the same domain server as the redirect server.  To have one YOURLS-PV Redirect Server (HTTP) and one YOURLS-PV Admin Server (HTTPS), you would need to tell the Admin Server the domain name you were working on (if I understood you right, it would be a different domain name).  In YOURLS-PV this would have to be BEFORE the config file loads.  Likely as a query string ?domain=vekind.org or a time-limited cookie, or maybe an additional entry at login.
It is an interesting thought...

@philhagen - I had up on my whiteboard an idea of a YOURLS-PV admin panel.  The idea would be to allow something like https://abolitionistapproach.info/admin to control the databases for many YOURLS or YOURLS-PV sites.  For example, the domains http://fyuel.org and http://vekind.org and http://tait.asia  - as sort of a stand-alone HTTPS controller.
This sparked a conversation with one of my students.  What if you allowed the same domain and same files (YOURLS) to be served on one physical box.  In Apache, it would be something like this...
<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/your-domain-root
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/your-domain-root
    ServerName your-domain.com
    SSLEngine On
    SSLOptions +StrictRequire
    SSLCertificateFile /path/to/server.crt
    SSLCertificateKeyFile /path/to/server.key
    SSLProtocol TLSv1
</VirtualHost>

Then in .htaccess you:
Redirect any HTTP traffic going to the /admin directory to the same place with HTTPS.
Redirect any HTTPS traffic not going to the /admin directory to the same place with HTTP.
Of course "/admin" could be any directory of choice.
The result would be YOURLS Admin being served as HTTPS and the YOURLS redirect engine would run in HTTP.
It might even work with YOURLS as is (out-of-the-box).
Good Luck,
Pop VeKind

@PopVeKind I'd be curious in the end to see what code in your project cannot be packaged as a plugin. I'm not sure your long term goal should be that your YOURLS-PV be merged with YOURLS.

@ozh  - Humm, That's interesting. OK - Will do.
Sincerely,
Pop VeKind

@ozh - Ok. here is the YOURLS-PV update for the last couple weeks.
As I mentioned (as TuKod) in YOURLS MultiSite #2306, I am new to the GitHub environment.  Also, due to my retirement, I have released the TuKod account to the TuKod Team.  So anyway, I took the time to learn the basics of Git.   I realized I need to give you just the code adjustments for the added options.  When I had Git compare YOURLS-PV to YOURLS there were hundreds of changes!  I was shocked.
The changes were made due to my closed system work habits.  For example, I automatically remove all trailing whitespaces (spaces, tabs, etc.) from each line.  This triggered dozens of Git changes.  Likewise, I have a "clean as you go" work habit.  Without thinking I make things pass the W3C Validator for HTML5, CSS3, and links.   And I adjust code with WordPress Code Standards for readability.   Altogether, these simple clean up generated hundreds of Git changes and masked the real code adjustments, buried in all the cleanup.
So I forked YOURLS and focused on just the YOURLS-PV adjustments. There are only 17 and most are tiny.  They center around five defined constants, YOURLS_SITE, YOURLS_CONFIGFILE, YOURLS_ABSURL, YOURLS_PROTOCOL, and YOURLS_ADMIN_DIR. The first two were redefined, the last three were added.
I have now started to build a website to support YOURLS-PV, for the time being, yourls.y143.net
The 17 code adjustments are cataloged on the YOURLS Code Adjustments Page.
The YOURLS-PV Road Map was moved to this site.  I am now in the process of adding Configuration Pages to show how to use each of the new features.  As I get these Configuration Pages written, I hope others will help me test these tiny adjustments. My test platform is currently limited to Apache in HTTP. However, I am planning to move all my project sites to an nginx server and HTTPS by next year.
Sincerely,
Pop VeKind

After more consideration...
After more consideration, I would suggest less change to the core, and put this in a plugin.  That is what I am currently doing on my production sites.
The small patch Splitting YOURLS_SITE - Added Features #2335 automatically calculates YOURLS_ABSURL  (the Absolute URL where the YOURLS Files are). This replaces one purpose of YOURLS_SITE (the other purpose is to create shortened URLs).  Thus, it allows YOURLS_ABSURL and YOURLS_SITE to have different values.
The Rename The Admin Directory Plugin (number 7 on the List of Benefits for #2335) uses YOURLS_ABSURL and adds this feature in a plugin.

i followed the guidance from @ozh  and recently set my installation to https
it seems to work ok but
the point of failure is when i attempt to browse to the short url (without the http://) with a + appended to view the general stats.
At that point the browser demands i login to my yourls with https even though i am already logged in.
im unsure where within the installation code i can amend a line of code to mitigate that.
any ideas?

Closing - see #2747