Error: Cannot find module '@typescript-eslint/parser'

Describe the bug
Getting the error in vscode "Error: Cannot find module '@typescript-eslint/parser'"
To Reproduce
Steps to reproduce the behavior:

Go to vs code
Click on prettier bottom right
Select prettier Eslint
Click save on any file in code base
See error

Expected behavior
No error
Example Project
Packages installed in the repo
prettier, prettier-eslint, @typescript-eslint/parser, eslint
Screenshots

Versions (please complete the following information):

Visual Studio Code: Version: 1.58.2
Node: v12.19.0
Package Manager npm 6.14.8
prettier-eslint: latest
prettier: latest
eslint: latest

System Specifications (please complete the following information):

OS: latest

Additional context
No google solutions found.

@stevengrimaldo Could you compare your setup with https://github.com/idahogurl/vs-code-prettier-eslint/tree/master/examples/typescript

@stevengrimaldo Could you compare your setup with https://github.com/idahogurl/vs-code-prettier-eslint/tree/master/examples/typescript

Hi, first of all, thank you for the extension. But why can't we upgrade the version of ESLint and Prettier?

All set, thanks!

I am facing the same error. I have updated the dev dependencies as per the above example.
Is any update to this?

Updated the .eslintrc working fine

I was having the same problem, turns out I was trying to use a plugin in my ESLint config file without the corresponding npm package installed.
I just removed the unused jsx-a11y plugin from my ESLint config.
I wasn't using JSX in my project but it had the following ESLint config:
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:@typescript-eslint/recommended-requiring-type-checking',
    'plugin:jsx-a11y/recommended',
    'airbnb-base/legacy',
    'prettier',
  ],
  plugins: ['@typescript-eslint', 'prettier', 'jsx-a11y', 'import'],

Because I had copied the .eslintrc.js file from another project.
And I didn't have the eslint-plugin-jsx-a11y package installed, installing it also fixes the issue.


Fails with operatorsAliases: false

We have operator aliases turned off in out project due to deprecation warning and dataloader-sequelize fails, cause it uses them internally. PR following.

While trying to quickly replace aliases with Sequelize.Op.and I realized that Op namespace was introduced with sequelize v4 and this lib aim is to support v3 as well, what is the preferred way to handle it?

If you do something like this
const { Op } = Sequelize; const operatorsAliases = {};
and pass operatorsAliases to the Sequelize constructor the error will vanish and you will load no operator aliases into sequelize.
This method allows you to, down the road, add operators from OP into the empty object as needed

Sorry for the slow response.
We could simply do something like const $and = Op.and || '$and' and then use [$and] in place of $and  in the few places we use it.

@liquidautumn this was addressed in https://github.com/mickhansen/dataloader-sequelize/pull/52 and  https://github.com/mickhansen/dataloader-sequelize/pull/53
@mickhansen I think we can close this ticket now.

Thanks @znarf


Add Fold function to Result monad

This pull request introduces Fold function to the Result monad, enhancing its functionality and making it more versatile for handling both success and failure scenarios.
Changes Made:

Implemented a Fold function within the Result monad, allowing for streamlined handling of success and failure cases.
The Fold function takes two callback functions as arguments:

successFunc: A function to be applied if the Result contains a successful value. It transforms the value into another type.
failureFunc: A function to be applied if the Result contains an error. It transforms the error into another type.

If the Result contains an error, the Fold function applies the failureFunc to the error and returns the transformed result.
If the Result contains a successful value, the Fold function applies the successFunc to the value and returns the transformed result.

Benefits:

Provides a clean and declarative way to handle both success and failure cases within the Result monad.
Increases the versatility and usability of the Result monad by enabling developers to easily define custom behavior for different scenarios.
Enhances code readability and maintainability by encapsulating error-handling logic within the Result monad itself.

Example:
func main() {
	result := maySucceed(5)

	foldResult := result.Fold(onSuccess, onFailure)
	fmt.Println(foldResult)
}

func maySucceed(value int) mo.Result[int] {
	if value < 0 {
		return mo.Err[int](errors.New("Value must be greater than 0"))
	}

	return mo.Ok(value)
}

func onSuccess(value int) interface{} {
	return fmt.Sprintf("Success: %v", value)
}

func onFailure(err error) interface{} {
	return fmt.Sprintf("Failure: %v", err)
}

@samber

I would use the same prototype as other methods: Fold(onSuccess[T], onFailure[T]) T
Feel free to add this method to the other types. Or I will do it by myself.

To date, Go does not allow type parameters on methods: https://github.com/golang/go/issues/49085 .
I don't really like returning interfaces, since it is not very typesafe.
In your case, I would suggest an additional helper: func Fold[T any,  U any, R any](Foldable[T, U], func(T) R, func(U) R) R
IMO Option, Result and Either should implement the following interface:
type foldable interface[T, U] {
   left() T
   right() U
}

@samber Here are the changes. Are you okay with these changes before implementing the Foldable interface in the remaining types (Either & Option)?
Also, I have a question: I've noticed different implementations of the fold function in various languages/packages. For instance, for the Result<TValue, TError> monad, the fold function always returns a value of type TValue, as you mentioned here. However, in other packages, I see that the fold function returns a new type.
So, I'm unsure which approach makes more sense. Should we make the fold function consistently return the same type TValue? If so, would it be acceptable to implement another function that returns a new type?"

Looks good.
I think we can return a different type in the case of mo.Fold, but it must be the same type if you also implement option.Fold

@samber I have changed method names for Foldable interface to make sure method names will not conflict with field names in the Either struct. Are you okay with that 👀

Looks good!
Let's merge ;)


Possibility to provide builds as archive

Hi,
right now I can only use your build via the exe based installer (same as on the offical swift download site). This works but it required more worn and local permission to do so.
It would be nice to have an additional archive (zip or so) which provides the same binaries (beside the current exe file). This would make it much easier to swap and require no permissions. It is also way easier to integrate into a CI pipeline that way.
Thanks in advance
Michael

This works but it required more worn and local permission to do so.

AFAIK Swift 5.9+ doesn’t require additional permission to install. Despite being verbose, you can refer to the CI script for how to extract it to any directory programmatically.
Recent Swift development snapshots, on the other hand, have encountered some regression (see apple/swift-installer-scripts#253) which fails the installer if it’s not elevated. I believe this is going to be fixed before Swift 5.10 release.

AFAIK Swift 5.9+ doesn’t require additional permission to install. Despite being verbose, you can refer to the CI script for how to extract it to any directory programmatically.

I try the steps but the extraction with the msiexec fails, not 100% why.
Still I would say having an archive would be quite helpful.

As @stevapple mentioned, barring the recent regression, the installer is switching to a per-user installable model, which will not require any permissions (though you really do need administration rights still to assign yourself the SeAllowSymbolicLinkCreation permission). The administrative installation requires that you unbundle the MSIs.
At some point, I would love to have an online installer, which will require having the MSIs available.  The CABs have been externalised, so we do not require additional space and that would allow you to extract the content manually if you so desire.
Distribution as an archive is not really possible right now due to lack of code signature on the binaries. There are a few layers of code signing that are already in place that ensure that the binaries are not tampered with and are validated when installing.
CC: @tristanlabelle about the regression due to the VCRuntime


Rename extravars to use yaml extension

Using extravars.yaml or extravars.yml  will allow some editor to identify the file as YAML and provide some support (validation, highlight syntax, etc)

It seems that this is a limitation of ansible-runner.


getNearestDc on Java

I built tdlib Java example with clang compiler. Built client run perfectly, but I didn't find the getNearestDc method in TdApi.java. This method presence in td/generate/scheme/telegram_api.tl, so I added it to td/generate/scheme/td_api.tl. After my changes build fails with:
Type NearestDc has no constructors
gmake[2]: *** [td/generate/CMakeFiles/tl_generate_tlo.dir/build.make:83: td/generate/CMakeFiles/tl_generate_tlo] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:886: td/generate/CMakeFiles/tl_generate_tlo.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2

Apparently, I need to create a few classes to implement this method's functionality. But I don't know C++ and failed on my tries. Please, could you give me instructions on how to do it?

The only helpful information from help.getNearestDc is returned by the method getCountryCode.

@levlam Thank you for the response. But this method will not return the nearest DC. The library also has not implemented other methods which present in the TL schema. I know that these methods are not needed for most developers and I think is no need to add them to the official lib. I only ask how to implement them in the custom client.

There is no method returning "nearest DC" in TDLib, because it is absolutely useless to know "nearest DC" even in a custom client.

But you can add such method, following implementation of any other simple method.

@levlam Okay, you're right. I will continue to study your library at my leisure because it is a pleasure to work with it. You make a unique product, thank you for your work


Questions on BiACM

@jpWang
first of all congratulations to all the authors of this great paper and a milestone work, it truly justifies the title SIMPLE yet EFFECTIVE
Question

From the paper I got to know, LiLT is using BiACM to introduce cross-modality interaction but could not find that part in the code, in code if I understood correctly LiLT is using separate Query, Key, and Value linear layers to calculate attention for text flow and layout flow. And then there is an addition of relative_distance_embeddings to each of them.
Then it adds both temp_attention scores to get final attention scores as

tmp_attention_scores = attention_scores / math.sqrt(self.attention_head_size)
tmp_layout_attention_scores = layout_attention_scores / math.sqrt(self.attention_head_size//self.channel_shrink_ratio)
attention_scores = tmp_attention_scores + tmp_layout_attention_scores
layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores

is this addition ( tmp_layout_attention_scores + tmp_attention_scores ) doing the cross-modality interaction learning? Please share some thoughts on this,

I understood that during pretraining LiLT  stops the gradients backpropagation through  the Text flow model, so during pretraining

 #  here  'tmp_layout_attention_scores` won't be added since we don't want to update attention_scores for text flow
#  also we can keep this line  unchanged and stop the gradients flow
attention_scores = tmp_attention_scores + tmp_layout_attention_scores
 # this addition will change  and  `tmp_attention_scores` won't be added
layout_attention_scores = tmp_layout_attention_scores

Can you please comment on is my understanding correct?

Hi,

Yes.
During pretraining,

layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores

is changed to
layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores.detach()

thanks  @jpWang ,
Just a confusion though, the paper says

In order to maintain the ability of LiLT to cooperate with different off-the-shelf text models in finetuning
as much as possible, we heuristically adopt the detached αTij for αfLij , so that the textual stream
will not be affected by the gradient of non-textual one during pre-training, and its overall consistency
can be preserved

so how does detaching textual_attention_score just from the calculation of layout_attetnion_scores preserve textual stream,
if we wanted to preserve the textual stream, should we not change this line
attention_scores = tmp_attention_scores + tmp_layout_attention_scores

because in my understanding these attention scores are responsible for text stream and
layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores.detach()

is responsible for the layout stream.
if we keep the attention_scores as such, it has some contribution from tmp_layout_attention_scores which is non-textual
so how do we preserve the textual stream?
is my understanding correct? please bear with me, I am new to this

“its overall consistency” said in the paper means the optimization consistency of the text flow. We don't want the gradients to back-propagate from layout_attention_scores to tmp_attention_scores, to influce the optimization of the text part. But  on the comtrary, attention_scores should guide the optimization of the layout flow (tmp_layout_attention_scores), and itself (tmp_attention_scores). So the text flow only be influenced by itself during optimization, that‘s what we call "consistency".

Understood the concept Sir,
but in code LiLT is adding tmp_layout_attention_scores   to attention_scores
attention_scores = tmp_attention_scores + tmp_layout_attention_scores

does this not mean -- tmp_layout_attention_scores (layout attention) has influence over attention_scores (text attention)
why only stop gradients to back-propagate from layout_attention_scores to tmp_attention_scores, why not to attention_scores also?
because as per my understanding this attention_scores become attetnion_probs and then context_layer
and for the next transformer layer, they are the hidden_states, which will in turn be used to calculate tmp_attention_scores
thus tmp_layout_attention_scores from the previous layer has made a contribution to text flow in this layer.
What's wrong with my understanding?

The layout flow needs to influence the text flow in inference but not in optimziaiton;
The text flow needs to influence the layout flow in both inference and optimziaiton.

I am sorry but I feel too dumb now :), unable to get the picture
So when you say

The text flow needs to influence the layout flow in both inference and optimziaiton.
then why during pretraining,  detach text attention scores ?
layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores.detach()

The layout flow needs to influence the text flow in inference but not in optimization;
then why not detach tmp_layout_attention_scores from the below code during pretraining ?
attention_scores = tmp_attention_scores + tmp_layout_attention_scores

What am I missing?

layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores.detach()
means 1) text influences layout in inference calculation and 2) layout does not influence text in back-propagation;
attention_scores = tmp_attention_scores + tmp_layout_attention_scores
means 1) layout influences text in inference calculation and 2) text influences layout in back-propagation.

layout_attention_scores = tmp_layout_attention_scores + tmp_attention_scores.detach()
means  2) layout does not influence text in back-propagation;
but we are detaching only tmp_attention_scores (text part) from back-propagation right,    how  does it stops tmp_layout_attention_scores   or layout_attention_scores from participating in back-propagation

did I ask something very dumb? @jpWang
can you please point out the mistake or a resource that would help me understand


Update ethashproof merkle roots for Ethereum Lightclient

Our ethash verification relies on having the merkle root of the DAG for the given epoch. We store these roots for the first 512 epochs here: https://github.com/Snowfork/polkadot-ethereum/blob/main/parachain/primitives/ethereum/src/ethashdata.rs. 512 epochs will run out after ~600 days from the date of this issue (very rough estimate based on current block production rate). We should update merkle roots well before that.
The merkle roots can be calculated using https://github.com/talbaneth/ethashproof

Deadline for this: Q1 of 2022

We should consider putting the DAG roots in chain state so that governance can update it.
Pros:

We can update without modifying the runtime.
Cons:
We are adding more chain storage reads in the import_header dispatchable which is already very expensive.
We can just pre-compute more epochs

governance update to runtime vs governance update to DAG root field in chain state doesn't really seem that significantly different? especially if the latter is going to be more gas expensive on an ongoing basis, seems worse?

Yeah, that's a fair point @musnit .
Can we recover from a situation where we did not update the roots? E. g. if verification fails, can we re-submit the same block after updating the root?
(Side note: I noticed recently that the substrate node/tx pool blacklists failed transactions, so if the hash is exactly the same, we might have an issue? Did not look further into this yet, could be that this is not an actual issue if the nonce changes.)

governance update to runtime vs governance update to DAG root field in chain state doesn't really seem that significantly different? especially if the latter is going to be more gas expensive on an ongoing basis, seems worse?

You're right about governance updates. But my intention is to entirely avoid an update, to runtime or roots, by hardcoding more roots now. My understanding is that, because this logic is for Eth 1.0 and PoW, our current runtime will inevitably require updates for Eth 2.0. The question is when? Is it worth bothering with a separate root updating mechanism if we can compute roots right now with a high degree of confidence?

Can we recover from a situation where we did not update the roots? E. g. if verification fails, can we re-submit the same block after updating the root?

Yes, we can re-submit. The relayer / worker will automatically re-submit on restart with whatever the latest nonce is.
PS. Tx pool blacklisting shouldn't affect this because a PoW verification failure is not considered a failure at the tx pool level. Tx pool considers the tx successful if the nonce is valid and we process the tx, regardless of whether  the dispatchable returns Ok or Error. But even if some unexpected issue causes the tx to be blacklisted, the blacklisting expires after 30 minutes

You are right that we need to change the whole mechanism for ETH 2.0, so investing much into an improved roots updating mechanism seems not worth it.
Great that re-submitting is already supported, so we can recover gracefully.
Thanks for explaining blacklisting in more detail!

yep don't think we need to worry about a special mechanism for root updating at all. runtime upgrade is fine.

Is an additional 2 years of runtime adequate?

yes


Remove deprecated future imports

Many older codebases have __future__ imports for forwards compatibility with features. As of this writing, all but one of those features is now stable in all currently supported versions of Python and so the imports are no longer needed. While such imports are harmless, they are also unnecessary and in most cases you probably just forgot to remove them.
This codemod removes all such __future__ imports, preserving only those that are still necessary for forwards compatibility.
Our changes look like the following:
 import os
-from __future__ import print_function

 print("HELLO")

More reading

https://docs.python.org/3/library/future.html

🧚🤖Powered by Pixeebot (codemod ID: pixee:python/remove-future-imports)

FYI - This change was autogenerated from a GitHub app - called Pixeebot. A code-quality GitHub App; like Dependabot, but for source code. Feel free to check it our for more details for how you can install it onto your project's repo for continued code hardening and code security recommendations.

Any chance you've had the time to review these changes?
If you're not interested implementing them at this time, no worries. I can close the PR and follow up with additional changes in the future. Also, this plugin is free for non-commercial open sourced projects, so feel free to give it an install if you want to see the other recommended PRs. (GitHub Apps - pixeebot)
Thanks,
Zach


Testing

name: Pull request
about: Base release

Describe the change
Initial build
Testing
CI and local tests

closes #2


chore: compile core components with Babel

Related issues
Short description and why it's useful
We still need to compile core components with Babel
Screenshots of visual changes before/after (if there are any)
Screenshot of passed e2e tests (if you are using our standard setup as a backend)
Contribution and curently important rules acceptance

[x] I read and followed contribution rules
[x] I read the TypeScript Action Plan and adjusted my PR according to it
[x] I read about Vue Storefront Modules and adjusted my PR according to it (details in contribition rules)

Thanks


added new logo

Coverage remained the same at 80.759% when pulling ab045e5de78bdee80e54fa98610643d927b504f6 on 13060NavMenuUpdated into 3c54e284fe70f60e5313da32d118f6f18999064b on 1.0.0.

Coverage remained the same at 80.759% when pulling ab045e5de78bdee80e54fa98610643d927b504f6 on 13060NavMenuUpdated into 3c54e284fe70f60e5313da32d118f6f18999064b on 1.0.0.


Chart inside an BottomSheetScaffold pop the BottomSheet

Hello,
I'm displaying a line chart in a BottomSheetScaffold. I specify to the BottomSheetScaffold that the BottomSheet must be collapsed, except that as soon as the graph is drawn the bottomsheet extends.
I need to explicitly tell the bottomSheetScaffoldState to collapse the bottomsheet after my chart is drawn.
When I use a surface with a height x the bottomsheet remains well collapsed
My Scaffold
val bottomSheetScaffoldState = rememberBottomSheetScaffoldState(
        bottomSheetState = rememberBottomSheetState(BottomSheetValue.Collapsed)
)

 BottomSheetScaffold(
        modifier = modifier,
        sheetContent = {
            Surface(modifier = Modifier.padding(MaterialTheme.padding.default.all)) {
                BalanceGraph(balanceChartProducer)

                 //adding this to make sur the bottomsheet remains well collaps at first
                 coroutineScope.launch {
                    bottomSheetScaffoldState.bottomSheetState.collapse()
                }
            }

        },
        scaffoldState = bottomSheetScaffoldState,

My Graph

Chart(
        chart = lineChart(
            axisValuesOverrider = AxisValuesOverrider.fixed(
                minY = 500f,
                maxY = 758f
            ),
            lines = currentChartStyle.lineChart.lines.map {
                it.also { it.pointConnector = DefaultPointConnector(0f) }
            }
        ),
        chartScrollSpec = rememberChartScrollSpec(isScrollEnabled = false),
        chartModelProducer = producer,
        startAxis = startAxis(),
        bottomAxis = bottomAxis(
            valueFormatter = DecimalFormatAxisValueFormatter(
                decimalFormat = DecimalFormat(".###")
            )
        ),
        runInitialAnimation = false,
    )

I tested if runInitialAnimation was the cause of this unexpected opening. Unfortunately the behavior remains the same with the variable set to false
The state of my screen when I first display it

Thanks for your help or analysis.
Best regards

This looks to be a bug. Thanks for the report!


Integrated problems output doesn't support --show-error-end mypy option

Type: Bug

Behaviour
Expected vs. Actual
After replacing default --show-column-numbers with --show-error-end in python.linting.mypyArgs array, the whole part of the code that is causing the error should be highlighted (default setting highlights only the token at the starting position), instead errors stop apearing in the problems view and no errors are highlighted in the code.
Steps to reproduce:

In empty project create a test.py file with a mypy error (e.g. x: int = 'a')
Change --show-column-numbers to --show-error-end in python.linting.mypyArgs setting

Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.10.5
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
Value of the python.languageServer setting: Default

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

> ~/anaconda3/bin/conda run -n py310 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.16.1/pythonFiles/linter.py -m mypy --follow-imports=silent --ignore-missing-imports --show-error-end --no-pretty ./test.py
cwd: .
##########Linting Output - mypy##########

test.py:1:10:1:12: error: Incompatible types in assignment (expression has type "str", variable has type "int")
Found 1 error in 1 file (checked 1 source file)

User Settings

languageServer: "Pylance"

linting
• mypyArgs: "<placeholder>"
• mypyEnabled: true

Extension version: 2022.16.1
VS Code version: Code 1.72.2 (d045a5eda657f4d7b676dedbfa7aab8207f8a075, 2022-10-12T22:15:18.074Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Sandboxed: No
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2

Currently we don't support customized output when using the problems window. We parse the output and collect details of what went wrong. So, the only arguments that are supported are the ones that don't change the output format.
If you need to use --show-error-codes, I recommend creating a task via task.json.

Just realised the title was wrong. The problem isn't adding the --show-error-codes option (which parses correctly and shows in the output pannel and when hovering over the error in code) it's the --show-error-end options which replaces the default output <file>:<row>:<col>:<message> with <file>:<row>:<col>:<end-row>:<end-col>:<message>. These lines don't get correctly parsed and as a result don't show up in the output panel or get underlined in code. The current behaviour is to just underline the token at the starting location but this seems wrong to me as errors could span multiple tokens. Also this behaviour is already implemented for the pylint linter so I assume that it shouldn't be to difficult to fix it for mypy (probably just updating the parsing regex and a few more code adjustments).

Confirmed that the behavior reported in @AntonVucinic's latest comment is the case:

--show-error-end option set in python.linting.mypyArgs results in no Problems from mypy output being parsed correctly in the Problems window

Resulting output from mypy can be seen in Output -> Python window

mypy output format with --show-error-end has 4 numbers separated by colons: <file>:<row>:<col>:<end-row>:<end-col>:<message>
Problems window does not parse these at all

Screenshot:

--show-error-end option NOT set results in mypy linter output being parsed correctly in Problems window, but only first letter of each is underlined by VSCode as "squiggles" in UI

First letter underlined corresponds to col from mypy linter output
mypy output seen in Output -> Python window follows format: <file>:<row>:<col>:<message>
Screenshot:

EXPAND for platform / package version info

Version: 1.79.2
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-07-17T00:12:34.652Z
Electron: 22.3.18
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 6.1.38-1-MANJARO

A/B experiments: No current experiments.

Extension
Author (truncated)
Version

vscode-pull-request-github
Git
0.66.2

test-adapter-converter
hbe
0.1.6

vscode-test-explorer
hbe
2.21.1

vscode-python-test-adapter
lit
0.7.1

python-path
mge
0.0.14

isort
ms-
2022.8.0

python
ms-
2023.12.0

pytest-fixtures
nic
0.3.0

vscode-xml
red
0.26.1

vscode-yaml
red
1.14.0

python-tox
the
1.0.0

CPUs
Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4400)

GPU Status
2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off

Load (avg)
2, 2, 2

Memory (System)
62.69GB (20.17GB free)

Process Argv
--ozone-platform-hint=wayland --ozone-platform-hint=wayland --unity-launch

Screen Reader
no

VM
0%

Please try this extension: https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker It should handle --show-error-end automatically. That extension will be the eventual place for linting with mypy. It also used dmypy for performance.

Suggested Solution

Change the RegEx used to match mypy linter output to something like the following:
(?<_filepath_prefix_here_ignore_this_group_>.*?):(?<line>\d+)(?:[:](?<column>\d+)(?:[:](?<endLine>\d+):(?<endColumn>\d+))?)?: (?<type>\w+): (?<message>.*)\r?(\n|$)

Feel free to tinker with this here
Note that:

In the code, each of the \ backslash characters is doubled up to escape them.  This would need to be done to the above RegEx too.
The (?<_filepath_prefix_here_ignore_this_group_>.*?) part of the Regex is different in the code: ${escapeRegExp(filepath)}
The filepath gets passed in here to construct a dynamic RegEx, and I had no way of using dynamically generated RegEx on regex101.com link above
So, this was made a lazy .*? capture group to simply match everything before the part matching :line:column:end_line:end_column as our pattern of interest.

Implement the optional capture groups endLine, endColumn in interface ILintMessage so they are handled by VSCode properly for MyPy linter.

Probably would need to override parseLine function from BaseLinter so endLine & endColumn are handled if found.
This could work similarly to how Pylint linter handles these, but note that Pylint uses IJsonMessage instead and translates this to an ILintMessage.

I'm not an expert at TypeScript, but from the looks of that code it seems feasible.
Also, based on the output of mypy I've observed so far... it looks like there may be some cases where both line == endLine and column == endColumn.  Not sure if this is intended by mypy or a bug.

@karthiknadig Thanks! I just refreshed the page after typing up the above comment and saw the other extension suggested.  I'll check it out to see if it works.

@karthiknadig After testing out the new ms-python.mypy-type-checker extension, unfortunately it looks as if it did not work for me.  There is an error in the MyPy Type Checker Output window logs:
2023-08-11 01:57:02.356 [info] /bin/python -m mypy.dmypy --status-file /tmp/.vscode.dmypy_status/status-0fff6c22-373a-40b3-a2b7-2e8f986ca857.json run -- --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-code --no-pretty --follow-imports=silent --ignore-missing-imports --show-column-numbers --no-pretty --show-error-end /home/exampleuser/src/pub/testproject/src/testproject/config/config.py
2023-08-11 01:57:02.356 [info] [Trace - 1:57:02 AM] Received notification 'window/logMessage'.
2023-08-11 01:57:02.356 [info] CWD Server: /home/exampleuser/src/pub/testproject
2023-08-11 01:57:02.527 [info] [Trace - 1:57:02 AM] Received notification 'window/logMessage'.
2023-08-11 01:57:02.527 [info] dmypy: follow-imports=silent not supported

Manually running that python -m mpy.dmpy command without passing --follow-imports=silent seems to work ok.  I can't get any output from VSCode's Problems window or otherwise.

... and now appears to be working! :tada:

It seems I may have spoken too soon.  After some more testing, it appears that I'm running into a bug with similar behavior to: microsoft/vscode-mypy#88
After making no changes and re-saving the file, the new extension re-runs dmypy but all the Problem items disappear.

@trinitronx I will be adding a setting to switch between daemon and regular mypy mode. That should make it easier to work with in that extension.

Closing this now as the mypy extension now has preferDaemon setting to switch between dmypy and mypy.


Create homesteadrdplaygroup.is-local.org.json

Requirements

[x] You have completed your website.
[x] The website is reachable.
[x] You have put a full stop (.) at the end of each of the CNAME and NS records.
[x] The CNAME record doesn't contain https:// or /.
[x] There is sufficient information at the owner field.

You should have your email presented. If you don't want to share email, you can leave email an empty string ("") and add any other social media such as Twitter or Discord.

Description

Information about our playgroup
Link to Website

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

You can retrigger this bot by commenting recheck in this Pull Request

I have read the CLA Document and I hereby sign the CLA


New version: Dell.CommandUpdate version 5.2.0

Pull request has been created with Komac v1.11.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

Resolves: #115475

Automatic Validation ended with:

Installation failed with exit code -1978335226 2024-02-11 23:51:47.357 [CLI ] ShellExecute installer failed: 4

(Automated response - build 720.)

Close with reason: Duplicate of #146628;


Add a Smoky Spiral CSS Animation

Describe the project you want to add with tech stack
I would like to add a cool Spiral Animation with Smoky-ish Particles which would resemble a loading animation.
It would be great to contribute to this repo under GSSoC'23!
Expected behavior

Would have a Dark Mode Switch Button

Screenshots (optional)

Additional context (optional )

@MohitGupta121  kindly assign me this issue


Runtime Error

https://github.com/open-mmlab/OpenSelfSup/blob/1db69ecebbc129e8fa90cdcea6f2082f0a4e3d17/openselfsup/datasets/classification.py#L37
when k is 5, the tensor is not contiguous.
if I changed it to correct_k = correct[:k].contiguous().view(-1).float().sum(0).item()
it works

Thanks for pointing out. We will fix it.


setup_libraries.sh file missing

where can the "setup_libraries.sh" file be found?
Is it necessary to work with "setup_libraries.sh" when installing Metalign via bioconda?

Hi,
Thanks for pointing this out. We removed this setup_libraries script from the repo a while ago but I forgot to update the wiki. To be clear, Bioconda is the preferred installation method, and you should not attempt to install the libraries manually (which is essentially what the setup_libraries script was doing) unless you can't (or really don't want to) use Bioconda. The instructions have been updated to reflect this.
Thanks,
Nathan

Hi Nathan,
Thank you so much for the quick response!
Best
Arvid

Am 23.11.2020 um 19:24 schrieb nlapier2<EMAIL_ADDRESS>
Closed #38.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


Change in file detected and application stops responding

If a file is changed I get a message like
Change: Web.config

All future requests to the unix socket result in 504 gateway timeout (using nginx).
I suspect the application is supposed to reload however I couldn't find any relevant logic in hyperfastcgi. Where is the above message coming from?

This message is coming from the System.Web, and than reloads the web application domain. HFC should handle this operation normally, do you use hyperfastcgi with managed config settings?

Thanks for the response. I didn't realise this was System.Web doing that.
We log a message in Application_End so we are seeing the shutdown but new requests do not trigger the application to start again, hence the 504s. Nothing in our log or hyperfastcgi's. I can also confirm hyperfastcgi no longer thinks the application is running because when we shut it down I no longer get the System.NotImplementedException: The requested feature is not implemented. error from ManagedFastCgiListener.Shutdown().
Yes we are currently using HyperFastCgi.Transports.ManagedFastCgiListenerTransport and HyperFastCgi.AppHosts.AspNet.AspNetApplicationHost

Looks like a mono bug. When mono unloads old domain and creates new one sometimes it messes the objects. For example, mono unloads domain with id=3 and creates next domain with id=1. But some objects in domain with id=1 are belonging to domain with id=4, which was never created. When HFC calls the object in this domain mono throws an exception.
Internal error: OutputPage threw an exception System.Runtime.Remoting.RemotingException: Server for uri 'd4eee666_9957_4575_850c_2b33c44cdf8e/1a84857e_3.rem' not found
I am going to isolate the bug and create and send small reproducible case to mono guys. While this issue won't be fixed in mono (or I won't find a workaround) I recommend reload HFC after changing web.config.

Please try the latest commit  https://github.com/xplicit/HyperFastCgi/commit/53778f9a7c963ac88c50abe3328a543307ad1790
I am not sure it will help, but on my machine the exception has gone.

Brilliant thanks
[2015-04-10 03:34:52Z] Debug   Configured host in domain 79e4cdae, id=1
Change: Web.config
[2015-04-10 03:38:53Z] Debug   Configured host in domain 79e4cdae, id=2


Add minWidth configuration option

There is a maxWidth but no minWidth configuration setting.
If you for example have a rather narrow image, the description for that image will overlap with the string "Image 1 of 2".
I tested all the config options available and was not able to set a minWidth.

This is a duplicate of #159.

Here is a JS/JQ workaround:
$(document).bind('cbox_complete', function(){
if ($("#colorbox").width() < 350) {
$.colorbox.resize({ width: 350 });
}
});


Create CodeTag plugin to render code files with and without solutions

Created a custom Liquid tag called CodeTag as a Jekyll plugin. This tag allows staff to easily "import" code snippets located in the _includes/ directory, and hide/show solutions as needed.
Fixes https://github.com/phrdang/berkeley-class-site/issues/14
Next steps (in separate PRs)

[ ] Figure out how to write tests for this. Currently I just manually tested it by changing inputs and seeing what the jekyll site looked like/what error was thrown
[ ] Automatically wrap the output of this tag in a highlight block
[ ] Should we render a placeholder like "*** YOUR CODE HERE ***" if @show_solution is false?
[ ] How do we want to create solution pages? Do we want them to be auto generated during the build process or manually created as .md files by staff?

Maybe using the context variable will allow us to get jekyll variables/front matter? https://stackoverflow.com/questions/7919644/using-liquid-variables-inside-of-a-liquid-tag-call?lq=1

Copying conversation from Slack:
@.cycomachead

Two comments: The name code is a little too generic? I don’t immediately have another name that’s short. example code_with_solutions assignment_code … maybe code is best since there’s no harm in using this for any code file, and it could syntax highlight, eventually. (oh we’ll need to use a custom theme for that!)

For the argument to show a solution ({% code questions/sample_question.py true %}) is there a way to use show_solution=true or maybe require that it be named? boolean args are kind of challenge to interpret.
I am OK if that makes people write show_solution=page.show_solutions or something. If that’s a common enough use, maybe the plugin can read page variables, or even entire site variables…

@.phrdang

Yeah I wasn’t sure what the best name was. We could do include_code maybe? example and assignment_code might be too specific since you can theoretically include code for any reason (to show an example, to show problem starter code, to show the solution), etc.

I could definitely make it required to be named. Right now everything after the tag name is parsed as a string so we could just require show_solution= to be at the start


Trying to keep List and ChipTextFieldState in sync

(whoops, pressed Enter accidentally 😅)
I'm currently making an app for a school project and using ChipTextField as it looks awesome!
The basic app is almost like the Inventory App Example from the Compose Tutorial.
Please keep in mind, I'm quite new to Kotlin / Jetpack Compose / Android development.
My code (Screen):
        val chipState = rememberChipTextFieldState<Chip>()
        var syncTags by remember { mutableStateOf(false) }
        OutlinedChipTextField(
            state = chipState,
            onSubmit = {
                syncTags = true
                Chip(it)
            },
            enabled = enabled,
            label = { Text(stringResource(R.string.form_field_tags_header)) },
        )
        DisposableEffect(chipState.chips, syncTags) {
            if (syncTags) {
                appointmentDetails.tags = chipState.chips.map { it.text }
                syncTags = false
            }

            onDispose {
                appointmentDetails.tags = chipState.chips.map { it.text }
            }
        }

My code (ViewModel):
data class AppointmentDetails(
    val id: Int = 0,
    val title: String = "",
    val description: String = "",
    val date: LocalDate = LocalDate.now(),
    val time: LocalTime = LocalTime.now().noSeconds(),
    var tags: List<String> = listOf()
)

My issue is, I want to have my tags all saved in the appointmentDetails.tags list. But as I didn't found out how to make that with the ChipTextFieldState, I had to ask ChatGPT, which came up with DisposableEffect. This works... kinda.
When entering stuff, it works! But when editing something (loading from the appointmentDetails.tags), it doesn't show anything.
So, my question: Is there a way to somehow keep the ChipTextFieldState in sync with the tags List?

Hi, there.
The only missing is passing your initial tags to the rememberChipTextFieldState(chips = ...). And the DisposableEffect() can be simplified.
@Composable
fun YourScreen(
    details: AppointmentDetails,
    modifier: Modifier = Modifier,
) {
    val initialChips = remember { details.tags.map(::Chip) }
    val chipState = rememberChipTextFieldState(chips = initialChips)

    DisposableEffect(details, chipState.chips) {
        onDispose {
            // Update your view model tag list after updating the chips or leaving the screen
            details.tags = chipState.chips.map { it.text }
            // Or using the immutable data pattern instead of updating
            // the tags field directly:
            // viewModel.updateDetailsTags(chipState.chips.map { it.text })
        }
    }

    OutlinedChipTextField(
        state = chipState,
        onSubmit = { Chip(it) },
        modifier = modifier,
    )
}

You can also use a LaunchEffect() instead of DisposableEffect(), this will update your tags more frequently.
LaunchedEffect(chipState) {
    // Listen to chip content text changes too, no need
    // to save tags when leaving the screen
    snapshotFlow { chipState.chips.map { it.text } }
        .collect { details.tags = it }
}

Thanks for your quick response!
I tried both of your code blocks and.. well..
The Disposable Effect:

Doing details.tags = chipState.chips.map { it.text } doesn't update the tags sadly.
Doing onValueChange(appointmentDetails.copy(tags = chipState.chips.map { it.text })) works. Kinda. When adding a tag, the inputs flash for a few frames o.O

The LaunchedEffect:

When doing that (also with onValueChange like above), the other fields get cleared when adding a tag. But if you enter the rest after the tags, it works.

Setting the initial tags still doesn't work sadly.
I know you don't have to help me - since it technically doesn't have something to do with your library (I guess?).
If you need more context from the code, I have it here.

Oh, that sounds quirky...
LaunchEffect and DisposableEffect should work well when passing chipState.chips as the key, maybe you can use onValueChange as another key, or print some logs to see if it works.
LaunchedEffect(onValueChange, chipState.chips) {}

oh wait, this works!!
        LaunchedEffect(onValueChange, chipState.chips) {
            // Listen to chip content text changes too, no need
            // to save tags when leaving the screen
            snapshotFlow { chipState.chips.map { it.text } }
                .collect { appointmentDetails.tags = it }
        }

..except now the date get's reset o.o
and filling on edit doesn't work either.
Sadly I still don't understand much of what I'm doing there. I know many other languages, but this is new to me, as I already said.
I'm really sorry for stealing you time for this 😓

You may need another LaunchedEffect key, appointmentDetails

that now crashes the app:
FATAL EXCEPTION: arch_disk_io_2
Process: dev.steffo.terminkalenderapp, PID: 9171
java.lang.IllegalStateException: Method setCurrentState must be called on the main thread
	at androidx.lifecycle.LifecycleRegistry.enforceMainThreadIfNeeded(LifecycleRegistry.kt:296)
	at androidx.lifecycle.LifecycleRegistry.setCurrentState(LifecycleRegistry.kt:105)
	at androidx.navigation.NavBackStackEntry.updateState(NavBackStackEntry.kt:188)
	at androidx.navigation.NavBackStackEntry.setMaxLifecycle(NavBackStackEntry.kt:159)
	at androidx.navigation.NavController.popEntryFromBackStack(NavController.kt:761)
	at androidx.navigation.NavController.access$popEntryFromBackStack(NavController.kt:68)
	at androidx.navigation.NavController$executePopOperations$1.invoke(NavController.kt:643)
	at androidx.navigation.NavController$executePopOperations$1.invoke(NavController.kt:640)
	at androidx.navigation.NavController$NavControllerNavigatorState.pop(NavController.kt:330)
	at androidx.navigation.NavigatorState.popWithTransition(NavigatorState.kt:149)
	at
androidx.navigation.NavController$NavControllerNavigatorState.popWithTransition(NavController.kt:343)
	at androidx.navigation.compose.ComposeNavigator.popBackStack(ComposeNavigator.kt:67)
	at androidx.navigation.NavController.popBackStackInternal(NavController.kt:280)
	at androidx.navigation.NavController.executePopOperations(NavController.kt:640)
	at androidx.navigation.NavController.popBackStackInternal(NavController.kt:578)
	at androidx.navigation.NavController.popBackStack(NavController.kt:491)
	at androidx.navigation.NavController.popBackStack(NavController.kt:468)
	at androidx.navigation.NavController.popBackStack(NavController.kt:453)
	at
dev.steffo.terminkalenderapp.ui.navigation.TerminkalenderNavGraphKt$TerminkalenderNavHost$5$2$1.invoke(TerminkalenderNavGraph.kt:58)
	at
dev.steffo.terminkalenderapp.ui.navigation.TerminkalenderNavGraphKt$TerminkalenderNavHost$5$2$1.invoke(TerminkalenderNavGraph.kt:57)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.tools.deploy.liveedit.AndroidEval.invokeMethod(AndroidEval.java:316)
	at com.android.tools.deploy.liveedit.Fix226201991Eval.invokeMethod(Fix226201991Eval.java:28)
	at com.android.tools.deploy.liveedit.BackPorterEval.invokeMethod(BackPorterEval.java:124)
	at com.android.tools.deploy.liveedit.ProxyClassEval.invokeMethod(ProxyClassEval.java:164)
	at com.android.tools.deploy.liveedit.AndroidEval.invokeInterface(AndroidEval.java:289)
	at com.android.tools.deploy.liveedit.Fix226201991Eval.invokeInterface(Fix226201991Eval.java:28)
	at com.android.tools.deploy.liveedit.ProxyClassEval.invokeInterface(ProxyClassEval.java:148)
	at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:702)
	at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:182)
	at com.android.deploy.asm.tree.analysis.Frame.executeInvokeInsn(Frame.java:648)
	at com.android.deploy.asm.tree.analysis.Frame.execute(Frame.java:573)
	at
com.android.tools.deploy.interpreter.ByteCodeInterpreter.doInterpret(ByteCodeInterpreter.java:191)
	at
com.android.tools.deploy.interpreter.ByteCodeInterpreter.interpreterLoop(ByteCodeInterpreter.java:130)
	at com.android.tools.deploy.liveedit.MethodBodyEvaluator.eval(MethodBodyEvaluator.java:104)
	at com.android.tools.deploy.liveedit.LiveEditClass.invokeDeclaredMethod(LiveEditClass.java:107)
	at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:94)
	at
com.android.tools.deploy.liveedit.LiveEditSuspendLambda.invokeSuspend(LiveEditSuspendLambda.java:33)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:99)
	at com.android.tools.deploy.liveedit.ProxyClassHandler.invoke(ProxyClassHandler.java:126)
	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
 	at $Proxy6.resumeWith(Unknown Source)
	at
kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:281)
	at
kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith$default(DispatchedContinuation.kt:276)
	at kotlinx.coroutines.DispatchedCoroutine.afterResume(Builders.common.kt:258)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0(TransactionExecutor.kt:36)
	at androidx.room.TransactionExecutor.$r8$lambda$AympDHYBb78s7_N_9gRsXF0sHiw(Unknown Source:0)
	at androidx.room.TransactionExecutor$$ExternalSyntheticLambda0.run(Unknown Source:4)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@1676fbd, androidx.compose.runtime.BroadcastFrameClock@64459b2, StandaloneCoroutine{Cancelling}@1a9d03, AndroidUiDispatcher@a7df480]

Damn, this is real Compose...hard to find useful stack trace

These two lines are not likely to relate to the LaunchEffect.
	at
dev.steffo.terminkalenderapp.ui.navigation.TerminkalenderNavGraphKt$TerminkalenderNavHost$5$2$1.invoke(TerminkalenderNavGraph.kt:58)
	at
dev.steffo.terminkalenderapp.ui.navigation.TerminkalenderNavGraphKt$TerminkalenderNavHost$5$2$1.invoke(TerminkalenderNavGraph.kt:57)

Maybe you need to track that call to see if there is something wrong.

hm.. That's just:
(57)        AppointmentEntryScreen(
(58)            navigateBack = { navController.popBackStack() },
                onNavigateUp = { navController.navigateUp() }
            )

So the point, where the Screen get's "rendered"? I have no idea though...

Weird...this call should be in the main thread.
https://git.steffo.dev/SteffoSpieler/terminkalender-app/src/commit/ffd13c8a313eef18daaf5e8d16115eb220a1eeee/app/src/main/java/dev/steffo/terminkalenderapp/ui/appointment/AppointmentEntryScreen.kt#L98

ok well, I've rolled back to the state of how it is in git and creating tags works. Just the pre-filling tags-part doesnt work.. And I don't understand why. Maybe because details.tags get's set after a quick delay? (Because it has to read them from the database?)

It could be. If your tag list doesn't come from the initial state, you can update it when it's available.
var filledTags by remember { mutableStateOf(false) }

LaunchedEffect(chipState, details.tags, filledTags) {
    if (filledTags ||
        // Or depend on the loading state or something
        details.tags == null) return@LaunchedEffect
    chipState.chips = details.tags
    filledTags = true
}

hm, this works - kinda.
I added an if, so it looks like this now:
if (appointmentDetails.tags.isNotEmpty()) {
            var filledTags by remember { mutableStateOf(false) }
            LaunchedEffect(chipState, appointmentDetails.tags, filledTags) {
                if (filledTags) return@LaunchedEffect
                chipState.chips = appointmentDetails.tags.map { Chip(it) }
                filledTags = true
            }
        }

But...

The values in the other inputs flicker now a lot (when adding tags and when opening the edit page)
The values in the other inputs get cleared when I'm adding a tag to an entry that doesn't have tags yet.

It's not like I could just.. make appointmentDetails.tags a ChipTextFieldState, right? Last time I tried it android studio gave me errors.
Because technically I'm already converting the list to a string on save.
But last time I tried it, I had an "this needs to be in a composable" error...

Emm...flickers, I didn't check your whole screen code, could it be the outer if caused this? Can you try to put it inside the LaunchEffect?
If this launched effect runs exactly once, there should not be any side effects to cause flickers.

it's now inside the LaunchEffect and the tags now don't get filled again.
What am I doing wrong here o.O

It's a little messy here...I will make a whole example later, it should work.

The whole example I have tested is here. If it still won't work, you may need to track the ui state (details object).
data class AppointmentDetails(
    val tags: List<String> = emptyList(),
)

class AppointmentViewModel : ViewModel() {
    private val _details = MutableStateFlow(AppointmentDetails())
    val details: StateFlow<AppointmentDetails> = _details

    init {
        viewModelScope.launch {
            delay(1000) // Load tags
            _details.update { it.copy(tags = listOf("Hello", "World")) }
        }
    }

    fun updateDetails(details: AppointmentDetails) {
        _details.update { details }
    }
}

@Composable
fun Fields(
    details: AppointmentDetails,
    onUpdateDetails: (AppointmentDetails) -> Unit,
    modifier: Modifier = Modifier,
) {
    val chipState = rememberChipTextFieldState<Chip>()

    var filledTags by remember { mutableStateOf(false) }

    LaunchedEffect(chipState, details.tags, filledTags) {
        if (filledTags || details.tags.isEmpty()) return@LaunchedEffect
        chipState.chips = details.tags.map(::Chip)
        filledTags = true
    }

    LaunchedEffect(chipState, details, onUpdateDetails) {
        snapshotFlow { chipState.chips.map { it.text } }
            .collect { onUpdateDetails(details.copy(tags = it)) }
    }

    OutlinedChipTextField(
        state = chipState,
        onSubmit = { Chip(it) },
        modifier = modifier,
    )
}

@Composable
private fun RootScreen(
    viewModel: AppointmentViewModel, // = viewModel(...)
    modifier: Modifier = Modifier,
) {
    val details by viewModel.details.collectAsState()
    Fields(
        details = details,
        onUpdateDetails = viewModel::updateDetails,
        modifier = modifier,
    )
}

hm, this works - kinda.
I added an if, so it looks like this now:
if (appointmentDetails.tags.isNotEmpty()) {
            var filledTags by remember { mutableStateOf(false) }
            LaunchedEffect(chipState, appointmentDetails.tags, filledTags) {
                if (filledTags) return@LaunchedEffect
                chipState.chips = appointmentDetails.tags.map { Chip(it) }
                filledTags = true
            }
        }

But...
* The values in the other inputs flicker now a lot (when adding tags and when opening the edit page)

* The values in the other inputs get cleared when I'm adding a tag to an entry that doesn't have tags yet.

ok I might be stupid.
I took a short break. Okay, maybe a bit longer than short.
And now I tested it on my phone, instead of the android emulator.
This works! Somehow..
Also the thing with the date was another issue that had nothing to do with this part.
The code, now:
        val initialChips = remember { appointmentDetails.tags.map(::Chip) }
        val chipState = rememberChipTextFieldState(chips = initialChips)
        if (appointmentDetails.tags.isNotEmpty()) {
            var filledTags by remember { mutableStateOf(false) }
            LaunchedEffect(chipState, appointmentDetails.tags, filledTags) {
                if (filledTags) return@LaunchedEffect
                chipState.chips = appointmentDetails.tags.map { Chip(it) }
                filledTags = true
            }
        }
        LaunchedEffect(onValueChange, chipState.chips) {
            snapshotFlow { chipState.chips.map { it.text } }
                .collect { appointmentDetails.tags = it }
        }
        OutlinedChipTextField(
            state = chipState,
            onSubmit = { Chip(it) },
            enabled = enabled,
            label = { Text(stringResource(R.string.form_field_tags_header)) },
        )

Thank you again for your time and for this awesome component! :D


Conda environment  installation via .yml failed

I tried to install via yml file, but it gave me below error
tao@deimos:~/MLG$  conda env create -f  environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:

wincertstore==0.2=py310haa95532_2
zlib==1.2.11=h8cc25b3_4
vc==14.2=h21ff451_1
vs2015_runtime==14.27.29016=h5e58377_2
pip==21.2.4=py310haa95532_0
bzip2==1.0.8=he774522_0
libffi==3.4.2=h604cdb4_1
ca-certificates==2022.2.1=haa95532_0
python==3.10.0=h96c0403_3
setuptools==58.0.4=py310haa95532_0
sqlite==3.38.0=h2bbff1b_0
tk==8.6.11=h2bbff1b_0
xz==5.2.5=h62dcd97_0
openssl==1.1.1m=h2bbff1b_0

According to Dean, it seem its better to specify  "--no-builds"when exporting environment ?

Yup I also could not install (using miniconda3)
Tao is using using Anaconda


fix exception at bootup

By default running cargo build on the default package throws exception. Rename variables to prevent users from having to debug.

This is a cargo generate template. It's not supposed to build at this state. Closing the PR


CPP: Improve AV Rule 114.ql's understanding of return types.

Fixes https://discuss.lgtm.com/t/false-positive-c-missing-return-statement/1423.
In short, it's possible to produce a template dependent type that is always void, except on the template itself where it's a TemplateParameter.
@dave-bartolomeo please could you confirm that the terminology I'm using - 'template dependent type' - is accurate (as it appears in the change note).

@dave-bartolomeo Any reason not to merge this?


Update diagnostic for Robocop 4.0 release after disablers module was rewritten

We're getting ready to release Robocop 4.0. However I remember you have custom code to handle Robocop scans - and this code will not work after the release. Disablers module was rewritten and now instead of parsing the file as text file it parses it as Robot Framework file (so the disablers are context aware ie. disabler defined in the FOR loop will be re-enabled after the loop).
I'm not aware of your project setup so I didn't add any tests, didn't run anything except precommits etc.

Thank you for the PR. It is merged.
Is the RoboCop repository up to date? So already with new disabler? So that I can test it?
Unfortunately you have committed the PR with a Github unknown email address, so you are not in the repo as a contributor :-(

Our repository is up to date, we are ready to release and the code on master branch will be used to release.
Ah, I probably commited with my work email. It doesnt matter really :)

OK, then I will test it this weekend and will let you know the result.

Just tested it, it works! Happy Release!!!


[Feature] Make Future for Shortcut

Can you please make custom shortcut call directly function without creating new class ?
so when we want to callback anything after shortcut key press without creating new class.

Please refer to the code below.
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pluto_grid/pluto_grid.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final List<PlutoColumn> columns = [
    PlutoColumn(title: 'Id', field: 'id', type: PlutoColumnType.text()),
    PlutoColumn(title: 'Name', field: 'name', type: PlutoColumnType.text()),
    PlutoColumn(title: 'Age', field: 'age', type: PlutoColumnType.number()),
  ];

  final List<PlutoRow> rows = [
    PlutoRow(cells: {
      'id': PlutoCell(value: '1'),
      'name': PlutoCell(value: 'Kim'),
      'age': PlutoCell(value: 20),
    }),
    PlutoRow(cells: {
      'id': PlutoCell(value: '2'),
      'name': PlutoCell(value: 'Lee'),
      'age': PlutoCell(value: 20),
    }),
  ];

  late PlutoGridStateManager stateManager;

  late StreamSubscription<PlutoKeyManagerEvent> keyEvent;

  @override
  void dispose() {
    keyEvent.cancel();

    super.dispose();
  }

  void _listener(PlutoKeyManagerEvent keyEvent) {
    if (keyEvent.isKeyDownEvent) return;

    if (keyEvent.isEnter) {
      print('enter');
      // do something.
      stateManager.moveCurrentCell(PlutoMoveDirection.right);
      return;
    }

    if (keyEvent.event.isControlPressed &&
        keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.keyH.keyId) {
      print('control + H');
      return;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Container(
          padding: const EdgeInsets.all(15),
          child: PlutoGrid(
            columns: columns,
            rows: rows,
            onChanged: (PlutoGridOnChangedEvent event) {
              print(event);
            },
            onLoaded: (PlutoGridOnLoadedEvent event) {
              stateManager = event.stateManager;
              keyEvent =
                  stateManager.keyManager!.subject.stream.listen(_listener);
            },
            configuration: PlutoGridConfiguration(
              shortcut: PlutoGridShortcut(
                actions: {
                  // Remove the desired override key.
                  // If the key is not in defaultActions, there is nothing to do.
                  for (final action in PlutoGridShortcut.defaultActions.entries)
                    if (action.key != LogicalKeySet(LogicalKeyboardKey.enter))
                      action.key: action.value,
                },
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Great, Man its working you are awesome :)

there is one issue im facing
when i change default shortcut inside actions it not working
  LogicalKeySet(LogicalKeyboardKey.f2):PlutoGridActionFocusToColumnFilter(),
but it was working perfectly.
and inside handler its now even working

can you explain this loop
   for (final action in PlutoGridShortcut.defaultActions.entries)
                    if (action.key != LogicalKeySet(LogicalKeyboardKey.enter))
                      action.key: action.value,

i'm having issue that PlutoGrid default shortcut is running too after adding adding handler and loop how can i prevent that actions ?

The example overrides the Enter key.
The enter key is a key registered in the primary key.
In this case, you need to exclude it from the primary key.

my key doesnt override key can you give me example how to override :/
because  i set f2 for PlutoGridActionFocusToColumnFilter but when i press f3 its works same

f2 and f3 are keys defined in defaultActions.
If you want to override f2 and f3 does nothing, do something like this:
actions: {
  for (final action in PlutoGridShortcut.defaultActions.entries)
    // If f3 key is overridden, it should be excluded from defaultActions as shown below.
    if (action.key != LogicalKeySet(LogicalKeyboardKey.f2) && action.key != LogicalKeySet(LogicalKeyboardKey.f3))
      action.key: action.value,
},

     for (final action
                            in PlutoGridShortcut.defaultActions.entries)
                          if (action.key !=
                                  LogicalKeySet(LogicalKeyboardKey.f2) &&
                              action.key !=
                                  LogicalKeySet(LogicalKeyboardKey.f3) &&
                              action.key !=
                                  LogicalKeySet(LogicalKeyboardKey.f4) &&
                              action.key !=
                                  LogicalKeySet(LogicalKeyboardKey.delete))
                            action.key: action.value,

this is structure but it keep calling default action ....
 keyEvent = stateManager.keyManager!.subject.stream
                      .listen(_keyEventListener);

this is my handler
void _keyEventListener(PlutoKeyManagerEvent keyEvent) {
    if (keyEvent.isKeyDownEvent) return;

    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.f3.keyId) {
      _addFunction();
    }
    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.f4.keyId) {
      _modifyFunction();
      return;
    }
    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.delete.keyId) {
      _deleteFunction();
      return;
    }
    if (keyEvent.event.isShiftPressed &&
        keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.escape.keyId) {
      if (!_isAddDialogOpen) {
        Navigator.pop(context);
      }
      return;
    }
  }

now when after selecting row when i press f3 then it should call my function but it keeps calling default action not my custom action.

 void _keyEventListener(PlutoKeyManagerEvent keyEvent) {
    if (keyEvent.isKeyDownEvent) return;

    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.f2.keyId) {
      const PlutoGridActionFocusToColumnFilter();
      return;
    }
    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.f3.keyId) {
      _addFunction();
      return;
    }
    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.f4.keyId) {
      _modifyFunction();
      return;
    }
    if (keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.delete.keyId) {
      _deleteFunction();
      return;
    }
    if (keyEvent.event.isShiftPressed &&
        keyEvent.event.logicalKey.keyId == LogicalKeyboardKey.escape.keyId) {
      if (!_isAddDialogOpen) {
        Navigator.pop(context);
      }
      return;
    }
  }

here is my code my default action is override of ColumnFilter but when i press f2 its not working (not going cursor to search or filter textfield)

Shortcut keys that operate in TextField in the column filter area are not overridden.
https://pluto.weblaze.dev/shortcuts
And if you want to assign PlutoGridActionFocusToColumnFilter to shortcut key, do as follows.
actions: {
 // Remove the desired override key.
 // If the key is not in defaultActions, there is nothing to do.
 for (final action in PlutoGridShortcut.defaultActions.entries)
   // If f3 key is overridden, it should be excluded from defaultActions as shown below.
   if (action.key != LogicalKeySet(LogicalKeyboardKey.f2))
     action.key: const PlutoGridActionFocusToColumnFilter(),
},

// or

if (keyEvent.isF2) {
 const PlutoGridActionFocusToColumnFilter().execute(
   keyEvent: keyEvent,
   stateManager: stateManager,
 );
 return;
}

so cant we overrridden column Filter.. is there any other option ?

As mentioned in the documentation, shortcuts for TextField (cell) and TextField (column filter) cannot be overridden.
The feature should be updated.

thanks :)
how to give flex  to column ?

Its not reflecting at first
When running first time i'm getting this date format

after selecting i am getting my custom format


rfc7230 tidy and tests

is_tchar could use a test, maybe some benchmarks. there should be an "obviously correct" function in the test which compares against the table driven output. Think about making is_tchar and those routines public interfaces to assist users.

All the various is_token_char and other routines should be consolidated into detail/rfc7230.hpp with an eye towards making them public. Rename to be consistent with the rfc.


CAMEL-11516 - fix test with system.property("line.separator")

LGTM to me. Go for it @onders86

Merged #1806


Ask me to install spyder-kernels, but doesn't work after the installation

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
The Python environment or installation whose interpreter is located at
C:\Users\miraboreasu\Miniconda3\envs\spyder‑env\python.exe
doesn't have the spyder‑kernels module or the right version of it installed (>= 2.2.1 and < 2.3.0). Without this module is not possible for Spyder to create a console for you.
You can install it by activating your environment (if necessary) and then running in a system terminal:
conda install spyder‑kernels=2.2
or
pip install spyder‑kernels==2.2.*
I  tried conda install spyder‑kernels=2.2, but still have this, and reset the IDE, it doesn't work
I would like to say more, I have tried VSCode, Pycharm. I really like Spyder, since it is the one when I just started learning Python back in the old days. But I don't know why this happened, since I used to use prompt in Tools, but now it has gone, anyway, please help me
What steps reproduce the problem?

Download the latest version from https://www.spyder-ide.org/
Use miniconda to create a new environment following https://docs.spyder-ide.org/5/faq.html#using-packages-installer
Then when I change the preference and restart the spyder, this happened

What is the expected output? What do you see instead?
https://ibb.co/3hNH4W3
The Python environment or installation whose interpreter is located at
C:\Users\miraboreasu\Miniconda3\envs\spyder‑env\python.exe
doesn't have the spyder‑kernels module or the right version of it installed (>= 2.2.1 and < 2.3.0). Without this module is not possible for Spyder to create a console for you.
You can install it by activating your environment (if necessary) and then running in a system terminal:
conda install spyder‑kernels=2.2
or
pip install spyder‑kernels==2.2.*
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version: Just download the lastest one today
Python version: 3.9.7
Qt version:
PyQt version:
Operating System name/version: Win10

Dependencies

PASTE DEPENDENCIES HERE

Hi @miraboreasumr,
I'm seeing you are using windows, can you try to use our windows installer available here: https://github.com/spyder-ide/spyder/releases/tag/v5.2.2 and see if your problem is resolved?
Please don't forget to uninstall Spyder from conda.

Hi @miraboreasumr,
I'm seeing you are using windows, can you try to use our windows installer available here: https://github.com/spyder-ide/spyder/releases/tag/v5.2.2 and see if your problem is resolved?
Please don't forget to uninstall Spyder from conda.

Hello, I did use the Windows installer.

Did you solved the issue you were having with the installer?

Did you solved the issue you were having with the installer?

Hello, no, I still have the issue even I use the one you provide.

Can you follow this video, https://www.youtube.com/watch?v=i7Njb3xO4Fw?

Can you follow this video, https://www.youtube.com/watch?v=i7Njb3xO4Fw?

steff456, I really appreciate your reply, but that doesn't help. I already said that I follow this video in "What steps reproduce the problem?"
I have spyder-kernels, but spyder IDE still asks me for it
https://ibb.co/3hNH4W3
The problem is still not solved.

Hi @miraboreasumr could you try to run from an Ananconda Prompt with your spyder-env activated the following:
conda install -c conda-forge spyder‑kernels=2.2.1

Let us know if that helps!

Great! Closing this one then.

how do you still use this without conda?
pip install doesn't solve it and I'm not using conda

Hi @vlasvlasvlas, could you describe your setup? Maybe a look to our wiki could be useful to understand better how things work when using Spyder and a specific Python environment/custom interpreter: https://github.com/spyder-ide/spyder/wiki/Working-with-packages-and-environments-in-Spyder
Let us know!

pip install spyder-kernels==2.2.1

I am facing the same issue. My setup is as follows.
I have installed stand along Spyder 5.4.3 on Windows 11 and Python 3.11 as standalone (stand alone means, I am not using Conda/Anaconda environment).
Python 3.11 version is installed in "C:/Program Files/Python311"
Spyder is installed in "C:\Program Files\Spyder"
Since Spyder comes with older version of Python which is Python 3.8.10, I changed this from Tools>Python interpreter: Select "Use the following Python interpreter".
After the Spyder is restarted, the following error pops up:
An error ocurred while starting the kernel
**The Python environment or installation whose interpreter is located at
C:\Program Files\Python311\python.exe
doesn't have the spyder‑kernels module or the right version of it installed (>= 2.4.0 and < 2.5.0). Without this module is not possible for Spyder to create a console for you.
You can install it by activating your environment first (if necessary) and then running in a system terminal:
conda install spyder-kernels=2.4
or
pip install spyder-kernels==2.4.*
From Command Prompt, I installed the spyder kernels using the pip install spyder-kernels==2.4.3 as suggested on Spder-IDE website.
But the errors persists. Can you please help me to resolve this issue?
PS. I tried to go through the wiki page and the youtube videos you have suggested earlier in this thread. But I could not find the solution for this issue.

can i still use this code below in spder without installing anaconda in my windows to fix the kernel problem?
conda install -c conda-forge spyder‑kernels=2.4.3


Imports from @react-email/components break with import-in-the-middle

@react-email/components is a metapackage that re-exports the individual component libraries from @react-email such as @react-email/body, @react-email/html, @react-email/tailwind, etc.
It does this using export * from <package> in its index.mjs file, and the following (compiled) code for index.js:
module.exports = __toCommonJS(src_exports);
__reExport(src_exports, require("@react-email/body"), module.exports);
__reExport(src_exports, require("@react-email/button"), module.exports);
__reExport(src_exports, require("@react-email/column"), module.exports);
// etc for the rest of the component libraries

// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  ...require("@react-email/body"),
  ...require("@react-email/button"),
  ...require("@react-email/column"),
  // etc for the rest of the component libraries
});

I have created an example minimal reproduction at: https://github.com/dawnmist/import-in-the-middle-react-email-issue
Expected Behavior
The application should be able to import any of the individual components directly from the @react-email/components library.
Actual Behavior
When import-in-the-middle is used as an --experimental-loader, the import paths for the @react-email components get incorrectly mapped as subdirectories/siblings of the index.js/index.mjs files of the @react-email/components library, resulting in file not found import errors:
Yarn 4 (nodeLinker=pnpm):
node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
[Error: ENOENT: no such file or directory, open '/home/username/project/node_modules/.store/@react-email-components-virtual-daf4c187d9/package/dist/@react-email/body'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/username/project/node_modules/.store/@react-email-components-virtual-daf4c187d9/package/dist/@react-email/body'
}

Yarn 3 (nodeLinker=pnpm):
(node:1753054) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("import-in-the-middle/hook.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
[Error: ENOENT: no such file or directory, open '/home/username/project/node_modules/.store/@react-email-components-virtual-8a501030e1/package/dist/@react-email/body'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/username/project/node_modules/.store/@react-email-components-virtual-8a501030e1/package/dist/@react-email/body'
}

Steps to Reproduce the Problem
I have created an example reproduction at: https://github.com/dawnmist/import-in-the-middle-react-email-issue

Clone the git repo: https://github.com/dawnmist/import-in-the-middle-react-email-issue
yarn install
yarn build
yarn start - server will run without using import-in-the-middle
Go to http://localhost:3000 and you should see the output "Hello world!"
Stop the server
yarn start:import - the same server will fail to run at all when using import-in-the-middle as an experimental-loader, throwing the error above where the @react-email/body library is instead attempted to be loaded as a subdirectory of the @react-email/components library instead of being treated as a separate npm library.

Specifications

Version: import-in-the-middle version 1.7.3
Platform: Debian 12 linux, x86_64
NodeJS: 18.19.0 & 20.11.0
Yarn: 3.7.0 + 4.0.2

I've made some attempt to debug what is going on, though it's only been partially successful.
Replacing line: https://github.com/DataDog/import-in-the-middle/blob/c3c2c52c1915b47994af59d507c59029c1f1fae9/hook.js#L157
With:
      const isNodeModule = !(modFile.startsWith('.') || modFile.startsWith('/') || modFile.startsWith('file:'))
      const modUrl = isNodeModule
        ? new URL(require.resolve(modFile, {
          paths: [new URL(srcUrl).pathname]
        }), srcUrl).toString()
        : new URL(modFile, srcUrl).toString()

This allows import-in-the-middle to get the correct url for submodule/child node_module library imports, however there is still an issue in that when it is processing those submodules import-in-the-middle fails to retrieve the submodule's exports. This results in the parent module being unable to re-export the submodule's exports as it does not know about the items being exported (the setters map for the submodule is returned as empty). The submodule then gets processed a second time after the parent has completed all its processing, this time properly picking up its own exports but it's too late at that point for the parent module to be informed of the child's exports. This then means that node throws errors that the parent "does not provide an export named 'XXX'" when it was one of the exports that the parent module was re-exporting from the submodule.
In terms of the isNodeModule test, I'm not sure if there are any other modFile exports likely to be seen, e.g. http: or deno:. If there are others that need to be treated like file/relative/absolute urls instead of using node resolution, that parameter should be updated to look for those too.


How to get value of variables from outside of the model function in PyscipOpt?

Hi,
I solved a minimization optimization problem using PyscipOpt.
Now I need the values of the variables obtained through this function.
It should be noted that the variables are 3-dimensional.
How can I access the final value of variables outside of this function?
There are the final values obtained by function:
I mean the optimization problem is solved in a function using pyscipopt. In the other separated function, I need the results of this function. I don't know how to get the results of the function from outside of it.
How can I do that?
Thanks

Please edit your question: remove the solution values of your variables and rather show us your model.

I don't understand. Did you try getSolVal(self, Solution sol, Variable var)?
If you do not want to carry the model around you can probably create a list associating the variable with the value (using the var.ptr  as a key)

oh, we even have getVal which does not need a solution


fix: index out-of-bounds issue in the LT05 rule when trying to remove elements from a sequence

When running sqruff on a DBT model in Snowflake dialect, the LT05 rule was panicking. This only removes the indexes when they exist, otherwise prints.
Error:
thread 'main' panicked at crates/lib/src/rules/layout/lt05.rs:166:21:
removal index (is 14) should be < len (is 10)

Hey @bradleyess,
Thank you so much for your contribution. I am slightly worried about this in its current shape. We don't currently support the Jinja template and so I am not sure your test proves the fix: I think we skip the test for templates we don't have yet.
I am looking at the Jinja templater right now, so I can look into this after that having finished it.
If you can prove that this test fails without any jinja that could be really helpful.


Enhanced Twitter Support

@benubois and I had a discussion about where Twitter support in NetNewsWire could be enhanced.  These are the main takeaways.

Support for Twitter Threads - Many twitter users use Twitter threads for long form writing, very similar to a blog post.  It would be nice to support this in NetNewsWire.  Feedbin already supports this in the Feedbin web interface.

Support for inlining articles.  Feedbin already supports adding a linked article inline using the Mercury service.  This could be something that NetNewsWire does on demand using some JavaScript and a custom scheme handler.

Better Feedbin / Twitter integration in NetNewsWire.  Specifically we discussed using NetNewsWire's Twitter rendering instead of the article content passed by Feedbin.  This would enable the above features for Feedbin as well as NetNewsWire local and iCloud accounts.

This is awesome that you two are even discussing this. Looking forward to seeing this implemented in NetNewsWire!!

@vincode-io Are you planning to do any work on this? I see Feedbin has nice support for Twitter threads and it's a shame it cannot be used right now. Ideally we would have both twitter thread support and inlining articles.

Maybe I'll work on this someday and maybe I won't. We have lots of things to implement that benefit all NetNewsWire users, not just Feedbin users with Twitter feeds.
We aren't overriding any Feedbin functionality. To support Feedbin's Twitter threads, we would have to put Feedbin specific code in NetNewsWire. That is why this issue exists in the first place.

Thanks for the answer and the correction; it clarifies what needs to be done to get this ticket resolved.

Adding additional Twitter support is pretty unlikely at this point, so I’m closing this.


please don't merge this

i redid the .csproj file so i can compile on linux. i haven't tested this

update: it launches but i can't press the buttons and when i run mainmenu in the console the mouse pointer doesn't hide


net/http/server: Shutdown() may return without an error (timeout) but leave dangling connections

There seems to be a race condition between Serve() and Shutdown()->closeIdleConns().
If Shutdown() runs and completes after a new connection has been accepted in Serve() but before c.setState(c.rwc, StateNew) was called for it, c.serve() won't detect that the server was closed until w.conn.server.doKeepAlives() is called (after serving the request).
I'm not sure whether this may be classified as "desired" behavior. TestServerShutdownStateNew is testing a somewhat similar scenario where Shutdown() runs right after setState(StateNew). In the case I'm describing Shutdown() would need to run right before setState(StateNew). In which case, I'd expect to get t.Errorf("shutdown too soon after %v", d).
I've discovered this by looking at the code. Not something seen in real env.
Possible fix (not tested):
diff --git a/src/net/http/server.go b/src/net/http/server.go
index feff200..9bc20f7 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -1703,22 +1703,40 @@ func validNPN(proto string) bool {
 	return true
 }

+func (c *conn) setStateNew(nc net.Conn) bool {
+	srv := c.server
+	srv.mu.Lock()
+	if srv.shuttingDown() {
+		srv.mu.Unlock()
+		return false
+	}
+	srv.trackConnLocked(c, true)
+	c.setStateValue(StateNew)
+	srv.mu.Unlock()
+	if hook := srv.ConnState; hook != nil {
+		hook(nc, state)
+	}
+	return true
+}
+
 func (c *conn) setState(nc net.Conn, state ConnState) {
 	srv := c.server
 	switch state {
-	case StateNew:
-		srv.trackConn(c, true)
 	case StateHijacked, StateClosed:
-		srv.trackConn(c, false)
+		srv.untrackConn(nc)
 	}
+	c.setStateValue(nc, state)
+	if hook := srv.ConnState; hook != nil {
+		hook(nc, state)
+	}
+}
+
+func (c *conn) setStateValue(state ConnState) {
 	if state > 0xff || state < 0 {
 		panic("internal error")
 	}
 	packedState := uint64(time.Now().Unix()<<8) | uint64(state)
 	atomic.StoreUint64(&c.curState.atomic, packedState)
-	if hook := srv.ConnState; hook != nil {
-		hook(nc, state)
-	}
 }

 func (c *conn) getState() (state ConnState, unixSec int64) {
@@ -2928,7 +2946,10 @@ func (srv *Server) Serve(l net.Listener) error {
 		}
 		tempDelay = 0
 		c := srv.newConn(rw)
-		c.setState(c.rwc, StateNew) // before Serve can return
+		if !c.setStateNew(c.rwc) { // before Serve can return
+			c.rwc.Close()
+			return ErrServerClosed
+		}
 		go c.serve(ctx)
 	}
 }
@@ -2999,9 +3020,7 @@ func (s *Server) trackListener(ln *net.Listener, add bool) bool {
 	return true
 }

-func (s *Server) trackConn(c *conn, add bool) {
-	s.mu.Lock()
-	defer s.mu.Unlock()
+func (s *Server) trackConnLocked(c *conn, add bool) {
 	if s.activeConn == nil {
 		s.activeConn = make(map[*conn]struct{})
 	}
@@ -3012,6 +3031,12 @@ func (s *Server) trackConn(c *conn, add bool) {
 	}
 }

+func (s *Server) untrackConn(c *conn) {
+	s.mu.Lock()
+	defer s.mu.Unlock()
+	trackConnLocked(c, false)
+}
+
 func (s *Server) idleTimeout() time.Duration {
 	if s.IdleTimeout != 0 {
 		return s.IdleTimeout

Thanks for the report.
I believe this is already tracked at the recently reported #33313. I suggest to move this discussion there. If you have investigated this, you may post in that thread (but no patches please, we can't accept patches posted on the issue tracker).
Closing here, but feel free to speak up if you believe this is not a dup of #33313.


Icon page alignment issue

Describe the bug
It's a small bug inside the Icon page, where we can see all icons. When viewing that page from a mobile device, the icons are displayed one at a time, and the alignment is not centered.
Expected behavior
To solve this small issue, we can either show two icons at once in mobile view, or we can display one icon at a time with the position centered.
In my opinion, showing two icons at once would be more convenient.
Screenshots

Issue Update
The alignment bug on the Icon page in mobile view has been successfully resolved. With the updated layout, icons display correctly.

Thanks for your patience, and feel free to reopen the issue if any related problems arise.

Issue Update
The alignment bug on the Icon page in mobile view has been successfully resolved. With the updated layout, icons display correctly.

Thanks for your patience, and feel free to reopen the issue if any related problems arise.


Add fallback for docker_binary attribute

It use which from shutil std package for Python 3.3 and later, we also define helper function called which for prior version.

Awesome! Thanks for contributing.
Left a minor review, I think we can safely assume Python >= 3.8


chore(deps): update common-dev-assets digest to 62d9c41

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
3e33725 -> 62d9c41

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

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


kubernetes.default.svc not among SANs in Kubernetes API serving certificate

Environmental Info:
RKE2 Version: v1.20.7+rke2r2
K3s Version: v1.21.1-rc1.0.20210514205428-fd4d226e3deb (based on go.mod in RKE2)
Describe the bug:
In-cluster attempt to connect to https://kubernetes.default.svc fails with "requested domain name does not match the server's certificate".
Steps To Reproduce:
From any pod (with curl and not on host network):
curl --cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt https://kubernetes.default.svc

Expected behavior:
Successful certificate verification:
$ curl --cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt https://kubernetes.default.svc
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "Unauthorized",
  "reason": "Unauthorized",
  "code": 401
}

(401 Unauthorized is fine, just looking for no cert issues ...)
Actual behavior:
$ curl --cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt https://kubernetes.default.svc
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.

(Originally observed with in-cluster Java client failing with "javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching kubernetes.default.svc found.")
Also note that the same request with https://kubernetes.default (without .svc) works fine.
Additional context / logs:
This is very likely introduced recently by https://github.com/k3s-io/k3s/pull/3241.
As @brandond pointed out, it is surprising this is not caught by Kubernetes conformance tests. (They check for DNS resolution for selected required PQDNs, but not for their presence in SAN list / ability to actually establish connection.) Filed https://github.com/kubernetes/kubernetes/issues/102549

We need to also see if this issue shows up in k3s 1.20.x and fix it there as well if so.

hmmm, thats kinda weird since if I recall correctly we do add kubernetes.default.svc to the sans https://github.com/k3s-io/k3s/blob/master/pkg/daemons/control/deps/deps.go#L322

It is added with cluster domain suffix (kibernetes.default.svc.<cluster suffix>, FQDN), the issue is when client uses one without suffix (kubernetes.default.svc, PQDN)

Validated on master using commitid: a7d1159ba6f71f36990fac2a1780fcc3f8621ab6

Recreated in v1.21.1+k3s1 by running command mentioned by Brad: echo QUIT | openssl s_client -connect localhost:6444 2>/dev/null | openssl x509 -noout -text | grep DNS which produced default DNS results of:
DNS:localhost, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc.cluster.local
On master, running the same command produces:
DNS:localhost, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local
In both cases, confirmed that curl'ing using the kuberentes.default.svc cert from inside a container continues to work and retrieves the Not Authorized message.


How is “Never start a line with ( or [” ment?

“Never start a line with ( or [” is a very simple rule, but I’m not sure it means the right thing.
standard doesn’t generate errors for code like this:
foo(
  (1 + 2) * 3,
  [1, 2, 3]
)

Is this a bug in standard or is starting a line with ( or [ allowed in this case?
If it is allowed, shouldn’t it say “Never start a statement with ( or [”?

I think that saying "never start a line" is actually more accurate than "never start a statement", though both are actually incorrect.
The correct rule is "\n ends a statement unless the next line starts with [, (, and a few addition, uncommon binary operators."
Instead of writing all that, I added a longer explanation to RULES.md and linked it from the list of rules in README.md.


Improve touch area / feedback of social icons on detail("詳細") page

@shaunkawano Could u send a PR?

I will! Hopefully I can get this done till the end of the day; is that ok?

Sure! Really appreciated!


On browser refresh/ chat reload remove chat logs

Version
I am using Webchat version 4.5.
Describe the bug
With Azure bot service authentication set up following this article   and details implementaion here .
When a user sign-in chats and refreshes browser the webchat is reinitilized and user is asked with auth prompt. To solve this scenario, we manage existing token across the browser reload and refresh the token if the token is not expired.
The issue with this solution is the user is taken to the last point in the conversation.  customer don't want that, it should be new conversation with greeting message without login prompt.
@tdurnford or anyone can you help us?

Direct Line only sends conversation update events for a member being added to the conversation when the conversation is first initialized. This event is intended to trigger the welcome message from the bot, and, evidently, using a refreshed token will not trigger the traditional welcome message. Since you want to maintain the user's logged in state, I would recommend sending a back channel welcome message event when the Direct Line Connection is fulfilled. Then in the bot you can cancel all existing dialogs to restart the conversation and send the welcome message.
Web Chat v4
const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
  if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
    // When we receive DIRECT_LINE/CONNECT_FULFILLED action, we will send an event activity using WEB_CHAT/SEND_EVENT
    dispatch({
      type: 'WEB_CHAT/SEND_EVENT',
      payload: {
        name: 'webchat/join',
        value: { language: window.navigator.language }
      }
    });
  }
  return next(action);
});
window.WebChat.renderWebChat({
  directLine: window.WebChat.createDirectLine({ token }),
  store
}, document.getElementById('webchat'));

Bot Framework SDK v4 (Node)
this.onEvent(async (context, next) => {
  if (context.activity.name === 'webchat/join') {
    const dc = this.dialogState.createContext(context);
    await dc.cancelAllDialogs();
    await context.sendActivity({ text: 'Backchannel Welcome Message sent from `onEvent`!' });
  }
  await next();
});

For more details, take a look at the Backchannel Welcome Event Web Chat Sample.
In the future, the Bot Framework Development teams prefers how to questions such as this one to be asked on StackOverflow. The support team monitors StackOverflow for the botframework and web-chat tags.
Hope this helps!

Thank you @tdurnford. I am trying the solution you suggested.

Direct Line only sends conversation update events for a member being added to the conversation when the conversation is first initialized. This event is intended to trigger the welcome message from the bot, and, evidently, using a refreshed token will not trigger the traditional welcome message. Since you want to maintain the user's logged in state, I would recommend sending a back channel welcome message event when the Direct Line Connection is fulfilled. Then in the bot you can cancel all existing dialogs to restart the conversation and send the welcome message.
Web Chat v4
const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
  if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
    // When we receive DIRECT_LINE/CONNECT_FULFILLED action, we will send an event activity using WEB_CHAT/SEND_EVENT
    dispatch({
      type: 'WEB_CHAT/SEND_EVENT',
      payload: {
        name: 'webchat/join',
        value: { language: window.navigator.language }
      }
    });
  }
  return next(action);
});
window.WebChat.renderWebChat({
  directLine: window.WebChat.createDirectLine({ token }),
  store
}, document.getElementById('webchat'));

Bot Framework SDK v4 (Node)
this.onEvent(async (context, next) => {
  if (context.activity.name === 'webchat/join') {
    const dc = this.dialogSet.createContext(context);
    await dc.cancelAllDialogs();
    await context.sendActivity({ text: 'Backchannel Welcome Message sent from `onEvent`!' });
  }
  await next();
});

For more details, take a look at the Backchannel Welcome Event Web Chat Sample.
In the future, the Bot Framework Development teams prefers how to questions such as this one to be asked on StackOverflow. The support team monitors StackOverflow for the botframework and web-chat tags.
Hope this helps!

Can you write the equivalent for C# SDK also?

@alokraj68 This how to question is better suited for StackOverflow. Please post your question there with the Web Chat and BotFramework tags so the BotFramework Support Team and the community at large can help you work through your issue.