Actually let's not

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

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.006%) to 56.947%

Totals

Change from base Build<PHONE_NUMBER>6:
0.006%

Covered Lines:
11898

Relevant Lines:
19891

💛  - Coveralls


Errors out if creation time not supported

Describe the bug
binsider fails to load an elf file from a file system that doesn't support creation. Instead it reports the error "IO error: creation time is not available for the filesystem"
To reproduce
Run binsider with a file argument on a file system without ctime support, like an NFS mount or tmpfs.
Expected behavior
binsider should load the elf file, but not display a creation time
Software information

Operating system: RHEL 8
Rust version: 1.77.2
Project version: HEAD

Additional context
I worked around it by modifying src/file.rs to set FileDateInfo.birth to "".into() if metadata.created().is_err(). You might want to implement something different.

Thanks for the report and sharing your workaround!
Added a fix here: #25
Do you think there might be other edge cases where e.g. modify or change time is not supported as well? Should we take measures for them as well?

I ran into the same issue by running it on docker from an apple silicone machine
❯ docker run --platform linux/amd64 -v ${PWD}:/mnt -w /mnt --rm -it ubuntu:latest /bin/bash

Going to be fixed with the upcoming release :)


Run tests using a local database.

This does several things:

Adds the ./api/bin/start_local_db.sh script for starting a local
database. It uses docker to run things in a container, and uses
the same Postgres version that we do now.

Modifies the tests to use that database.

Adds a CI configuration that uses GitHub actions to run the API
tests on PRs and do some light validation of the UI.

Sorry for the noise. I pinged y'all a bit early. There still might be some turbulence while I get CI working. I'll re-assign when it's ready for review.

Ok, CI is working now. Take a look!


Can you support the Chinese client?

This is an error

Gw2-64.zip
this is Chinese client

Since latest release the chinese client should be supported

1.4 and 1.5 is erro of "failed to inject hook 11"


Fix/dispatch gc

The DispatchFunction instances can get garbage-collected the same way the CallBackFunction instances are. The reason for this is the fact that the dispatched functions might be running later, as part of a message pump on the webview's thread handling them. This fix mirrors the indirect GC pinning that is already done for CallBackFunction instances, but is additionally locking the collection as it will be used to remove any functions that have been dispatched already.

So... this is weird. I was able to reproduce the crash on a Mac VPS. However, once I started the executable manually via the Terminal to get some console output to look at, it just worked. Even worse, now since I have done that once, running the .app again doesn't crash anymore! :weary:
The crash report lists the same stack trace still. Maybe I get lucky and can reproduce this again , this time with getting .NET logs to a file while it's happening...

I think as long as your PR runs fine, we are save to merge it. The Mac version of webview is using the method dispatch_async_f. So we have to pin the dispatch delegate until it runs even, if you can't reproduce the error reliably on the master branch code :)

The following is a crude repro for the issue, which this PR does indeed fix.
using var webview = new Webview(true, true);
Task.Run(async () =>
{
    await Task.Delay(2000).ConfigureAwait(false);
    webview.Dispatch(() =>
    {
        Thread.Sleep(1000);
        webview.Dispatch(() => webview.Navigate(new UrlContent("https://duckduckgo.com")));
    });
    GC.Collect();
});
webview.Navigate(new UrlContent("https://google.com")).Run();

I'll continue my troubleshooting for what looks like the same/similar issue still, but I agree that this PR is ready to go :)


[PT Run] System.InvalidCastException: Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'

Microsoft PowerToys version
0.41.3
Running as admin

[ ] Yes

Area(s) with issue?
PowerToys Run
Steps to reproduce
I wanted to start Affinity Designer and I think I type 'deign' and then pressed enter.
✔ Expected Behavior
The app should launch
❌ Actual Behavior
I received an exception:
System.InvalidCastException: Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'.
   Source: PowerLauncher
   TargetAssembly: PowerLauncher, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null
   TargetModule: PowerLauncher.dll
   TargetSite: Void SuggestionsList_PreviewMouseLeftButtonUp(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at PowerLauncher.MainWindow.SuggestionsList_PreviewMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Attached file is a zip file since txt files were not accepted.
2021-06-29.zip
Other Software
No response

Dupe of https://github.com/microsoft/PowerToys/issues/11898. Thanks for reporting! We have a fix on the way shortly.


package.json: Update react package dependency

Check for any outstanding update of point version of any outstanding NPM package dependency

[x] npm-update

npm-update in progress on 12-ip-10-29-163-166.
Log: http://fedorapeople.org/groups/cockpit/logs/npm-update-831-20191122-163232/

npm-update in progress on 4-ip-10-29-163-166.
Log: http://fedorapeople.org/groups/cockpit/logs/npm-update-831-20191122-163232/

npm-update react done: https://github.com/cockpituous/welder-web/commits/npm-update-react-20191122-163333

npm-update react-dom done: https://github.com/cockpituous/welder-web/commits/npm-update-react-dom-20191122-163333

Error accessing /repos/weldr/cockpit-composer/pulls
Status: 422
Reason: Unprocessable Entity
Response: {"message":"The specified issue is already attached to a pull request.","errors":[{"value"None,"resource":"PullRequest","field":"issue","code":"invalid"}],"documentation_url":"https://developer.github.com/v3/pulls/#create-a-pull-request"}: http://fedorapeople.org/groups/cockpit/logs/npm-update-831-20191122-163232/

Please manually check features related to these files:
README.md:is added using [react-intl](https://github.com/yahoo/react-intl) `MessageDescriptor`s, but without explicit `id` attributes.
README.md:**Step 2**. The developer runs `npm run translations:push`. As part of this process, [babel-plugin-react-intl-auto](https://github.com/akameco/babel-plugin-react-intl-auto)
README.md:will add `id` attributes to all of the messages, and [babel-plugin-react-intl](https://github.com/yahoo/babel-plugin-react-intl)
README.md:will extract all of the messages to JSON files, written to `./build/messages`. [react-intl-po](https://github.com/evenchange4/react-intl-po) is
README.md:language, and if translations are available, these translations are provided to react-intl's `<IntlProvider>`. react-intl
babel.config.js:    "@babel/preset-react"
babel.config.js:      "react-intl-auto",
babel.config.js:      "react-intl",
components/EmptyState/EmptyState.js:import React from "react";
components/EmptyState/EmptyStateInactive.js:import React from "react";
components/EmptyState/EmptyStateInactive.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/EmptyState/EmptyStateInactive.js:import { Alert, Button, OverlayTrigger, Tooltip } from "patternfly-react";
components/Form/Password.js:import React from "react";
components/Form/Password.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Form/TextInlineEdit.js:import React from "react";
components/Form/TextInlineEdit.js:import { defineMessages, injectIntl, intlShape } from "react-intl";
components/Layout/Layout.js:import React from "react";
components/Link/Link.js:import React from "react";
components/ListView/BlueprintContents.js:import React from "react";
components/ListView/BlueprintContents.js:import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl";
components/ListView/BlueprintContents.js:import { DataList } from "@patternfly/react-core";
components/ListView/BlueprintContents.js:import { Tabs, Tab } from "patternfly-react";
components/ListView/BlueprintsDataList.js:import React from "react";
components/ListView/BlueprintsDataList.js:import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl";
components/ListView/BlueprintsDataList.js:import { DataList, DataListItem, DataListItemRow, DataListCell, DataListItemCells } from "@patternfly/react-core";
components/ListView/BlueprintsDataList.js:import { PficonTemplateIcon } from "@patternfly/react-icons";
components/ListView/ComponentDetailsView.js:import React from "react";
components/ListView/ComponentDetailsView.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/ListView/ComponentDetailsView.js:import { Tabs, Tab } from "patternfly-react";
components/ListView/ComponentDetailsView.js:import { Tooltip, TooltipPosition } from "@patternfly/react-core";
components/ListView/ComponentDetailsView.js:import { connect } from "react-redux";
components/ListView/ComponentDetailsView.js:      this.setState({ selectedBuildIndex: undefined }); // eslint-disable-line react/no-did-update-set-state
components/ListView/ComponentInputs.js:import React from "react";
components/ListView/ComponentInputs.js:import { defineMessages, injectIntl, intlShape } from "react-intl";
components/ListView/ComponentInputs.js:} from "@patternfly/react-core";
components/ListView/ComponentInputs.js:// eslint-disable-next-line react/prefer-stateless-function
components/ListView/ComponentSummaryList.js:import React from "react";
components/ListView/ComponentSummaryList.js:import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl";
components/ListView/ComponentSummaryList.js:} from "@patternfly/react-core";
components/ListView/ComponentTypeIcons.js:import React from "react";
components/ListView/ComponentTypeIcons.js:import { defineMessages, injectIntl, intlShape } from "react-intl";
components/ListView/ComponentTypeIcons.js:import { Tooltip, TooltipPosition } from "@patternfly/react-core";
components/ListView/ComponentsDataListItem.js:import React from "react";
components/ListView/ComponentsDataListItem.js:import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl";
components/ListView/ComponentsDataListItem.js:} from "@patternfly/react-core";
components/ListView/DependencyListView.js:import React from "react";
components/ListView/DependencyListView.js:import { DataList } from "@patternfly/react-core";
components/ListView/LabelWithBadge.js:import React from "react";
components/ListView/ListItemImages.js:import React from "react";
components/ListView/ListItemImages.js:import { FormattedMessage } from "react-intl";
components/ListView/ListItemImages.js:import { connect } from "react-redux";
components/ListView/ListView.js:import React from "react";
components/ListView/SourcesListItem.js:import React from "react";
components/ListView/SourcesListItem.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/ListView/SourcesListItem.js:import { Spinner } from "patternfly-react";
components/Loading/Loading.js:import React from "react";
components/Loading/Loading.js:import { FormattedMessage } from "react-intl";
components/Modal/CreateBlueprint.js:import React from "react";
components/Modal/CreateBlueprint.js:import { Modal } from "patternfly-react";
components/Modal/CreateBlueprint.js:import { FormattedMessage } from "react-intl";
components/Modal/CreateBlueprint.js:import { connect } from "react-redux";
components/Modal/CreateImage.js:import React from "react";
components/Modal/CreateImage.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Modal/CreateImage.js:import { Button, OverlayTrigger, Popover, Icon, Alert, Modal } from "patternfly-react";
components/Modal/CreateImage.js:import { connect } from "react-redux";
components/Modal/DeleteBlueprint.js:import React from "react";
components/Modal/DeleteBlueprint.js:import { Modal } from "patternfly-react";
components/Modal/DeleteBlueprint.js:import { connect } from "react-redux";
components/Modal/DeleteBlueprint.js:import { FormattedMessage, injectIntl } from "react-intl";
components/Modal/DeleteImage.js:import React from "react";
components/Modal/DeleteImage.js:import { FormattedMessage } from "react-intl";
components/Modal/DeleteImage.js:import { connect } from "react-redux";
components/Modal/EditDescription.js:import React from "react";
components/Modal/EditDescription.js:import { Modal } from "patternfly-react";
components/Modal/EditDescription.js:import { FormattedMessage } from "react-intl";
components/Modal/EditDescription.js:import { connect } from "react-redux";
components/Modal/ExportBlueprint.js:import React from "react";
components/Modal/ExportBlueprint.js:import { connect } from "react-redux";
components/Modal/ExportBlueprint.js:import { Modal } from "patternfly-react";
components/Modal/ExportBlueprint.js:import { FormattedMessage } from "react-intl";
components/Modal/ManageSources.js:/* eslint-disable react/no-did-update-set-state */
components/Modal/ManageSources.js:import React from "react";
components/Modal/ManageSources.js:import { connect } from "react-redux";
components/Modal/ManageSources.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Modal/ManageSources.js:import { Modal, Alert, Spinner } from "patternfly-react";
components/Modal/PendingChanges.js:import React from "react";
components/Modal/PendingChanges.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Modal/PendingChanges.js:import { connect } from "react-redux";
components/Modal/PendingChanges.js:import { Button, OverlayTrigger, Popover, Icon, Alert } from "patternfly-react";
components/Modal/StopBuild.js:import React from "react";
components/Modal/StopBuild.js:import { FormattedMessage } from "react-intl";
components/Modal/StopBuild.js:import { connect } from "react-redux";
components/Modal/UserAccount.js:import React from "react";
components/Modal/UserAccount.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Modal/UserAccount.js:import { connect } from "react-redux";
components/Notifications/Notification.js:import React from "react";
components/Notifications/Notification.js:import { FormattedMessage } from "react-intl";
components/Pagination/Pagination.js:import React from "react";
components/Pagination/Pagination.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
components/Toolbar/BlueprintToolbar.js:import React from "react";
components/Toolbar/BlueprintsToolbar.js:import React from "react";
components/Toolbar/FilterInput.js:import React from "react";
components/Toolbar/FilterInput.js:import { Filter } from "patternfly-react";
components/Toolbar/ToolbarLayout.js:import React from "react";
components/Toolbar/ToolbarLayout.js:import { FormattedMessage } from "react-intl";
components/Toolbar/ToolbarLayout.js:import { Filter, Toolbar } from "patternfly-react";
core/router.js:import React from "react";
data/NotificationsApi.js:import React from "react";
data/NotificationsApi.js:import { FormattedMessage } from "react-intl";
main.js:import React from "react";
main.js:import ReactDOM from "react-dom";
main.js:import { addLocaleData, IntlProvider } from "react-intl";
main.js:import enLocaleData from "react-intl/locale-data/en";
main.js:import { Provider } from "react-redux";
main.js:import<EMAIL_ADDRESS>main.js:  const localData = require(`react-intl/locale-data/${lang}`); // eslint-disable-line import/no-dynamic-require
package.json:    "@patternfly/react-core": "3.120.8",
package.json:    "@patternfly/react-icons": "3.14.18",
package.json:    "patternfly-react": "1.19.1",
package.json:    "react": "16.12.0",
package.json:    "react-dom": "16.11.0",
package.json:    "react-intl": "2.9.0",
package.json:    "react-redux": "5.1.2",
package.json:    "@babel/preset-react": "^7.0.0",
package.json:    "babel-plugin-react-intl": "3.0.1",
package.json:    "babel-plugin-react-intl-auto": "^1.5.0",
package.json:    "eslint-plugin-react": "^7.11.1",
package.json:    "react-intl-po": "^2.2.2",
package.json:      "plugin:react/recommended",
package.json:      "prettier/react"
package.json:      "react/jsx-filename-extension": [
package.json:      "react/jsx-wrap-multilines": [
package.json:      "react/destructuring-assignment": "off",
package.json:      "react/no-multi-comp": "off",
pages/blueprint/index.js:import React from "react";
pages/blueprint/index.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
pages/blueprint/index.js:import { Tab, Tabs } from "patternfly-react";
pages/blueprint/index.js:import { connect } from "react-redux";
pages/blueprintEdit/index.js:import React from "react";
pages/blueprintEdit/index.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
pages/blueprintEdit/index.js:import { connect } from "react-redux";
pages/blueprints/index.js:import React from "react";
pages/blueprints/index.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
pages/blueprints/index.js:import { connect } from "react-redux";
pages/error/index.js:import React from "react";
pages/error/index.js:import { FormattedMessage, defineMessages, injectIntl, intlShape } from "react-intl";
utils/routes-loader.js: * https://github.com/kriasoft/react-static-boilerplate

Codecov Report

Merging #831 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
- Coverage   78.96%   78.93%   -0.04%
==========================================
  Files          67       67
  Lines        3323     3323
  Branches      698      698
==========================================
- Hits         2624     2623       -1
- Misses        699      700       +1

Impacted Files
Coverage Δ

components/Modal/CreateBlueprint.js
94.68% <0%> (-1.07%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5483ea...0cf5b8f. Read the comment docs.


M365 pipeline conversion for this repo

/azp run FluidStorybook

Ok I was wondering why the PR didn't trigger the pipeline, and neither did my manual attempt at getting it to trigger. The pipeline is configured in ADO to not run for PRs from forks, so I think we want to do this in a branch within the microsoft/FluidStorybook repo.

Alternatively... @tylerbutler you seem to be the one who last touched this repo in 2021. Is it in use at all? Should we disable the pipeline altogether instead of trying to update it? (And maybe archive the repo?)

This repo hasn't been used since 2021 or so. We can probably archive it.

@rohandubal let me know if you feel different, but based on the conversation above I'll close this PR.


Updated CODE_OF_CONDUCT.md

Description
I updated the code of conduct file by making changes in following points -
Our Pledge
Our Standards
Enforcement Responsibilities
Scope
Pull Request Guidelines
Enforcement
Enforcement Guidelines
Attribution
Conclusion
Also , I tried to make ik more interative.
If any further changes required please tell me.

Fixes issue #574

Screenshots (if applicable)
Add any screenshots that help explain or visualize the changes.

Checklist
Make sure to check off all the items before submitting. Mark with [x] if done.

[ x] I have performed a self-review of my code
[x ] I have commented my code, particularly in hard-to-understand areas
[x ] My changes generate no new warnings
[ x] I am working on this issue under GSSOC

If possible make this issue #574 as level 2 or level 3, it will be a great help from your side.

Please merge it into your repository

Please merge it to your repository

Please merge it into your repository


Update MENTORS.md

updated mentor.md

@Ayan-thecodeking Thanks for your interest! There are some merge conflicts in your branch, Could you please resolve them 😄

@Ayan-thecodeking Thanks for your interest! There are some merge conflicts in your branch, Could you please resolve them 😄

done @deephunt3r


Upgrade ChitChat to 1.2.0

Thank you for the contribution. It was merged directly as c6add6341e402820d4d86db0438ca283e471fb80 to keep commit history cleaner. Your contribution is still credited to you.


Classes not found when running on iOS

I have added the dependency to common source set since I am using it for a multiplatform project and it works fine when I run Android app, but when I run it on iOS, I get following error.
Could not find "/Users/mac/.gradle/caches/modules-2/files-2.1/media.kamel/kamel-image-iosarm64/0.7.2/33fd052e978bb1ea02569817afbfd6929a1e350a/kamel-image.klib" in [/Users/mac/Documents/Markaz-Supplier/markazSupplierIos/Pods, /Users/mac/.konan/klib, /Users/mac/.konan/kotlin-native-prebuilt-macos-x86_64-1.8.20/klib/common, /Users/mac/.konan/kotlin-native-prebuilt-macos-x86_64-1.8.20/klib/platform/ios_arm64]

Can you try kotlin 1.9.0?

I added an ios sample and everything works. Provide an example if you want me to take a look.

I couldn't migrate kotlin to 1.9 but I used kamel version 0.7.1 and it worked. Thanks.
The only problem I have right now is that ios app runs in to OOM error when loading a little large number of images.
The images I load have the size range from 400kb-1mb. And there can be  a lots of images. So it runs in to OOM.


Feature/136/caching configurations

Resolves #136

I am not seeing a noticable change in the speed of the application.

Nope, anytime the config file is parsed it should be cached automatically.

Also how big was the larger file you used to test the caching and is there a reason you used category routing?

That was a log error that should be fixed now. I tested with both cost routing and category routing but the differences were minimal for both.
Let's close this issue for now and focus our efforts towards potentially speeding up larger bottlenecks


Uncaught TypeError: Cannot read property 'path' of undefined

[Enter steps to reproduce:] sorry. I have no idea. was not even using javascript at the time. was editing xml. - anne

...
...

Atom: 1.38.2 x64
Electron: 2.0.18
OS: Microsoft Windows 10 Pro
Thrown From: uuu-kit package 1.0.0
Stack Trace
Uncaught TypeError: Cannot read property 'path' of undefined
At C:\Users\anneb\.atom\packages\uuu-kit\lib\paths.js:5

TypeError: Cannot read property 'path' of undefined
    at getPackagePath (/packages/uuu-kit/lib/paths.js:5:84)
    at /packages/uuu-kit/lib/paths.js:7:28)
    at /packages/uuu-kit/lib/paths.js:14:27)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:147172)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:150720)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (/app.asar/static/index.js:60:45)
    at require (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:146462)
    at /packages/uuu-kit/lib/export-object.js:3:46)
    at /packages/uuu-kit/lib/export-object.js:29:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:147172)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:150720)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (/app.asar/static/index.js:60:45)
    at require (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:146462)
    at /packages/uuu-kit/lib/main.js:10:43)
    at /packages/uuu-kit/lib/main.js:125:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:147172)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:150720)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (/app.asar/static/index.js:60:45)
    at require (internal/module.js:11:18)
    at customRequire (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:1:688769)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.38.2/resources/app/static/<embedded>:11:3550661)

Commands

Non-Core Packages
kite 0.165.0
uuu-kit 1.0.0

Interesting. was a simple error thrown or did it also crash Atom too?

I think it might have crashed Atom. I did one of those sounds good let’s try it – with no setup or preparation. And then disabled it. But since I got the strange error message I thought I should tell you.  As usual didn’t have time to fiddle with it, it’s on my list.
Thanks
Anne
From: Benjamin Gandhi-Shepard<EMAIL_ADDRESS>Sent: Wednesday, July 3, 2019 12:28 PM
To: brownerd/uuu-kit<EMAIL_ADDRESS>Cc: Leila Anne Breene<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [brownerd/uuu-kit] Uncaught TypeError: Cannot read property 'path' of undefined (#17)
Interesting. was a simple error thrown or did it also crash Atom too?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/brownerd/uuu-kit/issues/17?email_source=notifications&email_token=AE5MPYMC74MOODHMGEVIGQ3P5THSDA5CNFSM4H3C33ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZE7S2Y#issuecomment-508164459, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AE5MPYKTJWUQJYJY7YNMGQDP5THSDANCNFSM4H3C33ZA.

ok. lots of weird things to debug. I think a change to the atom api broke a function. either way it should be working fine now. let me know if you have any problems


Update projects

Updates mentor list of project coala.

I approve since @aptrishu has write access to coala and mentoring Google Code-in too.

Added in #123


Invalid memory access when sending data inside a struct's initialize

require "http/client"

struct Hello
  @websocket : HTTP::WebSocket

  def initialize
    @websocket = HTTP::WebSocket.new("wss://echo.websocket.org")

    spawn { @websocket.run }

    Fiber.yield

    # This causes the invalid memory access:
    @websocket.send("Hello!")
  end
end

Hello.new

Invalid memory access (signal 11) at address 0x8
[0x7f5742889126] *CallStack::print_backtrace:Int32 +118
[0x7f5742873109] __crystal_sigfault_handler +217
[0x7f57412f2890] ???
[0x7f574294d541] *HTTP::WebSocket#run:Nil +33
[0x7f5742878149] ~procProc(Nil) +9
[0x7f57428a8e23] *Fiber#run:(IO::FileDescriptor | Nil) +115
[0x7f5742872c66] ~proc2Proc(Fiber, (IO::FileDescriptor | Nil)) +6
[0x0] ???

This is fixed by making Hello a class or putting @websocket.send("Hello!") into a method.

I wonder if the pointer to self hasn't been setup yet or something, so spawn couldn't get it...
Here's another version, FWIW:
require "http/client"

struct Hello
  @a : String

  def initialize
    @a = "hello"

    spawn { puts @a }
    Fiber.yield
  end
end

Hello.new

spawn { @websocket.run } or spawn { puts @a } basically mean the captured block needs a reference to self and so self is put in the heap. It's put there by making a copy of the struct right when the method begins, point in which the struct is not initialized.
We could fix this by disallowing capturing blocks in a struct's initialize.

There's existing checks for when you initialize every ivar, so you can send self to a function in the constructor.
Looks like capturing blocks just need to be added to that.


Type error reported by @typescript-eslint/no-unsafe-return

Initial checklist

[X] I read the support docs
[X] I read the contributing guide
[X] I agree to follow the code of conduct
[X] I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected package
<EMAIL_ADDRESS>Steps to reproduce

Configure @typescript-eslint/no-unsafe-return rule in some Node.js or Next.js project (eg. Next.js App Router project)
Add Shiki example code for hast-util-to-jsx-runtime in components/CodeBlock.tsx
💥 Observe "Unsafe return of a value of type error" error with return value

Reproduction (typescript-eslint Playground)
Unsafe return of a value of type error. 12:3 - 20:6

Using a as JSX.element type assertion on the return value of toJsxRuntime() is a workaround for the issue:

Actual behavior
Error with a "type error". The type error is not observable.
Expected behavior
No error
Runtime
<EMAIL_ADDRESS>Package manager
<EMAIL_ADDRESS>Operating system
macOS Sequoia 15.1.1
Build and bundle tools
other (please specify in steps to reproduce)

Maybe related to #6 ?

This is an XY-problem. Your linter complains. The real problem is that there is a type error in hast-util-to-jsx-runtime when using it with modern JSX frameworks, which now include React 19. You’re just suppressing the type error.
This is indeed what I tried to fix in #6. As a workaround you can define the global JSX namespace yourself, do a type cast, or add an eslint-disable comment. I recommend type-casting to ReactElement.

To be clear, that's just a workaround though - does hast-util-to-jsx-runtime intend to fix this issue too?
I can't observe the actual TS type error in my editor / on the command line via tsc weirdly enough, only typescript-eslint can see it.

The JSX namespace is a special internal type to tell TypeScript how JSX works. They are obvervable to React users, but they’re not really intended for public use. In React, JSX.Element is an alias of `ReactElement.
JSX frameworks used to define the JSX namespace globally. This was really convenient for types that work with JSX in a generic manner, such as hast-util-to-jsx and @types/mdx. But over recent years all major JSX frameworks have moved away from the global JSX namespace, React being the last one with React 19.
IMO we should not rely on the global JSX namespace anymore at all, but the team is in disagreement on this. Also even if we do, the problem is hard to resolve. If we can’t rely on the JSX namespace, a lot of types internally become any/unknown.

This project depends on JSX, which is why it uses the quite useful JSX types. Type them and it works. Or don’t, then there are no types. I would really appreciate it if people talk to TS/React folks who want to go without these useful types. There are several other places where this can be discussed, and this ESLint rule isn’t it.

Thanks for the background!

This project depends on JSX, which is why it uses the quite useful JSX types. Type them and it works.

@wooorm I'm guessing that you mean ae638ba52762906fe094d74f82ba835ce23a2621, the recommendation in the Use section of the readme to use the following code:
import type {JSX as Jsx} from 'react/jsx-runtime'

declare global {
  namespace JSX {
    type ElementClass = Jsx.ElementClass
    type Element = Jsx.Element
    type IntrinsicElements = Jsx.IntrinsicElements
  }
}

It seems like it's kind of ok, but it's a lot of code for common use cases, and the error DX is not great (finding the error first of all, and then finding out that it's not a bug but a separate setup requirement - to paste code in some file).
Since there is the widespread removal of the global JSX interface, it does feel like the generic option would be slightly better - I'm guessing it would lead to code like this?
import { type JSX } from 'react';

toJsxRuntime<JSX>(...)

I'm not sure whether this was considered somewhere (maybe already in #6, if I didn't understand completely yet), but would it be possible to retrieve the type from the passed jsx function somehow instead?
So that no code would need to change, and the type is somehow retrieved from the function?
import { toJsxRuntime } from 'hast-util-to-jsx-runtime';
import { Fragment } from 'react';
import { jsx, jsxs } from 'react/jsx-runtime';

toJsxRuntime(out, {
  Fragment,
  jsx, // Type retrieved from this `jsx` function
  jsxs,
});


selectedrow color doesnot apply if I use Bootstrap4

Hi I am using styles from bootstrap 4 by adding a reference in the view

When I select a row on table it does not highlight the row to light blue like it used to do in bootstrap3.3.6
Table body tr has  aut-select="selected-class: info"
Any specific reason for this to be not workign in bootstrap4 or any plan to upgrade aurelie-table library with support for bootstrap4.

I am experiencing this as well - any update at all? I am also experiencing an issue where the styling on the pagination is not being applied.

my code identical to that of the example pagination code in the docs.

@simongroom I had the same problem with the pagination controls. It would appear the default markup doesn't use Bootstrap 4's pagination styling as @sreddim noted. Fortunately it's pretty straightforward to adapt the example of custom pagination to do so:
<aut-pagination current-page.bind="currentPage" page-size.bind="pageSize" total-items.bind="totalItems" >
    <template replace-part="pagination">

                    Previous

                    ${page.title}

                    Next

    </template>
</aut-pagination>


3192  part deux

Replaces #3192

✨ @Alhadis. Thanks for this.

No problem! :D Though it probably wouldn't hurt to have a link to the list from the site's help docs. The page that links here could also include a link to the grammars, stating where to file a report if one encounters an error with syntax highlighting... etc.

No problem! :D Though it probably wouldn't hurt to have a link to the list from the site's help docs. The page that links here could also include a link to the grammars, stating where to file a report if one encounters an error with syntax highlighting... etc.

Good call. I added it to the add grammar script but forgot about that addition. Will work on that now.

Hang on, do you mean the docs on help.github.com?

Yup, the part of GitHub that's untouchable by pull requests.

I don't know if that's within your domain or not, but I figure I should point it out all the time, since that's where a lot of confused visitors came from...

Yup, the part of GitHub that's untouchable by pull requests.

😸 understood.
So here's the thing, we actually deliberately made the help docs on help.github.com just point to this repository as most of the issues that people were having with Linguist required some assistance from people working on Linguist (and not our support team). That's why the README here reads as it does (i.e. as a troubleshooting guide). I'm going to take a stab at adding some additional docs to the README and in the longer term we should think about creating an issue template for this repository to help people open more useful issues.

OK, opened something up here: https://github.com/github/linguist/pull/3308


Custom road designs for MyPlot

Hey Jason I would like custom roads like in PlotSquard.
That you can then configure the streets as they like one the most.
Thank you for your attention!
Example: https://m.imgur.com/a/GPp0sW6

duplicate of #205


No typing error when using descontructing operator in data but runtime error

Bug description
When using the descontructing (...) operator, it is possible to pass more data than is expected in the data field without any typing error. However, you get a runtime error.
How to reproduce
Consider the following schema:
model User {
  id Int @id @default(autoincrement())
  email String
}

Doing something like this fails at runtime but not at compile time:
const input = {
  email<EMAIL_ADDRESS>  name: "sytten"
}

await prisma.user.create({
  data: {
    ...input
   }
})

It will say something like:
Unknown arg `name` in data.name for type UserCreateInput. Did you mean `email`?

Expected behavior

My preference would be to ignore additional fields because otherwise it means you basically ban the use of the ... operator for prisma (meaning a lot more verbose).
Generate a typing error for additional unexpected fields like is the case right now for fields specified directly (Object literal may only specify known properties), not sure if it is currently possible in typescript.

Prisma information
See above
Environment & setup

Prisma version: 2.22.1

The behaviour is reproducible and I agree we should loosen the validation here.

Loosening the validation could have the side effect that people expect the supplied data to be persisted - which it will not be as the fields just do not exist.

prisma looks cool and all but I was surprised this is an issue, as said by OP it means we cant use ...thing and that just make things unnecessarily verbose.
if changing the default behavior seems risky to you, what about providing an option ?
xxx.createMany({ skipDuplicates: true, ignoreAdditionalFields: true, data: yyy })


feat(vm-logs): keyword filtering

todo: add keywords to query params

Pull Request Test Coverage Report for Build 1118

91 of 113 (80.53%)  changed or added relevant lines in 6 files are covered.
20 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.09%) to 57.945%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/app/vm-logs/pipes/base-path.pipe.ts
7
8
87.5%

src/app/vm-logs/pipes/parse-timestamp.pipe.ts
8
9
88.89%

src/app/shared/services/base-backend.service.ts
1
3
33.33%

src/app/vm-logs/services/vm-logs.service.ts
23
26
88.46%

src/app/vm-logs/redux/vm-logs.reducers.ts
31
36
86.11%

src/app/vm-logs/redux/vm-logs.actions.ts
21
31
67.74%

Files with Coverage Reduction
New Missed Lines
%

src/app/vm/shared/vm-actions.service.ts
2
32.14%

src/app/shared/services/base-backend.service.ts
18
64.59%

Totals

Change from base Build 1107:
0.09%

Covered Lines:
12301

Relevant Lines:
18467

💛  - Coveralls


fix(aws-sdk-instrumentation): Patch new smithy client and middleware stack

Which problem is this PR solving?

Issue #1509

Short description of the changes

A breaking change in AWS SDK v3.363.0 renamed @aws-sdk/smithy-client to @smithy/smithy-client and @aws-sdk/middleware-stack to @smithy/middleware-stack, causing the AWS SDK Instrumentation to break for v3.363.0+ since the patched package names were changed. This change adds the new package names to the patches for the instrumentation

Confirmed new patch functionality by running npm run test-all-versions locally, which executed tests on aws-sdk v3.363.0+ (with breaking change reported in #1509) and versions < 3.363.0 (old behaviour).

amazing! 🥇


ARTEMIS-1664 fix npe bug while getting element in the process of rehash

Hi, we found a bug in ConcurrentLongHashMap, as follows:
12:32:31,000 WARN  [org.apache.activemq.artemis.core.replication.ReplicationEndpoint] 295: java.lang.ArrayIndexOutOfBoundsException: 295
at org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap$Section.get(ConcurrentLongHashMap.java:230) [artemis-commons-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap.get(ConcurrentLongHashMap.java:117) [artemis-commons-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendCommitRecord(JournalImpl.java:1185) [artemis-journal-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.journal.impl.JournalBase.appendCommitRecord(JournalBase.java:69) [artemis-journal-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendCommitRecord(JournalImpl.java:91) [artemis-journal-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.replication.ReplicationEndpoint.handleCommitRollback(ReplicationEndpoint.java:635) [artemis-server-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.replication.ReplicationEndpoint.handlePacket(ReplicationEndpoint.java:191) [artemis-server-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:638) [artemis-core-client-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:392) [artemis-core-client-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:374) [artemis-core-client-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1144) [artemis-core-client-2.4.0.jar:2.4.0]
at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:68) [artemis-core-client-2.4.0.jar:2.4.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:797) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.16.Final.jar:4.1.16.Final]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
The get thread saw doubled capacity first and at the moment values had not been assigned new values, so npe occurred. We should assign capacity after the keys and values. The volatile modifier would be needed to generate store barrier to make sure keys/values data are visible to other threads before the capacity is.

Hi, franz1981. Thanks for the review. The jira issue is ARTEMIS-1664.

@wy96f could you update your commit message with that.

@wy96f Well done, please address the changes I've proposed re lazySet and test :+1:

Please rebase this and push -f so the new Travis CI build for the PR will run. Thanks!

@jbertram i have taken @wy96f just rebased and done a PR so travis CI will build see https://github.com/apache/activemq-artemis/pull/1891
If that passes we can merge this PR (and ill close my branch of their work)

Seems first time travis build failed for unrelated reason second attempt
https://github.com/apache/activemq-artemis/pull/1892
is fine.

Sorry for the late reply. Using lazySet to update capacity filed is a good point. As for the test, I modified test as follows:
@Test
public void concurrentInsertionsAndReads() throws Throwable {
ExecutorService executor = Executors.newCachedThreadPool();
  for (int x = 0; x < 1000; x++) {
     ConcurrentLongHashMap<String> map = new ConcurrentLongHashMap<>(1, 1);

     final int nThreads = 16;
     final int N = 100_000;
     String value = "v";

     List<Future<?>> futures = new ArrayList<>();
     for (int i = 0; i < nThreads; i++) {
        futures.add(executor.submit(() -> {
           Random random = new Random();

           for (int j = 0; j < N; j++) {
              long key = random.nextLong();
              // Ensure keys are uniques
              //key -= key % (threadIdx + 1);

              map.get(key);
           }
        }));

        final int threadIdx = i;

        futures.add(executor.submit(() -> {
           Random random = new Random();

           for (int j = 0; j < N; j++) {
              long key = random.nextLong();
              // Ensure keys are uniques
              key -= key % (threadIdx + 1);

              map.put(key, value);
           }
        }));

     }

     for (Future<?> future : futures) {
        future.get();
     }

     assertEquals(map.size(), N * nThreads);
  }

  executor.shutdown();

}
Most likely, npe would occur. The test may cost a long time to trigger the bug. Is it ok to run the test for such a long time in the junit test?

@franz1981 lazySet is used to update capacity. Please review it :)

@wy96f could you rebase (it seems clebert merged my branch (which had your original code) i used for checking that the build passed in the night)
Also once rebased could you apply the same change to the Set implementation also?
As for the test having a longer running test i think is fine, just i think if it goes in as a full test suite test e.g. it wont run every PR.

Oops, i deleted the branch :( It seems not possible to reopen. I'll create a new one.

@michaelandrepearce hi, i don't get what you mean the test. Why do we need a suit test? And where should the test be put to stop from running by CI buid?

There are tests that run as part of PR and then separately there are a fuller test suite. Reason for this is the larger test suite takes much longer to complete, as such it’s run periodically or if larger changes are made. See the hackers guide for more info

@franz1981 1. I agree 2. Adding unsafe  is not trivial and lazySet is enough 3. size() is seldomly called, isn't it? 4. We can add @sun.misc.Contended in Section class, right?

@wy96f

Adding unsafe is not trivial and lazySet is enough

Probably we have already access to it thanks to io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess but it could be tricky to win the karaf validation if used, so I agree :+1:

size() is seldomly called, isn't it?

The load yes, but the store is on hot paths (eg put): dropping the cost of a volatile store/full fence could be very welcome on writer side (ig less latencies spikes while writing on the journal).

We can add @sun.misc.Contended in Section class, right

It could be tricky like using sun.misc.Unsafe directly in the code, due to the proprietary sun.misc.*, there are unglier but nonetheless effective ways to do it with plain Java too.
For example this is padding the lock fields from the one of the section using the same padding size of @Contended ie 128 bytes:
   abstract static class SectionL0Pad extends StampedLock {

      long p01, p02, p03, p04, p05, p06, p07;
      long p10, p11, p12, p13;
   }

   // A section is a portion of the hash map that is covered by a single
   @SuppressWarnings("serial")
   private static final class Section<V> extends SectionL0Pad {

Using jol it shows:
org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap$Section object internals:
 OFFSET  SIZE                                                       TYPE DESCRIPTION                               VALUE
      0    12                                                            (object header)                           N/A
     12     4                                                        int StampedLock.readerOverflow                N/A
     16     8                                                       long StampedLock.state                         N/A
     24     4               java.util.concurrent.locks.StampedLock.WNode StampedLock.whead                         N/A
     28     4               java.util.concurrent.locks.StampedLock.WNode StampedLock.wtail                         N/A
     32     4        java.util.concurrent.locks.StampedLock.ReadLockView StampedLock.readLockView                  N/A
     36     4       java.util.concurrent.locks.StampedLock.WriteLockView StampedLock.writeLockView                 N/A
     40     4   java.util.concurrent.locks.StampedLock.ReadWriteLockView StampedLock.readWriteLockView             N/A
     44     4                                                            (alignment/padding gap)
     48     8                                                       long SectionL0Pad.p01                          N/A
     56     8                                                       long SectionL0Pad.p02                          N/A
     64     8                                                       long SectionL0Pad.p03                          N/A
     72     8                                                       long SectionL0Pad.p04                          N/A
     80     8                                                       long SectionL0Pad.p05                          N/A
     88     8                                                       long SectionL0Pad.p06                          N/A
     96     8                                                       long SectionL0Pad.p07                          N/A
    104     8                                                       long SectionL0Pad.p10                          N/A
    112     8                                                       long SectionL0Pad.p11                          N/A
    120     8                                                       long SectionL0Pad.p12                          N/A
    128     8                                                       long SectionL0Pad.p13                          N/A
    136     4                                                        int Section.capacity                          N/A
    140     4                                                        int Section.size                              N/A
    144     4                                                        int Section.usedBuckets                       N/A
    148     4                                                        int Section.resizeThreshold                   N/A
    152     4                                                     long[] Section.keys                              N/A
    156     4                                         java.lang.Object[] Section.values                            N/A
Instance size: 160 bytes

While the original version layout were:
org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap$Section object internals:
 OFFSET  SIZE                                                       TYPE DESCRIPTION                               VALUE
      0    12                                                            (object header)                           N/A
     12     4                                                        int StampedLock.readerOverflow                N/A
     16     8                                                       long StampedLock.state                         N/A
     24     4               java.util.concurrent.locks.StampedLock.WNode StampedLock.whead                         N/A
     28     4               java.util.concurrent.locks.StampedLock.WNode StampedLock.wtail                         N/A
     32     4        java.util.concurrent.locks.StampedLock.ReadLockView StampedLock.readLockView                  N/A
     36     4       java.util.concurrent.locks.StampedLock.WriteLockView StampedLock.writeLockView                 N/A
     40     4   java.util.concurrent.locks.StampedLock.ReadWriteLockView StampedLock.readWriteLockView             N/A
     44     4                                                        int Section.capacity                          N/A
     48     4                                                        int Section.size                              N/A
     52     4                                                        int Section.usedBuckets                       N/A
     56     4                                                        int Section.resizeThreshold                   N/A
     60     4                                                     long[] Section.keys                              N/A
     64     4                                         java.lang.Object[] Section.values                            N/A
     68     4                                                            (loss due to the next object alignment)
Instance size: 72 bytes

Anyway before doing anything would be necessary to measure any benefits by adding something like that.
Our current use case for this collection is on the journal ie "mostly" single writer: the original collection was meant to be used on multiple writers scenarios and probably it could benefit from this technique.

I would be careful of over optimizing this. They let reason for the use of this class was to reduce the long autoboxing. It’s used throughout the code base where concurrent hash map used to be.
It comes also from Bookkeeper where it’s heavily used.
I think we have bigger fish to fry in artemis than over optimizing this.

@michaelandrepearce Agree about aggressive optimisations but not on volatile operation's: isn't the volatile read that cost but the volatile store that include an hidden cost a of a full barrier on x86 , to be paid   on hot paths and even if in contended. Dropoing it using lazySet or a plain store (for size) from the functional point of view it really can't introduce any new bugs, but is clear that is an implementation error from who has written the original class.

@franz, agreed volatile hit is on the write wy96f only changed the capacity to be volatile and changed the order they’re set to fix a bug. this only changes when the map is resized not every put. (Note size was already volatile)
As such it fixes the bug. If you , I or wy96f wants to further optimize that then that’s fine but I think that should be separate case to the functional bug. And obviously should be on its own merits.

@michaelandrepearce Yes agree :+1:
I've performed a couple of benchs and that's what I'm getting (reusing this benchmark: ):
master:
ConcurrentLongHashMapThroughput.randomGetPutRemove           50       100000  thrpt   60  26906004.642 ± 1014602.753  ops/s

plain load size:
ConcurrentLongHashMapThroughput.randomGetPutRemove           50       100000  thrpt   60  29136460.289 ± 604244.629  ops/s

IMO it worths to be pushed as a separate PR as you suggested

@franz1981  Hi, I'm a little puzzled about padding technique. In your example, i know that stampedLock fileds are in different cache lines for different sections but fields like capacity, size, etc can be in the same cache line with the next section's stampedLock fields. So the thread will clash with other threads and cause cache invalidations, is it right?

@wy96f

In your example

My example was just to show the method used to perform a padding with an existing abstract class, has not values from the perf purposes: sorry, my mistake to not have specified it at first :P

i know that stampedLock fileds are in different cache lines for different sections

For any of these reasonings consider 2 facts:

false sharing must not  be considered between cache lines but on prefetching size basis (ie 128 bytes == 2 cache lines)
the GC could arbitrarly choose to scatter Section instances on the heap in an order different from Section[] ie it is a GC implementation detail, although it is mostly true in this case

Hence, it would be great to protect each Section fields from any surrounding part of the heap that could invalidate its fields cache lines for any reasons: it could be another Section (what is likely to happen)  or any "living" instance the GC has chosen to move near to them.
In our case that could happen but probably it is more necessary to be "fixed" in the original class of Bookkeeper, that's more general purpose.

@wy96f If you want to take a look/review the code I have pushed https://github.com/apache/activemq-artemis/pull/1895 to improve the volatile usage witht the results I've attached in the above comments


Update example to use SecurityFilterChain

Change the example to reflect the changes according to https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter

Fixed in a subsequent commit.


OCM-10506 | test: automated cases id:73638

`jfrazier@jfrazier-mac  ~/workspace/rosa   jf_73638 ±  ginkgo run -focus 73638 tests/e2e
Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
Ginkgo CLI Version:
2.11.0
Mismatched package versions found:
2.17.1 used by e2e
Ginkgo will continue to attempt to run but you may see errors (including flag
parsing errors) and should either update your go.mod or your version of the
Ginkgo CLI to match.
To install the matching version of the CLI run
go install github.com/onsi/ginkgo/v2/ginkgo
from a path that contains a go.mod file.  Alternatively you can use
go run github.com/onsi/ginkgo/v2/ginkgo
from a path that contains a go.mod file to invoke the matching version of the
Ginkgo CLI.
If you are attempting to test multiple packages that each have a different
version of the Ginkgo library with a single Ginkgo CLI that is currently
unsupported.
Running Suite: ROSA CLI e2e tests suite - /Users/jfrazier/workspace/rosa/tests/e2e
Random Seed:<PHONE_NUMBER>
Will run 1 of 171 specs
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS•SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Ran 1 of 171 Specs in 25.550 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 170 Skipped
PASS
Ginkgo ran 1 suite in 30.93282275s
Test Suite Passed`

/lgtm


Add homebrew update to fix macos build.

The Travis macOS image doesn't automatically update homebrew, and its p7zip record has a URL that has recently become invalid. This makes all our macOS builds fail to install 7zip, which in turn makes them fail to publish the built package. This PR fixes that by telling homebrew to update.

Thanks for the pull request @kring!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium for Unreal Samples works.


Can you make a release

We might need nix 2.18.8 and 2.24.8, see https://discourse.nixos.org/t/nix-2-24-8-released-fixing-builtin-fetchurl-credentials-leak-severity-5-9-moderate/52732

https://github.com/nixbuild/nix-quick-install-action/releases/tag/v29


VersionBot: Don't mention repository.yml in errors when no repository.yml exists

See the conversation in https://github.com/resin-io/resin-ssh-keys/pull/44
The commit in that PR was missing a Change-type:  footer-tag, and VersionBot then displayed a
Versionist — Missing or forbidden tags in commits, see `repository.yml`

failing status-message, which is a bit confusing when the https://github.com/resin-io/resin-ssh-keys repo doesn't actually have a repository.yml file!

This is especially a problem for PRs from external contributors.
Something like "PRs must include a 'Change-Type: patch/minor/major' footer" would be understandable I think, but as is they get a message that's definitely not going to make sense, and they're stuck. Example: http://github.com/resin-io/docs/pull/653


Limit amount of buffered data and specify planes to be analyzed

Limits size of buffer of telescope data which is needed in case time between triggers is too long. Data with timestamps older than actual timestamp minus maximum buffer time slip will be dropped.
Select telescope planes to be analyzed. Not every time all 6 planes (default) are available.

@laborleben These are the changes as discussed yesterday. Just merge if you are fine with that.

Can you test, please?

@YannickDieter active_m26_planes -> analyze_m26_header_ids

All checks are passing. There is still a bug in test_interpreter.py:create_raw_data().
Data file are identical before and after changes. Note that the column plane now contains the header ID.


Adding note that CAE is not yet enabled in GCCH

Adding note that CAE is not yet enabled in GCC high.
This is confirmed by the following ICM:
https://portal.microsofticm.com/imp/v3/incidents/details/284126506/home

@jofried : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#label:"aq-pr-triaged"

Moved higher in the doc at the end of intro and not in box. Linked to PR above.


Add palette-modal icon; an indicator that a PaletteMenuItem has a modal

Feature page:  http://wiki.sugarlabs.org/go/Features/Replace_GtkMenu

@samdroid-apps, Maybe we should use "..." in the label when a modal dialog will be opened. This is a convention used in other environments.

@godiard In all of the designs on the wiki they use an arrow http://wiki.sugarlabs.org/go/Design_Team/Designs/Frame http://wiki.sugarlabs.org/go/Design_Team/Designs/Journal#mediaviewer/File:Journal-04.jpeg.  It looks very simple and refined and still portrays that there is something coming after clicking the button.
That's my opinion, but happy to change if needed :smile:

@samdroid-apps, used arrows because used submenus :)

Gnome uses arrows to indicate many different non-submenu things:

So does Firefox:

And iOs:


More precisely target cell when editing List

Hi, is there a way to more precisely "target" a specific cell in a List?
For example, in a List like this:

To get the value of the "Type size" cell in row 1, I would do something like this in my editcallback:
selectedIndex = self.w.myList.getSelection()[0]
newSize = self.w.myList[selectedIndex]["typeSize"]

vs. something like this, if possible:
selectedCellIndex = self.w.myList.getCell()

Thanks!

There is a lot going on in the middle between your list of dictionaries and the vanilla List.
cells are just representation of data... they aren't the real item from your list. A cell is also reused over and over again in the list view (a NSTableView).
I make a convenience method in the my controller to get the selected item of a vanilla List. This can be used inside a edit callback but also elsewhere
good luck

ah, good to know. I just thought I was missing out on something.
thanks as always for the help!


Add If-None-Match, ETag support to all GET/HEAD requests

The ETag is based on the content of the response, which still needs to be generated, so this does not reduce database load for requests.
Instead, the idea is to save some bandwidth for users just clicking around or staring at the auto-refreshing homepage, without having to guess a useful cache duration for dynamic content.
Some cooperating crawlers like Googlebot should also be able to take advantage of the header.

The feature is live & already saving bandwidth and milliseconds! Super cool.


Add script to ensure all array inputs are ReadonlyArray

To ensure this library is compatible with ReadonlyArrays, write a script that verifies all the inputs in the public declarations are ReadonlyArrays.

This is good enough for now.


Merge candidate regions

We need to merge candidate regions that are within a certain distance from each. For a thorough background/explanation of this problem, see https://github.com/mbhall88/head_to_head_pipeline/issues/53#issuecomment-694036442.
I guess a good starting default for the value of the distance would be k + 1

I have implemented this in #234 and am in the process of evaluating it. One thing that has become apparent though is that we are very likely going to need to resurrect #163


Update version: miurahr.aqtinstall version 3.1.5

Pull request has been created with Komac v1.6.0 :lemon:
Publisher added signed executables to this release.
Microsoft Reviewers: Open in CodeFlow

This package is expecting arguments:
usage: aqt [-h] [-c CONFIG]
           {install-qt,install-tool,install-doc,install-example,install-src,list-qt,list-tool,list-doc,list-example,list-src,install,tool,doc,examples,src,help,version}
           ...

Another unofficial Qt Installer.
aqt helps you install Qt SDK, tools, examples and others

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Configuration ini file.
...

This package is expecting arguments:

I'm a bit confused - isn't that expected for a CLI?

@wingetbot waivers Add Validation-Executable-Error

This package is expecting arguments:

I'm a bit confused - isn't that expected for a CLI?

It might be returning a non-zero exit code, due to lack of arguments. I think there might be a Commands field in the manifest to supply these. I try to note these, for future reference, when giving a waiver.


Water interrupts the travel anchor

You cannot see the travel anchor if water is in the way.

Minecraft version: 1.10.2
Forge version: <IP_ADDRESS>2 (latest for 1.10.2)
Ender IO version: 3.1.180 (latest for 1.10.2)
EnderCore version: <IP_ADDRESS>-beta (latest for 1.10.2)

Do you use Optifine or a shaders mod?

You can probably tell from the screenshots that I don’t use a shaderpack, but I do use OptiFine; however, direwolf20 encountered the same problem in his let’s play series, and he doesn’t use OptiFine, so it’s not an OptiFine issue.

Verify that the issue is still persisting after you removed Optifine.

Did you not read my comment?

I just proved that the issue occurs when not using OptiFine, though.

Citing DW20 and whether or not he uses Optifine is not a prove.
Or did you actually test without Optifine installed?

TE culling in Forge for 1.10.2 is very broken, this and all other tickets about travel anchors going out of sight randomly will have to wait for 1.11.

Citing DW20 and whether or not he uses Optifine is not a prove.

I know that he doesn’t use OptiFine. I won’t go through the trouble of uninstalling and reinstalling OptiFine, because I know that OptiFine isn’t the cause of this bug.

TE culling

What does that mean?

this and all other tickets about travel anchors going out of sight randomly will have to wait for 1.11.

So does that mean that this won’t be fixed in the 1.10.2 version of Ender IO?

@HenryLoenwind Can you please reply?


Investigate impact of changing web3_clientVersion response

Previously we reported a web3_clientVersion string containing: Hardhat & ethereumJS version. Now we're returning EDR and revm versions. What will the impact of this change be on Hardhat users? Is anyone actively using this API?
Definition of Done

An analysis of impact on the Hardhat ecosystem
Potential mitigation strategy

We discussed this with @fvictorio and settled on monkey patching the value returned by EDR in Hardhat to create version strings like<EMAIL_ADDRESS>https://github.com/NomicFoundation/hardhat/blob/8ddd066e902cac3e3689a2db50e557e76fad993b/packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts#L516


varlink: BuildImage() crashes podman if 'more' flag isn't set

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description

Steps to reproduce the issue:

Make a tarball of any image that would succeed at podman build

Call varlink API without more flag:
varlink call unix:///run/podman/io.podman/io.podman.BuildImage '{"build":{"contextDir":"/tmp/dipod-build531627851","dockerfiles":["Dockerfile"]}}'

Describe the results you received:
varlink client prints:
Connection closed.

podman panics and crashes:
panic: runtime error: slice bounds out of range

goroutine 172 [running]:
bytes.(*Buffer).readSlice(0xc000308720, 0xc00009c10a, 0xc000070000, 0x1, 0x0, 0x0, 0xc000070060)
	/usr/local/go/src/bytes/buffer.go:419 +0x10a
bytes.(*Buffer).ReadString(...)
	/usr/local/go/src/bytes/buffer.go:438
github.com/containers/libpod/pkg/varlinkapi.(*LibpodAPI).BuildImage(0xc0004041e0, 0xc00047c120, 0xc0004821c0, 0xc000160000, 0xc000258040, 0xc0004c8020, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/varlinkapi/images.go:227 +0xd73
github.com/containers/libpod/cmd/podman/varlink.(*VarlinkInterface).VarlinkDispatch(0xc00040a0d0, 0xc00047c120, 0xc0004821c0, 0xc000160000, 0xc000258040, 0xc0004c8020, 0x0, 0xc00049614a, 0xa, 0xc000032000, ...)
	cmd/podman/varlink/iopodman.go:6709 +0x2ace
github.com/varlink/go/varlink.(*Service).HandleMessage(0xc0000d4580, 0xc000160000, 0xc00047c120, 0xc0004821c0, 0xc00011e000, 0x80, 0x81, 0xc00040f740, 0xc000169780)
	vendor/github.com/varlink/go/varlink/service.go:112 +0x266
github.com/varlink/go/varlink.(*Service).handleConnection(0xc0000d4580, 0x1b602a0, 0xc000518000, 0xc00045cfc4)
	vendor/github.com/varlink/go/varlink/service.go:136 +0x1f7
created by github.com/varlink/go/varlink.(*Service).Listen
	vendor/github.com/varlink/go/varlink/service.go:290 +0x1e4

Describe the results you expected:
Expected some sort of provisional/in-progress response + podman not to crash.
Additional information you deem important (e.g. issue happens only occasionally):
Setting more flag (-m) prevents the crash.
Output of podman version:
Version:            1.4.5-dev
RemoteAPI Version:  1
Go Version:         go1.12.4
OS/Arch:            linux/amd64

Output of podman info --debug:
debug:
  compiler: gc
  git commit: ""
  go version: go1.12.4
  podman version: 1.4.5-dev
host:
  BuildahVersion: 1.9.2
  Conmon:
    package: Unknown
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.0.0-dev, commit: 6f177c68ed989a6cc14ddbf8cec421819bb46401'
  Distribution:
    distribution: ubuntu
    version: "19.04"
  MemFree: 386330624
  MemTotal:<PHONE_NUMBER>
  OCIRuntime:
    package: 'cri-o-runc: /usr/bin/runc'
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree:<PHONE_NUMBER>
  SwapTotal:<PHONE_NUMBER>
  arch: amd64
  cpus: 4
  hostname: eric-ubuntu
  kernel: 5.0.0-17-generic
  os: linux
  rootless: false
  uptime: 7h 38m 24.3s (Approximately 0.29 days)
registries:
  blocked: null
  insecure: null
  search: null
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 29
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 66
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Additional environment details (AWS, VirtualBox, physical, etc.):
Physical Ubuntu box.

Thank you for fixing this :+1:


Use unique symbol for well-known symbols

Expected behavior:
interface SymbolConstructor {
    readonly iterator: unique symbol;
}

Actual behavior:
interface SymbolConstructor {
    readonly iterator: symbol;
}

@rbuckton thoughts?

If we do this update, we need a fix like #20018.

We can't fix this in the core library because of NodeJS, Core-JS, ES6-Shim, etc. also defining these as symbol. I hope to get "lib" references in soon so that we can change NodeJS et. al. to reference the definitions in lib.es2016.symbol.wellknown.d.ts and then make this change.

@rbuckton lib references are in, what should we do here?

We unfortunately run into collisions in type definitions for packages like NodeJS that forward-declare some symbols. #26568 would help us to get to the point where the NodeJS type definitions could use /// <reference lib="..." /> without breaking in older versions of the compiler.

#24738 fixes this gracefully with older versions of the node.d.ts by just assuming that if you wrote symbol under the global SymbolConstructor you meant to say unique symbol.

#24738 fixes this gracefully with older versions of the node.d.ts by just assuming that if you wrote symbol under the global SymbolConstructor you meant to say unique symbol.

I know we considered this, but it was more of a workaround. We need something like #26568 for other reasons and its more maintainable going forward.

That won't really help the community upgrade, though - they'll be forced to try and update their entire type heirarchy to depending on the latest version of all the declaration files. The workaround has the advantage that older declaration files continue to work (and continue to work with older versions of TS) and can be updated as needed.

they'll be forced to try and update their entire type heirarchy to depending on the latest version of all the declaration files.

This is usually the case when types are updated in a dependency. On definitely typed there are only a handful of packages that introduce this kind collision, which we can address easily enough once #26568 has landed in a development build. I'm not saying that the symbol to unique symbol workaround might not still be needed, but its possible it won't be.

Sorry for being a bother, but now that #26568 has been merged, is it possible to revisit this for TS 3.1?

https://github.com/microsoft/TypeScript/pull/24738 would fix this in a manner that’s compatible with old .d.ts files.

Looks like this is a blocker to define correct Array::concat signature.
The Array::concat decides whether they should spread the argument based on Symbol.isConcatSpreadable
But Symbol.isConcatSpreadable is a symbol currently.
The incorrect code below passed the type check currently
const a: number[][] = [[0]]
const b: number[][] = a.concat([0])

Looks like this is a blocker to define correct Array::concat signature.
The Array::concat decides whether they should spread the argument based on Symbol.isConcatSpreadable
But Symbol.isConcatSpreadable is a symbol currently.
The incorrect code below passed the type check currently
const a: number[][] = [[0]]
const b: number[][] = a.concat([0])


Space leak?

I've used unagi-chan in for around a year on a couple of projects. I had always noticed climbing memory usage generally but never needed to track down why. A few weeks ago, that changed and I needed to track down our space leak. Sadly, all signs pointed to unagi-chan as the culprit and once purged from the app the leak disappeared. I've replicated the issue we were seeing in a fork as I was hoping to that added profiling flags to the base library could get better insights into what is going on.
https://github.com/buckie/unagi-chan/tree/bug/spaceleak
This, sadly, didn't work. It seems that there's too much inlining without SCC annotations to get a good look at the root cause.
The replication creates 10k large-ish byte strings, put's them on a channel, read's half (summing their length), performs a major GC, reads the rest, performs another major GC. This is done as one thread and then as two. I've included the ps files in the repo plus a couple scripts to replicate the environment and make running the tests easier.

I've done some other tests as well, where the reader thread outruns the writer thread, and those show the expected flat (or pyramid-ish because I drained half, thread delay 1s, drain the rest) memory usage. My interpretation of the results is that memory isn't being allowed GC unless the channel is fully empty.

Thanks for the report!

Hey @buckie I've just started looking at this, and maybe I'm being dense: aren't you just allocating a bunch of bytestrings during the upward slopes and then consuming them during the (very steep) downward slopes? The expected residency for the bytestrings you allocate in createAndWriteMsgs would seem to be what's expected at first glace for -hm and -hc; I'm not sure how to interpret retainer profiles yet.

I think that your interpretation is correct, feel free to close this. Though I have run into space leaks with unagi-chan (or specifically I had a leak that I thought it caused and the leak went away when I replaced it with Chan) this is not a proper replication of the problem.
I added a prime-sieve to mark the end of parts of the code and got the asymmetric triangle (gradual slope up, steep slope down with a step 1/2 way through) with a step on the right that I was expecting to see. Do you know what the x-axis for profiling means (or can you point me at docs for it?) because it's certainly not real-time seconds otherwise thread delay would have helped clear this up (as I thought it was).
Sorry for the inconvenience and my failure to replicated the issue I saw before.

Do you know what the x-axis's "seconds" means for profiling?

Huh, I guess I always assumed it was wall-clock time!

Sorry for the inconvenience and my failure to replicated the issue I saw before.

No problem at all. I really appreciate the effort you put into repro-ing this. And if you have time to open another ticket when you can track down the leak you were observing, that would be greatly appreciated!


User options

Not auto-scroll in guess list

done... not sure what more options are reasonable so open specific for those when they appear


docker-compose command failing

Hello! I'm facing this issue while running docker-compose build command:

Step 7/13 : RUN go run github.com/prisma/prisma-client-go generate --schema=/app/scripts/prisma/schema.prisma
 ---> Running in 6ea99da5dd8b
# github.com/prisma/prisma-client-go
/go/pkg/mod/github.com/prisma/prisma-client-go@v0.2.0/generator.go:43:6: undefined: errors.Is
note: module requires Go 1.13

Probably, the Go version from the Dockerfile is not compatible with the Prisma version.

Hi @KarineValenca!
I'll take a look at this.

Hi @KarineValenca!
I'll take a look at this.

Fixed this. =)

Fixed this. =)


Feature request: add Read and Write instances for None.type

It would be nice to have build-in Read[None.type] and Write[None.type] instances that would be enabled by default (similar to Read[Unit], etc) with the following behavior:

Write[None.type] simply sets/updates a column to SQL NULL;
Read[None.type] gets a column value and either returns None if the column is SQL NULL or fails if it is not.

Why?
Currently the behavior is inconsistent between Option[A] and None.type types, e.g.:
scala> sql"SELECT 12, null, 34".query[(Int, Option[Int], Int)].unique.quick.unsafeRunSync()
  (12,None,34)

scala> sql"SELECT 12, null, 34".query[(Int, None.type, Int)].unique.quick.unsafeRunSync()
doobie.util.invariant$NonNullableColumnRead: SQL `NULL` read at column 2 (JDBC type Integer) but mapping is to a non-Option type; use Option here. Note that JDBC column indexing is 1-based.
  at doobie.util.Get.unsafeGetNonNullable(get.scala:29)
  at doobie.util.Read$.$anonfun$fromGet$1(read.scala:74)
  at doobie.util.Read$.$anonfun$fromGet$1$adapted(read.scala:74)
  at doobie.util.LowerPriorityRead.$anonfun$product$1(ReadPlatform.scala:31)

Since None is a subtype of Option these two queries are expected to work in the same way, but in fact they don't.
Use case
However, if the behavior was consistent, it could come in handy for some specific scenarios. For example, consider two queries that produce similar records that differ in just one column that is either guaranteed to be non-null for the first query and always null for the second one. In such a case it may make sense to re-use a single ADT for both queries (especially if it runs pretty big):
case class Foo[B <: Option[Int]](a: Int, b: B, c: String)

Having that, we could do the following:
sql"SELECT a, b, c FROM foo WHERE b IS NOT NULL".query[Foo[Some[Int]]]....
sql"SELECT a, b, c FROM foo WHERE b IS NULL".query[Foo[None.type]]....

That way we could get strictly typed values of Foo[Some[Int]] and Foo[None.type] independently of each other and either process them separately (when necessary) without doing any further runtime checks (b.isEmpty, etc) OR process them all together as a type widened to Foo[Option[Int]]:
// This method requires that `foo.b == None`
def processFooNone(foo: Foo[None.type]) = ???
// This method requires that `foo.b` is defined
def processFooSome(foo: Foo[Some[Int]]) = ???
// This method is `foo.b`-agnostic
def processFooBoth(foo: Foo[?]) = ???

Actual behavior
Currently, however, None values are treated as a product with arity 0 and therefore they behave similar to Unit (which is not great, because we already have Unit for that, don't we?)
Note that Some-type values do work correctly already because they are treated as products with arity 1 and therefore do not accept SQL NULL values in query results, which is expected:
scala> sql"SELECT 123, 456, 789".query[(Int, Some[Int], Int)].unique.quick.unsafeRunSync()
  (123,Some(456),789)

scala> sql"SELECT 123, null, 789".query[(Int, Some[Int], Int)].unique.quick.unsafeRunSync()
doobie.util.invariant$NonNullableColumnRead: SQL `NULL` read at column 2 (JDBC type Integer) but mapping is to a non-Option type; use Option here. Note that JDBC column indexing is 1-based.
  at doobie.util.Get.unsafeGetNonNullable(get.scala:29)
  at doobie.util.Read$.$anonfun$fromGet$1(read.scala:74)

Besides
Circe the library offers proper support for encoding/decoding None.type already:

scala> import io.circe.syntax.*, io.circe.generic.auto.*
import io.circe.syntax._
import io.circe.generic.auto._

scala> case class Foo[B <: Option[Int]](a: Int, b: B, c: String)
class Foo

scala> val fooNone = Foo(123, None, "abc")
val fooNone: Foo[None.type] = Foo(123,None,abc)

scala> val fooSome = Foo(456, Some(789), "def")
val fooSome: Foo[Some[Int]] = Foo(456,Some(789),def)

scala> fooNone.asJson
val res6: io.circe.Json =
{
  "a" : 123,
  "b" : null,
  "c" : "abc"
}

scala> res6.as[Foo[None.type]]
val res7: io.circe.Decoder.Result[Foo[None.type]] = Right(Foo(123,None,abc))

scala> res6.as[Foo[Some[Int]]]
val res8: io.circe.Decoder.Result[Foo[Some[Int]]] = Left(DecodingFailure at .b: Int)

scala> fooSome.asJson
val res9: io.circe.Json =
{
  "a" : 456,
  "b" : 789,
  "c" : "def"
}

scala> res9.as[Foo[None.type]]
val res10: io.circe.Decoder.Result[Foo[None.type]] = Left(DecodingFailure at .b: Got value '789' with wrong type, expecting null)

scala> res9.as[Foo[Some[Int]]]
val res11: io.circe.Decoder.Result[Foo[Some[Int]]] = Right(Foo(456,Some(789),def))

Although I haven't seen this use case in the wild it makes sense to me - perhaps something to add post 1.0 since it can be added without affecting binary compatibility.
The issue you specified in Why? section should be fixed in 1.0-RC6 (or the upcoming RC7 release), since I made the base case derivation require at least a Tuple1 (or A :: HNil), instead of the previous HNil.


Bookstore: add reducers and actions

Tasks accomplished on this PR

Redux directory is created on the src folder
Define a slice of state for books and categories

This pull request is removed


How to get parameter binding in .NET with an array of arguments/parameters?

In PowerShell Editor Services, the debugger can pass us the path to a script and any arguments to use with it, like:
{
    "script": "C:\\Users\\me\\script.ps1",
    "args": [
        "-Param1",
        "foo",
        "-Param2",
        "bar"
    ]
}

Then in .NET, we need to pass those through to a PowerShell object to run the script.
Unfortunately, we don't seem to have a way to provide a script path as a command and an array of arguments to bind to it.
The options I can see are AddCommand(script) and then us having to recreate the parameter binding algorithm to decide when to use AddParameter("switch"), AddParameter("parameter", "argument") and AddArgument("arg"). This isn't possible in general though, since we must know which parameters are switch parameters on the script to do this correctly.
So then we're forced to use AddScript and use some string templating:
$"& '{scriptPath.Replace("'", "''")}' {string.Join(" ", args)}"

This has some serious drawbacks:

Injection becomes a possibility
Some arguments need escaping and others don't. Parameters shouldn't be escaped, but we don't actually know what's a parameter or not (that's what parameter binding works out).
The actual command execution stack now has an extra script layer in it, which isn't a nice artefact when debugging

Is there a better way? It would be nice if we could effectively array-splat from .NET.

Unfortunately, you can't just do:
$a = @('-module','microsoft.powershell.utility','-name','invoke-restmethod')
get-command @a

as it all becomes positional.

You could look though each and follow these rules

If it starts with - it's a parameter key
If the next arg also starts with - the value from before is $true (it's a switch) and this is a new parameter key
If it doesn't start with - it's a value

If the previous is a parameter key use this as the value
Else it's a positional argument and use AddArgument

Definitely not simple as you need to look ahead before determining whether something is a switch or a parameter with a value.

What is called for is a way to expose what is already implemented as part of the -File CLI parameter: a way to take an array of verbatim tokens and apply PowerShell's usual parameter binding to them.
That is, the SDK (the PowerShell class) needs something like an .AddParametersFromVerbatimTokens() method.

You could look though each and follow these rules

Yes I thought about that. But:
Get-ChildItem -Recurse ./dir

We're forced to know the specifics of the command's parameters, which puts us into full parameter binding territory

We're forced to know the specifics of the command's parameters

Ahh yes I didn't think about that unfortunately, sorry for the extra noise.

sorry for the extra noise.

No not at all -- appreciate the help! I very nearly implemented what you suggested, but then was lucky to hit upon that counterexample.

Here is a code for -File scenario
https://github.com/PowerShell/PowerShell/blob/2f0cc3b0f82e0e07e693db90daca39adb2caf591/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs#L1852-L1881
initialCommandArgs comes from CommandLineParser
https://github.com/PowerShell/PowerShell/blob/2f0cc3b0f82e0e07e693db90daca39adb2caf591/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs#L1168-L1210
This could work for the json scenario too.

@rjmholt This can't work because editor services is not giving you enough information to correctly invoke the command. For example, you don't know if "-param1" is a formal parameter or a string argument. You need a richer API with some kind of extra Metadata in the args collection for this to be possible.

The functionality exists, as part of the CLI's -File parameter, and @iSazonov has thankfully pointed to the relevant source-code location.
What's needed is to bring this functionality to the SDK.
To revise and extend my previous suggestion:

Add a new .Add*()  method for "baked in" arguments, to complement the existing .AddParameters() method(s):

// Accept a list (array) of strings to be interpreted as named arguments, as by the CLI's -File parameter.
public System.Management.Automation.PowerShell AddRawParameters (
  System.Collections.Generic.IList<string> rawParameters
);

Add new .InvokeWith*() methods that parallel the .Add*Parameters() ones, for repeatable calls with different per-call arguments, as previously discussed in https://github.com/PowerShell/PowerShell/issues/15004#issuecomment-799653120  (I'm leaving out overloads with the other parameters / generic return values supported by .Invoke(), the number of which could be reduced with optional parameters):
// positional arguments
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> InvokeWithParameters (
  System.Collections.IList parameters)
);

// named arguments
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> InvokeWithParameters (
  System.Collections.IDictionary parameters
);

// raw string tokens to be interpreted as named arguments, as by the CLI's -File parameter.
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> InvokeWithRawParameters (
  System.Collections.Generic.IList<string> rawParameters)
);

Conceptually though I have an array of tokens or command elements.
Between the parser and the compiler, the parser just decides whether something is a parameter name or not based on whether it begins with - (which seems like a reasonable way to go), but doesn't try to associate arguments to parameters:
https://github.com/PowerShell/PowerShell/blob/2f0cc3b0f82e0e07e693db90daca39adb2caf591/src/System.Management.Automation/engine/parser/Parser.cs#L6536-L6576
Instead, it creates a command element array and gives that to the compiler:
https://github.com/PowerShell/PowerShell/blob/2f0cc3b0f82e0e07e693db90daca39adb2caf591/src/System.Management.Automation/engine/parser/Compiler.cs#L4142-L4172
And then that array is interpreted by PowerShell at runtime:
https://github.com/PowerShell/PowerShell/blob/2f0cc3b0f82e0e07e693db90daca39adb2caf591/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs#L164-L188
I do understand what you're saying @BrucePay, that the tokeniser/parser theoretically does this classification work. I guess I'm saying that I'm happy to provide that step in a dumb way (essentially by providing a CommandParameterInternal[] array), so I can go halfway but still reuse PowerShell's logic to associate parameters with arguments.

Thanks for the deep dive, @rjmholt. Do you see any problems with / do you have suggestions regarding the proposed API surface?

One problem could potentially be how this is exposed for pipelines run in a remote runspace. I don’t think there is any parsing done locally for this case as the command/script is sent to the remote alongside any parameters as a list of name/value pairs (arguments just being values without a name). Adding such an API would have to raise an exception if run on

I don’t think there is any parsing done locally for this case as the command/script is sent to the remote alongside any parameters as a list of name/value pairs (arguments just being values without a name). Adding such an API would have to raise an exception if run on a pipeline attached to a remote runspace.

I'm guessing that's a problem that PowerShell.AddParameter() has already had to solve, since you can attach a remote runspace to such an object.

Do you see any problems with / do you have suggestions regarding the proposed API surface?

I don't want to go too far into things, but it feels like we need to use some kind of object here to say "this is a parameter name" and "this is a value". That's kind of the point we have to get it to to integrate with existing functionality. Perhaps PowerShell should do that though, I don't know.
I think we'd need a proof of concept to really explore it further. I mainly opened the issue as a dual question/suggestion, to see if any alternative approaches existed and also if anyone else had this desire.

I'm guessing that's a problem that PowerShell.AddParameter() has already had to solve

Not really, AFAIK these are just sent verbatim. The raw CLIXML message that contains the pipeline commands/scripts looks somewhat like this
<Obj RefId="3">
  <MS>
    <S N="Cmd">script or command to run, IsScript states which of the 2 this is</S>
    <B N="IsScript">true</B>
    <Nil N="UseLocalScope"/>
    <Obj N="MergeMyResult" RefId="4">some values here that don't matter to this issue</Obj>
    <Obj N="MergeToResult" RefId="5" />
    <Obj N="MergePreviousResults" RefId="6" />
    <Obj N="MergeError" RefId="7" />
    <Obj N="MergeWarning" RefId="8" />
    <Obj N="MergeVerbose" RefId="9" />
    <Obj N="MergeDebug" RefId="10" />
    <Obj N="Args" RefId="11">
      <TNRef RefId="0"/>
      <LST>
        <!--This is an argument, i.e. no Name just a value-->
        <Obj RefId="7b">
          <MS>
            <Nil N="N"/>
            <S N="V"></S>
          </MS>
        </Obj>
        <!--This is a parameter, i.e. Name with a value, switches just use a boolean value-->
        <Obj RefId="7b">
          <MS>
            <S N="N">ParameterName</S>
            <S N="V">parameter value</S>
          </MS>
        </Obj>
      </LST>
    </Obj>
  </MS>
</Obj>

So regardless of whether .AddArgument() or .AddParameter() is used the raw CLIXML message still needs to know whether it's a positional argument or parameter which as you've said cannot be gleamed without reading the parameter definition and becoming your own binder. This is why the proposed method would require one of the 2 things to happen to support remote invocations

An exception saying this only works for local stuff where it can utilise the builtin binder to determine whether it's a positional argument or parameter to build the internal info
An extension to the CLIXML that allows you to just pass in a raw list of values and the parsing happens on the remote side

The 2nd is a lot more useful and works in more situations but it would require further extensions to the remote spec which may not be feasible. It's definitely possible as the CREATE_PIPELINE message already has variable properties based on the PowerShell version (MergeInformation is v5+).

Great stuff, @jborean93.
On a quick meta note: As is probably evident, I'm out of my depth with respect to the innards of the SDK, parser, compiler, remoting, but I always welcome the opportunity to learn more, and I'm hoping that my somewhat-unencumbered outsider perspective is at least somewhat helpful on occasion.
Understood re not wanting to go deeper, @rjmholt, but re

It it feels like we need to use some kind of object here to say "this is a parameter name" and "this is a value".

Wasn't not having to preprocess the array of would-be parameters and letting PowerShell do the heavy lifting the motivation for opening this issue?

Something you can technically do in the absence of a proper API is manually create a CommandAst.
Everything that isn't a parameter does come through as a literal string though, unless you explicitly change up the ASTs you are creating.
Example:
using namespace System.Management.Automation.Language

$command = 'Get-ChildItem'
$params = @(
    '-Path',
    'Something',
    '-File')

$ep = [ScriptPosition]::new(
    <# scriptName: #> '',
    <# scriptLineNumber: #> 0,
    <# offsetInLine: #> 0,
    <# line: #> '',
    <# fullScript: #> '')

$ee = [ScriptExtent]::new($ep, $ep)

$commandElements = [CommandElementAst[]]::new($params.Length + 1)

$commandElements[0] = [StringConstantExpressionAst]::new(
    <# extent: #> $ee,
    <# value: #> $command,
    <# stringConstantType: #> [StringConstantType]::BareWord)

for ($i = 0; $i -lt $params.Length; $i++) {
    $text = $params[$i]
    if (-not $text.StartsWith('-')) {
        $commandElements[$i + 1] = [StringConstantExpressionAst]::new($ee, $text, [StringConstantType]::BareWord)
        continue
    }

    $commandElements[$i + 1] = [CommandParameterAst]::new(
        <# extent: #> $ee,
        <# parameterName: #> $text.Substring(1),
        <# argument: #> $null,
        <# errorPosition: #> $ee)
}

$sbAst = [ScriptBlockAst]::new(
    <# extent: #> $ee,
    <# paramBlock: #> $null,
    <# statements: #> [StatementBlockAst]::new(
        <# extent: #> $ee,
        <# statements: #> [StatementAst[]](
            [PipelineAst]::new(
                <# extent: #> $ee,
                <# pipelineElements: #> [CommandBaseAst[]](
                    [CommandAst]::new(
                        <# extent: #> $ee,
                        <# commandElements: #> $commandElements,
                        <# invocationOperator: #> [TokenKind]::Ampersand,
                        <# redirections: #> $null)))),
        <# traps: #> $null),
    <# isFilter: #> $false)

& $sbAst.GetScriptBlock()


[DOCS] Create a contribution guide

Create a CONTRIBUTING.md with steps to contribute to the project, including forking, branching, commit message standards and project setup -- MongoDB, Whatsapp/Facebook token, webhook configuration including exposing to web with ngrok or similar.

I would like to take this up!

I would like to take this up!

Sure thing! Assigned :rocket:


Add badge components

Adds BuyNowBadge, GdbdBadge and MbgBadge

What is the status of this PR? Do we still need it?

What is the status of this PR? Do we still need it?

I think yes, we have now verified badge too, Colin already made a ticket on JIRA CAR-7235


Please add daily trends for every state

Please add daily trends for every state

Please file this issue on https://github.com/covid19india/covid19india-react, as this repo is for the cluster page. Thanks.