Cannot create a project within the Flutter SDK.

using cmd prompt cannot create flutter file using flutter create command.
it shows Cannot create a project within the Flutter SDK. Target directory 'F:\flutter\flutter\new' is within the Flutter SDK at
'F:\flutter\flutter'.

Please create the project in a different folder than "f:\flutter\flutter", e.g. "f:\something\else"

@sadiya07
It seems you are trying to create flutter project inside Flutter SDK itself, ie, the path at which you installed the sdk.
Create it at different path / directory.
Closing from here as this is a non-issue. Please look for solutions on Stackoverflow.


fix: hrp boom --run-time setting

Main Changes

修复未指定压测时间 --run-time 时，hrp boom 默认只持续最多3s的问题
提升 --run-time 到期时间的检测频率（3s 一次改为 1s 一次）

Codecov Report
Base: 51.31% // Head: 42.04% // Decreases project coverage by -9.27% :warning:

Coverage data is based on head (cc4394c) compared to base (4910ba5).
Patch coverage: 30.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1464      +/-   ##
==========================================
- Coverage   51.31%   42.04%   -9.28%
==========================================
  Files          90       55      -35
  Lines       12849     9342    -3507
==========================================
- Hits         6594     3928    -2666
+ Misses       5924     5082     -842
- Partials      331      332       +1

Flag
Coverage Δ

unittests
42.04% <30.00%> (-9.28%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

hrp/internal/boomer/runner.go
58.25% <30.00%> (-0.32%)
:arrow_down:

hrp/step_thinktime.go
73.91% <0.00%> (-6.53%)
:arrow_down:

hrp/testcase.go
58.09% <0.00%> (-1.41%)
:arrow_down:

httprunner/__init__.py

httprunner/step.py

httprunner/utils_test.py

httprunner/loader.py

httprunner/make_test.py

httprunner/builtin/__init__.py

... and 29 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


feat: upgrade eslint and prettier

Codecov Report

Merging #564 (be5afaa) into main (68f5ff4) will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #564      +/-   ##
==========================================
+ Coverage   93.84%   93.90%   +0.05%
==========================================
  Files          17       17
  Lines         439      443       +4
  Branches       67       70       +3
==========================================
+ Hits          412      416       +4
  Misses         25       25
  Partials        2        2

Impacted Files
Coverage Δ

packages/core/src/services/PackageJsonMerge.ts
97.05% <0.00%> (+0.39%)
:arrow_up:

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 68f5ff4...be5afaa. Read the comment docs.


Show explanation if user cannot add new email

This change concerns the "Manage Email Addresses" submenu
in the Account settings.

I do not think it is right to merge some "unclear" changes into code base.
I will figure out this problem by a new PR.

I think I understand the problem now.
->  Clarify the reason why the user can't add a new email if there is a pending activation #25509

Thanks for this PR. I will close it in favour of the other PR.


Is it normal for the game to take multiple days to compile?

What is your question?
Ive heard some people say it takes an entire day for the game to first compile, but mines been trying to compile for a little over 2 days now and still nothing...
Under export/release/windows/bin all the normal fnf stuff is there except for the exe btw...
Also there are no errors. Just something about FlxCamera being depreciated...

the flxcamera deprecation is just a a warning, and also, I'm pretty sure it's not normal for the game to take days to compile

the flxcamera deprecation thing is just a warning, and also, I'm pretty sure it's not normal for the game to take days to compile

Interesting...
It doesnt let me use the command line which leads me to believe it's still going...

it shouldn't be

One more thing I should note is that my PC is kinda slo...
I'm gonna let it run one more night and if it doesnt work by tomorrow I'll shut it down...

Tomorrow has come and still nothing :(


Exceeded maximum rows when reading large files

Describe the bug
A clear and concise description of what the bug is.
When using load_dataset with json files, if the files are too large, there will be "Exceeded maximum rows" error.
Steps to reproduce the bug
dataset = load_dataset('json', data_files=data_files) # data files have 3M rows in a single file

Expected results
No error
Actual results
~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files)
    134                                 with open(file, encoding="utf-8") as f:
--> 135                                     dataset = json.load(f)
    136                             except json.JSONDecodeError:

~/anaconda3/envs/python/lib/python3.9/json/__init__.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    292     """
--> 293     return loads(fp.read(),
    294         cls=cls, object_hook=object_hook,

~/anaconda3/envs/python/lib/python3.9/json/__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    345             parse_constant is None and object_pairs_hook is None and not kw):
--> 346         return _default_decoder.decode(s)
    347     if cls is None:

~/anaconda3/envs/python/lib/python3.9/json/decoder.py in decode(self, s, _w)
    339         if end != len(s):
--> 340             raise JSONDecodeError("Extra data", s, end)
    341         return obj

JSONDecodeError: Extra data: line 2 column 1 (char 20321)

During handling of the above exception, another exception occurred:

ArrowInvalid                              Traceback (most recent call last)
<ipython-input-20-ab3718a6482f> in <module>
----> 1 dataset = load_dataset('json', data_files=data_files)

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
    841
    842     # Download and prepare data
--> 843     builder_instance.download_and_prepare(
    844         download_config=download_config,
    845         download_mode=download_mode,

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
    606                             logger.warning("HF google storage unreachable. Downloading and preparing it from source")
    607                     if not downloaded_from_gcs:
--> 608                         self._download_and_prepare(
    609                             dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
    610                         )

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
    684             try:
    685                 # Prepare split will record examples associated to the split
--> 686                 self._prepare_split(split_generator, **prepare_split_kwargs)
    687             except OSError as e:
    688                 raise OSError(

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/builder.py in _prepare_split(self, split_generator)
   1153         generator = self._generate_tables(**split_generator.gen_kwargs)
   1154         with ArrowWriter(features=self.info.features, path=fpath) as writer:
-> 1155             for key, table in utils.tqdm(
   1156                 generator, unit=" tables", leave=False, disable=bool(logging.get_verbosity() == logging.NOTSET)
   1157             ):

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files)
    135                                     dataset = json.load(f)
    136                             except json.JSONDecodeError:
--> 137                                 raise e
    138                             raise ValueError(
    139                                 f"Not able to read records in the JSON file at {file}. "

~/anaconda3/envs/python/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py in _generate_tables(self, files)
    114                             while True:
    115                                 try:
--> 116                                     pa_table = paj.read_json(
    117                                         BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
    118                                     )

~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()

~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()

~/anaconda3/envs/python/lib/python3.9/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowInvalid: Exceeded maximum rows

Environment info

datasets version:
Platform: Linux
Python version: 3.9
PyArrow version: 4.0.1

Hi @zijwang, thanks for reporting this issue.
You did not mention which datasets version you are using, but looking at the code in the stack trace, it seems you are using an old version.
Could you please update datasets (pip install -U datasets) and check if the problem persists?


[Bug]: wrongly returned internal server error (500) from token endpoint

Preflight Checklist

[X] I could not find a solution in the documentation, the existing issues or discussions
[X] I have joined the ZITADEL chat

Environment
ZITADEL Cloud
Version
v2.49.3, v2.50-rc1, main
Database
PostgreSQL
Database Version
No response
Describe the problem caused by this bug
We've been seeing HTTP status 500 - internal server error from time to time on the token endpoint on zitadel cloud. This is observed on the loadbalancer, which received the 500 from the zitadel backend. We strongly suspect this is because of a wrongly mapped error which should be in the 400 range, as we do not see any other alarming logs.
To reproduce
Send some invalid input to the token endpoint. However we currently don't have information on which parameters are triggering a 500.
We've already fixed similar bugs in:

https://github.com/zitadel/zitadel/pull/7419 (released and deployed with v2.47.0)
https://github.com/zitadel/zitadel/pull/7730 (released and deployed with v2.49.2)

It greatly reduced the amount of 500s we are seeing, by unfortunately a few still pop-up from time to time.
What is tested an excluded from v2.49.3+:

sending an invalid base64 string as refresh token returns a 400
sending an valid base64 string not encrypted by zitadel returns a 400
using a refresh token twice returns a 404

Screenshots
No response
Expected behavior
Zitadel should always return a status code <500, unless there is a problem with the server itself, for example fatal database errors, IO errors etc.
Operating System
No response
Relevant Configuration
No response
Additional Context
The purpose of this issue is to see if there are self-hosters that observe the same 500 statuses that might have a concrete "steps to reproduce" with request examples which trigger a 500.

as seen in traces:
Internal Server Error: ErrorType=server_error Description=cache error Parent=ID=VIEW-qJBg9 Message=cache error Parent=(ERROR: invalid byte sequence for encoding "UTF8": 0xa2 (SQLSTATE 22021))


Fix iOS publishing credentials

Problem
The iOS library is failing to publish code to matrix-org/matrix-wysiwyg-composer-swift (see failed job) with an error:
remote: Permission to matrix-org/matrix-wysiwyg-composer-swift.git denied to Velin92.
fatal: unable to access 'https://github.com/matrix-org/matrix-wysiwyg-composer-swift.git/': The requested URL returned error: 403

Solution
Use @ElementBot access token to publish.
To do

[ ] Provide @ElementBot with access to matrix-org/matrix-wysiwyg-composer-swift

Codecov Report
Patch coverage has no change and project coverage change: +1.61% :tada:

Comparison is base (2f1c7cc) 88.34% compared to head (3910408) 89.95%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #802      +/-   ##
============================================
+ Coverage     88.34%   89.95%   +1.61%
============================================
  Files           154       82      -72
  Lines         17856    14708    -3148
  Branches        862        0     -862
============================================
- Hits          15775    13231    -2544
+ Misses         1850     1477     -373
+ Partials        231        0     -231

Flag
Coverage Δ

uitests
?

uitests-android
?

uitests-ios
?

unittests
89.95% <ø> (+2.88%)
:arrow_up:

unittests-android
?

unittests-ios
?

unittests-rust
89.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 72 files with indirect coverage changes

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


tsswitch fork option

Hello gents,
i was approaching tsswitch but had a problem using "fork"
tsp --version
tsp: TSDuck - The MPEG Transport Stream Toolkit - version 3.19-1520

tsswitch -I fork 'tsp -I file test.ts'
* Error: fork[0]: error creating process: The system cannot find the file specified.
* Error: file[1]: cannot open test.ts': The system cannot find the file specified.

of course test.ts file is there.

You did not mention which system. From the system error message, I guess that this is Windows.
Which command interpreter are you using? DOS, PowerShell, bash, other? I guess DOS. Because the problem is here: you have a command interpreter problem, not a TSDuck problem.
Please carefully inspect the error messages. The answer is there.
tsswitch -I fork 'tsp -I file test.ts'
* Error: fork[0]: error creating process: The system cannot find the file specified.
* Error: file[1]: cannot open test.ts': The system cannot find the file specified.

First, error creating process means that the process is not created, the command is not found. So tsp does not run and does not even try to open the TS file.
Second, the message about test.ts is prefixed by file[1]. Having [1] means that the error is reported by the second (index 1) input plugin of tsswitch, tsp would not add an index.
Third, look closely at the cannot open message. It says test.ts', not test.ts. Do you see the difference? The trailing quote?
So, my conclusion is the following. You are using a command interpreter which, for some reason, does not recognize the quotes as most civilized command interpreters.
The scenario is:

The fork plugin tries to create a process with parameter-less command 'tsp (with a leading quote). There is no such program of course => error creating process.
The -I file is interpreted as tsswitch second input plugin, not a tsp plugin.
And it tries to open file test.ts' (with a trailing quote). There is no such file

Indeed, if I open a DOS command window (something I never do):
C:\> tsswitch -I fork 'tsp -I file test.ts'
* Error: fork[0]: error creating process: The system cannot find the file specified.
* Error: file[1]: cannot open test.ts': The system cannot find the file specified.

C:\> tsswitch -I fork "tsp -I file test.ts"
* Error: file: cannot open test.ts: The system cannot find the file specified.

In the second case, the error comes from the created tsp process, not tsswitch (there is no index in the plugin name) and the error mentions test.ts without trailing quote (the file does not exist on my system).
Apparently, the DOS command interpreter accepts only double quotes, not simple quotes.
Lessons learned:

Carefully read error messages, pay attention to details.

I'm sorry! I appreciate you as a very good person. However, I need to comment my point of view about this:

I use Windows and Linux, and not MacOS.
Inside Windows I use CMD, but Cygwin Bash and WSL Bash too (depending if it's Win7 or Win10).
I never use PowerShell (I don't like it!).
The CMD shell is not DOS. And from my point of view this simple shell it's preferable over PowerShell. So, if I need more than the CMD shell then I'll use Bash (from Cygwin or WSL).

Then, I feel it's preferable to leave to the user/developer to use whatever shell... if it's possible to support it. And at time the CMD shell in Windows is supported, rigth?
I undertand that this issue is related to the shell and not with the library. However, please don't remove support for the good CMD shell. Some of us want to keep using it.
Regards.

However, please don't remove support for the good CMD shell.

I won't remove that support simply because there is nothing to remove. TSDuck does not provide "support" for any kind of shell. TSDuck, just like any other program, just needs to receive the correct command line parameters.
By typing tsswitch -I fork 'tsp -I file test.ts', your intent was to pass those parameters:
-I
fork
tsp -I file test.ts

But the parsing of CMD (not better than DOS, sorry) is such that tsswitch receives those:
-I
fork
'tsp
-I
fil
test.ts'

However, please don't remove support for the good CMD shell.

I won't remove that support simply because there is nothing to remove.

Great! :wink:

By typing tsswitch -I fork 'tsp -I file test.ts', your intent was to pass those parameters:
But the parsing of CMD (not better than DOS, sorry) is such that tsswitch receives those:

I know it! All CMD users use double quotes, since single quotes have never been supported in this shell. For this reason in all Windows examples the quotes are ".
Regards.

@lelegard switch to cygwin. this is ok
thanks


Unknown log errors for unknown reason.

When I type a command in my discord the bot logs this:
(node:11572) DeprecationWarning: EvaluatedPermissions#hasPermission is deprecated, use Permissions#has instead (node:11572) DeprecationWarning: TextChannel#sendMessage: use TextChannel#send instead
I never use HasPermission or sendMessage. The only way I have sent a message has been using message.embed(embed);

Duplicate of #98


change changes_unix.go statDifferent()

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "mkorystov/hakathon/check_file_diff_change" git@github.com:zenefits/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.


Introduce encoding limits [TE-301]

Introduced new bounded encoding primitives
Bounded encoding primitives are used to guard possibly unlimited data structures in P2P messages
Boundaries are taken mostly from Tezos code

For reference, see https://simplestakingcom.atlassian.net/l/c/rwb1LGxf.

@bkontur my comments have been resolved, looks ok to me 👍

@bkontur my comments have been resolved, looks ok to me +1

@akoptelov
please squash commit and rebase to develop and then merge

Thanks, guys!


Fix linting error in CI

Resolve linter failures by auto-indenting the code with black.

I believe this was already done in c9f72f8a86ad44806a56b921c727b03544d7a5f3 on master, apologies I forgot to push the latest develop branch.

Using a code formatting tool is a useful in an open source project with external contributors who may have different preferences for code formatting, because it provides consistency and there is no need to spend time discussing formatting. So there is no need to have inconsistent conventions in the same project. There is a hatch script for formatting, just run hatch run lint:format, it couldn't be simpler! We probably need to pin down the Black and Ruff versions in the project configuration. In this case, the reformatting was likely due to a new version of Black.


Migrate Account Abstraction Factories page to tailwind/shadcn

Problem solved
Short description of the bug fixed or feature added

PR-Codex overview
This PR enhances UI components in various dashboard sections:

Updates alert styles
Refactors account factories display
Improves contract cells rendering
Adds tab navigation to Smart Wallets

Detailed summary

Updated alert styles with new variants
Refactored account factory display with skeleton loading
Improved rendering of contract cells with skeleton loading and links
Added tab navigation to Smart Wallets section

The following files were skipped due to too many changes: apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/account-abstraction/AAFooterSection.tsx, apps/dashboard/src/pages/dashboard/connect/account-abstraction.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

#4389  👈
main

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

Join @MananTank and the rest of your teammates on  Graphite


Name conflict in definitions

I am currently trying to combine a couple of different swagger files.
Now I keep getting Name conflict in definitions Because some swagger files have the same definitions. Is there a possibility to rename or merge them?

I don't know if is too late, buy try deleting the security definitions from each swagger file and add it dynamically by code.
Like:
const swaggerDocument = require('/path/to/swagger.json');
const securityDefinitions = {
    OAuth2: {
        ..... // Security definition for OAuth2
    },
};
const security = [{
  OAuth2: [], // Security for OAuth2
}];
swaggerDocument.securityDefinitions = securityDefinitions;
swaggerDocument.security = security;


Develop

Codecov Report

Merging #323 into develop will decrease coverage by 0.40%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #323      +/-   ##
===========================================
- Coverage    66.77%   66.36%   -0.41%
===========================================
  Files          212      212
  Lines        11535    11536       +1
===========================================
- Hits          7702     7656      -46
- Misses        3833     3880      +47

Impacted Files
Coverage Δ

framework/filter/ffmpegAudioFilter.cpp
81.09% <100.00%> (+0.59%)
:arrow_up:

mediaPlayer/mediaPlayerSubTitleListener.h
50.00% <0.00%> (-33.34%)
:arrow_down:

mediaPlayer/subTitle/subTitlePlayer.cpp
63.52% <0.00%> (-9.42%)
:arrow_down:

mediaPlayer/media_packet_queue.cpp
76.00% <0.00%> (-8.00%)
:arrow_down:

framework/demuxer/avFormatSubtitleDemuxer.cpp
65.69% <0.00%> (-6.57%)
:arrow_down:

mediaPlayer/player_notifier.cpp
77.54% <0.00%> (-4.82%)
:arrow_down:

mediaPlayer/buffer_controller.cpp
51.69% <0.00%> (-3.39%)
:arrow_down:

mediaPlayer/subTitle/subTitleSource.cpp
83.33% <0.00%> (-2.39%)
:arrow_down:

mediaPlayer/MediaPlayer.cpp
69.00% <0.00%> (-1.24%)
:arrow_down:

mediaPlayer/SuperMediaPlayer.cpp
73.52% <0.00%> (-0.76%)
:arrow_down:

... and 6 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 79278d1...fab55c5. Read the comment docs.


feature(blog): international-community post

Background

Changelog

feature(blog): international-community post and blog refinements


Allow using a Proxy

Currently there is no way to use a proxy with playwright. This fixes that.

This looks good. Any thoughts on how we might test it? Is there a simple proxy for .Net we could run up in one Acceptance test to just confirm it's all wired up properly?

This looks good. Any thoughts on how we might test it? Is there a simple proxy for .Net we could run up in one Acceptance test to just confirm it's all wired up properly?

Added a test: Driver_Uses_Proxy

I think we can merge this now @sbowler ?


Want to add clay morphism UI

Issue Type:
Want to add clay morphism UI
Screenshots

I have seen this somewhere, did you raise this issue in some other repo too?

No, I haven’t
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: VIDHI @.>
Sent: 26 March 2022 05:03 PM
To: @.>
Cc: NITESH @.>; @.>
Subject: Re: [arpit456jain/Amazing-Css-Effects] Want to add clay morphism UI (Issue #479)
I have seen this somewhere, did you raise this issue in some other repo too?
—
Reply to this email directly, view it on GitHubhttps://github.com/arpit456jain/Amazing-Css-Effects/issues/479#issuecomment-1079667270, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS2Y7UN5ZNVVXMQDBLJFMUTVB3YZFANCNFSM5RQHW7SQ.
You are receiving this because you were mentioned.Message ID: @.***>

@connectnitesh ??

any updates

Work in progress ,need three days to complete it.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: @.>
Sent: 31 March 2022 10:55 PM
To: @.>
Cc: NITESH @.>; @.>
Subject: Re: [arpit456jain/Amazing-Css-Effects] Want to add clay morphism UI (Issue #479)
any updates
—
Reply to this email directly, view it on GitHubhttps://github.com/arpit456jain/Amazing-Css-Effects/issues/479#issuecomment-1084890910, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS2Y7UOQSE2CJTGUQKUXNO3VCXNW3ANCNFSM5RQHW7SQ.
You are receiving this because you were mentioned.Message ID: @.***>

Cool! 👍


Allow use only email (but not username)

What steps will reproduce the problem?
Currently, you need to complete username and email to create one user. Plus, when you log in form social networks like facebook, a form appears asking for your username.
What is the expected result?
when you configure it (maybe a sameUserAndEmail option on module config?) the system uses email as username, so you need to complete it on any form
What do you get instead?
You are force to complete username
Additional info

Q
A

Yii2 version
<IP_ADDRESS>

Yii2-user version
0.9.12

PHP version
7.0.15-0ubuntu<IP_ADDRESS>

Been looking for this, anyone made custom changes for now?

I managed to do this by overriding some models and controllers, quite easy. I meant to write an howto but still haven't had the time.
Basically I've done this (but I need no registration or anything else):
diff --git a/config/web.php b/config/web.php
index e1ce082..f760128 100644
--- a/config/web.php
+++ b/config/web.php
@@ -81,9 +81,13 @@ $config = [
         'user' => [
             'class' => 'dektrium\user\Module',
             'admins' => ['master'],
+            'enableRegistration' => false,
             'controllerMap' => [
                 'security' => 'app\controllers\user\SecurityController',
             ],
+            'modelMap' => [
+                'User' => 'app\models\User',
+            ],
         ],
        'attachments' => [
                'class' => nemmo\attachments\Module::className(),
diff --git a/models/Utente.php b/models/Utente.php
new file mode 100644
index 0000000..2dd9d0e
--- /dev/null
+++ b/models/Utente.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * User model override
+ */
+namespace app\models;
+
+use dektrium\user\models\User as BaseUser;
+
+class Utente extends BaseUser
+{
+    public function beforeValidate()
+    {
+        $this->username = $this->email;
+        return parent::beforeValidate();
+    }
+}

In case you want registration you need to override views in order to remove the username field, and probably something else

@maxxer Great, thx.


Fix wrong thread response count display

The responses count display in CourseDiscussionResponsesFragment has been fixed to show only the top-level responses count instead of the total comments count. This field is not available from querying the thread list, so it's the thread details are queried explicitly to get access to this field. The paginated query for the responses is intialized concurrently, but their delivery to the adapter is deferred until the thread details have also been loaded and delivered.
The response count field has been added to the thread model, with a default unset state, and the adapter has been set up to hide it's display in the unset state. The response count layout has also been flattened into a single TextView to enable easily changing it's visibility directly, which requires the IconDrawable to be set as a compound drawable dynamically. This is done by it's view holder upon inflation to set the default icon, and upon binding the responses row to choose between the locked and unlocked items.
Fixes MA-2014.

Note that since the freezing implementation in ResponsesLoader is affected by the changes to sequentialize the endorsed and non-endorsed response loading in #616, I have merged it's branch here. Please review the changes introduced in there in it's own pull request.

Upon adding a response, the response count on the Response Screen doesn't update.

@miankhalid: I somehow missed implementing that even though it was brought up in the previous pull request on this as well :disappointed: Anyway, I have added that now. Do you want to do another review?
@BenjiLee, @bguertin, a second review from one of you guys?

@BenjiLee:

Just to make sure I'm on the right page, this fix is supposed to ensure that the # of responses right above "Unreport" in the screenshot, is supposed to reflect the total number of reponses/comments? or just the responses?

It was previously showing the total number of responses+comments, now it should only show the top-level responses.

I'm also seeing some weird behaviour on mobile-devi. I can see only the comments I create from the app on the app, but on desktop I see all of them

Yeah that's because the pull request introducing the comments count field has still not been merged yet. If you check on the lahore sandbox (where it is merged), you should see comments appearing on the app too.

:+1:

:+1:

Also added a commit to fix the issue with the comments count incrementing only affecting the thread model in the Fragment, which is not necessarily the same object as in the adapter, as the adapter model can be replaced with the updated response after performing voting, following, or reporting operations on it.


Spacing in social buttons

Feels like there should be some space between the icons and the text.

I noticed that on one of the other sites I worked on too.
Simple fix by adding a non breaking space in layouts/partials/social-buttons.html: https://github.com/containernetworking/cni.dev/pull/49/files


deps: Bump nan for compatibility with newer NodeJS

Summary
Bump nan from 2.16.0 to 2.18.0. (Tiny, tiny, single-dependency bump in yarn.lock and package-lock.json only!)
(I recommend reviewers to check the diff to see that this is a super tiny PR.)
Context: What is nan?
nan is a slightly more stable API target for compiling C/C++ addons for NodeJS projects against, attempting to hide the complexity and moving target that is the V8 engine internals beneath a more manageable, and once again a more "stable" API target.
For more info, see: https://github.com/nodejs/nan
Why do we need to update it periodically?
We occasionally need to bump this package for compatibility with newer NodeJS versions that bundle newer versions of V8, or carry different V8 patches, etc. Newer nan versions get put out from time to time to address breakages in nan's "stable" API when used against the newer/different copies of V8 found in newer NodeJS versions. Newer Node+V8 versions come out and break stability in their C/C++ interfaces, newer nan versions come out to pave over the breakage and continue to provide a stable API target over time.
Motivation for bumping this now
Allows us to bootstrap ppm on machines running the latest NodeJS 20.x
Remains untested whether ppm can fully run on NodeJS 20, but at least we know we can compile dependencies against NodeJS 14-20. Useful for keeping our Electron upgrade path smooth for the future. Not a perfect guarantee, but a great step to take nonetheless.
See: https://github.com/nodejs/release#release-schedule
Related task for the repo: Add NodeJS 20 to the test matrix, drop NodeJS 14
We should add NodeJS 20 to the test matrix for this repo soon, and drop NodeJS 14
NodeJS 20 will be an LTS version starting in October. With this PR, we should be good to start testing against it now, if we want. It should be decently mature, given it'll be LTS soon. However, it would also make just about as much sense to wait for it to be actually LTS (and therefore have better stability guarantees as a moving target of minor and patch versions to test against).
And yeah, we should drop NodeJS 14 from the test matrix, it's been EOL for a while now.
In theory we should drop NodeJS 16, since it just went EOL on September 11th, but since I think that version is still the best-supported version of Node to use around the various repos in Pulsar org, I think it's still worth testing, even if NodeJS 16 is also technically EOL already.
See:

https://github.com/nodejs/release#release-schedule
https://nodejs.org/en/blog/announcements/nodejs16-eol

Verification process

[x] After this change, ppm can now be built locally on my machine with the node on my machine being the latest current NodeJS 20.6.1.
[x] This shouldn't hurt compatibility with older NodeJS versions, so CI should pass!

We should add NodeJS 20 to the test matrix for this repo soon, and drop NodeJS 14

This may or may not be relevant, since I know this is PPM we're talking about, but the version of Electron we're using is pinned to Node v14.16.0. How much does that matter? Hopefully we'll be able to move to a newer Electron soon, but that's where we are at the moment.

the version of Electron we're using is pinned to Node v14.16.0.

Hmm. I see you're right about that, and in that case yeah, I would want to keep 14 in the test matrix. With us leaning toward Node 16 everywhere, I kind of forgot Electron 12 is still on Node 14, to be honest.
Probably want to stick to three or less major versions of Node for the test matrix. But the very specific ones don't matter much as long as we test against the newest LTS and the Electron version in the core editor's major version of Node are in there, we are pretty well covered, in my experience. (I would suggest 14 + 20 + [whatever LTS between 14 and 20 we want here]).

The good news is that the outlook for upgrading Electron soon-ish is suddenly very good — now that @mauricioszabo has gotten superstring performance to be much better in his Electron 25 branch. I don't think we'll have to test on Node 14 for much longer.

I really went overboard with the long PR body. This is a trivial, patch-level indirect dependency bump of nan.
(I've never had an issue with bumping nan before, personally. This came up a lot during the official atom org and atom-community org days, I seem to recall. We just bumped it and it allowed compiling against newer targets.)
Can I get a review, whenever folks get the chance, @pulsar-edit/backend? If there are any questions, I can try to answer them. I feel this is a very very very very low-risk, and tiny change, though, my personal view on this. Thank you for any reviews/comments/questions/etc.

Thanks for the review, merging!
Not messing with the CI test matrix for now.


GLib-GObject-CRITICAL G_IS_VALUE

Do the GLib-GObject crash? the error log just gets filled with this for 1000 of lines then all is fine
(sharp:4364): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:4364): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:4364): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this t$

(sharp:4364): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:4364): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:4364): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:4364): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this t$

(sharp:4364): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:4364): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this t$

(sharp:4364): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

(sharp:4364): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed

Are you able to reproduce this consistently, perhaps for one particular image?
A possible cause might be a glib version mismatch. The glib2.0-2.33.12+really2.32.4 version number and presence of /tmp in the filename both look a bit suspect. Is the version of glib that libvips was compiled against the same version being used at runtime?

It just happens randomly two times a day. and my /tmp/ dir is empty so don't know way it even say that at all.
ii  gir1.2-glib-2.0                    1.32.1-1                      amd64        Introspection data for GLib, GObject, Gio and GModule
ii  libglib2.0-0:amd64                 2.33.12+really2.32.4-5        amd64        GLib library of C routines
ii  libglib2.0-bin                     2.33.12+really2.32.4-5        amd64        Programs for the GLib library
ii  libglib2.0-data                    2.33.12+really2.32.4-5        all          Common files for GLib library
ii  libglib2.0-dev                     2.33.12+really2.32.4-5        amd64        Development files for the GLib library
ii  libv8-3.14.5                       <IP_ADDRESS>-8~bpo70+1            amd64        V8 JavaScript engine - runtime library

Package: libglib2.0-0
State: installed
Automatically installed: yes
Multi-Arch: same
Version: 2.33.12+really2.32.4-5
Priority: optional
Section: libs
Maintainer: Debian GNOME Maintainers<EMAIL_ADDRESS>Architecture: amd64
Uncompressed Size: 4,009 k
Depends: libc6 (>= 2.9), libffi5 (>= 3.0.4), libpcre3 (>= 8.10), libselinux1 (>= 1.32), zlib1g (>= 1:1.2.2)
PreDepends: multiarch-support
Recommends: libglib2.0-data, shared-mime-info
Breaks: gvfs (< 1.8)
Replaces: libglib2.0-dev (< 2.23.2-2)
Description: GLib library of C routines
 GLib is a library containing many useful C routines for things such as trees, hashes, lists, and strings.  It is a useful general-purpose C library used by
 projects such as GTK+, GIMP, and GNOME.

 This package contains the shared libraries.
Homepage: http://www.gtk.org/

Package: libv8-3.14.5
New: yes
State: installed
Automatically installed: yes
Version: <IP_ADDRESS>-8~bpo70+1
Priority: optional
Section: libs
Maintainer: Debian Javascript Maintainers<EMAIL_ADDRESS>Architecture: amd64
Uncompressed Size: 4,301 k
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: V8 JavaScript engine - runtime library
 V8 is a high performance JavaScript engine written in C++.  It is used in the web browser Chromium.

 This package provides the dynamic library for V8.
Homepage: http://code.google.com/p/v8/

If it doesn't segfault the process and everything appears to keep working then I'd probably ignore it. We can leave this issue open in case anyone else experiences the same problem.
If it does segfault the process, a backtrace via something like the catchsegv command is our friend.

I see that supervisor restart it one or two times a day. But It don't show why it restarted.
Here is my supervisor conf for the sharp what should I add to get catchsegv to work with it?
command=/usr/bin/node /home/node/image.js
directory=/home/node
autostart=true
autorestart=true
stderr_logfile=/var/log/nodejs.img.err.log
stdout_logfile=/var/log/nodejs.img.out.log
user=www-data

Once you've installed catchsegv, modify the command to:
command=catchsegv /usr/bin/node /home/node/image.js

You should see a backtrace in the error log if the process segfaults.

On my debian7 catchsegv was in the libc-bin so I need to do this instead.
command=/usr/bin/catchsegv /usr/bin/node /home/node/image.js

Where can I find the log from catchsegv?

Here is my Supervisor log
2015-05-10 19:48:09,867 INFO exited: img (terminated by SIGSEGV; not expected)
2015-05-10 19:48:10,884 INFO spawned: 'img' with pid 22026
2015-05-10 19:48:12,374 INFO success: img entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2015-05-12 22:39:27,586 INFO exited: img (terminated by SIGSEGV; not expected)
2015-05-12 22:39:28,596 INFO spawned: 'img' with pid 31755
2015-05-12 22:39:29,949 INFO success: img entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

@Zewy Were you able to get any backtraces in the stderr or stdout logs?

No I was unable to find where catchsgv is saving the log.

Sorry Zewy, not sure I can do much more to help here without a backtrace.
Perhaps it's time for you to ask Stack Overflow about the lack of catchsegv logging? Here's the best related question/answer I can find - http://stackoverflow.com/questions/77005/how-to-generate-a-stacktrace-when-my-gcc-c-app-crashes/6599348#6599348 - one of the other answers could help you.

Checking it out, I replay as soon I have something logged.

It crashed again and I got nothing to go on only this. I wish I know what image it was working on when it happened.

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:31753): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(sharp:31753): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:31753): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(sharp:31753): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:31753): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(sharp:31753): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:31753): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(sharp:31753): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:31753): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:31753): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(sharp:31753): GLib-GObject-CRITICAL **: g_value_copy: assertion `G_IS_VALUE (src_value)' failed

Got this warning also now haven't got that before
I have this settings for sharp
sharp.cache(2048,1024);
sharp.concurrency(4);
Is there any other settings I should add? sharp process around 50/s jpg images a sec and there size is from 50 to 200KB under normal load. Sometimes it is around 300/s+ but it is rare occasions.
Going to test with Apache JMeter and check out if it is high load that makes it crash.
vips warning: linecache: error reading tile 0x0: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x8: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x16: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x24: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x32: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x40: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x48: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x56: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x64: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x72: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x80: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x88: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x96: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x104: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x112: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x120: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x128: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x136: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x144: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x152: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x160: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x168: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x176: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x184: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x192: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x200: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x208: VipsJpeg: out of order read at line 1120

vips warning: linecache: error reading tile 0x216: VipsJpeg: out of order read at line 1120

"out of order read" looks like https://github.com/jcupitt/libvips/issues/261, fixed in (I think) libvips 8.0.1.

@Zewy Are you still experiencing this problem? If so, were you able to extract a backtrace?

@lovell Sorry still unable to get any backtrace from it.
Here is what I was able to to get from last crash. it just takes less then 1 sec to restart it so it not a so big issue.
Supervisor log
---
2015-05-21 23:00:01,847 INFO exited: img (terminated by SIGSEGV; not expected)
2015-05-22 14:52:55,005 INFO exited: img (terminated by SIGSEGV; not expected)
2015-05-28 08:14:32,935 INFO exited: img (terminated by SIGSEGV; not expected)
2015-06-04 20:43:52,141 INFO exited: img (terminated by SIGSEGV; not expected)
2015-06-10 10:04:39,051 INFO exited: img (terminated by SIGSEGV; not expected)
2015-06-19 18:32:26,489 INFO exited: img (terminated by SIGSEGV; not expected)
2015-06-25 23:08:52,236 INFO exited: img (terminated by SIGSEGV; not expected)
---

nodejs log
---
2015-06-25 21:32:29 Uptime: 147
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: read gave 2449 warnings
vips warning: VipsJpeg: Premature end of JPEG file
VipsJpeg: JPEG datastream contains no image

2015-06-25 22:32:29 Uptime: 148
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: read gave 1 warnings
vips warning:

(sharp:21591): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:4206: type id `0' is invalid

(sharp:21591): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(sharp:21591): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with
 type `(null)', this type has no GTypeValueTable implementation
vips warning: VipsJpeg: read gave 2 warnings
vips warning:
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution
2015-06-26 00:08:55 Uptime: 1
2015-06-26 01:08:55 Uptime: 2
---

Can you set environment variables for your client processes? A useful one is setenv G_DEBUG=fatal-warnings, this will make the process abort() (and hopefully generate a stack trace) on the first warning message.

@jcupitt going to add that line to my supervisor, do you know if I need something more then this?
[program:img]
command=/usr/bin/catchsegv /usr/bin/node /home/node/image.js
directory=/home/node
autostart=true
autorestart=true
stderr_logfile=/var/log/nodejs.img.err.log
stdout_logfile=/var/log/nodejs.img.out.log
user=www-data
environment=G_DEBUG="fatal-warnings"

Sorry, I don't use supervisor :( but I'd guess that might work.

Closing due to a lack of updates but please do add comments or re-open if this problem still exists.

Hi !
See this log :

using : "sharp": "^0.18.1", didn't saw that issue before (I do not have the image as it was on production).

@Alex-Werner Are you using node-canvas in the same process?

Not that I'm aware of but maybe in submodules ?
"dependencies": {
    "amqplib": "^0.5.1",
    "asyncawait": "^1.0.6",
    "bluebird": "^3.5.0",
    "boom": "^4.1.0",
    "chai": "^3.5.0",
    "check-types": "^7.1.5",
    "eventemitter2": "^3.0.2",
    "fs-extra": "^2.1.2",
    "hapi": "^16.3.0",
    "hapi-auth-cookie": "^6.1.1",
    "hapi-cron-job": "^2.0.1",
    "hoek": "^4.1.1",
    "htmlparser2": "^3.9.2",
    "inert": "^4.2.0",
    "joi": "^10.5.2",
    "jssha": "^2.3.0",
    "khal": "^2.0.0",
    "later": "^1.2.0",
    "lodash": "^4.17.4",
    "lout": "^9.1.0",
    "mandrill-api": "^1.0.45",
    "microwork": "^0.12.0",
    "microwork-rpc-handler": "^1.0.2",
    "moment": "^2.18.1",
    "mongodb": "^2.2.27",
    "node-gcm": "^0.14.6",
    "node-sass": "^3.8.0",
    "nodemailer": "^2.7.0",
    "object-assign": "^4.1.1",
    "request": "^2.81.0",
    "sha3": "^1.2.0",
    "sharp": "^0.18.1",
    "shortid": "^2.2.8",
    "vision": "^4.1.1",
    "winston": "^2.3.1"
  },

Thanks, my money would be on node-sass, which depends on libsass which depends on glib.
If so, a couple of options are:

ensure sharp is require'd before node-sass, or vice versa.
use a global install of both libsass and libvips

Hi not using any node-sass. But getting this issue:
(sharp:1265): GLib-GObject-WARNING **: gtype.c:4273: type id '0' is invalid

(sharp:1265): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced

(sharp:1265): GLib-GObject-WARNING **: gvalue.c:184: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation

(sharp:1265): GLib-GObject-CRITICAL **: g_value_transform: assertion 'G_IS_VALUE (dest_value)' failed

Only getting this randomly. Most of the time the resizer works just fine.


Python 3 compatibility

It would be cool if this was compatible with Python 3.x.

As far as I know, the code is now compatible with python 3. Please do test it and let me know


Update entity.py

device_state_attributes -> extra_state_attributes name change
device_state_attribute has been deprecated, Home Assistant started to complain in the logs about it, changed the files on my end and worked fine.

Thanks for this @ToxicDeathX - will release a new version shortly.


[Refactor] set defineExpr use new parser

What type of PR is this：

[ ] bug
[ ] feature
[ ] enhancement
[x] refactor
[ ] others

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

DefineExpr was parsed with the old parser before, but the new one was used when building the table, so there may be a problem of inconsistent statements. So we switch to the new one to cover all the old parsing cases.

[FE PR Coverage check]
:disappointed: fail : 14 / 18 (77.78%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/analysis/CreateMaterializedViewStmt.java
8
11
72.73%

:large_blue_circle:
com/starrocks/catalog/MaterializedIndexMeta.java
3
4
75.00%

:large_blue_circle:
com/starrocks/alter/RollupJobV2.java
3
3
100.00%

[FE PR Coverage check]
:disappointed: fail : 14 / 18 (77.78%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/analysis/CreateMaterializedViewStmt.java
8
11
72.73%

:large_blue_circle:
com/starrocks/catalog/MaterializedIndexMeta.java
3
4
75.00%

:large_blue_circle:
com/starrocks/alter/RollupJobV2.java
3
3
100.00%

[FE PR Coverage check]
:disappointed: fail : 14 / 18 (77.78%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/analysis/CreateMaterializedViewStmt.java
8
11
72.73%

:large_blue_circle:
com/starrocks/catalog/MaterializedIndexMeta.java
3
4
75.00%

:large_blue_circle:
com/starrocks/alter/RollupJobV2.java
3
3
100.00%

@Mergifyio backport branch-2.3


Client API permissions

This belongs to the OAuth Epic: #4004 - please read this for the big picture of what this issue is for :)

It is allowed for every authenticated user to add, browse, edit and delete clients. This is similar to what Slack does for integrations and will allow every user to use third party clients. The access to the restful API of Ghost is protected by the individual permissions of each user.

JSON API
Admin
Editor
Author
NoAuth

clients.browse
y
y
y

clients.read
y
y
y

clients.edit
y
y
y

clients.add
y
y
y

clients.destroy
y
y
y

This issue depends on #3910 for adding new permissions to the database.

Labelling all the open permissions related issues (there are several) with both permissions and later as I'm working on a spec to solve the immediate issues as well as a long term plan, which will replace all of these issues.
Note: I am aware this is required for OAuth #4004, I am working on a solution that will allow us to resolve this in the short term - at the moment there is no way forward. I'll reopen this as soon as we're able to progress with it.

I'm not 100% sure about the permissions here.

ghost-admin is supposed to be uneditable as described here: https://github.com/TryGhost/Ghost/issues/4177#issuecomment-162603221
ghost-frontend is editable, but not deletable. It should be edited by admins+ only IMO.

So I'd imagine if I was an admin and I logged in, I'd see a client (connections) screen in my menu and I could click on it. When I click on it, I see an uneditable entry for ghost-admin and an editable entry for ghost-frontend. I can add new entries.
If I'm an editor or author, I can login and see the client (connections) screen, but when I click on it, it is empty. I can add new entries.
Admins will have access to entries made by editors/authors, but not vice versa.
This allows anyone to connect a 3rd party app, but means that admins have final control.
 At some point we want to be able to define the concept of "owner" for a particular object, but that's a bigger part of our need to create a whole new permissions system one day.

I'm closing all OAuth and most API issues temporarily with the later label.
RE: OAuth, for the next 2-3 months we'll be implementing an official Ghost OAuth login system, providing global access to all Ghost blogs with a single login. We'll be opening issues around this system soon, and I don't want to cause confusion with OAuth for the API.
JSON API Overhaul & OAuth access are currently scheduled next on the roadmap


added canonical import

required to build gotty using the centurylink/golang-builder docker container.

I'm wondering if this docker builder is used commonly.
By the way, Is this a right way to use the canonical import?

I think it is. https://golang.org/doc/go1.4#canonicalimports


How about releasing the weights of models with small input size

Hi,
Thanks for your great work. In some resource limited scenario, it will benefit to use the model with smaller input size.  And the performance drop is acceptable. Would you consider to release the model weights before fine-tuning with the full input size?
Thanks.

Hi,
Thank you for your interest in our work. We are pleased to provide you with the pre-trained weights for CLIPA-V2. You can access them on Google Drive. The performance metrics are detailed in the clipa_jax/README.MD file. Additionally, we have included the configurations and logs in the shared weights directory. We hope you find this information helpful!


Review

For order management, instead of using one order per operation, with custom salt, and thus a custom hash, that needs to be signed, you could do:
   function createAppOrder(
        address _appAddress
    ) internal returns (IexecLibOrders_v5.AppOrder memory) {
        //create AppOrderOperation
        IexecLibOrders_v5.AppOrderOperation memory appOrderOperation = IexecLibOrders_v5
            .AppOrderOperation({
                order: IexecLibOrders_v5.AppOrder({
                    app: _appAddress,
                    appprice: 0,
                    volume: type(uint256).max,
                    tag: TAG,
                    datasetrestrict: address(0), // check is enforced by the requester, which is whitelisted
                    workerpoolrestrict: address(0), // check is enforced by the requester, which is whitelisted
                    requesterrestrict: address(this), // this
                    salt: bytes32(0),
                    sign: new bytes(0)
                }),
                operation: IexecLibOrders_v5.OrderOperationEnum.SIGN, //OrderOperationEnum
                sign: new bytes(0)
            });

        // presign - no-opp if the order was already signed
        _pocoDelegate.manageAppOrder(appOrderOperation);

        return appOrderOperation.order;
    }

This would mean:

A single order per ressource (app or dataset)
Once its signed, its good. All usage go in the same counter → less storage touched
Check/persmission is enforced by the ProtectedDataSharing contract, no need to re-check in the PoCo
infinite volume is safe, order is only valid as long as the ProtectedDataSharing owns the ressource and does the request.

This works for app and dataset.

If we are smart, this order could be built and pre-signed when the app takes ownership of the asset (app or dataset). That way you don't have to re-do the _pocoDelegate.manageAppOrder when you want to match a new request order.

Line 220 seems to be duplicated

Opinionated design proposition:

remove removeCollection
inherit from ERC721BurnableUpgradeable → adds a burn function that does the same as removeCollection
override _update(...)

function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) {
    if (to == address(0) && collectionDetails[_collectionTokenId].size > 0) {
        revert CollectionNotEmpty(_collectionTokenId);
    }
    return super._update(to, tokenId, auth);
}

This would protect against calling internal _burn on a collection that is not empty

Line 312 only support getApproved, it should also support isApprovedForAll.
Line 319 will check that address(this) is authorized anyway, so I would simply remove line 312.

It would be cleaner to do line 319 (take custody of the asset) then do all storage change (line 318, 320, ...). Do sure there is a risk, but it would be good practice.
I would swap line 318 and 319

same, in removeProtectedDataFromCollection, I would change the state (lines 341 and 342) BEFORE doing the transferFrom (line 336)

_safeTransferFrom is only used once. Other places use _protectedDataRegistry.safeTransferFrom directly. Consider removing _safeTransferFrom.

subscribeTo uses collectionDetails[_collectionTokenId] many time. It should be cached (using a storage pointer)

uint48 endDate = uint48(block.timestamp) +
    collectionDetails[_collectionTokenId].subscriptionParams.duration;
collectionDetails[_collectionTokenId].subscribers[msg.sender] = endDate;
if (collectionDetails[_collectionTokenId].lastSubscriptionExpiration < endDate) {
    collectionDetails[_collectionTokenId].lastSubscriptionExpiration = endDate;
}

can be rewritten as
collectionDetails[_collectionTokenId].subscribers[msg.sender] = Math.max(
    collectionDetails[_collectionTokenId].subscribers[msg.sender],
    block.timestamp + collectionDetails[_collectionTokenId].subscriptionParams.duration
).toUint48();

Also, I find it strange that if I still have 3 days of subscription left, and if I pay for 1 month of subscription, the 3 days I have are lost. I should have 1month + 3days.

In removeProtectedDataFromSubscription, you can remove the _collectionTokenId from the arguments, and read it from the protectedData details

subscribeTo can be frontrun
The collection manager can front run a call to subscribeTo (by a user), to set the duration to 1 second, while keeping the same price.
This will drain take the funds from the user just the same, but not give him a subscription.
A fix would be :

user says how long he wants to subscribe for
user give the funds for that
smart contract that the duration asked + value passed match the current price
if collection manager increassed the price, the transaction revert and no funds are spent by the user.
if collection manager decreassed the price, user gets a partial refund

This would allow removing the duration argument. Renting price would be "per day" or similar.
You could have a security check that the user never subscribe for more than X (1 month ? 1 year?)

The goal was to safeguard the interests of both the collection owner and the end user in a manner that ensures mutual protection. To achieve this, the system was designed with specific mechanisms:

Protection for the Collection Owner: The system safeguards collection owners by allowing them to retain control over their datasets. Owners specify both the duration and the price for accessing the dataset, ensuring that they can regain ownership of their data after the rental period. An end user could not rent/subscribe a dataset for an "infinite" period. Indeed, if an end user chooses to extend the rental period by renting the dataset again, these periods are not cumulative, ensuring that the collection owner's rights are preserved. This setup prevents perpetual loss of control over their dataset.

Protection for the End User: The system also protects end users by ensuring that they have uninterrupted access to the rented or subscribed datasets throughout the agreed-upon time period. This means the collection owner cannot revoke access to the data during the active rental period, thereby guaranteeing that the end user can fully utilize the data they have paid for without unexpected restrictions.

About AppWhitelist.sol
Is it really necessary to check that the owner of the app is the ProtectedDataSharing contract ? I think its irrelevant. An app is safe by its design, not because of its owner.

The ProtectedDataSharing will not be able to any app that it doesn't own.
The App may be whitelisted, then removed from ProtectedDataSharing ... and it would still be witelisted.

Also: address(this) in the event is not usefull.
You could simplify the contract as:
contract AppWhitelist is IAppWhitelist, Ownable {
    mapping(address => bool) public appWhitelisted;

    constructor(address _owner) Ownable(_owner) {}

    function addApp(address _app) public onlyOwner {
        appWhitelisted[_app] = true;
        emit NewAppAddedToAppWhitelist(_app);
    }
}

If you wanted to be really smart about it, you'd use ERC734 so that this contract is actually a PoCo whitelist.
contract ERC734 {
    mapping(bytes32 => mapping(uint256 => bool)) private _purposes;

    event KeyUpdated(bytes32 id, uint256 purpose, bool id);

    function keyHasPurpose(bytes32 id, uint256 purpose) public view returns (bool) {
        return _purposes[id][purpose];
    }

    function _setKeyHasPurpose(bytes32 id, uint256 purpose, bool value) internam {
        _purposes[id][purpose] = value;
        emit KeyUpdated(id, purpose, value);
    }
}

contract Whitelist is Ownable, ERC734 {
    uint256 internal constant GROUPMEMBER_PURPOSE = 4;

    constructor(address initialOwner) Ownable(initialOwner) {}

    function add(address ressource) public onlyOwner {
        _setKeyHasPurpose(bytes32(uint256(ressource)), GROUPMEMBER_PURPOSE, true);
    }
}

then

In DataProtectorSharing, _appRegistry is set but never used

https://github.com/iExecBlockchainComputing/dataprotector-sdk/blob/feature/new-sc-for-app-workflow/packages/sharing-smart-contract/contracts/registry/AppWhitelistRegistry.sol#L56-L61 could be significantly cheaper by using clones

I get that having a whitelist factory is a nice touch. That is easier to work with than deploying your own smart contract.
But assuming someone wants to deploy its own smart contract, why should he not be able to do so ? What is the risk here? I'm not sure I see the point of having to verify that the whitelist was created by the whitelist registry. Also its not a registry since all whitelists are ownable and the registry is not really involved in ownership (unlike appRegistry/datasetRegistry/...)

Who managed the app whitelist for a dataset? If the dataset is sold, the owner of the corresponding whitelist keeps tremendous power (he could whitelist an app that leaks the data).

fix on this PR


[Vue3 Incompatibility] Uncaught TypeError: superClass is undefined

What happens
After adding Vuesax to Vue, when running the application in development mode it does not work as expected, not even loading, because of a Uncaught TypeError: superClass is undefined. This blocks the rest of the app from loading, and degrading to @latest does not work either. I have also tried to use the CDN, but then Vue doesn't pick up the components, but that is another story.
System information
Using<EMAIL_ADDRESS>with a Node.js v15.12.0. The OS is Pop!_OS 20.10 (built on top of Ubuntu same version and the Linux 5.11 kernel). Currently using Firefox 88.0, but I have also tried with Chromium 90.0.4430.93 (snap) to get the same result. Using vuesax@next, so 4.0.1-alpha.25. You can view the full code at @HipyCas/wings-client.
Complete error message
Chromium:
vuesax.js?574d:174 Uncaught TypeError: Cannot read property 'prototype' of undefined
    at _inheritsLoose (vuesax.js?574d:174)
    at eval (vuesax.js?574d:18501)
    at Module.eval (vuesax.js?574d:18553)
    at __webpack_require__ (vuesax.js?574d:37)
    at eval (vuesax.js?574d:101)
    at eval (vuesax.js?574d:104)
    at webpackUniversalModuleDefinition (vuesax.js?574d:10)
    at eval (vuesax.js?574d:17)
    at Object../node_modules/vuesax/dist/vuesax.js (chunk-vendors.js:1407)
    at __webpack_require__ (app.js:854)

Firefox:
Uncaught TypeError: superClass is undefined
    _inheritsLoose vuesax.js:174
    _class3 vuesax.js:18501
    <anonymous> vuesax.js:18553
    __webpack_require__ vuesax.js:37
    <anonymous> vuesax.js:101
    <anonymous> vuesax.js:104
    webpackUniversalModuleDefinition vuesax.js:10
    <anonymous> vuesax.js:17
    js chunk-vendors.js:1407
    __webpack_require__ app.js:854
    fn app.js:151
    <anonymous> main.js:12
    js app.js:1301
    __webpack_require__ app.js:854
    fn app.js:151
    1 app.js:1374
    __webpack_require__ app.js:854
    checkDeferredModules app.js:46
    <anonymous> app.js:994
    <anonymous> app.js:997

My code
The code is the same as the provided in the documentation, just changing some things which were already working on my Vue application.
This is the code for the main.js file:
import { createApp } from 'vue';
import App from './App.vue';
import Vuesax from 'vuesax'; // Vuesax NPM package
import router from './router';
import store from './store';
import 'vuesax/dist/vuesax.css'; // Vuesax CSS

createApp(App).use(Vuesax).use(store).use(router).mount('#app');

NPM does not report any dependency or conflict problem, but here goes the (abbreviated) package.json:
{
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0",
    "vue-router": "^4.0.0-0",
    "vuesax": "^4.0.1-alpha.25",
    "vuex": "^4.0.0-0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-e2e-cypress": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-unit-mocha": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-prettier": "^6.0.0",
    "@vue/test-utils": "^2.0.0-0",
    "babel-eslint": "^10.1.0",
    "chai": "^4.1.2",
    "eslint": "^6.7.2",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-vue": "^7.0.0",
    "prettier": "^2.2.1",
    "stylus": "^0.54.7",
    "stylus-loader": "^3.0.2",
    "vue-cli-plugin-tauri": "*"
  }
}

May you try vue2

maybe you should try vue2

Well there is way more issues than this for vue3 lol, this project is not and will probably never be compatible with vue 3 judging by the state of things
Vue2 and Vue3 are very different and would require a major rewrite

Ok thanks! Is then the @lusaxweb/vuesax-next repository the one supposed to be compatible with Vue3?

Nope not even, it was just supposed to be a clean rewrite of the project which has way too many issues but it's currently abandoned and didn't make it past alpha (only 30% of components)

Do we have support on Vue 3 now?

What's the status of this project? Is it active or abandoned?


Extend modal shift to international transport

With the high-speed rail vs. plane discussion becoming more and more prominent, I think it would be nice if we could add international transport to our modal shift functionality in the ETM.
First thoughts on implementation:
Maybe we can add a node after bunkers_useful_demand_planes that converts energy to passenger kilometres; connect that node to transport_useful_demand_passenger_kms; rename the 'domestic planes' slider to 'planes'; add international aviation to the planes slider -> when the user adds international transport to his or her scenario passenger kilometres for planes will increase and can subsequently be replaced by trains.
Not sure if this will work tho..

Very good idea! Would be cool when people could shift between international trains and planes and see the difference.
We just discussed in a meeting with @Mart, @michieldenhaan and @ChaelKruip that it would be nice to include this modal shift improvement in a proposal to for example 'de Groene Partijen' (Marjolein Demmers) before implementing this, because we thought that they would be interested in this new feature.
Notifying @AlexanderWirtz and @jorisberkhout

Closing, no plans for implementation atm


Example isn't working for all the sensors at once

The example works only for the first two sensors (illuminance, pressure), the rest doesn't get recognised in HA.

How about increase the sleep ms from 500 to 1500? I test the example with esp32s and esp32c3.(2.0.8sdk)

I'm using Firebeetle32 (ESP32-Wroom-32E)
The encryption example doesn't work, even for one sensor :(

I'm using Firebeetle32 (ESP32-Wroom-32E)
The encryption example doesn't work, even for one sensor :(

Use a shorter device name?
”DIY”

Yes that did it! Even with one sensor though using only 3 letters is kinda a limitation... I will look into it.
My thought adding multisensors are that the user should add them all together (
bthome.addMeasurement)) and the .cpp should count the lenght and "chop" the pakets, sending them seperately.
The only input from user, should be the name, bind key and the sensors / states.
That's my goal...
Will work on that when I have some spare time...
Thank you a lot for your hard work!!!

With one sensor the example works perfect, adding more than one, even with a bigger delay (3000) doesn't make any change in HA

With one sensor the example works perfect, adding more than one, even with a bigger delay (3000) doesn't make any change in HA

My homeassisant will add more than one sensor, it takes some time.And I just delay 500ms in my demo project.
Or you can try this way below:
Sensor1
bthome.resetMeasurement();
bthome.addMeasurement...
bthome.buildPaket...
bthome.start();
delay...
bthome.stop();
Sensor2
bthome.resetMeasurement();
bthome.addMeasurement...
bthome.buildPaket...
bthome.start();
delay...
bthome.stop();

Yes that did it! Even with one sensor though using only 3 letters is kinda a limitation... I will look into it. My thought adding multisensors are that the user should add them all together ( bthome.addMeasurement)) and the .cpp should count the lenght and "chop" the pakets, sending them seperately. The only input from user, should be the name, bind key and the sensors / states. That's my goal... Will work on that when I have some spare time... Thank you a lot for your hard work!!!

I prefer to chop the packet manually cause I use the PT_SLEEP(pt, 500) macro from #include "protothreads.h" to make the thread non-block in the loop.
If the .cpp could chop the packet auto, we should find the proper way to avoid using the delay funtion.

do you have any BTHome related errors in ha?

do you have any BTHome related errors in ha?
No. It works well with my hass.

I think I have solved it with another way.

I have also found a way to send a String for BIND_KEY I'm waiting for your code first

That works much better!
I will add now the change to the Bind key to be passed as String, making it more user-friendly

You can test it if you want.
My opinion is still that the user shouldn't care about counting the bytes, should just send the values of the sensors and the code should take care of the rest (cropping the pakets and send them so that everything always works)
My thought making this example was to be as less complicated and user friendly as it could...
I will give it a try to solve this
Thank you once more, you are a great help on this project, most of the code couldn't be here without you!

It would be nice if the code could deal with the data length and chop the adv packet itself. I hope that the bindkey could support not only string but also the char or byte array.

By the way, can your ha display all the sensor entities with the new code?

Let's continue the discussion here


changeset publish does not replace workspace: ranges with current version in workspace before publishing with yarn as a package manager

Affected Packages
@changesets/cli
yarn version: 2.1.1
changeset cli version: 2.9.2
Problem
@zkochan has already raised an issue with support of workspace ranges in dependencies, and he already proposed a solution for his immediate need of bumping workspace:x.y.z dependencies when changeset version is invoked.
However, this only bumps the semver range in the package.json but keeps the workspace: int it. That is the expected behavior locally but is not the expected behavior during publish.

workspace: with a semver range should have the 'workspace:' stripped before the publish.
workspace:* should have the '*' resolved to the workspace version and the the 'workspace:' stripped before the publish.

changeset publish does not do that resulting in the NPM package being published with 'workspace:' in the version specified which obviously does not work.
Proposed solution
Not sure, but @zkochan already had a comment regarding this at: https://github.com/atlassian/changesets/pull/311/files#r407058482 and to my knowledge yarn2 properly publishes such packages when invoked with 'yarn npm publish'. Not sure about pnpm.
Maybe the solution is to let the package manager handle this?
Workaround so far:
I am using yarn v2, so the workaround for me is ugly but produces consistent results.

Just stop at changeset version
Use yarn npm publish to publish packages
manually create git tags
push to git

Additional information regarding what Yarn V2 does during the publish:

Yarn packs the package before submitting to the registry,
prior to packing through the yarn-plugin-pack, a hook is invoked: beforeWorkspacePacking
that hooks resolves the workspace ranges and resplaces them in the generated manifest for the packing tool

https://github.com/yarnpkg/berry/blob/b9ca9d35e5b8592c5b84653122c832dc194793f5/packages/plugin-pack/sources/index.ts#L40
A possible solution would be to let the package manager, in this case yarn do the packing and publishing with its knowledge of the workspace and dependencies. However it seems that changeset only detects pnpm or npm and is not aware of yarn when publishing:
https://github.com/atlassian/changesets/blob/a57d16355ad7d67b18b768c8f79224d80afa507c/packages/cli/src/commands/publish/npm-utils.ts#L32
async function getPublishTool(cwd: string): Promise<"npm" | "pnpm"> {
  const pm = await preferredPM(cwd);
  if (!pm) return "npm";
  return pm.name === "pnpm" ? "pnpm" : "npm";
}

It also seems from the rest of that file that there are some strong assumptions that the publishing tool is npm or behaves like npm, rather than just an external command. Yarn may not conform to that but it remains quite simple to just delegate that task of publishing to its command line.

Can yarn recursively publish all the packages that have new versions?
pnpm has the pnpm publish -r command that (at the moment) works better than using changesets to publish the bumped versions.  I assume Yarn also has something like that.

Maybe the solution is to let the package manager handle this?

Yes, I believe this is the best option for moving forward.

However it seems that changeset only detects pnpm or npm and is not aware of yarn when publishing:

Can using Yarn 2 be easily distinguished from Yarn 1? I don't know details, but Yarn 1 is explicitly not used for publishing right now because there were some problems with it.

Can yarn recursively publish all the packages that have new versions?
pnpm has the pnpm publish -r command that (at the moment) works better than using changesets to publish the bumped versions. I assume Yarn also has something like that.

Not to my knowledge in its current version. Yarn npm publish only acts on the current workspace. It can however just gracefully ignore republish with  --tolerate-republish. So I assume, that the intent of whoever wrote that part was to just call this on every workspace and just ignore the ones whose versions was not bumped.
Note that prior to publish, you are supposed to have used yarn version plugin or something else like changesets to bump the versions in manifests that had changesets.
@zkochan I am also playing around with pnpm + rush, and I only switched to yarn today to check the differences in yarn v2. The couple of things that really struck me in yarn v2 are:

yarn + changesets = all you need for monorepo, and if you need more, you can just write a yarn plugin or a repo tool,
zero-install + pnp are much cleaner, node_modules is a mess with linking for debugging.
pnpm is cool but not enough on its own. monorepo tools are bloated with useless crap, redo what pnpm/yarn do better and integrate poorly with pnpm workspaces and yarn workspaces. I don't know if there is an alternative way to reduce that node_modules mess with pnpm and linking.

Maybe the solution is to let the package manager handle this?

Yes, I believe this is the best option for moving forward.

However it seems that changeset only detects pnpm or npm and is not aware of yarn when publishing:

Can using Yarn 2 be easily distinguished from Yarn 1? I don't know details, but Yarn 1 is explicitly not used for publishing right now because there were some problems with it.

Well it can definitely be distinguished but not with just 'preferred-pm' module. I believe that module could use more precise heuristics to detect yarn v2 from yarn v1. For example the presence of .yarn/releases/yarn-xxxx.js or ultimately it's a yarn and then we do a yarn --version :-)
BTW, for the workspace: problem, ultimately we can simply request yarn v2 to pack the workspace in a tgz, and slightly adjust the npm/pnpm command line for publishing to use the packed output. That's it. The rest gets taken care of by changesets as usual.

BTW, for the workspace: problem, ultimately we can simply request yarn v2 to pack the workspace in a tgz, and slightly adjust the npm/pnpm command line for publishing to use the packed output. That's it. The rest gets taken care of by changesets as usual.

Seems like a more complex thing to do (with no benefits?). If we could just offload both packing and publishing to a single command then this would make our implementation easier, right?

@Andarist I'm always an advocate for separation of concerns. In this case, leaving the package manager do what it is intended to do is the right approach. If something is missing in yarn/npm/pnpm to make things work flawlessly for publishing before changesets take the control back for tagging the release, we should just push for it to happen there.
The second thing that comes to my mind as a suggestion is to evaluate the positioning of the yarn version plugin with regard to changesets. That plugin is justified from a yarn point of view as it does handle something that the PM knows better than anyone else: dependency versions in a workspace. At the same time, changesets does something else with change logs that the PM has nothing to do with. There may be some synergies here and some collaboration to happen between the PM for version management, identifying the changes in a workspace, and using that information to produce a workspace friendly changelog, handle git tagging, handle pre-releases etc...
Such a thing could also be used with PNPM as well if it publishes similar APIs and allows for plugin architecture that hooks into the PM lifecycle.
Ultimately, the end goal should be that PM + changesets + few PM plugins => monorepos that work everywhere, in dev environments, in CI, with vscode, in docker, offline, ... without having to hack the monorepo tools (i.e. lerna, rush, nx,...). to bypass/eject/... things they do which circumvent what the underlying PM usually does. It should be easier today that both yarn and pnpm bring builtin support for workspaces.

Tagging this issue from yarn berry which is of extreme interest to changesets imho :-)
https://github.com/yarnpkg/berry/issues/1510

Can using Yarn 2 be easily distinguished from Yarn 1? I don't know details, but Yarn 1 is explicitly not used for publishing right now because there were some problems with it.

@Andarist Yes, if the lockfile contains __metadata it's v2, otherwise it's v1

Any plan to fix this or coordinate with yarn berry?

@abdes yes, we definitely want to fix that - sorry for not being responsive lately for this issue. Having a lot on my plate.
Would you be willing to work on fixing this? As discussed - I believe we should switch to using appropriate package managers for publishing, but we should keep using npm for Yarn 1 repositories. This would be the easiest solution for us, from what I understand.
Q: Is everything that is needed for this to work with Yarn 2 included in their core? Or are some parts of this covered by their plugins and people have to opt-in?

@Andarist I don't wanna rush this tbh :-). I saw that you have started the discussion with the lead maintainer of berry and I think this is the right thing to do first. He is extremely open and supportive, so I suggest that the first step should be to agree with @arcanis on how this would work. I feel that he is willing to consider a solution that perfectly integrates changeset with berry and that's what we want :-)

Can using Yarn 2 be easily distinguished from Yarn 1? I don't know details, but Yarn 1 is explicitly not used for publishing right now because there were some problems with it.

@Andarist Yes, if the lockfile contains __metadata it's v2, otherwise it's v1

Just spent some time on a package manager detection library: https://www.npmjs.com/package/@lerepo/detect-package-manager,
There is a CLI package with it for a quick test if you wanna check it out in your environemnt. https://www.npmjs.com/package/@lerepo/detect-package-manager-cli
It detects npm, pnpm and yarn, and provides the version installed in the system. Note that when using berry, the version of yarn is the one applied in the project/workspace and not the global one. So you may have a yarn v1 installed globally but a yarn workspace setup with yarn v2.1.1. The detection will return 2.1.1 as a version and not the global yarn. This is already something implemented in yarn itself.
If the project is using yarn v1, then the version will be that of the globally installed yarn.

Is this still in development?

@okikio it is - in a sense that I intend to work on Changesets. It isn't in a sense that I don't have much free time lately. This is what can happen in the under-funded OSS. If your company relies on Changesets, or on the OSS in general - they might consider sponsoring projects like this to improve the situation. It should be a form of insurance/risk mitigation policies for companies.

Thanks for your response, I'll keep this in mind

@Andarist I just went to go sponsor because I thought I missed a link to do so on the landing page, but I did not see anything there. I think it would be great to set up some sort of sponsorship ability for this project that people could use. I know there are a number of options out there today for setting that up that are fairly low effort.
I did see you personally have sponsorship set up on your profile which I did, but I think it would be good to set up this actual repo for that as well. Maybe that is not possible since it is under the Atlassian org?

@Andarist I just went to go sponsor

Thank you ❤ If you need any issue to be prioritized - let me know, I can't promise anything but I can try to look into it.

I did see you personally have sponsorship set up on your profile which I did, but I think it would be good to set up this actual repo for that as well. Maybe that is not possible since it is under the Atlassian org?

Yeah, this is a tad complicated because of that at the moment. I don't really want to enter that territory to avoid potential complications.

For anyone else landing here, the temporary solution to this for us is to overwrite these versions directly in between the changeset version and changeset publish steps. We do not check these changes in to version control. They are only for publishing packages correctly. We throw the changes away after changeset publish with git checkout -- "*.json"
You may need to tweak this javascript for your team's needs. We are explicitly looking inside dependencies, peerDependencies and devDependencies and overwriting whatever the current version is with the current workspace version. We do not check at all if the workspace:<operator> syntax is. This basically resolves to us doing an exact install of the workspace package.
const { readFileSync, writeFileSync } = require('fs');
const { execSync } = require('child_process');
const wsOutput = execSync('yarn workspaces list --json', {
  encoding: 'utf-8',
});

// We will only try to update dependencies in these package file types
const DEP_TYPES_TO_UPDATE = [
  'dependencies',
  'devDependencies',
  'peerDependencies',
];

// Used to look up the current package.json version at a location
const getPackageFile = (location) =>
  JSON.parse(readFileSync(`${location}/package.json`));

// Object map of entries to make version replacement easier when we publish
const workspaceVersionMap = Object.fromEntries(
  wsOutput
    // Create an array from the command response
    .split('\n')
    // Filter out any empty strings (last newline from split)
    .filter((string) => Boolean(string))
    // Parse JSON strings
    .map((string) => JSON.parse(string))
    // Create [key, value] and lookup version
    .map(({ location, name }) => [
      name,
      { location, version: getPackageFile(location).version },
    ])
);

// const replaceWorkspaceSyntax = ()

// Go replace versions in each package.json file
for (const pkg in workspaceVersionMap) {
  const { location } = workspaceVersionMap[pkg];

  // Get the packagefile data that we will use to rewrite the version updates.
  // NOTE: This data will be mutated in JS before we output to overwrite the file
  const packageFile = getPackageFile(location);

  // Used to target a package.json dependency list type and if the dependency matches one of our workspace packages,
  // we update the version to match the current workspace version in our workspace version map.
  const mutuateDeps = (depType) => {
    // Get the dependency type from the file and iterate over each dependency
    for (const dep in packageFile[depType]) {
      // if a dependency matches one of the dependencies in our workspace map
      if (Object.keys(workspaceVersionMap).includes(dep)) {
        // we mutate the package file data in memory to match the current workspace version
        packageFile[depType][dep] = workspaceVersionMap[dep].version;
      }
    }
  };

  // Go mutate the allowed dependency types
  DEP_TYPES_TO_UPDATE.map((dependencyType) => mutuateDeps(dependencyType));

  // Write our updated files
  writeFileSync(
    `${location}/package.json`,
    // Convert the file data to json
    // include the 2 space indent formatting
    // and also add an empty newline at the end
    `${JSON.stringify(packageFile, null, 2)}\n`
  );
}

The kind donation from @brianespinosa has helped me to regain interest in Changesets and I'm looking into fixing this soon.

I've created a pull request that attempts to fix the issues mentioned here. I will setup snapshot releases for this PR soon-ish but in the meantime I would love to ask if there are any people willing to test this stuff out in their projects.

@Andarist I am just getting back into the office from being out and trying not to look at any code. Let me kick the tires on that PR late this week to see how it works. Our use case is definitely more limited than others, but I can at least validate how it is working on our end.

@Andarist, Eagerly waiting for those snapshot releases.
As yarn add local-dependency adds dependency using the workspace:^ protocol by default and manually finding and replacing the real package version is a pain.

@HosseinAgha till the feature lands, you can use this trick:

Run yarn pack to create an archive (workspace:* versions will be replaced)
untar the generated package.tgz  into a _release folder
set publishConfig.directory to point this folder
call changeset publish

Basically:
 "publishConfig": {
    "directory": "_release/package"
  },
  "scripts": {
    // build - >pack -> untar archive in publishConfig folder
    "build-publishable-release": "yarn build && rimraf ./_release && yarn pack && mkdir ./_release && tar zxvf ./package.tgz --directory ./_release && rm ./package.tgz",
}

As tested here: https://github.com/soluble-io/cache-interop/pull/135

@Andarist I have yet to circle around to test this... but we do have some big version bumps coming in some of our packages this week. When we do that, I want to try this branch in our pipeline and see how it does and I can report back. It should be out by Friday so I'll report back, though again... I suspect due to our limited use case with version ranges, this PR should easily work for us.

yarn changeset version
yarn workspaces foreach --from '@org/*' npm publish --access public
yarn changeset tag

Does the trick for me.

@belgattitude thank you so much! This is exactly what I needed.
In my case, I'm using preconstruct to build all packages simultaneously and combine it with yarn's workspaces foreach command to do the manual packing you suggested.
The release is fully automated with changesets/action@v1 action.
If someone else uses preconstruct - here are my relevant release scripts.
  "scripts": {
    "build": "preconstruct build",
    "build:release": "yarn build && yarn forallpackages exec rm -rf _release && yarn forallpackages pack && yarn forallpackages exec \"mkdir _release && tar zxvf package.tgz --directory _release && rm package.tgz\"",
    "forallpackages": "yarn workspaces foreach --no-private --verbose",
    "release": "yarn build:release && changeset publish",
  },

And in the release action, simply call yarn release.
  - name: Create release PR or release packages
    uses: changesets/action@v1
    with:
      publish: yarn release
      commit: version-packages
      title: Version Packages
      createGithubReleases: true
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Full example is here.

@Pagebakers workaround works perfectly and is quite elegant, and less error prune of creating temp directories and changing the package.json.
Minor issue with our monorepo as it contained private packages, be sure to use the private flag if you have private packages:
yarn changeset version
yarn workspaces foreach --no-private --from '@neo4j-ndl/*' npm publish --access public
yarn changeset tag


Custom menu actions & Data detectors conflict

Hi,
I see that at times when the message text is just a number/ url/ email, long press of message bubble causes Data detectors to override Custom menu actions.
One workaround I could think of is to determine whether or not the message text is  just a number/ url/ email, in cellForItemAtIndexPath & disable that particular cell.textView.dataDetectorTypes. I haven't tried it yet though.
Is there a better way to solve this problem?

+1 I'm having the same problem

@Sufi-Al-Hussaini I found a workaround which was to override my custom cells gestureRecognizer:shouldReceiveTouch: with only return YES
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    return YES;
}

This way I can at least get the custom menu when long pressing not the bubble but the cell. I don't know yet if this has some side-effects seeing that the original implementation in JSQMessagesCollectionViewCell is the following:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    CGPoint touchPt = [touch locationInView:self];

    if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
        return CGRectContainsPoint(self.messageBubbleContainerView.frame, touchPt);
    }

    return YES;
}

@jessesquires or can anyone shed any light as to what might be the side effects of my solution?

@GianniCarlo -- shouldn't be any negative side-effects.
The original implementation limits the touch to the message bubble, your change allows touches in the entire cell

@jessesquires - oh ok, I thought it might clash with another UIGestureRecognizer in the cell that I may not know about. But everything is working well so far 👍

Thanks a lot guys, @GianniCarlo and @jessesquires!

Thanks for me as well @GianniCarlo  and @jessesquires! I've changed the shouldReceiveTouch method to add a bit pit "long press area padding" to address the same issue:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    CGPoint touchPt = [touch locationInView:self];

    if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
        int padding = 30;
        CGRect enlargedFrame = CGRectInset(self.messageBubbleContainerView.frame, -padding, -padding);
        return CGRectContainsPoint(enlargedFrame, touchPt);
    }

    return YES;
}

In JSQMessageViewController.m, what is the purpose of this line
	[UIMenuController sharedMenuController].menuItems = nil;
in
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
The nilling out the menuItems here kills my custom menus on inputToolbar.contentView.textView
Thanks


fix(endWith): ability to endWith different types (#4183)

Description: add ability for endWith operator to end the Observable with different types.
Related issue (if exists): #4183

Coverage remained the same at 96.808% when pulling d08f235dbc45ffff7fcba30e9d468094891873c0 on dkosasih:endWith-mix_types into 7eeb671e71aef5c0243f74becf1d890844c6a636 on ReactiveX:master.

Thanks, @dkosasih!