Server start failed, No provider for "framework:jasmine"

Hi,
sorry to bring up again an issue that has been reported multiple times, but I tried the various proposed solutions and it still shows up.
What I tried:

rm  node_modules, npm i
clean npm cache, rm node_modules, npm i
npm remove -g karma (although was not installed -g)
manual reinstallation of missing package
debugging the code with console logs to see what's happening
running LOG_DEBUG

Still no luck.
The Error:
09 05 2020 08:57:20.186:ERROR [karma-server]: Server start failed on port 9876: Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)

My karma config
module.exports = function (config) {
  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: '.',

    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['jasmine'],

    // list of files / patterns to load in the browser
    files: [
      { pattern: 'demo/bundle-ie11.html', type: 'dom' },
      'test/e2e/explorerAPIs.e2e.karma.test.ts'
    ],

    // list of files / patterns to exclude
    exclude: [
    ],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      '**/*.ts': ['tsc']
    },
    plugins: [
      'karma-tsc-preprocessor'
    ],

    // test results reporter to use
    // possible values: 'dots', 'progress'
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
    reporters: ['progress'],

    // web server port
    port: 9876,

    // enable / disable colors in the output (reporters and logs)
    colors: true,

    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_DEBUG,

    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: false,

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: ['FirefoxHeadless', 'ChromeHeadless'],

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: false,

    // Concurrency level
    // how many browser should be started simultaneous
    concurrency: Infinity
  });
};

My installed karma deps (npm list --depth=0)
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>
Output of debug (seems to be in the correct directory):
Final config Config {
  LOG_DISABLE: 'OFF',
  LOG_ERROR: 'ERROR',
  LOG_WARN: 'WARN',
  LOG_INFO: 'INFO',
  LOG_DEBUG: 'DEBUG',
  frameworks: [ 'jasmine' ],
  protocol: 'http:',
  port: 9876,
  listenAddress: '<IP_ADDRESS>',
  hostname: 'localhost',
  httpsServerConfig: {},
  basePath: '/Users/julien/work/blockcerts-verifier',
  files:
   [ Pattern {
       pattern:
        '/Users/julien/work/blockcerts-verifier/demo/bundle-ie11.html',
       served: true,
       included: true,
       watched: true,
       nocache: false,
       weight: [ 1, 0, 0, 0, 0, 0 ],
       type: 'dom',
       isBinary: undefined },
     Pattern {
       pattern:
        '/Users/julien/work/blockcerts-verifier/test/e2e/explorerAPIs.e2e.karma.test.ts',
       served: true,
       included: true,
       watched: true,
       nocache: false,
       weight: [ 1, 0, 0, 0, 0, 0 ],
       type: undefined,
       isBinary: undefined } ],
  browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true },
  customContextFile: null,
  customDebugFile: null,
  customClientContextFile: null,
  exclude: [ '/Users/julien/work/blockcerts-verifier/karma.conf.js' ],
  logLevel: 'DEBUG',
  colors: true,
  autoWatch: false,
  autoWatchBatchDelay: 250,
  restartOnFileChange: false,
  usePolling: false,
  reporters: [ 'progress' ],
  singleRun: true,
  browsers: [ 'FirefoxHeadless', 'ChromeHeadless' ],
  captureTimeout: 60000,
  pingTimeout: 5000,
  proxies: {},
  proxyValidateSSL: true,
  preprocessors:
   [Object: null prototype] { '/Users/julien/work/blockcerts-verifier/**/*.ts': [ 'tsc' ] },
  preprocessor_priority: {},
  urlRoot: '/',
  upstreamProxy: undefined,
  reportSlowerThan: 0,
  loggers:
   [ { type: 'console',
       layout: { type: 'pattern', pattern: '%[%d{DATE}:%p [%c]: %]%m' } } ],
  transports: [ 'polling', 'websocket' ],
  forceJSONP: false,
  plugins: [ 'karma-tsc-preprocessor' ],
  client:
   { args: [],
     useIframe: true,
     runInParent: false,
     captureConsole: true,
     clearContext: true },
  defaultClient:
   { args: [],
     useIframe: true,
     runInParent: false,
     captureConsole: true,
     clearContext: true },
  browserDisconnectTimeout: 2000,
  browserDisconnectTolerance: 0,
  browserNoActivityTimeout: 30000,
  processKillTimeout: 2000,
  concurrency: Infinity,
  failOnEmptyTestSuite: true,
  retryLimit: 2,
  detached: false,
  crossOriginAttribute: true,
  browserSocketTimeout: 20000,
  cmd: 'start',
  configFile: '/Users/julien/work/blockcerts-verifier/karma.conf.js' }

node version:
v11.15.0
npm version:
6.14.4
To be noted that if I turn off the error throwing for the framework, the same issue arises for the browsers (Chrome, FF).
I have another project on my computer with a local install of karma and it works fine. The only difference is the absence of tsc pre-processor in the latter, but when I edited the config file of the failing project to ignore tsc, the issue remained the same.
Any help would be greatly appreciated.
Thanks

The problem is in these lines:
    plugins: [
      'karma-tsc-preprocessor'
    ],

By default Karma will load plugins from all installed NPM packages matching ‘karma-*’, but you have changed it by asking to only load plugins from the single package, hence the error. Either remove plugins key completely or list all plugins you need.
See http://karma-runner.github.io/5.0/config/configuration-file.html for plugins docs.
Please don’t close this issue just yet, I’ll see if error message can be improved.

@devoto13,
That solved it. I had taken the property from the tsc readme and didn't realize I was overwriting the (default) rule.
Thank you

I guess the vast majority of these issues are caused by missing plugins. So rather than:
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)

Maybe
Error: No plugin supplied "framework:jasmine"!

Bonus points for listing the plugins supplied.


Maximum image overlay size on iOS with Google Maps?

Summary
We have recently upgraded from react-native-maps version 0.29.3 to 1.3.0-beta.2, and some overlay images that previously rendered on the map without any issues are no longer appearing. The images appear correctly on an Android device using Google Maps, and when using native Apple maps on an iOS simulator - the bug seems to only occur when using Google Maps on an iOS device.
We upgraded to this version because the fix for issue 3057 regarding polygon colour was fairly critical to our app (thank you for solving it!!), so can't really downgrade.
Reproducible sample code
import React from 'react'
import MapView, { Overlay, PROVIDER_GOOGLE } from 'react-native-maps'

interface OverlayData {
	uri: string;
	bounds: [[number, number], [number, number]];
}

const overlayData: OverlayData[] = [{
	// working image - 236 KB (808 × 768 pixels)
	uri: 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Compass_Barnstar_Hires.png/1078px-Compass_Barnstar_Hires.png',
	bounds: [
		[-34.112934054091504,<PHONE_NUMBER>2607287],
		[-34.13863400940858,<PHONE_NUMBER>4797933]
	]
}, {
	// non working image - 363 KB (1,078 × 1,024 pixels)
	uri: 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Compass_Barnstar_Hires.png/808px-Compass_Barnstar_Hires.png',
	bounds: [
		[-34.111022858153866,<PHONE_NUMBER>0529327],
		[-34.13731262869155,<PHONE_NUMBER>7669296]
	]
}]

const region = {
	latitude: -34.123348117057915,
	latitudeDelta: 0.09114369672222011,
	longitude:<PHONE_NUMBER>9060135,
	longitudeDelta: 0.14679931104183197
}

const App = () => {
	return (
		<MapView
			style={{ flex: 1 }}
			provider={PROVIDER_GOOGLE}
			region={region}
		>
			{overlayData.map((data, index) => (
				<Overlay
					key={index}
					image={{ uri: data.uri }}
					bounds={data.bounds}
				/>
			))}
		</MapView>
	)
}

export default App

Steps to reproduce

Run the above code in iOS simulator or device and only one image will appear (the smaller)
Remove provider={PROVIDER_GOOGLE} and reload
Both images will appear

Expected result
Both images should appear whether using native Apple maps or Google Maps.
Actual result
Larger image does not appear when using Google Maps on iOS.
React Native Maps Version
1.3.0-beta.2
What platforms are you seeing the problem on?
iOS (Google Maps)
React Native Version
0.64.3
What version of Expo are you using?
Not using Expo
Device(s)
Simulators: iPhone 8 + iPad 9th generation (iOS 15.4); Device:  iPad 6th generation (iOS 14.7.1)
Additional information
The theory I currently have is that there is a maximum size of image overlays enforced somewhere, although I haven't been able to find any information on that for this library or for Google Maps.
In addition to the two images I've used in the reproducible example above, I tested the following sized images (all .pngs) which previously worked before upgrading:

234 KB / 1000 × 1000 pixels (works)
315 KB / 1070 × 956 pixels (does not work)
449 KB / 739 × 648 pixels (works)
663 KB / 775 × 1034 pixels (does not work)

Because of this, at the moment I think the problem is related to dimension, not the size of the image in bytes.
Lastly - many many thanks for this library, it's fantastic!

Just an update based on further testing: it seems as though the limit in dimensions is a maximum of 1024 pixels in either width or height. I guess I'm curious as to whether this is a recent limit imposed by this library, or by Google Maps, or an actual bug?

hi @stevie-g. Thank you for taking the time to put together a thorough issue.
This is not a limit imposed by react-native-maps, nor did I read about it in the Maps SDK release notes. I did some quick testing however, and it seems like it is caused by using the "new" metal renderer on iOS. You can test this out quite easily by going to your node_modules > react-native-maps > iOS > AirGoogleMaps > AirGoogleMapManager.m and at line 48 change [GMSServices setMetalRendererEnabled:YES]; to [GMSServices setMetalRendererEnabled:NO]; and doing react-native run ios after making the change.
Patching this line could be a temporary solution if you rely on large images. I will try to investigate further when I have the time to do so, and will leave this open until we figure out how to move forward :)

Hi Simon,
Thanks for your reply and for the solution - I can confirm that that change has fixed the issue. Patching that line seems to be the best solution for us, at least in the short term - I would rather hold off on making changes to how we generate images and their dimensions until we know if it's definitely necessary or not.
Thanks again!

Hi all! I see same issue in my 0.69.4 RN project with 1.2.0 react-native-maps. I was investigating on this and threshold for image dimension seems to be 1024px (same image, squared, changing from 1024px to 1025px and it disappears). Turning off metal renderer helps to fix this

I've been able to reproduce the issue in a native project, so I've opened an issue on google's issue tracker: https://issuetracker.google.com/issues/247339055


Use explicit psbt::Error types instad of ParseError(String) messages to downflow information

This part of #837  is still open
#1310 was the first attempt at this. Now that psbt::Error and encode::Error have been dissected, it should be ready to tackle @arturomf94

Brilliant! I'll send the PR in now 😎


Get-BcEnvironments fails with "The remote server returned an error: (403) Forbidden." but I can access Admin Center via the browser

Describe the issue
I can access the Admin Center for the tenant via my microsoft CSP account yet using the same account to create the device login authcontext to pass to Get-BcEnvironments gives "The remote server returned an error: (403) Forbidden."
To be honest I don't know if this is a Get-BcEnvironments issue or not.  It doesn't feel like it is.  I decided to log it here since my account is able to access Admin Center via the web.
In addition, I used this account to get the list of environments successfully earlier this afternoon but now it fails consistently.  It's very weird.
Can you tell me if my understanding is correct, in that if my account can access Admin Center via the web I should also be able to use the same account to retrieve the list of Environments via Get-BcEnvironments?
Scripts used to create container and cause the issue
$authContext = New-BcAuthContext -includeDeviceLogin

$env = Get-BcEnvironments -bcAuthContext $authContext

Full output of scripts
BcContainerHelper version 4.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
Attempting authentication to https://api.businesscentral.dynamics.com/user_impersonation offline_access using device login...
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code QW8CPU5UC to authenticate.
Waiting for authentication.....
Authenticated from <IP address redacted> as user <user redacted> (<user redacted>@<domain redacted>.onmicrosoft.com)
Authenticated to common, using tenant id <Tenant ID redacted>
Get-BcEnvironments Telemetry Correlation Id: 8120413a-fc39-4abf-a7c7-218aa05c1eb9
The remote server returned an error: (403) Forbidden.
Forbidden
 (ms-correlation-x = d3b5db41-5b50-404a-a5fa-cff684b5dcbc)
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.7\BcSaaS\Get-BcEnvironments.ps1:32 char:9
+         throw (GetExtendedErrorMessage $_)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The remote serv...a-cff684b5dcbc):String) [], RuntimeException
    + FullyQualifiedErrorId : The remote server returned an error: (403) Forbidden.
Forbidden
 (ms-correlation-x = d3b5db41-5b50-404a-a5fa-cff684b5dcbc)

...

Screenshots
If applicable, add screenshots to help explain your problem.
Additional context

It worked earlier this afternoon once.  Then tried using a refresh token authcontext and now not even devicelogin authcontext works anymore
did it use to work? Yes, once.  Now not at all.

Code works fine here (but your code doesn't print anything)
$authContext = New-BcAuthContext -includeDeviceLogin
$env = Get-BcEnvironments -bcAuthContext $authContext
$env.name

outputs
dirdemo2
dirdemo
PROD
FAT
QA

You might need to add -TenantId 'tenantid' to your get-bcauthcontext if your user has access to multiple tenants?

Thankyou Freddy.  Adding the -tenantID parameter to New-BcAuthContext was what I was missing.  The clue too was that without it, NewBcAuthContext returned 'Authenticated to common, using tenant Id: .  And that Tenant was not the one I was attempting to query the list of Environments from.
Using your suggestion the following code works correctly.
$tenantID = '<The Tenant Id that contains the environment my microsoft CSP account has access to>'
$authContext = New-BcAuthContext -includeDeviceLogin -tenantID $tenantID

$env = Get-BcEnvironments -bcAuthContext $authContext
$env.name


.mat-primary custom color affecting tab foreground color

Reproduction
I am trying to change the button color to white from black
PRIMARY RAISED
  With belows css
  .mat-primary {
	color: white;
	}
But While checking with tab body foreground color also affecting.

Please find the below attachment
how can I deal with tab foreground color

Angular:
CDK/Material: Material
Browser(s): Chrome
Operating System (e.g. Windows, macOS, Ubuntu):  Windows

Resolved
because of $primary: mat-palette( Custom pallate color) it is afecting.


Custom Fragment focus

Hello!I have focus problem witn my  i have layout like this
<FrameLayout>
    <CustomViewOne android:id="@+id/vOne"></FrameLayout>
    <CustomViewTwo android:id="@+id/vTwo"></FrameLayout>
</FrameLayout>

My CustomViewOne its class  extends FrameLayout and have one button in layout. CustomViewTwo seem class have one button too. When i use vOne.setVisibility(View.GONE) i see my vTwo. When i press button down in my keyboard my vTwo lost focus, and button from vOne can found focus... Actualy i can click on invisible view. How to fix this problem?

This sample has been migrated to a new location and updates are happening there (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!


Add settings page

Describe your suggested feature
A simple settings page in the client, categorized.
Display settings:

Language
Theme
View mode (grid or table)
Grid mode (comfortable or compact)
Hide synopsis of unread books
Hide covers of unread books
Hide covers of NSFW books

Privacy settings:

Delete the account

More settings can be added as they're needed.
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] I have written a short but informative title.
[X] I have updated the app to the latest version.
[X] I filled out all of the requested information in this form.

Books creation settings:

Default currency
Default store


MSSQL connection without SMB?

Hi,
Is it possible to make a direct MSSQL connection to execute queries without SMB access to the host? The --mssql mode stops working if access to 445 is blocked and didn't know if there was something I was missing, as this would rule out any DB work where only the MSSQL port was exposed?
Many thanks in advance.

This was a design decision, as making a direct MSSQL connection wouldn't really return any useful info about the host. You can modify the code so that it doesn't make an SMB connection pretty easily. PR's are welcome :)

I look into this, maybe by adding one flag --no-enumeration :)

Check the wiki updated https://github.com/byt3bl33d3r/CrackMapExec/wiki/MSSQL-Command-Reference#1-windows-auth


Temp2

Desired Outcome
Please describe the desired outcome for this PR.  Said another way, what was
the original request that resulted in these code changes?
Implemented Changes
Describe how the desired outcome above has been achieved with this PR. In
particular, consider:

What's changed? Why were these changes made?
How should the reviewer approach this PR

Connected Issue/Story
Resolves #[relevant issue(s), e.g. 47]
Definition of Done
Feel free to copy this information from the connected issue.
Changelog

[ ] The CHANGELOG has been updated
[ ] This PR does not include user-facing changes and doesn't require a
CHANGELOG update

Test coverage

[ ] This PR includes new unit and integration tests to go with the code
changes
[ ] The changes in this PR do not require tests

Documentation

[ ] Docs (e.g. READMEs) were updated in this PR
[ ] A follow-up issue to update official docs has been filed here: insert issue ID
[ ] This PR does not require updating any documentation

Temporary pr that was needed for practice in separating commits


Alarm not updating - status: unknown

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.
Describe the bug
Alarm is not pulled anymore.
To Reproduce

Enable an alarm on Alexa App
Go to HA
Check sensor status

Expected behavior
Alarm value should be puleld from Alexa as it was on previous versions
Screenshots

System details

Home-assistant (version): 2023.1.4
alexa_media (version from const.py or HA startup): 4.5.0
alexapy (version from pip show alexapy or HA startup): 1.26.4
Amazon 2FA is enabled (y/n). <!---We will not debug login issues if unanswered--->: Yes

Logs
Please provide logs.
Additional context

Sorry missed 4.5.2
Simone


Gracefully Handle Rolling Weapons With Missing Data

If someone forgets to enter a +x to hit, or enter a damage value, we are throwing a console error.  Would be better to log this to chat so people know what they need to fix.

Duplicate of #25


CMake support for AppleClang

Adds support for building "host" for MacOS via Terminal window using AppleClang.
cd real-time-cpp
mkdir build
cd build
cmake ../ref_app -DTARGET=host
make install -j8

Thank you for adding support for building "host" for MacOS via Terminal window using AppleClang.

Hi @jwinarske just for your info, it has been two years, but just for your info, several of your fantastic and beautiful CMake builds are now running in on Ubuntu pipelines in CI on GitHub actions.
Thanks again for providing this technology.

Hi @jwinarske just for your info, it has been two years, but just for your info, several of your fantastic and beautiful CMake builds are now running in on Ubuntu pipelines in CI on GitHub actions.
Thanks again for providing this technology.

@ckormanyos Cool!  Thanks for the kind words, and thanks for the inspirational book 👍

@ckormanyos Cool!  Thanks for the kind words, and thanks for the inspirational book 👍

Cool! Thanks for the kind words, and thanks for the inspirational book

Thank you as well. It is good to hear your kind response. Progress is ongoing, as I intend to also integrate some macos builds and builds for the examples as time allows. I am also strongly considering to try to figure out how to get an AVR(R) and/or ARM(R) simulators on a test runner in the future to do some actual target-based simulations...

Cool! Thanks for the kind words, and thanks for the inspirational book

Thank you as well. It is good to hear your kind response. Progress is ongoing, as I intend to also integrate some macos builds and builds for the examples as time allows. I am also strongly considering to try to figure out how to get an AVR(R) and/or ARM(R) simulators on a test runner in the future to do some actual target-based simulations...

This covers most everything on using QEMU for aarch64 bare metal.  ARMv7, and QEMU AVR would follow the same pattern.  CTest could be used to execute the unit tests; minor CMake changes.  It might make sense to use a binary repository (Conan or other) to manage toolchains, and QEMU flavors.  Then maybe add some stack trace capture.

This covers most everything on using QEMU for aarch64 bare metal.  ARMv7, and QEMU AVR would follow the same pattern.  CTest could be used to execute the unit tests; minor CMake changes.  It might make sense to use a binary repository (Conan or other) to manage toolchains, and QEMU flavors.  Then maybe add some stack trace capture.

... covers most everything on using QEMU for aarch64 bare metal. ARMv7, and QEMU AVR would follow the same pattern. CTest could be used to execute the unit tests; minor CMake changes.

Thank you for this very good idea, Joel. Sounds like a plan! And will pursue this further in #96.

... covers most everything on using QEMU for aarch64 bare metal. ARMv7, and QEMU AVR would follow the same pattern. CTest could be used to execute the unit tests; minor CMake changes.

Thank you for this very good idea, Joel. Sounds like a plan! And will pursue this further in #96.


Behavior change with formly v6.x in custom field with mat-autocomplete

Description
We have a custom formly field with autocomplete that displays the mat-autocomplete panel as a mat-table. It works perfectly with ngx-formly 5.x, but when upgrading to 6.x, an extra keystroke is required to trigger the popup.
Minimal Reproduction
Here is the 5.x version: https://stackblitz.com/edit/angular-ivy-yawmsc
In the input field, type 1234 and you will get 2 matches in the auto-complete panel as expected
Here is the 6.x version: https://stackblitz.com/edit/angular-ivy-yazmqy
In the input field, type 1234 and nothing happens. If you type one more character then the popup shows.
The only difference in the two is the formly version.
This seems like a small change but if we were to deploy that to production, it would be disruptive for our users as the extra  keystroke is not at all intuitive. In fact, the use case demonstrated is one where we need exactly 4 digits to search on, no more, no less. so the popup should show once the 4th character is input.
I have been unable to find a workaround.
Your Environment

Angular version: 13.3.12
Formly version: 6.1.1

Additional context
If the samples are re-written to simply use mat-option instead of all the mat-table stuff, then the behavior is as expected in formly 6.x.  I don't know why mat-table is behaving differently.

I came up with a workaround to manually open the autocomplete panel, but it would be nice if it wasn't required.
https://stackblitz.com/edit/angular-ivy-4bgyum

Tested on fresh installation and it seems working without the workaround: https://stackblitz.com/edit/angular-4qj9pm?file=src/app/autocomplete-type.component.ts


BUG: fix a bug in _ttest_finish() from scipy.stats

Describe the Issue
I think there is a mistake about the sign of the variable 't' in _ttest_finish(). The codes run well but will produce wrong results in paired T-test (e.g., scipy.stats.ttest_rel(), scipy.stats.ttest_ind()). Specifically, the p-values of the alternative with 'greater' and 'less' are reversed due to the wrong sign of the variable 't'.
Reproducing Code Example
import numpy as np
x = np.random.normal(10,1,10)
y = np.zeros(10)
scipy.stats.ttest_rel(x, y, alternative='less')

In this case, the null hypothesis is x<y, which should be rejected (with a very small p-value). However, the generated p-value is nearly 1, which is false.
import numpy as np
x = np.random.normal(10,1,10)
y = np.zeros(10)
scipy.stats.ttest_rel(x, y, alternative='greater')

In this case, the null hypothesis is x>y, which should not be rejected. However, the generated p-value is nearly 0, which is false.
In fact, their results are reversed.
SciPy/NumPy/Python version information
1.8.0 1.22.3 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)

In this case, the null hypothesis is x<y,

The alternative parameter controls the alternative hypothesis, not the null hypothesis. The null hypothesis is always x = y. In this example l, we would not expect the null hypothesis to be rejected in favor of the alternative, x < y, because x tends to be greater than y.

In this case, the null hypothesis is x<y,

The alternative parameter controls the alternative hypothesis, not the null hypothesis. The null hypothesis is always x = y. In this example, we would not expect the null hypothesis to be rejected in favor of the alternative (x < y) because the observations from x are all greater than corresponding observations from y.
I'll leave this open for a bit in case you have a suggestion about the documentation.

Thanks for your quick response and explanations. I think I misunderstood the meaning of the attribute before :)

NP, and thanks for reporting what seemed like a bug! User feedback like this helps fix defects and improve documentation.


[dubbo-1929]: remove the verison property that is no use (#1929)

remove the verison property that is no use, you can see issue  #1929

Codecov Report

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

@@             Coverage Diff              @@
##             master    #2078      +/-   ##
============================================
- Coverage     53.06%   52.95%   -0.12%
- Complexity     4956     5004      +48
============================================
  Files           559      570      +11
  Lines         24894    25552     +658
  Branches       4432     4492      +60
============================================
+ Hits          13211    13530     +319
- Misses         9661     9967     +306
- Partials       2022     2055      +33

Impacted Files
Coverage Δ
Complexity Δ

...apache/dubbo/rpc/protocol/dubbo/FutureAdapter.java
58.06% <0%> (-6.46%)
3% <0%> (ø)

.../dubbo/remoting/transport/netty4/NettyChannel.java
61.25% <0%> (-5%)
22% <0%> (-1%)

...he/dubbo/remoting/transport/netty/NettyServer.java
67.85% <0%> (-3.58%)
8% <0%> (-1%)

...e/dubbo/remoting/transport/netty4/NettyServer.java
72.13% <0%> (-3.28%)
9% <0%> (-1%)

...dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java
77.2% <0%> (-1.48%)
29% <0%> (ø)

...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
58.33% <0%> (-0.84%)
30% <0%> (-1%)

.../java/org/apache/dubbo/config/ReferenceConfig.java
46.97% <0%> (-0.72%)
38% <0%> (ø)

...e/dubbo/rpc/protocol/thrift/ThriftNativeCodec.java
0% <0%> (ø)
0% <0%> (?)

...rpc/protocol/thrift/ext/MultiServiceProcessor.java
12.76% <0%> (ø)
3% <0%> (?)

...o/rpc/protocol/thrift/DubboClassNameGenerator.java
100% <0%> (ø)
3% <0%> (?)

... and 10 more

Continue to review full report at Codecov.

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

Looks good to me! Thanks for the pull request!


Fix default TaskResource for RealtimeIndexTasks.

It was supposed to be the same as the task id, but it wasn't because
"makeTaskId" has a random component.

:+1:


documentation incorrect

In the documentation https://www.groundai.com/project/openspiel-a-framework-for-reinforcement-learning-in-games/1 we read in several places that games are written in C++

Game implementations are in C++ and wrapped in Python

Games are written in C++

This is incorrect and may lead to people giving up on using this.
If you open python/games/tic_tac_toe.py you read what I suppose to be really correct

Games are strongly encouraged to be written in C++ for efficiency and so tha tthey can be available from all APIs. Writing Python-only games means that they will be slow and only be accessible from Python algorithms.
Nonetheless, there are many cases where this is desirable (or required),....

It is not incorrect. 99% of the games are written in C++, and just like any higher level API one could simply choose to abide by the higher-level API only (we cannot prevent this) so we provide a single game implementation in Python for people who do not want to use C++.

@lanctot
"Games are written in C++" reads as a REQUIREMENT.
But it is not a requirement.
Therefore I think it's incorrect.
That 99% of the games is in C++ does not make it a requirement.

and just like any higher level API one could simply choose to abide by the higher-level API only

There is no mentioning of a higher-level API. Yes it says games are wrapped in python but that does not override the stated requirement.
Also I assume you can not use any other higher level API (say, java). How would you then use the agents and algorithms?

Some code suggests MujocoEnv is C++
But there is code in gym/envs/mujoco/mujoco_env.py that is pure python.

"Games are written in C++" is an objectively true statement that is as correct now as when we wrote it. ;-)
Joking aside, it cannot be a requirement, even if we wanted it to be. The higher-level API I am referring to is just pyspiel: anybody could have written a game that exposes the same methods as the C++-wrapped games and the python algorithm would have no way of knowing. The same is true for any language (i.e. Julia and/or Java). The obvious downside with doing this is that then those games are only available to algorithms in those languages.
We provide the python game only because we expect it to be a common use case for people who really do not want to use C++. If we hadn't provided it, people could have done it anyway. We are not encouraging people to do this because of the downsides, but as always people are free to do whatever you want. :)

@lanctot  it's not true, the one game in python is the counter example. The crux is that most of your system will still work if you write the game in python because the rest of your system is in python anyway (if I get it correctly). It would not if I wrote a game in Java.
Anyway I'm just pointing out this mistake, for me it's a mistake so it probably is for others. I tried my best to explain the problem but in the end it's your call.

The crux is that most of your system will still work if you write the game in python because the rest of your system is in python anyway (if I get it correctly). It would not if I wrote a game in Java.

There are several algorithms in Python, but you don't have to use Python to use OpenSpiel. There are many classical tabular and search algorithms written only in C++ (see https://github.com/deepmind/open_spiel/tree/master/open_spiel/algorithms). You can use OpenSpiel for research without ever touching the Python parts if you want.

It is probably a "noob question" - but I wonder, is there anything in OpenSpiel's architecture that makes python games slower than they would be if used without OpenSpiel? Because I do experience bad performance for my simple custom Python game, and I use a simple, custom RL algorithm without many moving parts (validated that the bottleneck is the env).
I know it's not very specific but I wonder if it might be the case because it might be better for me to just implement the same API in pure Python (some kind of overhead?).


add missing initialization

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 86.642%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
467

Relevant Lines:
539

💛  - Coveralls


Add wireless connectivity (RF/Bluetooth LE)

The NRF24l01+ is used if many projects and may be a rather good candidate for a cheap component to act as both a BLE/RF transmitter and and receiver for computers that don't have Bluetooth capabilities.

Good thought! I have this planned, and I've already done some preliminary testing on it actually. Your thoughts are in line with mine (starting with the nrf series).
See #3

I have some on order, I'll be experimenting with getting those shortly.


Update sbt-microsites to 1.1.0

Updates com.47deg:sbt-microsites from 1.0.2 to 1.1.0.
Release Notes/Changelog
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.47deg", artifactId = "sbt-microsites" } ]

labels: sbt-plugin-update, semver-minor

Codecov Report

Merging #1362 into master will increase coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1362      +/-   ##
==========================================
+ Coverage   86.43%   86.52%   +0.09%
==========================================
  Files          57       57
  Lines        2174     2174
  Branches      111      111
==========================================
+ Hits         1879     1881       +2
+ Misses        295      293       -2

Impacted Files
Coverage Δ

...rc/main/scala/io/circe/shapes/SizedInstances.scala
78.57% <0%> (-14.29%)
:arrow_down:

.../core/shared/src/main/scala/io/circe/Decoder.scala
85.44% <0%> (ø)
:arrow_up:

...rc/main/scala/io/circe/numbers/BiggerDecimal.scala
85.96% <0%> (ø)
:arrow_up:

...re/shared/src/main/scala/io/circe/JsonNumber.scala
95.18% <0%> (ø)
:arrow_up:

...les/core/shared/src/main/scala/io/circe/Json.scala
79.26% <0%> (+1.21%)
:arrow_up:

...re/shared/src/main/scala/io/circe/KeyDecoder.scala
97.29% <0%> (+2.7%)
:arrow_up:

...d/src/main/scala/io/circe/NonEmptySeqDecoder.scala
100% <0%> (+8.33%)
:arrow_up:

Continue to review full report at Codecov.

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


porting cshar-sdk by using .NET Core

It would be very good if you could port the csharp-sdk to only use the .NET Core so that we can develop applications with the csharp-sdk platform across, like on Linux with Mono...

I totally agree. I'll look into how effort is required to run against .NET Core and try to get a timeframe out


PreregistrationUser row should link back to the confirmation object that created them

A single-use invitation has a confirmation object which links to a preregistration user.  A multi-user invitation has a confirmation object -- however, there is no link between a multi-use invitation and the preregistration users it spawned.
We should add a column to PreregistrationUser which links to a confirmation_id, allowing multiple preregistration users to be linked back to their multi-use invite.

This is connected to https://github.com/zulip/zulip/pull/21740, which we merged earlier this week; reading that will be a good resource for seeing how to do this. (And of course https://zulip.readthedocs.io/en/latest/subsystems/schema-migrations.html is the basic background for doing the migration part of this).

PreregistrationUser has a confirmation field -
https://github.com/zulip/zulip/blob/0043c0b6b2d78f4ccbee4c422b7324a1690857b5/zerver/models.py#L2206
Confirmation has a content_object field -
https://github.com/zulip/zulip/blob/0043c0b6b2d78f4ccbee4c422b7324a1690857b5/confirmation/models.py#L142
To find MultiuseInvite from PreregistrationUser -
PreregistrationUser.confirmation.content_object
And, to find PreregistrationUser from MultiuseInvite -
contenttype_obj = ContentType.objects.get_for_model(multiuse_invite)
prereg_user = PreregistrationUser.objects.filter(object_id=multiuse_invite.id,  content_type=contenttype_obj

So, can someone clarify what this issue is about?


FBThrift 'py3' support needed: No module named 'openr.thrift'

Issue Description
Hi, I've build openr on my machine according the README. After openr/py installed, the breeze command throws several module not found error like:
File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/clients/openr_client.py", line 17, in <module>
ModuleNotFoundError: No module named 'openr.thrift'

It seems some python modules for py3 part is missing and I have no clue where is openr.thrift module and like openr.thrift.OpenrCtrlCpp.clients?
Can someone give me some hints to fix so that maybe I can contribute.
Environment

tag or commit hash on which this occured
master
OS version: ubuntu 1804

Minimal test code / Steps to reproduce the issue
After built, run any breeze cmd
What's the actual result?
throws module not found error
$ breeze kvstore keys
Traceback (most recent call last):
  File "/usr/local/bin/breeze", line 33, in <module>
    sys.exit(load_entry_point('py-openr==1.0', 'console_scripts', 'breeze')())
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2447, in load
    return self.resolve()
  File "/home/gd/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2453, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/breeze.py", line 22, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/clis/config.py", line 12, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/commands/config.py", line 16, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/cli/utils/utils.py", line 28, in <module>
  File "/usr/local/lib/python3.6/dist-packages/py_openr-1.0-py3.6.egg/openr/clients/openr_client.py", line 17, in <module>
ModuleNotFoundError: No module named 'openr.thrift'

What's the expected result?
no module issues.

breeze (and OpenR components) all use fbthrift (fork of Apache thrift) to communicate. I believe these modules are missing as we’re not building the ‘py3’ thrift language client libraries and structures.
These are a little more involved abs they are Cython libraries linked to the C++ libraries. I haven’t yet, but need to workout how to get these building in OSS world.
We could see if we can just add thrift compiler to use ‘py3’ but I feel we’ll need cpp2 first for py3 to build.

I also see the same problem with making breeze operational. Thrift python libraries are not built, and trying to manually build them for the thrift repo is not working as the setup script requires specific built files to be in a specific folder within the trift repo (old way was all deps were in /build directory of openr and actually being installed, so the setup.py was working). When trying to run the thrift setup.py file, python cannot find module X ( where X was trift, then its dependency fb303, then neteng etc). Please provide an integrated solution for breeze to be operational through your install scripts.

I have attempted to do exactly this and the problem is much deeper. py3 thrift is Cython wrapped C++ and is off by default in the Open Source fbthrift builds. I've approached the team for support in making this work, but I have not been successful thus far unfortunately.
Some of my work can be seen in this branch: https://github.com/facebook/openr/tree/breeze_docker
I will try find cycles again some day soon, but without FB Thrift teams help, it's going to need to be very hacky. I want this for my home OpenR install, but may end up writing a lightweight non thrift py3 breeze for OSS to work around it.

I have managed in the past to get fbthrift to compile the python modules as well. (it was with the Release Candidate 20191208-10906 codebase. It needed to find the python-six package during configuration of cmake and then you were able to run the related setup.py to build and install also the related python wrappers.
If that helps, that was the cmake call that enabled python support build (running cmake inside the build dir of fbthrift root dir.
You needed to have python-six project built and:
cmake -Dpython-six_DIR=/opt/python-six/python-six-Q8Be2n47Opv-n5B-m-qxwvUlULZRCVNgM-AharcWT7Q/lib/cmake/python-six/  -DBUILD_SHARED_LIBS=ON  ../

Ok, we have thrift py3 modules compiling in the Docker container - Just a few more install placements for the thrift files ans we should have breeze workable in Docker.
We can then use these learning to try make this more friendly and widely usable.


Nestia SDK not working with Monorepo or Thirdparty

Question
Hello!
I am encountering an issue with the Nestia SDK in my project setup. Here are the details:
Problem Description
I am working on a Monorepo with multiple packages. I am facing an issue when reusing packages within my repo or when integrating external library packages. Specifically, the SDK fails to generate code for certain modules.
Code Snippets
Here is a snippet of my AppModule:
import { Module } from '@nestjs/common';

// this in my repo
import { AuthModule } from '@fzap/auth-module';

import { CategoryModule } from './fandom/category.module';
import { FandomModule } from './fandom/fandom.module';
import { AccountModule } from './account/account.module';

// this from another library
import { NotificationModule } from<EMAIL_ADDRESS>
@Module({
  imports: [
    AccountModule.forRoot({ dataSourceName: 'default' }),
    CategoryModule,
    FandomModule,
    NotificationModule.forRoot(),
    AuthModule
  ],
})
export class AppModule { }

Here is my configuration:
import type sdk from "@nestia/sdk";
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./src/app.module";

const NESTIA_CONFIG: sdk.INestiaConfig = {
  input: () => NestFactory.create(AppModule),
  output: "src/api",
  distribute: "packages/api",
  primitive: false,
  simulate: true,
  assert: true
};
export default NESTIA_CONFIG;

Issue Details
In this setup, the SDK fails to generate code for two specific modules: AuthModule (an internal package in the repo) and NotificationModule (an external library).
Upon investigation, I found the issue arises from the following code snippet in the NestiaSdkApplication.ts file:
const file: ts.SourceFile | undefined = program.getSourceFile(c.file);

// c.file => /user_path/.../fzap/node_modules/.pnpm/@dailoc.lq+notification-module@0.0.1_@nestjs+common@10.3.8_@nestjs+core@10.3.8_<EMAIL_ADDRESS>
It appears that the getSourceFile function is unable to retrieve the specified file, which prevents the SDK from generating the necessary code for these modules.
Could you please investigate this issue and provide guidance on how to resolve it? Any insights or potential fixes would be greatly appreciated.
Thank you!

Can you give me a reproducible repo?

Currently, to make monorepo SDK generation working, you should generate SDK library per each package.
If you want to make it advance, can you give me a reproducible repo?

We use Nestia in a PNPM monorepo and generate the sdk as a package. Works without issues

Currently, to make monorepo SDK generation working, you should generate SDK library per each package.
If you want to make it advance, can you give me a reproducible repo?

We use Nestia in a PNPM monorepo and generate the sdk as a package. Works without issues

I think it is the monorepo composed with multiple NestJS sub repositories.
No way to build integrated SDK in such circumstance.
Just build multiple SDK libraries and merge them into one by yourself please.


Replacing for "" with "selected only" crashes the editor on certain circunstances

Godot version:
Godot v3.2.1 stable official

OS/device including version:
Windows 7 home premium service pack 1

Issue description:

When replacing "var " for "" on a block of selected code  the editor crashed
Steps to reproduce:
To reproduce, on a new script, write:
var a
var b
var c

Then, press ctrl+r, write "var " on the search box and let the replace box emprty, then check "selected only", select var a and b and press "
Minimal reproduction project:

ReplaceBug.zip
The project just contains a script named "new_script.gd"

Duplicate of #37416 (fixed in 3.2.2).


Migrate Aquamanage Project from Docker Compose to Kubernetes

Title: Migrate Aquamanage Project to Local Kubernetes with Production Configuration
Description:
We need to migrate the Aquamanage project from Docker Compose to a local Kubernetes setup. This migration will allow for better scalability and management while providing the option to toggle between local and production configurations.
Tasks:

Set up a local Kubernetes cluster (e.g., Minikube).
Convert Docker Compose services into Kubernetes manifests (Deployments and Services).
Implement ConfigMaps and Secrets for managing environment-specific configurations.
Ensure the application can switch between local and production profiles using environment variables.

Check the docker-file for more details

i want to contribute. plz assign me thank you.

Hi @RomeoIndiaJulietUniform , I would like to work on this issue

Hi @Nazneenp and @Sarveshk76,
Thank you both for your enthusiasm for this project! Given that multiple people are interested, I’ve decided to assign the task to both of you. Your pull requests will be the key differentiators.
Please work on your solutions independently and submit a pull request when you're ready. I will review and merge the one that best meets our requirements.
Looking forward to seeing your contributions!
Thanks a lot again 🙂

@Sarveshk76  @Nazneenp , If you are facing any issue to run it locally ,please refer the CONTRIBUTING.md. If you have still have problem you can raise the issue in the comment section, I will definitely help you


RFC: Add async support to wasmtime

This RFC proposes adding native support to the wasmtime crate for
imported functions which are async. Additionally it provides APIs to
call wasm functions as an async function.
rendered

This looks great and I'm really excited for this!
I think what is outlined in this RFC makes sense and I don't have concerns other than how tricky implementing a feature like this will be.
I'm also in the process of writing an RFC for "instance pools" where we can reserve all of an instance's resources upfront (with configurable constraints since limits will need to be enforced) in a module-agnostic manner to allow for extremely fast instance creation in highly-concurrent scenarios à la Lucet.  Part of that work will include setting up a region in virtual memory that can be used for the alternative stack and thus will have some overlap with this proposal.

Heh yeah I figured that the work you're doing would lend itself well to stack allocation, so seems reasonable to defer to that!

Because we are never spawning futures ourselves, and because leaf Futures hold a waker handle, we don't need to worry about taking in an executor handle or anything like that right? Basically I just want to confirm that we aren't wedding ourselves to a particular executor, which we shouldn't do.
I guess if Func::new_async et al took a handle to the executor, they could pump the event loop in place rather than switching stacks and "remotely" returning NotReady. Not advocating for this though, as event loop reentry has been a terrible hair mess every time I've ever ran into it...

Right yeah, that's a goal of this integration is that it's all executor-agnostic. Wasmtime won't necessarily be a leaf future but we'll always be executing within the context of a future's poll method, meaning we'll always have a Context to pass to any future we get from calling an async host function.

Ok I've been implementing this and I've run into a snag so far which is somewhat unfortunate. This proposed signature:
impl Func {
    pub fn new_async<'a, T, R>(
        store: &Store,
        ty: FuncType,
        state: T,
        func: fn(Caller<'a>, &'a T, &'a [Val], &'a mut [Val]) -> R,
    ) -> Func
    where
        R: Future<Output = Result<(), Trap>> + 'a,
    {
        // ...
    }
}

does not compile in that it's not what we want. The problem with this signature is that it's letting the caller pick 'a, which instead we want the callee to pick 'a (a higher-rank bound). Otherwise this, which is memory unsafe, would be allowed:
async fn foo(caller: Caller<'static>, state: &'static i32, params: &'static [Val], results: &'static [Val]) -> Result<(), Trap> {
    // ...
}

Func::new_async(store, ty, 0i32, |a, b, c, d| async { foo(a, b, c, d).await })

Clearly 'static isn't correct in this case!
Unfortunately though when using a HRTB I can't figure out how to return an unboxed future. This means that the final signature I'm working with is:
pub fn new_async<T, R, F>(store: &Store, ty: FuncType, state: T, func: F) -> Func
where
    F: for<'a> Fn(
            Caller<'a>,
            &'a T,
            &'a [Val],
            &'a mut [Val],
        ) -> Box<dyn Future<Output = Result<(), Trap>> + 'a>
        + 'static,
    T: 'static,

which... wow is that a mouthful. It expresses what we want though in that as the callee we pick 'a and you as the caller have to work with whatever we pick, meaning that the lifetimes are anonymous to you and you can't persist them beyond your call frame (which is what we want). The major downside to this is that the call-site of this function now looks like:
Func::wrap_async(store, state, |state, param| Box::new(async { state.async_method(param) }))

which... is also a mouthful.
Unfortunately though I can't really figure out how to make this more ergonomic. I basically don't know how to write a function that takes an async function. I don't think that Rust-the-language really has what we want at this time in that this is just a fact of life when working with async, but if others have suggestions on how to improve this they would be most welcome!

I think this works for making the future not a boxed trait object:
pub fn new_async<T, R, Fut, F>(store: &Store, ty: FuncType, state: T, func: F) -> Func
where
    F: for<'a> Fn(
            Caller<'a>,
            &'a T,
            &'a [Val],
            &'a mut [Val],
        ) -> Fut
        + 'static,
    T: 'static,
    Fut: Future<Output = ()>
{
    todo!()
}

Or am I missing something? I haven't actually tried calling it with anything so it might be one of those rare signatures that type checks alone, but doesn't actually work at any call sites.

Ah yeah that will indeed compile, but the problem is that the future returned can't borrow any of the input arguments with that signature or the input state itself. That means that it won't be compatible with most async fn definitions which would otherwise just take those parameters as arguments (e.g. would have &self as a method receiver).
This is where I think it's not possible in Rust, what we really want is impl Fn() -> impl Future but that requires higher-rank type parameters, not just higher-rank lifetime parameters.

Yeah you would need to put closed-over state into Arcs and clone them into an async move result or something. Whether this is better than boxing the future up into a trait object isn't clear to me.

If you can't close over the arguments, however, I fear that it loses a key bit of expressivity with async functions. One consequence, for example, is that for Func::new you can't ever actually safely fill in the results array. The returned future can't borrow it so it looks like it's only valid for the initial creation of the future, not for the duration of the future (which it actually is). Furthermore having to close over your own state is probably not how libraries are written already, generally using &self as a method receiver,  forcing you to otherwise do:
let my_state = the_rc.clone();
let func = Func::wrap_async(&store, move || {
    let futures_state = my_state.clone();
    async move { futures_state.async_method().await }
});

compared with, if you can close over state:
let my_state = the_rc.clone();
let func = Func::wrap_async(&store, my_state, move |state| {
    Box::new(async move { state.async_method().await })
});

Overall I think there's not a great answer here. Nothing feels "obviously right" because the async story in Rust is still getting baked. I think we're going to be forced to pick the lesser of two evils, and I would personally think that we should sacrifice ergonomics first before sacrificing capabilities in the API (e.g. what you can/can't borrow)

One consequence, for example, is that for Func::new you can't ever actually safely fill in the results array.

lol good point
yeah seems like a boxed trait object is the way to go until some future time when Rust gets more expressive.

Ok I've posted the initial implementation I've got for this. The only API change other than what I already mentioned above is that Func::wrap_async ended up not working out due to what I think is a compiler bug that made the ergonomics of using it unbearable. Instead of a singular Func::wrap_async there's now a huge suite of Func::wrapN_async functions that all force the closure to take a Caller<'_>.
Overall I'm really not all that happy with how the API turn out in terms of ergonomics, but I am pretty happy with where it is in terms of expressivity and what you can do with it.

I posted a comment above about checking for sync/async stores via the type system at compile time, rather than panicking at runtime.
I'm also wondering: will this be forward-compatible with wasm being able to call host functions with a promise-like interface? Right now, the current proposal still looks like a blocking call to wasm. Eventually, I'd like wasm to be able to ask the host to start a computation and return a promise, and later ask for the value from the promise, while doing other work in the interim.

AFAIK there's not any proposals right now for wasm calling a host function and getting a promise of some kind. In that sense it's hard to say. Otherwise to do what you're thinking today I believe that would need host-layer emulation where you'd return handles back to wasm and wasm could query the status of the handle later on.

On Mon, Nov 23, 2020 at 07:26:25AM -0800, Alex Crichton wrote:

I definitely agree that the scenario you're outlining is a downside. Unfortunately though I don't know of a fix other than two crates, wasmtime and wasmtime-async. Switching between async/not-async isn't really a good fit for Cargo features which are additive (but this is more mutually exclusive).

From the RFC, it sounded like async wasmtime structures could support
synchronous functions, it's just that synchronous-only wasmtime
structures can't support asynchronous functions. Is that the case? That
seems like the right use case for Cargo features: if anyone needs
async, wasmtime gets built with async support, which may add overhead
for the sync case.

@joshtriplett oh that's right for defining functions but calling functions must match the type of store. As a library  you could always define a synchronous host function, but for calling wasm you're always going to need to match the store which is where the mutual exclusivity comes into play.

Motion to finalize with a disposition to merge
I'm proposing that we merge this RFC.
Early feedback has been received and all requested outstanding changes to the proposal has been made.
An implementation in Wasmtime has already been started.
Stakeholders sign-off
Tagging all employees of BA-affiliated companies who have committed to the Wasmtime repo in the last three months plus anyone who has given feedback on this PR as a stakeholder.
Fastly

[x] @alexcrichton
[ ] @pchickey
[ ] @fitzgen
[ ] @sunfishcode
[ ] @cfallin
[ ] @iximeow

IBM

[ ] @uweigand

Intel

[ ] @abrown

Mozilla

[ ] @julian-seward1
[ ] @yurydelendik

Motion to finalize with a disposition to merge
I'm proposing that we merge this RFC.
Early feedback has been received and all requested outstanding changes to the proposal has been made.
An implementation in Wasmtime has already been started.
Stakeholders sign-off
Tagging all employees of BA-affiliated companies who have committed to the Wasmtime repo in the last three months plus anyone who has given feedback on this PR as a stakeholder.
Fastly

[x] @alexcrichton
[ ] @pchickey
[ ] @fitzgen
[ ] @sunfishcode
[ ] @cfallin
[ ] @iximeow

IBM

[ ] @uweigand

Intel

[ ] @abrown

Mozilla

[ ] @julian-seward1
[ ] @yurydelendik

@abrown would you be up for giving this a look? It's blocking #5 as well which you r+'d, and we're quite eager to merge both. (It's blocking #5 because of stack handling, and more on the implementation than the RFC side, to be clear.)

Entering Final Call Period
https://github.com/bytecodealliance/rfcs/blob/main/accepted/rfc-process.md#making-a-decision-merge-or-close

Once any stakeholder from a different group has signed off, the RFC will move into a 10 calendar day final comment period (FCP), long enough to ensure that other stakeholders have at least a full business week to respond.

The FCP will end on February 26th.

The FCP has elapsed without any objections being raised. I'm going to merge this. Thanks everybody!


remoteEntry.js use hashes?

take advantage of browser caching，like remoteEntry.[chunkhash].js

like index.html, remoteEntry as a fixed entry point of an independent module does not need hash

well, my project uses a meta data json file for load remoteEntry js, this json file contains the file name mapping of the remoteEntry file, the remoteEntry file name is dynamic, only update when content changes, like webpack chunkhash.
because the remoteEntry file size may be too large, so i want to use the characteristics of browser caching to speed up the display of pages.
but the hash I generated with the webpack compilation.hash,  you know the compilation.hash is unstable, so it would be nice  if your plugin can use like stable chunkhash.


pydocstyle is no longer maintened and has isssues with overload

We are currently using pydocstyle in our precommit.
This is deprecated https://github.com/PyCQA/pydocstyle/pull/658 and, more importantly, has a number of issues with
@overload. https://github.com/PyCQA/pydocstyle/issues/613, https://github.com/PyCQA/pydocstyle/issues/525, https://github.com/PyCQA/pydocstyle/issues/635
For example, I fail to make something like this pass our precommit
@overload __add__(self,other:float)-> float: ...

@overload __add__(self,other:int)-> int: ...

def __add__(self,other:int|float)->int|float
''' Add an int or float. '''

which I would like to use..

Also, I would vote to ignore D105
Docstrings on magic methods in magic methods are not that useful in most cases

Is this solved by #193 ?


Ignore Crosswalk image placeholder tools/crosswalk

@jiajiax this shall easy your submission; please have a check.

@zqzhang checked done , It was useful to me. thanks.


ros2_planning_system: 0.0.13-1 in 'eloquent/distribution.yaml' [bloom]

Increasing version of package(s) in repository ros2_planning_system to 0.0.13-1:

upstream repository: https://github.com/IntelligentRoboticsLabs/ros2_planning_system.git
release repository: https://github.com/IntelligentRoboticsLabs/ros2_planning_system-release.git
distro file: eloquent/distribution.yaml
bloom version: 0.9.7
previous version for package: 0.0.12-1

plansys2_bringup
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_domain_expert
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_executor
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_lifecycle_manager
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_msgs

No changes

plansys2_pddl_parser
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_planner
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_problem_expert
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

plansys2_terminal
* Add Threads to cmake. RELEASE build type
* Contributors: Francisco Martin Rico

Hi @mjcarroll
I am trying to fix the next build error in Jenkins. It has no sense for me because the test that fails if for guessing if using -lpthread or -lpthreads`, as far as I understand the error. Am I missing something?
Determining if the pthread_create exist failed with the following output:
Change Dir: /tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_300a4/fast"
make[2]: Entering directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_300a4.dir/build.make CMakeFiles/cmTC_300a4.dir/build
make[3]: Entering directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_300a4.dir/CheckSymbolExists.c.o
/usr/lib/ccache/cc   -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2    -o CMakeFiles/cmTC_300a4.dir/CheckSymbolExists.c.o   -c /tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_300a4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_300a4.dir/link.txt --verbose=1
/usr/lib/ccache/cc -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2     CMakeFiles/cmTC_300a4.dir/CheckSymbolExists.c.o  -o cmTC_300a4
CMakeFiles/cmTC_300a4.dir/CheckSymbolExists.c.o: In function `main':
./obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp/./obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp/CheckSymbolExists.c:13: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_300a4.dir/build.make:97: recipe for target 'cmTC_300a4' failed
make[3]: *** [cmTC_300a4] Error 1
make[3]: Leaving directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_300a4/fast' failed
make[2]: *** [cmTC_300a4/fast] Error 2
make[2]: Leaving directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'

File /tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_d655a/fast"
make[2]: Entering directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_d655a.dir/build.make CMakeFiles/cmTC_d655a.dir/build
make[3]: Entering directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d655a.dir/CheckFunctionExists.c.o
/usr/lib/ccache/cc   -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_d655a.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_d655a
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d655a.dir/link.txt --verbose=1
/usr/lib/ccache/cc -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_d655a.dir/CheckFunctionExists.c.o  -o cmTC_d655a -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_d655a.dir/build.make:97: recipe for target 'cmTC_d655a' failed
make[3]: *** [cmTC_d655a] Error 1
make[3]: Leaving directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_d655a/fast' failed
make[2]: *** [cmTC_d655a/fast] Error 2
make[2]: Leaving directory '/tmp/binarydeb/ros-eloquent-plansys2-terminal-0.0.12/obj-arm-linux-gnueabihf/CMakeFiles/CMakeTmp'

dh_auto_configure: cd obj-arm-linux-gnueabihf && cmake ..
This is usually because of an error building the package.
The traceback from this failure (just above) is printed for completeness, but you can ignore it.
You should look above `E: Building failed` in the build log for the actual cause of the failure.
--------------------------------------------------------------------------------------------------

Thanks!!!
Francisco

Am I missing something?

I don't believe so?  I'm going to merge this version bump and we can see what happens and go from there.
One thing I noticed is that you are explicitly setting CMAKE_BUILD_TYPE, which is unnecessary.  That should probably be propagated from the workspace-level using colcon or catkin.

@fmrico I took a second look at the logs, and this should actually resolve the issue: https://github.com/IntelligentRoboticsLabs/ros2_planning_system/pull/26
The other thread-related issues were just a knock on from the root error, which was for example:
23:07:05 CMake Error at /opt/ros/eloquent/share/plansys2_executor/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
23:07:05   By not providing "Findtest_msgs.cmake" in CMAKE_MODULE_PATH this project
23:07:05   has asked CMake to find a package configuration file provided by
23:07:05   "test_msgs", but CMake did not find one.
23:07:05
23:07:05   Could not find a package configuration file provided by "test_msgs" with
23:07:05   any of the following names:
23:07:05
23:07:05     test_msgsConfig.cmake
23:07:05     test_msgs-config.cmake
23:07:05
23:07:05   Add the installation prefix of "test_msgs" to CMAKE_PREFIX_PATH or set
23:07:05   "test_msgs_DIR" to a directory containing one of the above files.  If
23:07:05   "test_msgs" provides a separate development package or SDK, be sure it has
23:07:05   been installed.
23:07:05 Call Stack (most recent call first):
23:07:05   /opt/ros/eloquent/share/plansys2_executor/cmake/plansys2_executorConfig.cmake:38 (include)
23:07:05   CMakeLists.txt:12 (find_package)
23:07:05


Possible error in automatically filling out config.json

During server start presto-admin gives the following error message:
Fatal error: coercing to Unicode: need string or buffer, int found

Underlying exception:
    coercing to Unicode: need string or buffer, int found

Aborting.

Putting double quotes around the port number in /etc/opt/prestoadmin/config.json fixed the issue.

Is this when the config was set interactively?

Yes.

Fixed by https://github.com/prestodb/presto-admin/issues/88


[Doc] Update external table-Hive

To fix https://github.com/StarRocks/docs.zh-cn/issues/1387
Signed-off-by: amber-create<EMAIL_ADDRESS>

@mergify backport branch-3.0


Arbitrary variant selector syntax not working

Hi, thank you for your work on UnoCSS. I am working with Solid and I am trying to use UnoCSS’s arbitrary selector feature which works in the playground.
Given the following code:
function App() {
  return <>

Hello, world!

*]:[color:red]">

Hello, world!

Hello, world!

Hello, world!

Hello, world!

  </>
}

I expected all lines to be red but I’m only seeing the first line render as red.
Here’s a MVP repro: https://github.com/zaydek/solid-unocss-arbitrary-variant-bug.
Here is the playground version using the same code and config (I originally copied the config from the playground): https://uno.antfu.me/play/?html=DwEwlgbgBAxgNgQwM5ILwCIDaMD2ccBOAXAQKYgC66AfABKlz4A0UA7oXCAITAD04EagChQkWIhQZMAMmoAqCkWx5CJclWFQoowfUY4W7Apx79Im7QLoNmbDtz5WhWndf2H7ppy6t7bRk0dzETNBIA&config=JYWwDg9gTgLgBAbwFBzgEwKYDNgDsMDCEuOA5gDQpxhQYDOGMAqrhJQL5xZQQhwDkAV1YBjOnX5IkGAB6RY6bAENBAG3iYc%2BIiWCkAFMlQ16jOgC44AbSrHaDZq30BKSqgC6Sds6RA&options=N4IgLgTghgdgzgMwPYQLYgFwKgGzgUwF8g.
Is there something I’m doing wrong? Thank you.

I'm just only see playground, all lines was red. It's same as your expect.😅

I'm just only see playground, all lines was red. It's same as your expect.😅

Yes. That’s the expected output. If you open the repro I created and run npx vite you will see different results.

I found it's encoded. Can't be parsed.

Oh this must be a side-effect of Solid being transformed by Babel. I’ll bring this to the attention of Solid. Thanks for diagnosing!

Oh this must be a side-effect of Solid being transformed by Babel. I’ll bring this to the attention of Solid. Thanks for diagnosing!

Oh ! i paste your  test code in unocss' example named vite-solid project. I find it's work success.
And i'm not familiar with solid, may be giving you the wrong hint. I'm sorry to if that.
Finally, You can try and check the difference between unocss example and your repo.

Oh this must be a side-effect of Solid being transformed by Babel. I’ll bring this to the attention of Solid. Thanks for diagnosing!

Oh ! i paste your test code in unocss' example named vite-solid project. I find it's work success. And i'm not familiar with solid, may be giving you the wrong hint. I'm sorry to if that. Finally, You can try and check the difference between unocss example and your repo.

Thank you! I'll try vite-solid and check if that works.

@chris-zhu It looks like it’s the order of the plugins. By calling { ...solidPlugin(), enforce: "post" } it works. I did try to repro the repo you linked but I got the same results until I used enforce. I also tried pre on UnoCSS but got the error linked here: https://github.com/solidjs/solid/issues/1169#issuecomment-1221322246.
export default defineConfig({
  plugins: [
    {
      ...solidPlugin(),
      enforce: "post",
    },
    // ...
  ],
  // ...
})

Is there any foreseeable problem using enforce to get plugins to work together? Thank you.

Alright I’m gonna close this issue since this is working. If future Solid users run into this, you can simply use:
import { defineConfig } from "vite"
import solid from "vite-plugin-solid"
import unocss from "unocss/vite"

export default defineConfig({
  plugins: [
    unocss(),
    solid({
      hot: false,
    }),
  ],
  server: {
    port: 3000,
  },
  build: {
    target: "esnext",
  },
})

Thanks @chris-zhu!


Fixes for some CMSIS-DAPv2 and libusb issues

Fixed regression that broke CMSIS-DAPv2 support.
Better testing of USB device interfaces to detect CMSIS-DAPv2. It now properly selects the v2 interface on a device with multiple interfaces with "CMSIS-DAP" in the name.
Further cleanup of libusb error log messages. Logging of some errors was removed. The log messages about permissions issues on Linux are restricted to one message per VID/PID pair per process lifetime. These changes stop all log spewage that happened on Windows or Linux when pyOCD waits for a probe to be connected.

/morph test


File validation issues

This issue will be used to collect all info related to the verification data for 3.1.0-Preview 2 release:
Build to use: daily build from https://github.com/dotnet/core-sdk#installers-and-binaries
If you plan to create any Azure resources specifically for the verification work, please create those in the 3.1-p2-validation resource group, in the ASP.NET Core Test subscription.
Make sure to create the issues in aspnet/AspNetCore repo and apply the proper area label and Validation label. Put the issue in 3.1.0-preview2 milestone.
After you create the issues, add them to the https://github.com/aspnet/AspNetCore/projects/4 project and unassign yourself from this issue.

Nothing in build area should be user-visible and we didn't change OpenAPI glue in this release.

https://github.com/aspnet/AspNetCore/issues/15233
https://github.com/aspnet/AspNetCore/issues/15232
https://github.com/aspnet/AspNetCore/issues/15231
https://github.com/aspnet/AspNetCore/issues/15230
https://github.com/aspnet/AspNetCore/issues/15229

https://github.com/aspnet/AspNetCore/issues/15250
https://github.com/aspnet/AspNetCore/issues/15249

https://github.com/aspnet/AspNetCore/issues/15239
https://github.com/aspnet/AspNetCore/issues/15237
https://github.com/aspnet/AspNetCore/issues/15236
https://github.com/aspnet/AspNetCore/issues/15235
https://github.com/aspnet/AspNetCore/issues/15221

https://github.com/aspnet/AspNetCore/issues/13777
https://github.com/aspnet/AspNetCore/issues/14110
https://github.com/aspnet/AspNetCore/issues/14653
https://github.com/aspnet/AspNetCore/issues/14868
https://github.com/aspnet/AspNetCore/issues/14902
https://github.com/aspnet/AspNetCore/issues/15068
https://github.com/aspnet/AspNetCore/issues/15070
https://github.com/aspnet/AspNetCore/issues/15071
https://github.com/aspnet/AspNetCore/issues/15122
https://github.com/aspnet/AspNetCore/issues/15162


Allow title prop to be of type PropTypes.element

Hi @HugoGiraudel, here's a small feature request.
This PR updates the allowed type for the title prop of react-a11y-dialog.
With this update it's not only possible to use strings as a valid type for the title prop but also PropTypes.element. In my case I always show the dialog title to users, but also wanted to include an decorative SVG icon, which is an element.
If you find this useful please consider to merge this pull-request.
I already did npm run lint && npm run build.
Cheers
Eric

Hey there. Thank you very much for taking the time to do that. I think that’s a good idea, although I’d like to move the next version of the library to render props to give more controls to authors about how they want to render their dialog.
I’m going to release this one in the mean time. Thanks again. :)


refactor(docker): remove old scripts

Codecov Report

Merging #403 (369876a) into master (e33e563) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 369876a differs from pull request most recent head c5d3af4. Consider uploading reports for the commit c5d3af4 to get more accurate results

@@           Coverage Diff           @@
##           master     #403   +/-   ##
=======================================
  Coverage   45.60%   45.60%
=======================================
  Files          56       56
  Lines        3250     3250
  Branches      561      561
=======================================
  Hits         1482     1482
  Misses       1599     1599
  Partials      169      169

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 e33e563...c5d3af4. Read the comment docs.


ValueError raised when Nested Discriminated Unions are used twice

Checks

[x] I added a descriptive title to this issue
[x] I have searched (google, github) for similar issues and couldn't find anything
[x] I have read and followed the docs and still think this is a bug

Bug
The Following code is copied from doc as is except for the last Model2:
from typing import Literal, Union

from typing_extensions import Annotated

from pydantic import BaseModel, Field, ValidationError

class BlackCat(BaseModel):
    pet_type: Literal["cat"]
    color: Literal["black"]
    black_name: str

class WhiteCat(BaseModel):
    pet_type: Literal["cat"]
    color: Literal["white"]
    white_name: str

# Can also be written with a custom root type
#
# class Cat(BaseModel):
#   __root__: Annotated[Union[BlackCat, WhiteCat], Field(discriminator='color')]

Cat = Annotated[Union[BlackCat, WhiteCat], Field(discriminator="color")]

class Dog(BaseModel):
    pet_type: Literal["dog"]
    name: str

Pet = Annotated[Union[Cat, Dog], Field(discriminator="pet_type")]

class Model(BaseModel):
    pet: Pet
    n: int

# The above code is copied as is, the following is added
class Model2(BaseModel):
    pet: Pet
    n: int

Run the above code, without the last Model2, the code runs well, but with Model2, the code throws the following error:
Traceback (most recent call last):
  File "/Users/stephen/Work/medieco/hub/hub-api/test.py", line 41, in <module>
    class Model2(BaseModel):
  File "pydantic/main.py", line 204, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 488, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 419, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 534, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 599, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 633, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 776, in pydantic.fields.ModelField._create_sub_type
  File "pydantic/fields.py", line 451, in pydantic.fields.ModelField._get_field_info
ValueError: `Field` default cannot be set in `Annotated` for "pet_Annotated[Union[__main__.BlackCat, __main__.WhiteCat], FieldInfo(discriminator='color', extra={})]"

Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.9.0
            pydantic compiled: True
                 install path: /Users/stephen/work/.venv/lib/python3.9/site-packages/pydantic
               python version: 3.9.0 (default, Dec 20 2020, 11:26:29)  [Clang 12.0.0 (clang-1<IP_ADDRESS>)]
                     platform: macOS-12.1-x86_64-i386-64bit
     optional deps. installed: ['dotenv', 'email-validator', 'typing-extensions']

BTW, I find that the code works with pydantic 1.8.2, so this problem may be introduced via 1.9.0

I also experience the same behavior as @StephenPCG.
C:\dev\pydantic-discrimination-union-problem>python -c "import pydantic.utils; print(pydantic.utils.version_info())"
             pydantic version: 1.9.0
            pydantic compiled: True
                 install path: C:\Users\jol\venv\pydantic-discrimination-union-problem\Lib\site-packages\pydantic
               python version: 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)]
                     platform: Windows-10-10.0.19043-SP0
     optional deps. installed: ['typing-extensions']

I have a bigger example (source) using FastAPI.
import enum
from typing import List, Union, Literal

from typing_extensions import Annotated
from fastapi import FastAPI
from pydantic import Field, BaseModel
import uvicorn

class CutleryTypeEnum(enum.IntEnum):
    KNIFE = 1
    FORK = 2
    SPOON = 3

class CutleryBase(BaseModel):
    name: str

class Knife(CutleryBase):
    cutlery_type_id: Literal[CutleryTypeEnum.KNIFE]

class Fork(CutleryBase):
    cutlery_type_id: Literal[CutleryTypeEnum.FORK]
    number_of_teeth: int = None

class Spoon(CutleryBase):
    cutlery_type_id: Literal[CutleryTypeEnum.SPOON]
    volume: float = None

Cutlery = Annotated[
    Union[Knife, Fork, Spoon],
    Field(discriminator='cutlery_type_id'),
]

app = FastAPI()

@app.get("/cutlery",
         response_model=List[Cutlery])
async def get_cutlery():
    return [{'cutlery_type_id': CutleryTypeEnum.KNIFE, 'name': 'My sharp knife'},
            {'cutlery_type_id': CutleryTypeEnum.FORK, 'name': 'The three teeth fork'},
            {'cutlery_type_id': CutleryTypeEnum.SPOON, 'name': 'Tea spoon'}]

#
# Enable the second usage of Cutlery result in traceback on startup
#

@app.get("/cutlery2",
         response_model=List[Cutlery])
async def get_cutlery():
    return [{'cutlery_type_id': CutleryTypeEnum.KNIFE, 'name': 'My sharp knife'},
            {'cutlery_type_id': CutleryTypeEnum.KNIFE, 'name': 'My knife is sharp'},
            {'cutlery_type_id': CutleryTypeEnum.FORK, 'name': 'The three teeth fork'},
            {'cutlery_type_id': CutleryTypeEnum.SPOON, 'name': 'Tea spoon'}]

uvicorn.run(app, host='<IP_ADDRESS>', port=80)

If I enable the endpoint /cutlery2 I get the following traceback on start-up:
python main.py
Traceback (most recent call last):
  File "C:\dev\pydantic-discrimination-union-problem\main.py", line 55, in <module>
    async def get_cutlery():
  File "C:\Users\jol\venv\pydantic-discrimination-union-problem\lib\site-packages\fastapi\routing.py", line 582, in decorator
    self.add_api_route(
  File "C:\Users\jol\venv\pydantic-discrimination-union-problem\lib\site-packages\fastapi\routing.py", line 525, in add_api_route
    route = route_class(
  File "C:\Users\jol\venv\pydantic-discrimination-union-problem\lib\site-packages\fastapi\routing.py", line 351, in __init__
    self.response_field = create_response_field(
  File "C:\Users\jol\venv\pydantic-discrimination-union-problem\lib\site-packages\fastapi\utils.py", line 65, in create_response_field
    return response_field(field_info=field_info)
  File "pydantic\fields.py", line 419, in pydantic.fields.ModelField.__init__
  File "pydantic\fields.py", line 534, in pydantic.fields.ModelField.prepare
  File "pydantic\fields.py", line 728, in pydantic.fields.ModelField._type_analysis
  File "pydantic\fields.py", line 776, in pydantic.fields.ModelField._create_sub_type
  File "pydantic\fields.py", line 451, in pydantic.fields.ModelField._get_field_info
ValueError: `Field` default cannot be set in `Annotated` for '_Response_get_cutlery_cutlery2_get'

No errors if I inline the Annotated type like this:
@app.get("/cutlery",
         response_model=List[Annotated[
             Union[Knife, Fork, Spoon],
             Field(discriminator='cutlery_type_id'),
         ]])
async def get_cutlery():
    return [{'cutlery_type_id': CutleryTypeEnum.KNIFE, 'name': 'My sharp knife'},
            {'cutlery_type_id': CutleryTypeEnum.FORK, 'name': 'The three teeth fork'},
            {'cutlery_type_id': CutleryTypeEnum.SPOON, 'name': 'Tea spoon'}]

Replacing my Cutlery class with this seems to work OK:
class Cutlery(BaseModel):
    __root__: Annotated[
        Union[Knife, Fork, Spoon],
        Field(discriminator='cutlery_type_id'),
    ]

BTW, I find that the code works with pydantic 1.8.2, so this problem may be introduced via 1.9.0

Thanks for that.  Some code working last year with 1.8.2 is not working with 1.9.0 and it looks like this is the reason.

Also experiencing this error. In my case the error appears when I use an Annotated field twice in the same model. Using Pydantic v1.9.0.
from typing import Literal, Union, List
from typing_extensions import Annotated
from pydantic import BaseModel, Field

class Cat(BaseModel):
    pet_type: Literal['cat']

class Dog(BaseModel):
    pet_type: Literal['dog']

Pets = Annotated[Union[Cat, Dog], Field(discriminator='pet_type')]  # noqa: F821

class Model(BaseModel):
    pets_field1: Pets
    pets_field2: List[Pets]

ValueError: 'Field' default cannot be set in 'Annotated' for 'pets_field2'

I think the fundamental problem here is the usage of our Annotated class inside a List[]. The code around this is way too complicated for me to understand.
@havardthom have you tried to define Pets as:
class Pets(BaseModel):
    __root__: Annotated[
        Union[Cat, Dog],
        Field(discriminator='pet_type'),
    ]

I think the fundamental problem here is the usage of our Annotated class inside a List[]. The code around this is way too complicated for me to understand.
@havardthom have you tried to define Pets as:
class Pets(BaseModel):
    __root__: Annotated[
        Union[Cat, Dog],
        Field(discriminator='pet_type'),
    ]

Yes I got it working with root model, although I had to refactor parts of my solution to extract the __root__ object. A pure annotation field would be preferable.

I confirm that the following code runs smoothly in pydantic 1.8.2 but raises an error (as noted) in 1.9.0
from __future__ import annotations

from typing import List
from typing import Literal
from typing import Union

from pydantic import BaseModel
from pydantic import Field
from typing_extensions import Annotated

class A(BaseModel):
    operator: Literal["a"]
    foo: str
    cs: List[C]

class B(BaseModel):
    operator: Literal["b"]
    foo: str
    cs: List[C]

C = Annotated[
    Union[A, B],
    Field(discriminator="operator"),
]

A.update_forward_refs()

# B is not prepared and requires call to update_forward_refs
# but this will yield a ValueError in pydantic 1.9.0
B.update_forward_refs()
# ValueError: `Field` default cannot be set in `Annotated` for '_cs'

Ran into this too, I've tried to see if I can understand what is causing this as the DiscriminatedUnion feature is super helpful!
Looks like this is a regression that was previously caught here.
The issue seems to be that the FieldInfo/Annotation is being mutated to set the default, which means on the second time around this is getting tripped up
The regression appears to be introduced here when the __eq__ was fixed: #2502.
@PrettyWood/@JacobHayes - do you think it would it make sense to have a way of cloning the object here to avoid mutating the object here? Or would it be possible to avoid setting the default value here all together? #

I've tested a fix where we do not mutate the original FieldInfo object, but this causes failures else where (in tests that do not directly call _get_field_info) so the it looks like the copy/new is a no go unfortunately.

Appears to be related to this too #3702

I confirm that the following code runs smoothly in pydantic 1.8.2 but raises an error (as noted) in 1.9.0
from __future__ import annotations

from typing import List
from typing import Literal
from typing import Union

from pydantic import BaseModel
from pydantic import Field
from typing_extensions import Annotated

class A(BaseModel):
    operator: Literal["a"]
    foo: str
    cs: List[C]

class B(BaseModel):
    operator: Literal["b"]
    foo: str
    cs: List[C]

C = Annotated[
    Union[A, B],
    Field(discriminator="operator"),
]

A.update_forward_refs()

# B is not prepared and requires call to update_forward_refs
# but this will yield a ValueError in pydantic 1.9.0
B.update_forward_refs()
# ValueError: `Field` default cannot be set in `Annotated` for '_cs'

Using a redefinition of C like suggested above (and in the docs)
class C(BaseModel):
  __root__: Annotated[Union[A, B], Field(discriminator="operator")]

does make the code run. However, it seems to also require some additional imho rather ugly attribute access
b = B(operator="b", foo="foo", cs=[A(operator="a", foo="bar", cs=[]] )
print( b.cs[0].__root__.bar ) # instead of previously b.cs[0].bar

Thanks, this helped me with a similar problem with nested attribute Unions. On the note of ugly attribute access, this is how I fixed that:
class C(BaseModel):
  __root__: Annotated[Union[A, B], Field(discriminator="operator")]

  def __getattr__(self, attr):
      return getattr(self.__root__, attr)


enable only on certian ENV

I want to only do browsersync when i do yarn start-bs
how do i do this in webpack config?

@theskillwithin Hello!
using the config from the documentation, you can simply add a new line to scripts in package.json:
"scripts": {
  "start-bs": "cross-env NODE_ENV=development webpack --watch",
  "prod": "cross-env NODE_ENV=production webpack"
},

Let me know if it works for you

the above comment is a valid solution. for the absence of further discussion, i close this. thank you, guys