Use JSON schema to validate webpack config (fixes #2971)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

[x] Feature

What is the current behavior? (You can also link to an open issue here)
Validation is limited to a simple condition:
if(!options.entry && !options.plugins) {
  throw new Error("Passed 'options' object does not look like a valid webpack configuration");
}

What is the new behavior?
Validation logic is expressed using ./schemas/webpackOptionsSchema.json JSON schema.
Does this PR introduce a breaking change?

[x] Yes

If this PR contains a breaking change, please describe the following...

Impact:
An error is thrown when an unknown configuration is encountered in webpack options object.
This error might appear now because previously unknown configuration was ignored.

Migration path for existing applications:
Remove unknown configuration properties from webpack options object.
To configure a loader, use LoaderOptionsPlugin.
For a list of valid configuration properties, refer to the webpack documentation (https://webpack.github.io/docs/configuration.html).

Github Issue(s) this is regarding:
https://github.com/webpack/webpack/issues/2971

Other information:

Need to discuss how to approach testing.
JSON schema is declarative. Therefore, the contents of the schema should not be tested. The implementation testing is left to https://github.com/epoberezkin/ajv.

Need to discuss how to inform user about errors.
Just throwing an error is not enough.

Passed 'options' object does not look like a valid webpack configuration

I am fine with the current implementation – throwing an error and printing detail info to the console.log. I can see how someone can dislike this.

Outstanding tasks

[ ] Waiting for @sokra to come back on https://github.com/webpack/webpack/pull/2974#discussion_r78160976
[x] Waiting for a decision/ solution regarding a pre-existing failing test condition https://github.com/webpack/webpack/pull/2974#issuecomment-245860191

Tests are failing because:
[ { keyword: 'additionalProperties',
    dataPath: '',
    schemaPath: '#/additionalProperties',
    params: { additionalProperty: 'name' },
    message: 'should NOT have additional properties' } ]

[ { keyword: 'additionalProperties',
    dataPath: '',
    schemaPath: '#/additionalProperties',
    params: { additionalProperty: 'optimize' },
    message: 'should NOT have additional properties' } ]

[ { keyword: 'additionalProperties',
    dataPath: '',
    schemaPath: '#/additionalProperties',
    params: { additionalProperty: 'worker' },
    message: 'should NOT have additional properties' } ]

[ { keyword: 'additionalProperties',
    dataPath: '',
    schemaPath: '#/additionalProperties',
    params: { additionalProperty: 'updateIndex' },
    message: 'should NOT have additional properties' } ]

[ { keyword: 'additionalProperties',
    dataPath: '',
    schemaPath: '#/additionalProperties',
    params: { additionalProperty: 'stats' },
    message: 'should NOT have additional properties' } ]

can anyone contribute a description for these? (they are not present in https://webpack.github.io/docs/configuration.html)

Please add *.json to the .editorconfig.

name is a valid property used to give configs a name when using multiple configurations in an array.
optimize is invalid. It's old syntax and no longer used.
worker is used by the worker-loader, but it should not be on the config object, but the config should use the LoadersOptionsPlugin instead.
stats is valid. It allows to pass stat options to the CLI.
updateIndex is used by the HMR test cases, but can also be rewritten to use the LoadersOptionsPlugin

Info on stats @gajus can be gathered from here.
https://github.com/webpack/webpack/blob/master/lib/Stats.js

Also would this error for a user if they added an additional custom property (some sort of metadata) to their config? I know quite a few who do this, and use those options, etc.

I'm not sure if we should throw when additional keys are encountered... webpack 2 should not have too many breaking changes. It's ok to discourage it and display warnings, but I don't think that we should break. The sass- and the less-loader for instance provide the possibility to read options from the config (because we had to deal with functions as options).

Please add *.json to the .editorconfig.

b4e6604

worker is used by the worker-loader, but it should not be on the config object, but the config should use the LoadersOptionsPlugin instead.

This ought to be a simple change from:
module.exports = {
	worker: {
		output: {
			filename: "hash.worker.js",
			chunkFilename: "[id].hash.worker.js"
		}
	}
}

to:
var webpack = require("../../");
module.exports = {
	plugins: [
		new webpack.LoaderOptionsPlugin({
			options: {
				worker: {
					output: {
						filename: "hash.worker.js",
						chunkFilename: "[id].hash.worker.js"
					}
				}
			}
		})
	]
}

Correct?

Correct?

Yes.
I forgot npm link webpack.

@sokra
git clone https://github.com/webpack/webpack.git
cd webpack
npm install
npm link
npm link webpack
npm test

is giving:
  1) ConfigTestCases extract-text issue-14 should compile:
     Error: global leak detected: addresses
      at Runner.checkGlobals (/dev/node_modules/mocha/lib/runner.js:210:21)
      at Runner.<anonymous> (/dev/node_modules/mocha/lib/runner.js:73:10)
      at emitOne (events.js:101:20)
      at Runner.emit (events.js:188:7)
      at /dev/node_modules/mocha/lib/runner.js:557:14
      at done (/dev/node_modules/mocha/lib/runnable.js:287:5)
      at /dev/node_modules/mocha/lib/runnable.js:360:7
      at _combinedTickCallback (internal/process/next_tick.js:67:7)
      at process._tickCallback (internal/process/next_tick.js:98:9)

Unrelated to this PR.

worker is used by the worker-loader, but it should not be on the config object, but the config should use the LoadersOptionsPlugin instead.

70e4a1e

updateIndex is used by the HMR test cases, but can also be rewritten to use the LoadersOptionsPlugin

e42ddb2

No comments on the error handling?

The sass- and the less-loader for instance provide the possibility to read options from the config (because we had to deal with functions as options).

My understanding is that all options need to be passing using webpack.LoaderOptionsPlugin.

There will still be loader queries in webpack 2 (and tbh I don't know what the difference between an option and a query is).
My problem with this change is, that it needs some time to be implemented in the community. Loader authors need to update their code and publish new versions of it, people need to update their dependencies. I would like to have a smooth transition where you get a warning with webpack 2 and an error with webpack 3.

Options and queries are interchangeable.
Loader authors are not affected. No code change is required to the loader to accept options passed using LoaderOptionsPlugin. Therefore, no update is needed of dependencies.
As I said earlier, this only affects webpack configuration.

On Sep 9, 2016, at 12:15, Johannes Ewald<EMAIL_ADDRESS>wrote:
There will still be loader queries in webpack 2 (and tbh I don't know what the difference between an option and a query is).
My problem with this change is, that it needs some time to be implemented in the community. Loader authors need to update their code and publish new versions of it, people need to update their dependencies. I would like to have a smooth transition where you get a warning with webpack 2 and an error with webpack 3.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

No code change is required to the loader to accept options passed using LoaderOptionsPlugin. Therefore, no update is needed of dependencies.

It depends on how robust the loader was developed. I took a quick look at the sass- and the less-loader which both had to read from the webpack config object because they had to support function options and it seems like they all support the new behavior by accident because they populate the config from the query and the webpack config object (see here and here). Also the markdown-loader does this by accident. If this code was written in a way these specific options can only be configured on the webpack options object, the author would need to update it.
Since the sass- and the less-loader would support the new way out-of-the-box, the impact of this change is probably not as big as I've assumed. However, I don't know how many loaders out there would need a fix for this.
@gajus I really like this change and thanks for your effort 👍. I just don't want to introduce too many actual breaking changes just because it's webpack 2. We may break things, but l want to give people time to adjust their code.
What do other people think about this? @TheLarkInn @bebraw @sokra

ConfigTestCases extract-text issue-14 should compile:
Error: global leak detected: addresses

Thank you @sokra
37066fc692a0e981f25aeb6010bedf5e5f886c53

@jhnns Warnings in webpack 2 and failing hard in webpack 3 would seem the sanest way to me too. That way we get at least some value from validation while giving depending projects time to catch up.

@jhnns Warnings in webpack 2 and failing hard in webpack 3 would seem the sanest way to me too. That way we get at least some value from validation while giving depending projects time to catch up.

Sounds reasonable.
I would only argue that since webpack 2 is still not released, making this a breaking change shouldn't be a concern. This is not changing webpack configuration API. It only enforces not to use configuration that shouldn't be there in the first place. Considering that any existing project that uses webpack@2-beta at the moment is under an active development, it would be a minor annoyance.

It definitely needs to only warn in webpack 2. We are only holding webpack 2 in beta until documentation is released. This is essentially a Release Candidate. This features original purpose is to help validate the types of properties that are in the schema.
If these can be handled by giving deprecation warnings, please do so. After webpack 2, v3 brings a lot of breaking changes for usability .etc.

It definitely needs to only warn in webpack 2. We are only holding webpack 2 in beta until documentation is released. This is essentially a Release Candidate. This features original purpose is to help validate the types of properties that are in the schema.

Understood.
Earlier @sokra comment asked to remove console.log from the API. If we are going this route, I will need to re-add it.

Earlier @sokra comment asked to remove console.log from the API

You're right 😁.  @sokra is probably more keen to break things, but I don't agree with him in this regard. Since webpack is one of the most popular JS projects, we should be more conservative with breaking things.

It only enforces not to use configuration that shouldn't be there in the first place

Unfortunately, this is not true. We have added this as advice to our docs as a makeshift because we did not know how to deal with this.

@andreypopp you have dealt with some of the error messaging. Do you have a good suggestion for @gajus that would allow for warning on additional properties in the webpack config?

Alright after @webpack/collab-team discussed, we decided that we will let this error, however to merge this PR must fulfill these requirements:

[ ] Provides error messages that describe in clear detail to the user how to remedy this error via LoaderOptionsPlugin();. Since the validation knows exactly what properties are additional, you can use the erroring data to output a solution the user can copy and paste into their config.

[ ] Modify your Breaking Change instructions in PR Long message field to be more than:

Migration path for existing applications: Fix configuration.

User will need to see use case and example of what will error, and how to remedy this.

[..] Since the validation knows exactly what properties are additional, you can use the erroring data to output a solution the user can copy and paste into their config.

That makes an assumption that the additional property is a loader property.
There is no way to distinguish whether user made a typo (e.g. "debuq" instead of "debug"), or if the user's intention was to pass a property to the loader (e.g. "sassLoader").
Therefore, telling user to add the configuration to LoaderOptionsPlugin would be misguiding.
However, a phrasing such as:

"foo" is an unknown property.
To configure a loader, use LoaderOptionsPlugin.
For everything else, refer to the webpack documentation (https://webpack.github.io/docs/configuration.html).

Modify your Breaking Change instructions in PR Long message field to be more than:

How about:

Remove unknown configuration properties from webpack options object.
To configure a loader, use LoaderOptionsPlugin.
For a list of valid configuration properties, refer to the webpack documentation (https://webpack.github.io/docs/configuration.html).

yeah, but the link should be http://webpack.js.org/api/configuration/
Don't link to the old documentation.

Using custom properties which do not exist on the webpack schema will now throw an error during validation. Users now will need to use LoaderOptionsPlugin({}). Therefore the following example:

module.exports = config;

const config = {
  sassLoader: {
    includePaths: [
      /*...*/
    ]
  }

};

Will need to be migrated to look as follows:
module.exports = config;

const customLoaderOptions = {
  sassLoader: {
      includePaths: [
        /*...*/
      ]
    }
};

const config = {
  plugins: [
    webpack.LoaderOptionsPlugin({
      options: customLoaderOptions;
    });
  ]

};

Something like this I would assume. In addition providing the link to documentation.

Also tagging @gaearon @hansl @filipesilva @taylorotwell as this could impact their respective projects if they are using loaders which require custom properties in the webpack config. I'll try and communicate this in your respective repo's also.

Current coverage is 11.42% (diff: 100%)

Merging #2974 into master will not change coverage

@@             master      #2974   diff @@
==========================================
  Files             1          1
  Lines            35         35
  Methods           6          6
  Messages          0          0
  Branches          6          6
==========================================
  Hits              4          4
  Misses           31         31
  Partials          0          0

Powered by Codecov. Last update 37066fc...76920b3

btw. the long-term goal is to get these options back into the query object, by allowing any value in queries...

That makes an assumption that the additional property is a loader property.

There is no way to distinguish whether user made a typo (e.g. "debuq" instead of "debug"), or if the user's intention was to pass a property to the loader (e.g. "sassLoader").

This is true. I would want the error to still be intuitive for the user if it can be. Can we do better than what we have?

Lets start with the error message.
this.message = "Passed 'options' object does not look like a valid webpack configuration.";

This can be rephrased to:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match API schema. Inspect validationErrors property of the error to learn what checks have failed.

Regarding the console log error.
console.error("Configuration is invalid. Fix the following errors:", webpackOptionsValidationErrors);

This can be rephrased to:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match API schema. The following checks have failed.
[... list of failed checks]

Sounds good to me. 👍
Shouldn't it be "that does not match the API schema"?

Shouldn't it be "that does not match the API schema"?

Corrected. Thank you.

Message phrasing has been improved. 9e0a95e
Can this be merged?

If I do an npm install with a package.json setup like: "webpack": "https://github.com/webpack/webpack"
I get the error:
> cross-env NODE_ENV=production webpack --bail --progress --color --display-error-details --profile

module.js:327
    throw err;
    ^

Error: Cannot find module '../schemas/webpackOptionsSchema.json'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/rupesh/Documents/src/project-name/node_modules/webpack/lib/validateWebpackOptions.js:5:28)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)

And sure enough the folder and file in the path mentioned are missing on the file system.
Is anyone else seeing this?

schemas is missing in package.json files. You can send a PR.

schemas is missing in package.json files. You can send a PR.

https://github.com/webpack/webpack/pull/3013

A breaking change from 2.1.0-beta22 to 2.1.0-beta23 really sucks. You might really broke a lot of CI system today...

beta22 and beta23 are both prerelease versions and there has not been a 2.x release yet.
sokra has every right as defined by semver to make breaking changes

Having the "right" to do something is a thing. Not caring about current users (that help to test prerelease right?) and upgrade path is another thing.

"testing" and "depending" on prerelease software are different things
if webpack can't make breaking changes then it will just end up with tonnes of bloat and be slow
I think this is a good change, random plugins should not pollute the config with random keys in case webpack wants to use them in the future
instead of complaining about it, we could help come up with a solution, for example,
maybe webpack could add a loaderConfig: {} option which loader and plugin authors could use for their config without using the global config
so loaders just go config.loaderConfig[loaderName] instead of config[loaderName]
Also thanks, I have been looking into static site generators atm so I might look at phenomic when I get home

I think this is a good change, random plugins should not pollute the config with random keys in case webpack wants to use them in the future

It definitely is.
I think a simpler workaround than having to use a plugin to pass data should be offered. The errow thrown does not event mention a solution. I could say
If your configuration currently use non webpack related properties (eg: eslint, sass, postcss etc.), you should pass those data by using `LoaderOptionsPlugin`. Please refer to XXX for more detail

I think the best solution will be to support real JS for query. It's the best user experience we can offer an make configuration for loader even more clear than having to split in multiple places.

i have a trouble in webpack2 . but i'm tring to use webpack1' way to code my webapck2.
and ....there is some thing wrong in postcss-loader
<addr> module : {
loaders : [
{test:/.js$/,loader:'babel-loader',exclude:path.resolve(__dirname,'node_modules'),
//绝对路径 只解析src下的提高打包性能
include:path.resolve(__dirname,'src')},
{test:/.css$/,loader:'style-loader!css-loader!postcss-loader'}
]
},
plugins : {
//for postcss
new webpackLoaderOptionsPlugin({
options : {
postcss : function(){
return [auroprefixer]
},
devServer: {
contentBase: "./public", //本地服务器所加载的页面所在的目录
colors: true, //终端中输出结果为彩色
historyApiFallback: true, //不跳转
inline: true //实时刷新
}
}
}),
======just part of them
there is error
angular-oms-front\webpack.config.js:27
new webpackLoaderOptionsPlugin({
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at requireConfig (E:\another\angular-oms-front\node_modules\webpack\bin\convert-argv.js:96:18)
at E:\another\angular-oms-front\node_modules\webpack\bin\convert-argv.js:109:17
(i'm not good at english .waiting your reply)

@huizi666 plugins should be an array. Could you please open support request at Stack Overflow and other channels? Thanks. 👍

I dont understand about "support request",but this is my git ，could you please gitclone git@github.com:huizi666/angular-webpack.git  . And checkout the webpack.config.js   Thanks~~ @bebraw

@bebraw  may you can send me an email<EMAIL_ADDRESS>~ ^_^


Integrating multiple flutter modules into an Android application fails

Greetings
We are trying to integrate two different flutter modules into our Android application.
We are integrating the modules as AARs as outlined here:
https://docs.flutter.dev/development/add-to-app/android/project-setup
However, we encounter the following error:
Duplicate class com.org1.lib.BuildConfig found in modules jetified-flutter_debug-1.0-runtime (:flutter_module:) and jetified-flutter_debug-1.0-runtime (flutter_module.aar) Duplicate class io.flutter.plugins.GeneratedPluginRegistrant found in the following modules: jetified-flutter_debug-1.0-runtime (:flutter_module:), jetified-flutter_debug-1.0-runtime (flutter_module.aar) and jetified-flutter_release-1.0-runtime (com.org2.sdk:flutter_release:1.0)
I see that there is an existing issue that is related:
https://github.com/flutter/flutter/issues/39707
We tried experimenting with the workarounds suggested. However, none of them worked within our constraint i.e. using AAR files for the flutter modules.
Please help.
Thanks.

Thanks for the report @rushilsingh
I think the error you are getting could be due to the fact that Flutter generates dependency aar with version of their parent instead of the version of dependency.
The multiple flutter modules you are using could be using dependencies which could be using conflicting class names somehow and hence throwing the reported error:
Duplicate class com.org1.lib.BuildConfig found in modules jetified-flutter_debug-1.0-runtime (:flutter_module:) and jetified-flutter_debug-1.0-runtime (flutter_module.aar) Duplicate class io.flutter.plugins.GeneratedPluginRegistrant found in the following modules: jetified-flutter_debug-1.0-runtime (:flutter_module:), jetified-flutter_debug-1.0-runtime (flutter_module.aar) and jetified-flutter_release-1.0-runtime (com.org2.sdk:flutter_release:1.0)
There's a similar issue open that points to related use case in which you can follow-up for further updates: https://github.com/flutter/flutter/issues/117359
I am closing this as a duplicate. If you disagree, write in comments and I'll reopen it.

Thanks for your response @darshankawar
The conflicting dependency is flutter itself.
The conflicting class name GeneratedPluginRegistrant is coming auto-generated code in the .android folder resulting from the 'flutter build aar' command.


feat: add support for Step Functions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

.otherwise() is standing in for the operation ASL calls "Default":, so why not say .default()?

Because that's a reserved keyword in most languages we're targeting (by way of switch/case/default). Same for else.

I think it'd be nice if the thing you use to catch errors at least had "catch" somewhere in its name. As you point out, "catch" is a keyword in lots of languages,

Best I can think of then is addCatch, to go along with addRetry. Better?

Because that's a reserved keyword in most languages we're targeting (by way of switch/case/default). Same for else.

How about nextState, catchState, defaultState?


Develop

fix bug of showing wrong total for shared dashboards
add the range to the total number directive
refine the directive controller to reduce method calls

Current coverage is 36.04% (diff: 100%)

No coverage report found for develop at 60ddd22.

Powered by Codecov. Last update 60ddd22...51cc276


Manual integration instructions

How to integrate Moya into my project manually. Thanks

Hmm, this is a question that has not come up before. Generally, there's no all-purpose solution to using a CocoaPods library without CocoaPods. If you must integrate normally, dragging in the Moya files in the Source directory should age good, but you'll need to remove RxSwift and ReactiveCocoa files if you aren't using them, also integrate Alamofire, and remove the import Alamofire statements from the Moya files. That should do it – let me know if you run into issues.

thanks. I download Moya-4.4.0 to my project. dragging the Moya.xcodeproj to project  and remove RxSwift 、ReactiveCocoa  also remove the import Alamofire from the Moya files. Click on the + button under the "Embedded Binaries" section. add the Moya.framework.  Then have an error:
clang: error: no such file or directory: '/Users/xiaolei/Library/Developer/Xcode/DerivedData/WeatherQ-cvhqwncoeewmnxemtgteetjgepxd/Build/Products/Debug-iphonesimulator/Moya.framework/Moya'

Instead of dragging in Xcode projects, try dragging in the individual swift files.

The reason the Xcode project won't work is because it relies on frameworks that aren't present in the folder. You need to run carthage bootstrap to get them. Other than that, just dragging the project should work. No need to delete anything.

It might be worth doing what AFNetworking does and just not supporting manual installation, you need to have a lot of prerequisites set up for Moya, and the more useful interesting stuff can only really happen when you have a larger dependency graph, of which doing manually is just a waste of time.

Agreed.


onSlideChangeEnd is not firing when sliding fast and over the slides

onSlideChangeEnd is not firing when you move fast and in the beginning or in the end you still try to slide  more. This happens at least when using iOS 8.1.3. and Safari.
My settings:
pagination: '.pagination',
speed: 450,
loop: false,
paginationClickable: false,
resistance : "100%",
noSwiping : false,
longSwipesRatio : 0.35,
eventTarget: 'container',

It was discussed many times, because when you slide fast there is no "transitionend" event. Anyway, check Swiper 3


added read option

i removed about from the navbar i thought of placing it in home page and added all necessary UI for read option

i removed about from the navbar i thought of placing it in home page and added all necessary UI for read option

But why have I assigned any issue like that to u ?

@Sayak-Bhunia not actually but when I placed read option they are getting congested in the navbar  so  changed it where read contains the memes ,lifestories and 3 more sessions loke that

@Sayak-Bhunia sorry i forgot i intimate you before i will change and make other pr can you please then where should i place this new read option

@Sayak-Bhunia sorry i forgot to intimate you before doing, i will change and make other pr again  can you please tellme  where should i place this new read option

Well I don't want the read option to be used.


correct inception_v3 network

@fchollet
According to Table 1 in paper and inception_v3 implement from TensorFlow, I found that there are some mismatch numbers. Please check it, great thanks for your implement!

Yes, seems you're right. Thanks!


Method to calculate modes?

Is there a method to calculate the modes/wavenumbers in Fourier space?
The background is that I'd like to calculate power spectra and thus need to bin the data in Fourier space based on their wavenumber.

ping @mkstoyanov (as  you were just active on the repo yesterday)

The box assumption is that the index of the data and the wave number will match, i.e.,
input[ k * plane_stride  + j * line_stride + i] // box entry (i, j, k)
output[ k * plane_stride  + j * line_stride + i] // wave vector (i, j, k)

Note the orientation (order) of the box, it indicates which is the leading (fast changing), middle and trailing (slowest changing) dimension.
In the distributed case, you have to account for the fact that each MPI rank contains a local box and the box and index start and end offset.
There is no method in heffte to give you the wavenumber, but that should be enough to write your own method.

Thanks for the pointer.
I'm not sure I fully understand.
Assuming that i,j,k.plane_stride,line_stride are all  > 0, how would I get to a wave vector of, say, (-3, -2, 0)?
PS: I also assume that we might use different vocabulary

@pgrete For some reason I am not getting notifications on this one. Sorry for the delay.
I'm not sure what you're calling "wavenumber" and what would correspond to negative numbers.

Thanks for the follow-up @mkstoyanov
What I meant is similar to the numpy fftfreq output where the second half of the frequencies (wavenumbers) are negative.

heFFTe doesn't have such method, but it seems like a simple map from the index to the wavenumber.
Basically, what they call n in numpy would be (i, j, k) in the box index of heFFTe.

Yes, so that was probably implicitly my question.
How are indices mapped to wavenumber in heFFTe (as different convention exit in different libraries).
Does it follow numpy convention, i.e., for even number of modes the first half of the wavemodes go from 0 to n/2 -1 and the second half goes from -n/2 to -1 ?

heFFTe doesn't decide those, it's a matter of the backend. However, every backend that we support will generate identical wave-numbers, which is the direct definition of DFT. Libraries that shuffle the wave-numbers by default would be in the minority.
See this about FFTW, which is the library that sets most of the conventions when it comes to FFTs
https://www.uni-muenster.de/Physik.TP/archive/fileadmin/lehre/NumMethoden/SoSe10/Skript/Ordening.pdf

Thanks for clarifying. I was just double checking as I already learned the hard way in the past that different conventions are being used by different libs.
Feel free to close the issue (or keep it open if some callback function would be desirable to be available in heFFTe).

That's actually good to know, I would never expect that there can be a difference in the different libs. It's something to keep an eye out. Thanks for bringing it up.
I won't add a method to heFFTe (at least for now) but I should probably document that we are using the same conventions as FFTW.


Since 0.0.6 update I get an error

Component error: plex_assistant - Requirements for plex_assistant not found: ['python-Levenshtein==0.12.0'].

arch
x86_64

dev
false

docker
true

hassio
false

os_name
Linux

os_version
4.4.59+

python_version
3.7.7

timezone
Europe/Amsterdam

version
0.107.7

virtualenv
false

Python-Levenshtein was removed as a requirement in 0.0.4. Try reinstalling. If you're installing manually be sure to install all the files, especially manifest.json.
If you're still having issues try deleting the __pycache__ folder inside the components folder.


WidgetClassExt::add_binding's callback returns a bool instead of ControlFlow

Normally one would return gdk::EVENT_PROPAGATE or gdk::EVENT_STOP in these, but you can't since the later are u32 instead of bool. I think this should retun a glib::ControlFlow.
https://gtk-rs.org/gtk4-rs/git/docs/gtk4/subclass/widget/trait.WidgetClassExt.html#method.add_binding

@A6GibKm Want to provide a PR?

It would be nice to check all the subclassing code for cases where we return a boolean as well

The callback you pass ends up being used for creating a CallbackAction, https://gtk-rs.org/gtk4-rs/git/docs/gtk4/struct.CallbackAction.html#method.new. The callback is a https://docs.gtk.org/gtk4/callback.ShortcutFunc.html and as you can see, TRUE means the action was successful but i am not sure if that maps correctly. Continue doesn't convey the action was handled

I would have closed the issue as  I don't think we should change the type here but I have noticed few cases in the manual code where it would make more sense to switch to using ControlFlow/Propagation.


Update Webdriver

Updates webdriver version (@6.x.x).
Minimum supported version of Node is now 12.x.x
Updates the e2e test files to suit v6 syntax.
Updates Node version in circle-ci file.

Related: https://github.com/prebid/prebid-universal-creative/pull/124

Closing this PR at this time in lieu of https://github.com/prebid/prebid-universal-creative/pull/159 which made a number of updates to the dependencies.


SDC-17096: Support subscribe to topics matching specified pattern in Kafka multi topic consumer

Kafka MultiTopic Consumer can support consumer to subscribe to topics with accurate names, but do not support patterns in the topic names. We often encounter such scenarios. For example, we need to subscribe to topics starting with elk*, so we hope that topic names can support pattern, so that we don’t have to modify and restart the pipeline every time.

+1


cmd: add more test for cmd

cmd: add more test for cmd

Codecov Report

Merging #1058 (8bfba16) into main (b4ba7e6) will increase coverage by 3.81%.
The diff coverage is 30.76%.

@@             Coverage Diff              @@
##               main    #1058      +/-   ##
============================================
+ Coverage     46.12%   49.94%   +3.81%
  Complexity      149      149
============================================
  Files           146      147       +1
  Lines         23782    23311     -471
  Branches        422      422
============================================
+ Hits          10970    11643     +673
+ Misses        11467    10276    -1191
- Partials       1345     1392      +47

Impacted Files
Coverage Δ

cmd/info.go
55.69% <22.22%> (+55.69%)
:arrow_up:

cmd/main.go
56.25% <50.00%> (+34.41%)
:arrow_up:

pkg/meta/sql.go
68.57% <0.00%> (-1.33%)
:arrow_down:

pkg/chunk/cached_store.go
55.55% <0.00%> (-0.74%)
:arrow_down:

pkg/meta/redis.go
72.24% <0.00%> (-0.74%)
:arrow_down:

pkg/meta/tkv.go
76.16% <0.00%> (-0.44%)
:arrow_down:

pkg/meta/base.go
84.19% <0.00%> (ø)

pkg/object/minio.go
5.88% <0.00%> (+0.16%)
:arrow_up:

pkg/meta/utils.go
73.00% <0.00%> (+1.22%)
:arrow_up:

pkg/utils/utils.go
89.04% <0.00%> (+2.60%)
:arrow_up:

... and 19 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 b4ba7e6...8bfba16. Read the comment docs.


Feat/issue 235 : [Refactoring] large class DevoxxGenieToolWindowContent

[Refactoring] large class DevoxxGenieToolWindowContent
directly related to Issue 235
+
Update to gradle 8.11.1 (solution built and tested with openjdk 23)

Your plugin is great 👍 , hope this will help 🤞

Thanks for the refactoring! 👍🏼

Hello @stephanj it's a pleasure to contribute your work is great i would like to make this plugin popular in my company


Make sure the list of filteredWords is not caps sensitive and parses input string before any command is checked

any string compared to filteredWords should be converted to lowercase first

delete my issue face to face like a real man


NameConstraints cases

[ ] Name constraints

Updated the PR title to clarify that this only covers NameConstraints. Let's do the key constraints in another PR 🙂


Support custom entities attached to distinct stock entities in DB-less

New functionality
KIC provides a means to inject custom entities associated with a specific stock entity, such as a Kong service, route, or consumer, in DB-less mode, without prior knowledge of that stock entity's ID.
Proposed implementation
We add a new annotation, konghq.com/custom-entity-store, which references a Secret or ConfigMap and a key within them. This annotation is available on Service, Ingress, and KongConsumer resources. The referenced Secret/ConfigMap key's value is a raw YAML blob. The controller injects this blob verbatim under the associated Kong service, route, or consumer derived from the Kubernetes resource. Validation of entities within the value is up to the user; invalid entities will prevent configuration from syncing.
Background
Originally an internal request, FTI-2615.
Custom plugins can define custom entities with an arbitrary schema containing Kong DAO fields. The controller has no advance knowledge of these schemas, and thus we cannot define a CRD that provides a proper structured representation of their fields. Custom entities can include foreign key references to other DAO entities.
In DB-backed mode, we provide no support for custom entities within KIC, and instruct users to add them directly via the admin API. This is not an option in DB-less mode, however, as KIC must send all DB-less config in a single blob. To support custom entities in DB-less mode, we allow users to provide a Secret containing arbitrary YAML (as of 0.9.0), and trust them to correctly define custom entities added by their plugins. This YAML is appended to the end of the DB-less configuration KIC generates.
Because the YAML blob is appended to the end of the entire generated configuration, it is only suitable for custom entities that do not reference other Kong entities. To reference other Kong entities, users would need to know the entity ID in advance and include an appropriate reference in their custom entity YAML. KIC's generated configuration does not include entity IDs and does not allow users to provide their own IDs (with the exception of CA certificates), allowing Kong to randomly generate IDs when it ingests the config blob. We do not want to add support for user-defined IDs to additional entities because they are cumbersome to manage.
Thus, to properly support custom entities with foreign key references, we need to provide a means to inject their YAML blob under the stock entity in our generated configuration, rather than only injecting top-level custom entities.
Future work
We may want to explore adding a CRD for custom entities that supports both DB-backed and DB-less mode. Although adding entities to the API directly in DB-backed mode does work, it's at odds with how we normally have users manage configuration with KIC. Though we cannot know entity schemas in advance and would need to include a raw JSON field to contain the entity, we could include minimal scaffolding to indicate the custom entity's API endpoint (which is also effectively its object path in declarative YAML) and any foreign object references it has.

Is this issue something we could translate into a new or existing KEP? :thinking:

Revisiting this and thinking about implementation options. While arbitrary YAML blob from annotation does allow users to provide (hopefully valid) custom entities in the context of a specific K8S resource, we can't simply shove that inside the serialized Kong entity YAML we generate from it.
The path to serialization is generate a Kong entity struct from the K8S resource struct, transform that Kong struct into its decK file equivalent, and then marshal JSON or YAML from the decK file struct. Custom DAOs effectively let you extend standard Kong entity schemas to add new fields, and that presents a challenge for Go struct marshaling: we have no idea what those fields will be at code/compile time, and there's not really an obvious way to shove them in. If you want something like:
services:
  name: foo
  graphql-rate-limiting-advanced:
    costs:
    - type_path: Query.allPeople
      mul_arguments: first
    - mul_arguments: first
      add_constant: 42

you can't really get there from marshaling the decK file service struct: there is no GraphQLRateLimitingAdvanced field that marshals into graphql-rate-limiting-advanced. I don't think there's a good way to either dynamically extend the struct or a good way to marshal the standard struct and then smush the additional user content as a byte[] onto it. The latter seems maybe more viable, but may be kludgy--it'd possibly need a custom JSON marshaler, which IIRC aren't fun.
Furthermore complicating things is that we don't marshal those structs individually, we marshal a decK file.Content that contains slices of each, so we don't really have a good way to insert content into the individual structs within.

Requires further design work based on considerations above. A design spike looks like a reasonable next step.

Won't fix now - please comment if interested in this feature.


Fix JSP compilation under Java 8

This replaces the 1.8.4 JSP jar with the one included in the 1.9.44 SDK.

https://ocd.appscale.com:8080/job/Daily Build/4466/


Using freetype-go as a back end for sdl-ttf

Making an SDL2 implementation for Go would be great, but we probably shouldn't reinvent the wheel when we don't have to. In the case of sdl-ttf, that would be a particularly tough wheel to reinvent. What if we used freetype-go as the back end? I took a quick look at the API and it seems like most of the features we need are in there with a few exceptions (checking ascent/descent, fixed-width detection, etc) that I may have missed. Has anybody else looked into this?

My thoughts on this:

I've had weird problems with sdl_ttf, like certain glyphs randomly disappearing and rendered text being zero width when it shouldn't be. Maybe these problems could be fixed in a reimplementation, but I'd be happy to consider an alternative solution.
I actually tried using freetype-go as a replacement for sdl_ttf because of these problems, but it was prohibitively slow. I don't know whether this was because of the freetype-go library itself, the way I was using it, or the context in which I was using it (xgb). I wouldn't be surprised if all three were factors, but if I can't use freetype-go in the same way that I use sdl_ttf and get similar performance, then it's unacceptable as a replacement IMO.

More research is probably warranted.

I agree that speed should be a pretty big concern in this case. I didn't know that sdl_ttf used freetype2, so that might make the transition easier if freetype-go is performant enough. I'll look into this.

Okay, it looks like freetype-go is not in any state to serve as our back end, simply because it's too lacking in features. That said, it looks like developers on golang.org/x/exp/shiny want to help improve the library as seen here.
"A secondary goal is to drive development of the Freetype Go port - it has some basic functionality but also some long-standing known deficiencies. Writing a quality GUI text editor is again a substantial amount of work, and I don't intend to build one, but I intend that working on shiny will push the Freetype Go library to be good enough to let someone or some team do exactly that, if they had the time and inclination."

It's been about 11 months since the last post in this discussion. Has golang/freetype gotten any better since then? Is this more feasible now? I'm working on a project using SDL2, and I'm running into problems with glyphs randomly not rendering. I get errors like the following:

Failed to render "Th": Text has zero width

So far as I can tell, it's a pretty common problem with SDL2_ttf. The most annoying part is that it seems to happen completely at random. Sometimes it works, and sometimes it doesn't.

I hadn't followed this discussion but if this issue can't be fixed with SDL2, I'll have a go at writing the code that use the Go freetype library.
In the meantime, is it possible for you to share a small runnable code that reproduce the issue? It seems like the only other similar problem I found is in another binding for D lang: http://stackoverflow.com/questions/26956658/sdl-ttf-rendertext-blended-fails-randomly.
I added a test file called sdl_ttf_test.go at the ttf directory which you can run by executing go test -v at the directory. It simply executes ttf.RenderUTF8_Solid() multiple times on random strings. It doesn't seem to reproduce the issue though :(

I have not been able to reproduce the problem consistently. It happens a lot, but sometimes it doesn't happen at all. For some bizarre reason, it seems to happen far more often when using the race detector, but even then it doesn't happen sometimes. I think it may have to do with multithreading issues, but I'm not sure.
I looked into golang/freetype. I looks very clean and easy to use, but the issue is that it draws, not surprisingly, to a draw.Image. Would it be possible to provide a way to make an sdl.Surface and/or sdl.Texture implement draw.Image, either directly or as some kind of wrapper type that adds the methods? I've done it before in my own SDL bindings, but I'm not sure how efficient it was, and I don't think it worked with very many pixel formats.

I'm really late to the party but I wanted to reply about the error:

Failed to render "Th": Text has zero width

I was having this problem and it was due to using a RWFromMem wrapped around a ttf font I loaded into memory previously. It looks like the resulting RWOps didn't have any references to the byte slice that I used to create the RWOps and it was getting garbage collected and throwing the zero width error later.


Add a "Download Receipt" button on contribution success page

As an organization contributing to a collective, I need a receipt/invoice whenever I contribute. Rather than having me search through the UI for the place where I'll be able to download my receipt, it would be great to have that directly on the confirmation page.

This would be especially helpful for event receipts, as we're seeing demand to use them as Tickets to check at the venue entrance

The receipt should also be available on the transaction page (e.g. https://opencollective.com/esmarconf2023-742644ff/orders/640768). Currently you can only download it when you are on the list page and search for the transaction like (https://opencollective.com/esmarconf/events/esmarconf2023-742644ff/transactions?searchTerm=betsy)

@poohlaga 100% agree. I've shared your feedback in https://github.com/opencollective/opencollective/issues/6678

We won't be able to show the button easily for guest profiles since the call to the PDF service is authenticated. They'll still get the PDF by email.


Add CI to tests + code style check

Hi,
I think it would be nice to have a CI tool running the tests and checking the code style. I think it would help the reviewing process and make developers aware of their mistakes before any review.
I think Travis CI and Style CI would do the trick.
I can help making it work if you guys like the idea. ;)
Thanks for the project!  :)

You're welcome @luizpedone. That sounds awesome! Of course this is a great idea.
I can do the configuration, but you (or anyone with repository's admin privileges, I guess) must enable the Travis CI account there. If I'm not mistaken, all you need to do is enable Travis CI for this repo on their website.
I think it's the same thing you need to do at Style CI website.
If you need any help, let me know. =)

@luizpedone Travis CI and Style CI already enabled for the Corcel repo. Thanks!


Hi, I wanna know what's the difference between config/classic_cv and config/usb_cv?

🚀 Feature

Motivation

Pitch

Alternatives

Additional context
<!-- Add any other context or screenshots about the feature request here. --

classic_cv use resnets and usb_cv use vit


Nested for-loops in RSX render incorrectly

Problem
Nested for-loops in RSX seem to render in an incorrect order 🤔  This was initially found by @DogeDark on dioxus-web, and I was able to reproduce and simplify the example on dioxus-desktop. Freya however doesn't seem to be affected, so this seems like a post-v0.6 bug.
Looking at the implementation, the for-loop is converted to an iterator of VNodes. My hunch is having the outer iterator call the inner one is leading to the ordering bug but the logic looks correct to me.
https://github.com/DioxusLabs/dioxus/blob/c2b131f249cc757716ca2c4d917cc9b8db98aa08/packages/rsx/src/forloop.rs#L52C31-L52C32
Steps To Reproduce
#[component]
fn App() -> Element {
    let mut data = use_signal(|| vec![vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]);
    let mut next_value = use_signal(|| 10);

    let mut load_more = move || {
        let mut new_row = Vec::new();
        for _ in 0..10 {
            new_row.push(next_value());
            next_value += 1;
        }
        data.push(new_row);
    };

    rsx! {
        button {
            onclick: move |_| load_more(),
            "load more",
        }
        div {
            style: "display: grid; grid-template-columns: repeat(10, auto);",

            for row in data() {
                for column in row {
                    div{ key: "{column}", "{column}" }
                }
            }
        }
    }
}

Expected behavior
Separating the above nested loops with a temporary variable results in the following correct output:

Screenshots
However with the nested loop:

Environment:

Dioxus version:  Latest git
Rust version: Nightly
App platform:  Web + Desktop tested so far (so I think the issue resides in RSX itself)

Questionnaire

I'm interested in fixing this myself but don't know where to start

If you add many lists to the first render, they render correctly:
use dioxus::prelude::*;

#[component]
fn App() -> Element {
    let mut data = use_signal(|| {
        (0..100)
            .step_by(10)
            .map(|i| (i..i + 10).collect::<Vec<_>>())
            .collect::<Vec<_>>()
    });

    let mut load_more = move || {
        let mut new_row = Vec::new();
        let last = {
            let binding = data.last().unwrap();
            *binding.last().unwrap()
        };
        for i in 1..11 {
            new_row.push(last + i);
        }
        data.push(new_row);
    };

    rsx! {
        button {
            onclick: move |_| load_more(),
            "load more",
        }
        div {
            style: "display: grid; grid-template-columns: repeat(10, auto);",

            for (i, row) in data.iter().enumerate() {
                for column in row.iter() {
                    div{ "{column}" }
                }
            }
        }
    }
}

fn main() {
    launch(App)
}

Diouxs SSR doesn't use core diffing and it also renders the lists correctly. I think this is a bug with keyed list diffing (here). If it was a bug with rsx, then the initial list would render incorrectly as well


Connecting a ConnectAP to multiple SubNetworks in the Communication editor

We are not sure we understand the IEC 61860-6 standard correctly.
At present each ConnectedAP can only be mapped onto one SubNetwork
In the screenshot below, only two devices have ConnectedAPs which are not already mapped onto a SubNetwork

Once they are assigned, the ConnectedAPs cannot then be placed onto multiple SubNetworks (they are all greyed out).
We are not sure but we wonder if it should be possible to place a single ConnectedAP onto multiple SubNetworks.
Use Case
The use case for this is that SubNetworks can be used to organise the logical arrangement of information within the network architecture (along the line of routable/physical networks). However at present we don't provide any option in OpenSCD to configure a GSE or SMV message to a particular SubNetwork.
As an example, I might have a Layer 2 network which represents a particular Primary Bus where most GOOSE messages go and I might wish to represent this as a SubNetwork.
I might also have a separate Layer 2 network which represents the "Whole Substation" for certain functions (e.g. GOOSE interlocking). All though this is mainly just a "different VLAN", it seems reasonable to represent this as a different SubNetwork.
At present it is not possible to model this when configuring a GOOSE message.
This is the kind of thing which seems to be described in IEC 61850-6 Sec. 6.4 "The communication system model".
Currently available tools all handle SubNetworks in quite different ways -- this part of the standard appears a bit confusing.
I am hoping that @JakobVogelsang can help me at some stage..
(cfyi @mtilbrook)

There appears to be the provision (in a rather complex manner) to map AccessPoints to multiple SubNetworks using the ServerAt element.

We think if the ServerAt is supported within OpenSCD then when cretaing a GSE or SV element in the Communication section there should be the option to select the Access Point/SubNetwork.
In SEL Architect this looks like:

I think this should be part of the Communication screen for GSE/SV:

Attached is an SCD file which includes the ServerAt definition:
SEL_Adding_SubNetworks_AccessPoints.zip
(thanks for this file @mtilbrook)

That is clearly a missing feature. When doing this, we need to check back with the services section if GOOSEs/SampledValues are allowed at any AccessPoint.

We will tackle that while working on the publisher plugin. I will write a fresh issue with all the requirements and will connect this one so that you can track the progress.

We had issues to work with GSE and SMV elements in the lab. There are two PR that are addressing some of the issues. I however would like to allow the user to change that parent of GSE and SMV. With that, basically change the assignment to subnetworks. For that I would like to use the move gesture as in the substation section. @danyill what do you think about this?


Ensure that CaaS that failed to start are removed after the sovity Portal timeout

Enhancement
Description
Connectors that are still PROVISIONING after 15 minutes are automatically removed in the sovity Portal. Since status update requests will fail after that happens, there is no more hope that the connector will start and should be removed from AP.

Contrary to my initial analysis, status requests to the CaaS portal do not fail when the connector is removed there. The reported status is NOT_FOUND which is a valid status in the AP. Since this does not cause any issues and even prevents the connector from disappearing in thin air, I'm opting for leaving it as is and requiring the user to manually remove the faulty connector.
Closed as not planned.


autoreconf: no config.status: cannot re-make

@troglobit , you deserve a 🍺
Ran into the following issue when compiling pimd. It does not bother me. However, if it says it is missing we ought to fix it 😄
Cloning into 'pimd'...
  FIXDEP  libite/lite.h missing ... OK

My first run produces the following error:
Cloning into 'libite'...
./autogen.sh: line 3: autoreconf: command not found

Resolved by installing dependencies:
yum -y install automake autoconf

Another run ended up with error: Libtool library used but 'LIBTOOL' is undefined:
Cloning into 'libite'...
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force --warnings=portability -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force --warnings=portability
autoreconf: running: /usr/bin/autoheader --force --warnings=portability
autoreconf: running: automake --add-missing --force-missing --warnings=portability
configure.ac:11: installing './ar-lib'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am:3: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:3:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:3:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:3:   If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:3:   its definition is in aclocal's search path.
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: automake failed with exit status: 1

Resolved the above with:
yum -y install libtool

Now, it failes with:

autoreconf: running: /usr/bin/autoconf --force --warnings=portability
autoreconf: running: /usr/bin/autoheader --force --warnings=portability
autoreconf: running: automake --add-missing --force-missing --warnings=portability
configure.ac:11: installing './ar-lib'
configure.ac:12: installing './config.guess'
configure.ac:12: installing './config.sub'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: no config.status: cannot re-make
autoreconf: Leaving directory `.'
make: *** No targets specified and no makefile found.  Stop.

Hi Alan,
in pimd we only use a few source files from libite, so you don't need to build libite separately (yet).  Just let the pimd configure script clone libite and then build pimd from the top-level directory.
For the upcoming pimd v2.4 series I'm planning to convert pimd to proper GNU configure and build system. I haven't decided yet on making libite a dependency or simply maintain copies of the needed files.  Anyway, that shouldn't affect you now.
See the pimd/README.md file, Contributing section, for more details on building pimd from GIT.

See the pimd/README.md file, Contributing section, for more details on building pimd from GIT.

@troglobit :+1:

@greenpau Maybe we can close this issue then? :)


luci-app-privoxy: cleanup and fixes for #298 #334 #335

remove extra apperror.lua page
so no nore need for extra directory inside model/cbi
add option temporary_directory needed for external filters
remove special handling of bootstrap theme #298 #334
modified version handling suggested in #335

Signed-off-by: Christian Schoenebeck<EMAIL_ADDRESS>

@jow-
May I get merge permissions so I can merge packages that I maintain ?

Thanks.


Fix NRE for AvaloniaNativeTextInputMethod

What does the pull request do?

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

[ ] Added unit tests (if possible)?
[ ] Added XML documentation to any related classes?
[ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation

Breaking changes

Obsoletions / Deprecations

Fixed issues

You can test this PR using the following package version. 11.0.999-cibuild0032407-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

You can test this PR using the following package version. 11.0.999-cibuild0032474-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

You can test this PR using the following package version. 11.0.999-cibuild0032637-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]


Exception in dbushelper.py

Describe the bug
Tried dev branch yesterday.
After few hours  serialbattery is crashing with Exception, see log:
ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
Seems related to TimeToSoc/ Calculation?
Here my Config related to that:
TIME_TO_GO_ENABLE = True
TIME_TO_SOC_POINTS = 100,10
TIME_TO_SOC_VALUE_TYPE = 1
TIME_TO_SOC_RECALCULATE_EVERY = 60
TIME_TO_SOC_INC_FROM = True
How to reproduce
Steps to reproduce the behavior:
Not sure about it but i think:
1.) Install nightly dev.
2.) Use above Time-To-Go/Time-To-Soc Parameter
3.) wait some time (few hours)
Expected behavior
No Crash
Driver version
nightly dev
Venus OS device type
Raspberry Pi
Venus OS version
3.01
BMS type
JKBMS / Heltec BMS
Cell count
18
Connection type
Serial USB adapter to RS485
Config file
[DEFAULT]

; --------- Battery Current limits ---------
MAX_BATTERY_CHARGE_CURRENT    = 115.0
MAX_BATTERY_DISCHARGE_CURRENT = 115.0

; --------- Cell Voltages ---------
; Description: Cell min/max voltages which are used to calculate the min/max battery voltage
; Example: 16 cells * 3.45V/cell = 55.2V max charge voltage. 16 cells * 2.90V = 46.4V min discharge voltage
MIN_CELL_VOLTAGE   = 2.900
; Max voltage can seen as absorption voltage
MAX_CELL_VOLTAGE   = 3.450
; Float voltage (can be seen as resting voltage)
FLOAT_CELL_VOLTAGE = 3.340

;Maxx: Settings GAS
;MAX_CELL_VOLTAGE    = 3.450
;FLOAT_CELL_VOLTAGE  = 3.450

; Bulk voltage (may be needed to reset the SoC to 100% once in a while for some BMS)
; Has to be higher as the MAX_CELL_VOLTAGE
BULK_CELL_VOLTAGE  = 3.650
; Specify after how many days the bulk voltage should be reached again
; The timer is reset when the bulk voltage is reached
; Leave empty if you don't want to use this
; Example: Value is set to 15
; day 1: bulk reached once
; day 16: bulk reached twice
; day 31: bulk not reached since it's very cloudy
; day 34: bulk reached since the sun came out
; day 49: bulk reached again, since last time it took 3 days to reach bulk voltage
BULK_AFTER_DAYS =

; --------- Bluetooth BMS ---------
; Description: List the Bluetooth BMS here that you want to install
; -- Available Bluetooth BMS:
; Jkbms_Ble, LltJbd_Ble
; Example:
;     1 BMS: Jkbms_Ble C8:47:8C:00:00:00
;     3 BMS: Jkbms_Ble C8:47:8C:00:00:00, Jkbms_Ble C8:47:8C:00:00:11, Jkbms_Ble C8:47:8C:00:00:22
BLUETOOTH_BMS =

; --------- BMS disconnect behaviour ---------
; Description: Block charge and discharge when the communication to the BMS is lost. If you are removing the
;              BMS on purpose, then you have to restart the driver/system to reset the block.
; False: Charge and discharge is not blocked on BMS communication loss
; True: Charge and discharge is blocked on BMS communication loss, it's unblocked when connection is established
;       again or the driver/system is restarted
BLOCK_ON_DISCONNECT = True

; --------- Charge mode ---------
; Choose the mode for voltage / current limitations (True / False)
; False is a step mode: This is the default with limitations on hard boundary steps
; True is a linear mode:
;     For CCL and DCL the values between the steps are calculated for smoother values (by WaldemarFech)
;     For CVL max battery voltage is calculated dynamically in order that the max cell voltage is not exceeded
LINEAR_LIMITATION_ENABLE = True

; Specify in seconds how often the linear values should be recalculated
LINEAR_RECALCULATION_EVERY = 1
; Specify in percent when the linear values should be recalculated immediately
; Example: 5 for a immediate change, when the value changes by more than 5%
LINEAR_RECALCULATION_ON_PERC_CHANGE = 5

; --------- Charge Voltage limitation (affecting CVL) ---------
; Description: Limit max charging voltage (MAX_CELL_VOLTAGE * cell count), switch from max voltage to float
;              voltage (FLOAT_CELL_VOLTAGE * cell count) and back
;     False: Max charging voltage is always kept
;     True: Max charging voltage is reduced based on charge mode
;         Step mode: After max voltage is reached for MAX_VOLTAGE_TIME_SEC it switches to float voltage. After
;                    SoC is below SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT it switches back to max voltage.
;         Linear mode: After max voltage is reachend and cell voltage difference is smaller or equal to
;                      CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL it switches to float voltage after 300 (fixed)
;                      additional seconds. After cell voltage difference is greater or equal to
;                      CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT it switches back to max voltage.
; Example: The battery reached max voltage of 55.2V and hold it for 900 seconds, the the CVL is switched to
;          float voltage of 53.6V to don't stress the batteries. Allow max voltage of 55.2V again, if SoC is
;          once below 90%
;          OR
;          The battery reached max voltage of 55.2V and the max cell difference is 0.010V, then switch to float
;          voltage of 53.6V after 300 additional seconds to don't stress the batteries. Allow max voltage of
;          55.2V again if max cell difference is above 0.080V or SoC below 90%
; Charge voltage control management enable (True/False).
CVCM_ENABLE = True

; -- CVL reset based on cell voltage diff (linear mode)
; Specify cell voltage diff where CVL limit is kept until diff is equal or lower
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = 0.004
; Specify cell voltage diff where CVL limit is reset to max voltage, if value get above
; the cells are considered as imbalanced, if the cell diff exceeds 5% of the nominal cell voltage
; e.g. 3.2 V * 5 / 100 = 0.160 V
CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT = 0.015

; -- CVL reset based on SoC option (step mode)
; Specify how long the max voltage should be kept, if reached then switch to float voltage
MAX_VOLTAGE_TIME_SEC = 900
; Specify SoC where CVL limit is reset to max voltage, if value gets below
SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT = 80

; --------- Cell Voltage Current limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be in-/decreased depending on min and max cell voltages
; Example: 18 cells * 3.55V/cell = 63.9V max charge voltage
;          18 cells * 2.70V/cell = 48.6V min discharge voltage
;          But in reality not all cells reach the same voltage at the same time. The (dis)charge current
;          will be (in-/)decreased, if even ONE SINGLE BATTERY CELL reaches the limits

; Charge current control management referring to cell-voltage enable (True/False).
CCCM_CV_ENABLE = True
; Discharge current control management referring to cell-voltage enable (True/False).
DCCM_CV_ENABLE = True

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
CELL_VOLTAGES_WHILE_CHARGING   = 3.55, 3.50, 3.45, 3.40
MAX_CHARGE_CURRENT_CV_FRACTION =    0, 0.05,  0.5,    1

CELL_VOLTAGES_WHILE_DISCHARGING   = 2.75, 2.80, 2.90, 3.00
MAX_DISCHARGE_CURRENT_CV_FRACTION =    0,  0.1,  0.5,    1

; --------- Temperature limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be in-/decreased depending on temperature
; Example: The temperature limit will be monitored to control the currents. If there are two temperature senors,
;          then the worst case will be calculated and the more secure lower current will be set.
; Charge current control management referring to temperature enable (True/False).
CCCM_T_ENABLE = True
; Charge current control management referring to temperature enable (True/False).
DCCM_T_ENABLE = True

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
TEMPERATURE_LIMITS_WHILE_CHARGING = 0,   2,   5,  10,  15, 20, 35, 40 , 50
MAX_CHARGE_CURRENT_T_FRACTION     = 0, 0.1, 0.2, 0.4, 0.8,  1,  1, 0.4,  0

TEMPERATURE_LIMITS_WHILE_DISCHARGING = -20,   0,   5,  10, 15, 45, 50
MAX_DISCHARGE_CURRENT_T_FRACTION     =   0, 0.2, 0.3, 0.4,  1,  1,  0

; --------- SOC limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be increased / decreased depending on State of Charge,
;              see CC_SOC_LIMIT1 etc.
; Example: The SoC limit will be monitored to control the currents.
; Charge current control management enable (True/False).
CCCM_SOC_ENABLE = False
; Discharge current control management enable (True/False).
DCCM_SOC_ENABLE = FALSE

; Charge current soc limits
CC_SOC_LIMIT1 = 98
CC_SOC_LIMIT2 = 95
CC_SOC_LIMIT3 = 91

; Charge current limits
CC_CURRENT_LIMIT1_FRACTION = 0.1
CC_CURRENT_LIMIT2_FRACTION = 0.3
CC_CURRENT_LIMIT3_FRACTION = 0.5

; Discharge current soc limits
DC_SOC_LIMIT1 = 10
DC_SOC_LIMIT2 = 20
DC_SOC_LIMIT3 = 30

; Discharge current limits
DC_CURRENT_LIMIT1_FRACTION = 0.1
DC_CURRENT_LIMIT2_FRACTION = 0.3
DC_CURRENT_LIMIT3_FRACTION = 0.5

; --------- Time-To-Go ---------
; Description: Calculates the time to go shown in the GUI
;              Recalculation is done based on TIME_TO_SOC_RECALCULATE_EVERY
TIME_TO_GO_ENABLE = True

; --------- Time-To-Soc ---------
; Description: Calculates the time to a specific SoC
; Example: TIME_TO_SOC_POINTS = 50, 25, 15, 0
;          6h 24m remaining until 50% SoC
;          17h 36m remaining until 25% SoC
;          22h 5m remaining until 15% SoC
;          28h 48m remaining until 0% SoC
; Set of SoC percentages to report on dbus and MQTT. The more you specify the more it will impact system performance.
; [Valid values 0-100, comma separated list. More that 20 intervals are not recommended]
; Example: TIME_TO_SOC_POINTS = 100, 95, 90, 85, 75, 50, 25, 20, 10, 0
; Leave empty to disable
TIME_TO_SOC_POINTS = 100,10
; Specify TimeToSoc value type [Valid values 1, 2, 3]
; 1 Seconds
; 2 Time string <days>d <hours>h <minutes>m <seconds>s
; 3 Both seconds and time string "<seconds> [<days>d <hours>h <minutes>m <seconds>s]"
TIME_TO_SOC_VALUE_TYPE = 1
; Specify in seconds how often the TimeToSoc should be recalculated
; Minimum are 5 seconds to prevent CPU overload
TIME_TO_SOC_RECALCULATE_EVERY = 60
; Include TimeToSoC points when moving away from the SoC point [Valid values True, False]
; These will be as negative time. Disabling this improves performance slightly
TIME_TO_SOC_INC_FROM = True

; --------- Additional settings ---------
; Specify only one BMS type to load else leave empty to try to load all availabe
; LltJbd, Ant, Daly, Daly, Jkbms, Lifepower, Renogy, Renogy, Ecs
BMS_TYPE = Jkbms

; Exclute this serial devices from the driver startup
; Example: /dev/ttyUSB2, /dev/ttyUSB4
EXCLUDED_DEVICES =

; Enter custom battery names here or change it over the GUI
; Example:
;     /dev/ttyUSB0:My first battery
;     /dev/ttyUSB0:My first battery,/dev/ttyUSB1:My second battery
CUSTOM_BATTERY_NAMES =

; Auto reset SoC
; If on, then SoC is reset to 100%, if the value switches from absorption to float voltage
; Currently only working for Daly BMS
AUTO_RESET_SOC = False

; Publish the config settings to the dbus path "/Info/Config/"
PUBLISH_CONFIG_VALUES = 1

; Select the format of cell data presented on dbus [Valid values 0,1,2,3]
; 0 Do not publish all the cells (only the min/max cell data as used by the default GX)
; 1 Format: /Voltages/Cell (also available for display on Remote Console)
; 2 Format: /Cell/#/Volts
; 3 Both formats 1 and 2
BATTERY_CELL_DATA_FORMAT = 1

; Simulate Midpoint graph (True/False).
MIDPOINT_ENABLE = False

; Battery temperature
; Specify how the battery temperature is assembled
; 0 Get mean of temperature sensor 1 to sensor 4
; 1 Get only temperature from temperature sensor 1
; 2 Get only temperature from temperature sensor 2
; 3 Get only temperature from temperature sensor 3
; 4 Get only temperature from temperature sensor 4
TEMP_BATTERY = 0

; Temperature sensor 1 name
TEMP_1_NAME = Temp 1

; Temperature sensor 2 name
TEMP_2_NAME = Temp 2

; Temperature sensor 2 name
TEMP_3_NAME = Temp 3

; Temperature sensor 2 name
TEMP_4_NAME = Temp 4

; --------- BMS specific settings ---------

; -- LltJbd settings
; SoC low levels
; NOTE: SOC_LOW_WARNING is also used to calculate the Time-To-Go even if you are not using a LltJbd BMS
SOC_LOW_WARNING = 20
SOC_LOW_ALARM   = 10

; -- Daly settings
; Battery capacity (amps) if the BMS does not support reading it
BATTERY_CAPACITY = 50
; Invert Battery Current. Default non-inverted. Set to -1 to invert
INVERT_CURRENT_MEASUREMENT = 1

; -- ESC GreenMeter and Lipro device settings
GREENMETER_ADDRESS  = 1
LIPRO_START_ADDRESS = 2
LIPRO_END_ADDRESS   = 4
LIPRO_CELL_COUNT = 15

; -- HeltecModbus (Heltec SmartBMS/YYBMS) settings
; Set the Modbus addresses from the adapters
; Separate each address to check by a comma like: 1, 2, 3, ...
; factory default address will be 1
HELTEC_MODBUS_ADDR = 1

; --------- Battery monitor specific settings ---------
; If you are using a SmartShunt or something else as a battery monitor, the battery voltage reported
; from the BMS and SmartShunt could differ. This causes, that the driver never goapplies the float voltage,
; since max voltage is never reached.
; Example:
;     cell count: 16
;     MAX_CELL_VOLTAGE = 3.45
;     max voltage calculated = 16 * 3.45 = 55.20
;     CVL is set to 55.20 and the battery is now charged until the SmartShunt measures 55.20 V. The BMS
;     now measures 55.05 V since there is a voltage drop of 0.15 V. Since the dbus-serialbattery measures
;     55.05 V the max voltage is never reached for the driver and max voltage is kept forever.
;     Set VOLTAGE_DROP to 0.15
VOLTAGE_DROP = 0.00

Relevant log output
@4000000064ea64290a51d68c INFO:SerialBattery:
@4000000064ea64290a55b6bc INFO:SerialBattery:Starting dbus-serialbattery
@4000000064ea64290a5ecedc INFO:SerialBattery:dbus-serialbattery v1.0.20230723dev
@4000000064ea64290a6366a4 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
@4000000064ea64290a677d84 INFO:SerialBattery:Testing Jkbms
@4000000064ea64290db0d454 INFO:SerialBattery:Connection established to Jkbms
@4000000064ea64290db55c7c INFO:SerialBattery:Battery Jkbms connected to dbus from /dev/ttyUSB1
@4000000064ea64290db95fd4 INFO:SerialBattery:========== Settings ==========
@4000000064ea64290dbdfb84 INFO:SerialBattery:> Connection voltage: 59.91V | Current: -0.0A | SoC: 76%
@4000000064ea64290dc1e76c INFO:SerialBattery:> Cell count: 18 | Cells populated: 0
@4000000064ea64290dc60234 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
@4000000064ea64290dca4024 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 115.0A | MAX BATTERY DISCHARGE CURRENT: 115.0A
@4000000064ea64290dce6a8c INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 175.0A | MAX BATTERY DISCHARGE CURRENT: 175.0A (read from BMS)
@4000000064ea64290dd23b1c INFO:SerialBattery:> CVCM:     True
@4000000064ea64290dd6713c INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
@4000000064ea64290dda64f4 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
@4000000064ea64290dde7404 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
@4000000064ea64290de27f2c INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
@4000000064ea64290de6578c INFO:SerialBattery:Serial Number/Unique Identifier: P1_P1
@4000000064ea64290f66c984 INFO:SerialBattery:DeviceInstance = 1
@4000000064ea64290f6b691c INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
@4000000064ea6429106885fc INFO:SerialBattery:publish config values = 1
@4000000064ea8e5a1be7a37c ERROR:SerialBattery:>>> ERROR: No reply - returning [len:49/13664]
@4000000064ea8e6a1c2a8494 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:266/53001]
@4000000064ea8ea628606724 ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea8ee22d5df5d4 ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea8f1e3322242c ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea8fd207679b64 ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea900e0d6fe354 ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea904a12dec1d4 ERROR:SerialBattery:Exception occurred: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #643
@4000000064ea905e0ed93754 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:173/1431]
@4000000064ea90a0256ce114 ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000064ea90bc156f4824 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:49/13664]
@4000000064ea915d2162610c ERROR:SerialBattery:>>> ERROR: No reply - returning [len:235/4621]
@4000000064ea9277381d517c ERROR:SerialBattery:>>> ERROR: No reply - returning [len:235/4621]
@4000000064ea928737ab656c ERROR:SerialBattery:>>> ERROR: No reply - returning [len:255/3294]
@4000000064ea94c42f2a0b14 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:235/4621]
@4000000064ea94d42e2a0fd4 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:235/4621]
@4000000064ea94ee2fecc2bc ERROR:SerialBattery:>>> ERROR: No reply - returning [len:49/13664]
@4000000064ea9a11323bdb0c ERROR:SerialBattery:>>> ERROR: No reply - returning [len:49/13664]
@4000000064ea9c212556f7b4 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:173/1431]

Any other information that may be helpful
No response

Thank you, it was already fixed but not merged. It was merged now.


New offer screen defaults to "advanced" tab

The new offer screen is defaulting to the advanced tab and should default to the General tab.

Fixed.


SESSION_MANAGER environment variable not defined

When I try to start the container I get the following error:
VNC_COL_DEPTH = 24
VNC_RESOLUTION = 1024x576
VNC_IP = <IP_ADDRESS>
VNC_PORT = 5901

Connect to <IP_ADDRESS>:5901

Start script..
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

tested on Debian GNU/Linux 10 (buster)

Hi @jnthnw, do you still have this problem?
The Error message is displayed every time, but it should still work. I will fix this when refactoring.

I am expressing this problem also, and i can't connect via vnc.
can i define this var before your fix?
thanks

@Guyv-dev The error message is always issued, but does not affect zoomrec. What is the error message when connecting via VNC?

I am getting 'unable to connect' when i try to connect with vnc client. I tried couple of vnc clients and gets the same output.
Although i cant connect, the port is in fact open and in LISTEN state

$ netstat -tulnp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 :::5901                 :::*                    LISTEN      -
tcp        0      0 <IP_ADDRESS>:5901            <IP_ADDRESS>:*               LISTEN      -

But the bigger problem i face is that it doesnt  seems  to record.  my settings are:

sudo docker run -d --restart unless-stopped
-v /home/duser/recordings:/home/zoomrec/recordings
-v /home/duser/audio:/home/zoomrec/audio
-v /home/duser/meetings.csv:/home/zoomrec/meetings.csv:ro
-p 5901:5901
--name zoomrec
kastldratza/zoomrec:latest

meetings.csv:

weekday;time;duration;id;password;description;record
sunday;11:25;70;url;;des;true;

i am running docker 20.10.10 build b485636 on debain 11.

@Guyv-dev The error message is always issued, but does not affect zoomrec. What is the error message when connecting via VNC?
Here's the error

@Guyv-dev The error message is always issued, but does not affect zoomrec. What is the error message when connecting via VNC?

Here's the error

Actually, it was my mistake, an embarrassing one, I thought that port 5901 is the default port for vnc. So it's working for me.
By the way, I would love to see 3 more features in your next build:

To be able to change the crt value, zero creates extremely large files.
Automatically minimize the participant's window and move the bar to the top.
Stop the loop (after some time) that waits for the zoom meeting to start. When the zoom meeting hasn't occurred eventually, the script keeps waiting forever.


Null termination of VERSIONINFO strings?

Track issue https://github.com/mxre/winres/issues/25

I'm doing some research on this issue:
https://devblogs.microsoft.com/oldnewthing/20040130-00/?p=40813

The strings in each bundle are stored as counted UNICODE strings, not null-terminated strings.

Note that we must explicitly null-terminate the string since the string in the resource is not null-terminated.

https://stackoverflow.com/questions/45491778/why-do-mfc-rc-files-sometimes-have-a-manually-inserted-0-at-the-end
https://stackoverflow.com/questions/7745076/vc-resource-compiler-rc-option-n
LoadString() (or more exactly LoadStringW() as ANSI variant cannot do that) can be used to retrieve the raw string resource when you specify 0 as the buffer size:
WCHAR* str;
int str_len;
str_len = LoadStringW(hInstance, ID_STRING, (LPWSTR) &str, 0);

In this case it just stores the address of the original string resource into the str as mapped into process memory and no string copying happens. Obviously the LoadLibrary() implementation then simply cannot add the terminator and this is when the resource compiler option is handy as work with zero-terminated strings is so much easier then using the string length (the return value of LoadLibrary()).
-> Long story short, it looks like, indeed, we should NULL-terminate them

https://devblogs.microsoft.com/oldnewthing/20061221-02/?p=28643
Hmmm... It looks like it already adds a NULL somehow? The length is 0c 00 (so, 12). The string is example.exe, which is 11 characters, so it does ad a NULL.
0010c5e0  61 00 72 00 00 00 00 00  40 00 0c 00 01 00 4f 00<EMAIL_ADDRESS>0010c5f0  72 00 69 00 67 00 69 00  6e 00 61 00 6c 00 46 00  |r.i.g.i.n.a.l.F.|
0010c600  69 00 6c 00 65 00 6e 00  61 00 6d 00 65 00 00 00  |i.l.e.n.a.m.e...|
0010c610  65 00 78 00 61 00 6d 00  70 00 6c 00 65 00 2e 00  |e.x.a.m.p.l.e...|
0010c620  65 00 78 00 65 00 00 00  30 00 06 00 01 00 50 00  |e.x.e...0.....P.|

The only thing I don't understand is why in the blog post, the length seems to be in bytes, but here it is in characters.

Would you look at that, Mr. Chen has an answer for this as well. Not surprised at all.
https://devblogs.microsoft.com/oldnewthing/20061222-00/?p=28623

A common mistake in generating 32-bit resources is to mistreat the cbData field of the structure I called a VERSIONNODE as a count of characters rather than a count of bytes if the type is Unicode text. Even Microsoft’s own Resource Compiler has fallen into this trap! For example, consider this VERSIONNODE I presented last time:

These malformed version resources manage to get away without crashing too horribly because the standard format of version resources uses string data only in leaf nodes. Therefore, the incorrect cbData affects only the node itself and doesn’t cause the child nodes to be parsed incorrectly (since there are no child nodes).

Uhh... So, that means my resource generator is bugged?

Yep, the wrong number of bytes looks like a binutils bug.
https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=binutils/resbin.c;hb=HEAD
/* Convert a stringtable resource to binary.  */

static rc_uint_type
res_to_bin_stringtable (windres_bfd *wrbfd, rc_uint_type off,
			const rc_stringtable *st)
{
  int i;

  for (i = 0; i < 16; i++)
    {
      rc_uint_type slen, length;
      unichar *s;

      slen = (rc_uint_type) st->strings[i].length;
      if (slen == 0xffffffff) slen = 0;
      s = st->strings[i].string;

      length = 2 + slen * 2;
      if (wrbfd)
	{
	  bfd_byte *hp;
	  rc_uint_type j;

	  hp = (bfd_byte *) reswr_alloc (length);
	  windres_put_16 (wrbfd, hp, slen);

      for (j = 0; j < slen; j++)
	    windres_put_16 (wrbfd, hp + 2 + j * 2, s[j]);
	  set_windres_bfd_content (wrbfd, hp, off, length);
    }
      off += length;
    }
  return off;
}

As we can see here windres_put_16 (wrbfd, hp, slen);, they write the number of characters instead of the number of bytes, which would be slen*2.


Support For Private Repos?

Would be awesome to have that, since most of the code I currently write is private. 😢

I second that. Would like to see that as well.

Planning on giving this package some (sorely-needed) love over the holidays; thank you both for the heads-up!

Sounds great. Don't work too much over the holidays 😁

@mdxprograms looks like I took your advice too literally; good news though, v0.8.0 is out and you should be able to use it with private repos once you get your key set up. Let me know if you have any issues with it.

@r24y How do I activate the private repo support? Preference panel only shows the README for me.

Would you mind pasting here the version of Atom and the version of github-issues you've got installed? You should see a "User Token" field in the preferences pane, and the "GitHub Issues: Open" command should work for public repos without configuration.  I'll reopen this issue while this remains unsolved.

http://i.imgur.com/0f70DRI.png

I have my key setup and it's still not pulling in any issues.

Atom v1.16.0
Github-Issues 0.8.3

Since Atom 0.18 added GitHub integration, I revisited this package. I still have 0.8.3 installed, but now I can see the token field.
I created a token with "full private repo" access, but as far as I could tell from the network inspector this package hasn't requested the GitHub API. It just loads forever, without logging any sort of error in the console.

@dodekeract the package uses the request-promise package to perform network requests, and Atom's devtools only show requests made from WebKit, so they wouldn't show up anyways.
Do you have more than one repository open in Atom? I just realized that it only displays issues for one repo at a time, and if the first repo is not a Github repo then it will not attempt to load them.

@r24y No, I assumed this might be an issue and closed all other projects. It also auto-updated to quick-issues and still doesn't work. :/

Hm, this is turning into a very interesting issue 🙃
Is there anything else that might be "special" about the setup? Maybe:

Proxy/firewall? (I'm behind a proxy myself and it's working, but perhaps there's an edge case I'm not experiencing.)
Permissions granted to the API key are not broad enough? (If the key did not have permission to read issues it might look like this.)
Issues filter "Open/Closed/All" is not set correctly (e.g. filter set to "Open" but all issues are closed)? (I don't think this is the problem, but someone else just filed a bug that looked like this.)

Any further information you can provide would be helpful, since right now there aren't enough clues as to what's happening (er, I suppose, not happening).

@r24y I have this issue on both my Macs. One is a 2017 MacBook Pro and the other one is a Hackintosh. It might be macOS only.
Proxy/firewall: nothing crazy, just ordinary stuff.
Permissions granted: I granted the full repo permission. It's a shame that issues isn't a separate permission...
Filter: I have it set to all.
Note: It now shows No GitHub repos found. Perhaps it's your GitHub detection?

Wonderful, this is very helpful. Thanks so much. I'll see what this turns up.


Shouldn't validate_token param be access-token, not auth_token?

I note that in the doc entry for validate_token the params specified are auth_token and uid. When trying to use the endpoint in cURL I can only make it work with uid, access-token, and client. Shouldn't the docs reflect this or am I missing something?

I believe access-token as opposed to auth_token is correct. That's what's working for me.


Adding favicon to match logo.

Also removing empty line at the end of build-docs.

How sure are we that that's the file we wish to use? Are we following another project's example?

I was just basing it off of the contents of docs/_static/google_logo.png

I removed the superfluous change and sent it as #236


Update Terratest Docs to show support for multiple clouds

Initially, we supported only AWS. We now support GCP and thanks to #158, #159, and #160, we have limited support for Oracle Cloud Infrastructure (OCI). We should update our README to reflect this support.

Maybe this is best left for another issue, but I think Terratest really needs a dedicated documentation site.
I started writing a table of contents once and this is how far I got:
1. Requirements
2. Installation
3. Testing HTTP Services
4. Testing Packer templates
5. Testing Terraform AWS resources
6. Testing Terraform GCP resources
7. Testing Docker
8. Files
9. Git
10. Misc
	1. Random Functions
	2. Retry

I think it would be good to nut out a skeleton, then maybe we start working on something.

I like the idea @robmorgan. Terratest consists of a large number of functions, so a documentation site that tried to go over each one would be unmaintainable / unreadable, but I think what you're suggesting is more of a series of guides and best practices. I think that would be very worth having, either on a dedicated website, or as a blog post series.

@brikis98 your right, I guess that direction I'm heading in. More of a series of guides + best practices. I'll open another ticket for it.

Moving my part to #162.

New website shows all the clouds/providers we support: https://terratest.gruntwork.io/


Make sldns_str2wire_svcparam_buf() static.

The function is only used in this translation unit and prevents a "no
previous prototype" warning.

One of these days I'll be able to do a compile check for a RC before a new release is tagged.
Sorry about that.

LGTM, thanks!


Console window?

Is there a way to bring up a console window? Where do my fmt.Printlns go?
And I think it would be good to have the console tab be present when you open  a project as it would make it clearer  what the right hand frame is for.

yep good idea.  need to capture stdout / stderr for main process and send to console window.  also can send first N chars of output to Status bar..


Pos processing website desc

@shanyas10 Thank you for the PR! Only one small thing about the integration test (not in this PR though): the "same column" test requires a double-check of metadata key. In the interest of time-zone, it may be easier for you to get more details from @manandey since he has encountered the situation before.


Have a controller rumble when the current is stalling

Description
Drive team want to insure we don't brown out since we have 16 motors this season. They want a warning when the current is stalling so they know to let off some of the motors. Mr. Kesler recommended we have the controller shake during these moments.
Describe alternatives you've considered
We could have a warning appear on shuffleboard, but this will be more effective at getting the drivers attention.

@ehill17 I don't know how this was moved to the Backlog (that might have been my fault) but are you still working this item?


New version: LearningHorse v0.3.0

Registering package: LearningHorse
Repository: https://github.com/QGMW22/LearningHorse.jl
Created by: @QGMW22
Version: v0.3.0
Commit: 2be84d765ddc58269c72756cc541274fa591097d
Reviewed by: @QGMW22
Reference: https://github.com/QGMW22/LearningHorse.jl/issues/1#issuecomment-894663804

@QGMW22 please see the message above.  Once you fix the automerge issues you can register again the new revision without changing the version number and this pull request will be automatically updated.
[noblock]

i.e. if I update my repository and fixed automerge issue, This pull request will be updated by @JuliaRegistrator ?
Although I think I fixed automerge issue, this pull request hasn't updated.
[noblock]

An unexpected error occurred during registration.

I updated this pull request, and it met all of the guidelines, but this hasn't merged yet.
I don't understand why.
[noblock]


Add support for ouputting fmt result to stdout

Some editors require a formatting command that returns the result to stdout so this PR adds support for that. I made the arguments for it -O and --to-stdout to match tar but we could go for something else.
Sorry if these functions shouldn't be in main.rs but I followed where show_updated_message() was.

Helix formatting pipes the file to stdin and reads from stdout, so having an ability to read from stdin would be nice here. (I think convention is to use - as the filepath?)
Doing uiua fmt --to-stdout /dev/stdin works when I run it manually from the command line, but not from Helix for some reason...
This should probably be a new issue. Seems kind of silly to make a PR for a language I've never used though ... (I'm thinking about doing AOC this year in Uiua.)

It also looks like even with --to-stdout it still mutates the file passed in, which I think is not expected behavior.

@gamma-delta That is indeed unintended, I've just made a pull request to fix that.


Retirement message

Summary of changes
Asana Ticket: ⏱Schedule Tab | Add retirement message
Create a plug for a retirement message (for CR and bus) in the Schedule tab.
Pending: specific date

The specific date is still pending from Katrina but other than that, this is ready to be reviewed.

The specific date is still pending from Katrina but other than that, this is ready to be reviewed.


Quick Accent bug

Microsoft PowerToys version
0.68.1
Installation method
PowerToys auto-update
Running as admin
None
Area(s) with issue?
Quick Accent
Steps to reproduce
there is a Quick Accent bug when I play Valorant, if I press any key (for example the A key the game freezes and the character goes in the direction)
✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

Is there a chance that you are pressing QuickAccent activation keys, e.g. A + Space? Or just A? /needinfo

both options just A or A + space, it also happens when I press F to defuse the peak  De: Stefan MarkovicEnviado:quarta-feira, 22 de março de 2023 04:49Para: microsoft/PowerToysCc:Murillo Zubk; AuthorAssunto: Re: [microsoft/PowerToys] Quick Accent bug (Issue #24811) Is there a chance that you are pressing QuickAccent activation keys, e.g. A + Space? Or just A? /needinfo—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>


Tooltipster with a form and selectbox option not working IE

Hey guys,
Im not sure if this the right place to ask this but Im having a problem with tooltipster and IE. When I make an interactive tooltipster that shows on hover and add a form with an selectbox in it, it is impossible too select an option in IE because the tooltipster closes and your unable to make an selection.
I made an Plunker to quickly show the problem (open in IE):
http://plnkr.co/lckgcT
I tried adding all kinds of css options too the form select options (display: block/inline-block etc) and playing with the Z-index. But nothing works and the tooltipster keeps closing when I 'open' the select options.
Im sorry for the bad english and I hope the problem is clear!

Fixed it and updated the Plunker with the fix.
you need to add stopPropagation function too each select element. I fixed it by adding the following too the functionReady of the tooltipster:
functionReady: function(origin) {
	origin.tooltipster('content').find('select').each(function() {
		jQuery(this).mouseleave(function(event){
			event.stopPropagation();
		});
	});
}

Hi, thanks for the report, didn't have time to answer this before now. The cursor is actually out of the tooltip when you select an item, I think that's why. Custom triggers would also be a way to mitigate this issue.


Convert files to use Markdown formatting

The documentation files should be updated to use Markdown. This involves renaming them to use the .md file extension, but also converting the previoous Trac wiki markup.
However, see also #2 --- don't go and blindly convert things. Start with RepyV1/2 docs+tutorial, clearinghouse, custom installer builder docs. Then proceed to the other things.
Any help is appreciated! Just add your GiHub handle and the page you will be converting as a comment below.

start with RepyV1/2 docs+tutorial

FYI, #8 converted the RepyV2 tutorial and API docs.

#12 converterd the RepyV1 tutorial and API docs.

Some converted pages may still point to old trac wiki pages that have not been converted yet. So it is a good idea to check from time to time and update the links if the pages have been updated, e.g. like so when in the docs directory:
grep -lr --include="*.md" "wiki:\|\.wiki" .

Excellent point, we need to check this regularly.

Note: Clearinghouse and Custom Installer Builder docs conversions / updates per #13, #14.

Use tractomd.py-script for some limited automatic conversion!

9ce5e758ac94191bf3372806710756b93d097787 converts the "formal installer documentation" and infrastructure architecture document.

8595301d114e69aafb031c7deb125b5c7d41320f converts the Unit Test Framework docs.

#19 converts BaseInstallers, Clearinghouse/Design, CIB API and Usage, Operating/SWUP, and Zenodotus.

@ankitbhatia32 is going for EducationalAssignments and Programming.

I have converted almost all the folder and files except the ATTACHMENTS. Here is the link:
https://github.com/ankitbhatia32/docs

No .wiki files are left in this repo, so I'm closing this issue. Thank you for your contributions!


Background Camera streams pause after some amount of time

WebRTC v3.1.0
HA 2023.4.1
Frontend 20230406.1
I have 5 Ubiquiti cameras connecting over rtsp & configured in MSE only mode in chrome on an ipad.  The streams open without any issue, but after a few minutes the streams pause and start buffering content.  Eventually, they turn black and are disconnected.  No interaction at all with the ipad during this time - it's a camera + calendar display.
Nothing obvious in the logs with default settings in HA.
Assuming these are buffering - the desired outcome would be for these cameras to flush their buffer and stay in real time no matter what.
Happy to pull logs or other info.   Please let me know how I can help debug.

I've been able to reproduce a similar appearing issue on chrome for mac by repeatedly swapping tabs and triggering video-rtc.connectedCallback().   Grabbing the video object into temp1, it appears that the video player is being set to a time outside the buffer.  Manually setting temp1.currentTime = temp1.seekable.end(0) resumes playing.

Tentatively, removing background: true from the cards resolves this.  My dashboard has been running for about an hour without any issues.  Will let it run overnight.
Assuming this holds true, the issue is likely that the stream eventually slips outside of the content in the buffer and then hangs.
The return statement here prevents the call to  this.connectedCallback(); which contains code to jump to the front of the buffer.  https://github.com/AlexxIT/WebRTC/blob/master/custom_components/webrtc/www/video-rtc.js#L240

Continuing to see issues on my HA dashboard after 30-90 minutes.  Still unable to reproduce without background: true by switching tabs.  Going to leave a long running stream running on my laptop to see if I can get it to reproduce and debug.

I've added a handeler to the video.onpause, and verified that the video on my ipad seems to be being caused by something calling pause() on the video objects randomly.   I have yet to figure out the root cause.

I've added a handler to the video.onpause, and verified that the video on my ipad seems to be being caused by something calling pause() on the video objects randomly.
Current SWAG is the video is underflowing and safari is pausing similar to - https://stackoverflow.com/questions/74461792/mediasource-api-safari-pauses-video-on-buffer-underflow
Applying an infinite duration resolved the issue on safari for desktop (the video is flagged as a livestream and never pauses). Unfortunately, this doesn't resolve the issue on safari for iPad.

Hi what is it I add to get this working. Thanks

There is a known problem, MSE can crash if the RTSP stream is "broken"