Feature request: output file to replace existing

Hi, thanks for this tool! I've been using it for over three years!
I know it's been a while since the last release, but I'd like to ask you if is there any chance if you could add an option to force the creation of the target file.
The idea is to allow importing the dummy file that contains a placeholder while developing and the correct one once a library is released. Sometimes we link the library to a webpack based application, without passing through through the tipical release pipeline (so, webpack handles its building).
Currently, by doing this, it outputs:
File lib/esm/version.js is not generated by genversion and therefore will not be replaced. Please ensure that the file can be destroyed and remove it manually before retry.

Assuming that version.js is <target> and the building output is lib/:
// index.js
export { version } from "./version";

// version.js
export const version = "$dev";

and then, after running genversion ($ pnpm genversion -esd <target>), the file should get replaced correctly.
I know it could be possible to run rm -rf <target>, but we should have the same path everywhere and that would be prone to mistakes in the future.
I have something like this command:
{
	"scripts": {
		"build:cjs": "pnpm tsc -p tsconfig.build.cjs.json && pnpm genv -- lib/cjs/version.js",
		"build:esm": "pnpm tsc -p tsconfig.build.esm.json && pnpm genv -- lib/esm/version.js",
		"genv": "pnpm genversion -esd"
	}
}

Having the rm -rf would make us to create two different commands, each to run genversion on a path.
I'm also available to work on it and open a PR.
Let me know. Thank you!

Hi! Thanks for the feedback and suggestion. If I understood correctly, you would like to have a placeholder version.js that the genversion is able to overwrite when needed.
Currently genversion overwrites the file only if the first line of the file matches the regexp pattern /generated by genversion/i. The original purpose of this safeguard was to avoid accidents where a misconfiguration might cause genversion to overwrite an important file in the project or elsewhere. Usually projects are under version control and therefore such accident would not be a big issue because likely easily detected. But still, the possibility for damage would exist if there were no safeguard.
You possibly picked the hint already; an easy way to solve this is to modify the first line of your placeholder file to look like it was created by genversion. In other words, just replace // version.js with // Generated by genversion. so that genversion knows the file is safe to overwrite.

Happy new year! Finally I got some free time to work on genversion.
I am planning for two features related to the issue. The first is the introduction of -f --force flag that overwrites the target file regardless the contents of the first line or the file in general. The second is an ability to specify a custom template with -t --template flag (#23).
I assume that the first, --force, can solve your initial issue of genversion refusing to overwrite the file regardless of the extra code added in typescript compilation. However, the overwriting removes those extra lines which can be important to you or the compilation process. Although I would instruct genversion to be run before any compilation takes place, I can understand that not all pipelines can allow that. For that, the second feature, --template, can bring some help by letting you to customise the file generated with genversion. With a custom template you could include and match the lines produced by the typescript compilation. There is the long-term maintenance downside such that you might need to update the custom template if your complication process changes for example due to a new typescript version. Still, the template feature at least provides a solution.
I am planning to release the both features in the next genversion release v3.2, hopefully within a week or so. If you have any comments on these features, regarding your use case or in general, feel free to share.

Hi @axelpale, happy new year to you!
Thanks for your reply and the work on this library!
The main issue that comes to my mind about running genversion before anything else, is that it changes a working directory file. Which translates, for all the cases out there that (just like me) should run genversion before any compilation step, into the need of adding a script that resets the git head before publishing the package (as it is required).
That's not very convenient and might bring to a few downsides and issues. Publishing a package with a dirty git working directory can also be skipped, but that might bring some unwanted and not ignored files (perhaps temporary but required) into the package itself. Quite a big deal IMHO.
So, the best action here is to run genversion on a pre-built file that is gitignored, or in a folder just made for distribution (which usually already have some commands for cleaning up or ignoring the folder).

Then, moving to the proposal of --force, it might have less and less sense (exclusively for my use case) given what happens with Typescript compilation (which, still, I'm not very sure the code it outputs is needed in all the cases).
I find the proposal in #23 very very interesting, but I still have some doubts on how this could cover my use case.
Given the Typescript-outputted code, it might have much sense to create something like a "block" that genversion recognizes and goes to act on, even after third parties compilation.
Hence, from:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
// Generated by genversion.
exports.version = "x.y.z";
//# sourceMappingURL=version.js.map

To:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
// genversion:start
exports.version = "x.y.z";
// genversion:end
//# sourceMappingURL=version.js.map

But I think we might not be very sure other compilers won't change the code inside the "block". One example that comes to my mind (ofc, to be tested and evaluated) is the case of a project that builds with Webpack (or any other bundler), ts-loader and TerserPlugin that removes the comments (therefore the block would get destroyed. To avoid this, genversion should be run in webpack compilation before TerserPlugin, which is not an easy task by the way).
I'm maybe of the idea that using an AST Parser to parse the file and lookup for the variable "version", change its value and build the file back could be the best way to avoid most of the problems. You could just read the variable name as an input!
If you could have an AST Parser that does this job for you, you wouldn't have to care about:

Code output (cjs or esm, except of how you should look for the property in the AST)
Code format (prettier or eslint, double column, single column, single quotes, double quotes: all of them could and would be handled externally before or after genversion execution).

Having an AST Parser would therefore make the whole template feature (which feels to be a bit an overkill and a bit much complex to me) useless. And you still might want to keep the templateEngine concept to let people have a different AST parser, perhaps one for EJS (you should therefore expose a known interface through which you do expect specific things).
But I think that having the possibility to specify a templateEngine should be something that should be evaluated later and only if needed or requested, because I feel it could take a lot of effort to create and I don't know if there are other people out there that use a different format.
In general, my idea is that genversion should not care about the user / project settings, as they feel to be out-of-scope matters.
By having an AST Parser, you could deprecate flags such as --semi or --double and --strict and you would not have the issues that you described in #23 to make templates fit with the current existing flags. Deprecating those flags, would make your way ready to introduce a possible templateEngine.
I don't know if you agree with my idea and what's yours. I'm genuinely curious.
Again, thank you!

Thanks @alexandercerutti for your thoughtful and honest view on this. It definitely makes sense for genversion to replace a variable in a target file – under version control or not – instead of creating or changing a file that is likely under version control. I will take this point and the others into consideration when planning for the upcoming release. The work continues...

@axelpale I had a few spare time today and I attempted to implement a little POC with an AST parser with string replacement and file re-build, for both CJS and ESM, if you are interested.
Of course, some corner case might not be covered, but this is a good start to me.
https://codesandbox.io/p/devbox/l76k99

Hi @alexandercerutti and congrats for the good work. The AST parser approach is interesting and definitely would suit many projects very well. The AST parser solves the formatting in very different but powerful way. I am hesitant, however, for its complexity when compared to good ol' string replace. Maybe your AST parser application to meta data insertion is worth its own package because it gives lots of power and possibilities for its complexity. I can easily imagine a tool, say "plaster" (note ast :D), that allows devs to insert properties to source bundles with simple assignments like plaster .version=$version dist/bundle.js.
While AST parser is great in ensuring correct structure, style, and format, I assume it requires that the file to parse is perfectly formatted. Parsing takes time and with large bundles things might slow down. After all, genversion is just a tiny piece in long pipelines, it should be very simple under the hood too and without much requirements placed for the host project.
My current working plan for genversion is to implement --variable <string> parameter and --substitute flag. The given <string> is rendered in the generated module file instead of the actual version tag. When the substitute flag is present, that string is being replaced with the version tag. The substitute flag kind of repurposes genversion's module generation as template generation. The user who wants to insert the actual version into post-build bundles needs to run genversion only once to generate the template-ish module, let that module be compiled into the bundle, and then add a genversion --substitute call somewhere along the pipeline. No changes into version control after the initial generation, and best of all users can easily modify the generated template to their needs.

The AST parser solves the formatting in very different but powerful way

Au contraire, actually (😄). I thought and hoped an AST could have given access to the single tokens used to format (semi-colons, commas...), but I was wrong.

While AST parser is great in ensuring correct structure, style, and format, I assume it requires that the file to parse is perfectly formatted.

Does it? AST seems to not care about formatting until it is a valid JS (if said so). So people are free to format the file as they wish, with the tool they wish.
What I see, though, is that escodegen owns some formatting settings and some defaults that might not match with the original settings, so additional checks (probably based on some heuristics?) could be performed to verify which settings should be set when outputting. Otherwise, auto-detection based on the most common formatting tools' settings could be set (e.g. reading .prettierrc or .eslintrc, or something like that and merging them).
I agree with you on the parsing time, but I think that if a package is provided with specific instructions (e.g. "creating a file named version.js containing an exported variable named VERSION"), most people will follow the suggested approach and fewer will create something complex. So, this can cut out most of the corner cases' discovery and complexity in most of the usages. Might be wrong though.

My current working plan for genversion is to implement --variable  parameter and --substitute flag. The given  is rendered in the generated module file instead of the actual version tag. When the substitute flag is present, that string is being replaced with the version tag. The substitute flag kind of repurposes genversion's module generation as template generation. The user who wants to insert the actual version into post-build bundles needs to run genversion only once to generate the template-ish module, let that module be compiled into the bundle, and then add a genversion --substitute call somewhere along the pipeline. No changes into version control after the initial generation, and best of all users can easily modify the generated template to their needs.

I've read #26, and I think this is fine. Also, these options could interop pretty much correctly with the AST (I mean, I don't think they could break anything, just in case).
What's not very clear to me is why one "needs to run genversion only once to generate the template-ish module". I mean, couldn't we users just create our file and, once given the right settings, genversion just replaces them? Also about what you wrote later: "and best of all users can easily modify the generated template to their needs.". I'm thinking about not creating a tailored file for the version but hardcoding the variable into the index barrel file that exports everything.
Thank you!

Thanks again for the sharp and thoughtful input.

AST seems to not care about formatting until it is a valid JS (if said so)

Sorry, I misused formatting as a umbrella term for all structure, including valid JS. Although valid JS likely covers 98% of the cases, it is still a strong assumption and a requirement we are better without if possible. I know that I do not know where people are using genversion and I can begin to imagine some exotic pipeline steps that break JS validity temporarily. Also, users of JS-flavoured languages that are not valid JS (coffeescript) can experience issues and would need to be unnecessary careful when placing genversion in their pipeline.

"needs to run genversion only once to generate the template-ish module". I mean, couldn't we users just create our file

You are correct, the generation step would not be necessary for users who would like to create their own file. Also, I am glad that you pointed out the possibility for users to just hardcoding the variable into the root index file or wherever needed. Personally, I prefer separation of concerns a dedicated file brings, but I can see the value in not forcing users to do that. I need to consider the backward-compatibility in genversion usage, thus we cannot just drop the generation feature and expect everybody to migrate to variables overnight. Therefore I need to find a stable project state that is backward-compatible but still allows the variable approach. However, if the variable approach takes off well, it might take over the generation approach as a primary way to use genversion at some point in the future.

Also, users of JS-flavoured languages that are not valid JS (coffeescript) can experience issues and would need to be unnecessary careful when placing genversion in their pipeline.

I don't know if others feel the same, but I feel the most intuitive usage of genversion is after every library compilation step.
But I think the doubt could be "easily" resolved by "creating an opinionated manifesto", a set of boundaries and guidelines that you'd like people to adhere to and that, if surpassed, could lift you up from the responsibility of providing any change to the program or even support, if a reported issue does not provide valid points to change the manifesto and the code.
One of the points of such manifesto, could be that using genversion after any compilation step is highly recommeded. Of course, such manifesto would contain rules and indications you feel to be right.
Once a manifesto is provided, entropy tends to get pretty much reduced IMHO. Your current manifesto is what you wrote in the paragraph "Try it out".

I can begin to imagine some exotic pipeline steps that break JS validity temporarily

No please, don't do that lol. Unless you want to end in the Alice in Wonderland's rabbit hole 😄

Personally, I prefer separation of concerns a dedicated file brings, but I can see the value in not forcing users to do that.

Definitely agree, but the fact of putting the variable inside the index file is still a possibility.

I need to consider the backward-compatibility in genversion usage, thus we cannot just drop the generation feature and expect everybody to migrate to variables overnight.

Of course. The most critical thing is the usage through npx without prior installation. You might just want to be sure that eventual deprecated and removed options do not break the flows, if you decide to bump the major semver.

Therefore I need to find a stable project state that is backward-compatible but still allows the variable approach.

I'd keep "VERSION" as default lookup string, allow the new optional flag --variable and always allow --substitute / -s (or maybe --replace / -r ?).
I honestly don't see any difference between "generation" approach and "variable" approach.
I might be wrong, but if you see the flow as "reading file" -> "changing" -> "emitting", you might just want to change "reading file" to "reading file or fallback", and the fallback would just use the name in --variable or a default one "VERSION" (to be retro-compatible).
After all, users that are already generating the file on demand, they are already fine with what is outputted right now, so having a retro-compatible fallback is important.

You really help me think this through, thank you for that!

I feel the most intuitive usage of genversion is after every library compilation step

Of course a major audience for genversion are those who compile and bundle their client-side code. However, there exists many projects, especially libraries, that do well without. For example, genversion itself is an example of a project that uses genversion but does not have any compilation steps. Other examples of my own are affineplane and tapspace. The latter has a build pipeline for standalone bundles but is also useable as-is, and therefore Tapspace's raw codebase cannot contain any unfinished business such as variables to be replaced. Furthermore, with the advent of native browser support for ECMAScript modules, there must be increasing number of projects that do not trouble themselves with a build pipeline. Therefore the ability to generate a finished version module without any variable-trickery is important.

I'd keep "VERSION" as default lookup string, allow the new optional flag --variable and always allow --substitute / -s (or maybe --replace / -r ?).

I am thinking of using "GENVERSION_VERSION" as the default variable name if --variable is present and without a value. It is way too likely that a large bundle accidentally contains "VERSION" somewhere. Regarding the flag name, I did consider --replace but I feel it to be too easily misunderstood as file replacement instead of variable substitution in the context of genversion. I also considered --assign as in variable assignment but its meaning would not be accurate because we are not changing the value of the variable but substituting the variable with a literal. I wish there would be a simpler word than "substitute" that is still accurate and not easily confused with file operations.

However, there exists many projects, especially libraries, that do well without.

Well, yeah, in the distribution pipeline, the compilation is purely optional.

I am thinking of using "GENVERSION_VERSION" as the default variable name if --variable is present and without a value.

Wouldn't be more explicit and understandable to throw an error if --variable is set as empty? It might mean that the user forgot to set the name. Otherwise one might go to check why things are not working and end up then looking inside the built file only then to discover something that, perhaps, it didn't read on the documentation (their fault, but still time taking to realize). I always prefer explicit things over assumptions.

It is way too likely that a large bundle accidentally contains "VERSION" somewhere

Usually, bundles like Webpack split the modules into functions. The only corner case that comes to my mind could be UMD, but I'm not even sure this is a real problem right now.

Regarding the flag name, I did consider --replace but I feel it to be too easily misunderstood as file replacement instead of variable substitution in the context of genversion. I also considered --assign as in variable assignment but its meaning would not be accurate because we are not changing the value of the variable but substituting the variable with a literal. I wish there would be a simpler word than "substitute" that is still accurate and not easily confused with file operations.

You have a valid point. I could also suggest --apply (which is great, but might confuse those not using it to think they are not actually applying the change) or --supersede (which is similar to --substitute but takes the place of) or a more verbose --change-existing.

Wouldn't be more explicit and understandable to throw an error if --variable is set as empty?

You are right. I agree that explicit is better than implicit, thus there should not be a default variable name.

I could also suggest --apply or --supersede

Good suggestions. The following might help. I came to understand better what you wrote previously, including:

I honestly don't see any difference between "generation" approach and "variable" approach.

I do agree now that generating a version module that includes a placeholder variable does not serve much purpose. Users that just want to substitute variables after build can easily hardcode the variable wherever they like and in whatever style they want. Therefore, as I already wrote in #26, I am dropping --substitute idea altogether and just make --variable to indicate substitution in the target file. Here is an example that would just replace the variable in the target bundle file:
$ genversion --variable PACKAGEVERSION dist/bundle.js

Taking into consideration that --variable must have a value, I again feel tempted to rename the flag as --replace. The result almost reads like "replace this in that":
$ genversion --replace PACKAGEVERSION dist/bundle.js

To give an example with multiple properties and your --apply suggestion:
$ genversion --property name,version --apply PKGNAME,PKGVERSION dist/bundle.js

You are right. I agree that explicit is better than implicit, thus there should not be a default variable name.

I mean, you might choose to have a default only if --variable is not specified. By doing this way, you can assure retro-compatibility.

I think I like this.
A possible improvement could be that --property and --apply merge into a (I think) docker-like mapping.
$ genversion --apply name:PKGNAME,version:PKGVERSION dist/bundle.js

By doing this, I think you could remove any ambiguity between the order of the two parameters.
I have a doubt now. By having the concept of remapping like property, isn't this going further than the simple genversion?
Also, what I don't have clear is if --apply is now meant to replace --variable for multiple params or add parameters.
You could have --apply or just --variable with the same behavior described above, which behaves in these ways:

Looks for a default "VERSION" and replaces with package.json's 'version', which is more than enough for most of the cases out there, IMHO:

$ genversion dist/bundle.js

Goes on Error for missing parameter for --apply:

$ genversion --apply dist/bundle.js

Gets 'version' from 'package.json' and seeks for PKGVERSION in the file:

$ genversion --apply version:PKGVERSION dist/bundle.js

Gets all the specified fields from 'package.json' and remaps them

$ genversion --apply name:PKGNAME,version:PKGVERSION dist/bundle.js

An optional thing that might interest you, could be the possibility of specifying such parameters in a JSON map in package.json itself (you are already reading that so, why not?). You could also take advantage of this package if you want to exaggerate 😄 https://github.com/cosmiconfig/cosmiconfig

In any case, you have been a tremendous help :)

🚀 🚀 🚀

A possible improvement could be that --property and --apply merge into a (I think) docker-like mapping

The docker-like mapping is a sound improvement. Still, --property needs to be available for those who do not --apply to variables but generate the module. I will attempt to make --apply work both ways, with --property or the docker-like mapping, as in the snippets further below.

I have a doubt now. By having the concept of remapping like property, isn't this going further than the simple genversion?

Yes, the customisation of properties expands possible use cases of genversion outside of mere package version. However, I view this feature more as a supplement for version getting than complete repurposing of the tool. According to #21 there are cases where the package name is a desirable supplementary datum, for example to be displayed next to the version in log output. If the feature makes lives of genversion users easier, I would go for it.
Still, I am a bit worried the new possibility to pick properties can turn out to be a can of worms for maintaining genversion. I can already see problems with applying non-string properties from package.json, like "keywords". While it sounds like a simple matter of replacing a placeholder variable, say PKGKEYWORDS, with the output of JSON.stringify(pjson.keywords), in reality it is shaky to hardcode such unquoted variable PKGKEYWORDS in the source code without linters or compilation going red, am I right?
Application of string properties is much easier, because the hardcoded export const version = "PKGVERSION" would just turn to export const version = "1.2.3" upon replacement. Compare this with export const keywords = "PKGKEYWORDS" that would become the troublesome export const keywords = "["hello", "world"]". If we remove hardcoded double quotes like export const keywords = PKGKEYWORDS, then the PKGKEYWORDS becomes a undefined JS variable from linters' perspective, requiring users to configure the variable as a global variable or to be ignored by linter/compiler. Still even more wormy, the result would become export const keywords = ["hello", "world"] which is valid but causes users to begin to request formatting of the JSON.stringify output, like usage of single quotes instead of doubles. While possible, it's tedious from my maintainer point of view.
For these reasons, I need to limit the set of applicable properties to those that have string value. In effect, this limitation limits possible new use cases, emphasising the mere supplementary role of --property with respect to version-getting.

$ genversion dist/bundle.js

Regarding the default behavior, that I wont be changing from module generation. The command above will generate the most basic version module file at dist/bundle.js instead of variable replacement. Changing that promise would constitute to a new major version and would probably still annoy current users.
However, I will keep the version property as the default. Therefore the most minimal usage of --apply would become:
$ genversion --apply PKGVERSION dist/bundle.js
which would be equivalent to:
$ genversion --apply version:PKGVERSION dist/bundle.js
as well as:
$ genversion --property version --apply PKGVERSION dist/bundle.js

the possibility of specifying such parameters in a JSON map in package.json itself

That is a good suggestion for the future. However, designing that feature would be much easier if genversion were only about replacing variables and not about generation of modules. It would be a great feature of that hypothetical spin-off tool plaster.

Still, --property needs to be available for those who do not --apply to variables but generate the module. I will attempt to make --apply work both ways, with --property or the docker-like mapping, as in the snippets further below.

So --property will generate the file to include the specified fields? Did I understand correctly? I'd keep only --apply. Having two parameters that do almost the same things could be source of confusion.

Still, I am a bit worried the new possibility to pick properties can turn out to be a can of worms for maintaining genversion. I can already see problems with applying non-string properties from package.json, like "keywords". While it sounds like a simple matter of replacing a placeholder variable, say PKGKEYWORDS, with the output of JSON.stringify(pjson.keywords), in reality it is shaky to hardcode such unquoted variable PKGKEYWORDS in the source code without linters or compilation going red, am I right?

I think that people could expect the value that can be found in the JSON. Say I (as a user) select keywords, I might expect to have the array replaced in the code, instead of the string. It might be a bit counter-intuitive to have the string instead. The same is true with any other kind of object. You should check the type of parameter inside the package.json and choose what action to take.

While possible, it's tedious from my maintainer point of view.

I agree with all you have written up to this point. This could be tedious, error-prone, and confusing. You might want either to restrict replacement only to strings, as you said or do that just for the version.

I am thinking --property being for generation, only to choose the set of properties to bake in the generated file, while --apply is for the in-place replacement so that its value maps a set of properties to the variables to be replaced. There would be no --substitute flag or similar to activate replacement, but --apply alone would make genversion to replace instead of generate.

What's the difference between generating and applying? I mean, generation could be considered a fallback for failing to read a file, isn't it?

However, I realised there is a big problem for --apply in general what makes its use sketchy at best, namely the source maps. If we modify a bundle in any way that changes the code length even by a single character, that would break mappings in source maps. I hope that every project that compiles and bundles the code also uses some form of source maps (personally I do) at least during development. Letting a simple tool like genversion to mess that up is a big no-no. And I can guarantee you that I, as a genversion developer, wont begin to learn how to modify source maps :D

Yeah, you are right. Source maps would break. Said I think that a solution should be as easy as possible, and also said that I think bundlers should not be used for libraries, I think one of the rules of your manifesto should be that genversion should be applied only on libraries and (only if needed) before any kind of bundling, not for final projects.
Changing a value inside a bundle makes almost no sense IMHO: DefinePlugin for webpack as well as other integrated tools for the other bundlers, already exist and they do exactly what you are describing, without compromising the source maps.
Learning source maps? No thx! :D

Hi @alexandercerutti ! Just a moment ago I released genversion v3.2.0 with many features which you initiated or helped me to think through. I am very grateful for that. Unfortunately, I could not wrap my head around the --apply nor --variable flags, and therefore I had to discard them for the time being, at least until I can see their purpose more clearly.
That said, I suppose your original issue can be solved with the new flags --force and --template. Thus, I will close this long issue now and celebrate the new release. Still, feel free to open new issues if those new flags do not serve your use case well, or if you do have more good ideas up in your sleeve!
It can take a while before I give genversion another development sprint, except for minor bugfixes. Still, the work will continue at some point. Thank you for all the help! So long, take care! 🎸

Okay great! Thank you for the support, @axelpale!


Embed mode

Any website may display an active (listening) Cool Maze QR-code.
Make sure the layout is fine, and think of the best ways to restitute the data to the embedding page.

Works "not that bad" out of the box.

Drawback : when the iFrame is redirected to the resource URL, it is not trivial to "go back" to the QR-code.

TODO: make sure the message box fits within the iFrame boundaries.  Or, use only big iFrames.

To make money (#95) embeds are useful for partnerships.


Open API: post sample json format to create new Fact

once sample JSON is written, test on local with sample JSON
add default fields manually in API if needed or set default in models for those fields

close with #44


About longer prediction time than xgboost

Description
I am currently conducting a comparison between xgboost and lightgbm on prediction time. When I run predict function for both xgboost and lightgbm, I found that lightgbm always has 2-3 times more prediction time than xgboost. Then I found that xgboost can take xgb.DMatrix as the format of newdata in the predict function, but in the predict function of lightgbm, it cannot take lgb.Dataset object as the format of newdata, I wonder could you please tell me whether this is the reason for the longer prediction time in LightGBM than xgboost ? Since if I use matrix form of data as newdata in predict function in both xgboost and lightgbm, I will get similar prediction time for xgboost and lightgbm.
Also, I wonder whether there are any methods to improve the prediction time of lightgbm? My data has 56 features and 560K observations. Thank you very much!

lightgbm always has 2-3 times more prediction time than xgboost

This claim is too broad to generate a meaningful answer or any action here.
Please see the discussion in #5934, especially https://github.com/microsoft/LightGBM/issues/5934#issuecomment-1596208059 for some specific examples of the things that could cause one program using xgboost to run faster than another program using lightgbm.
If you see specific opportunities to improve LightGBM's prediction speed, write up a bug report with specific details or submit pull requests changing the code... we'd really appreciate that!
Or if you want to do the work to put together a benchmark controlling for all those factors listed in #5934 and present the results here, it might contribute to discussions about efficiency in this project.
But to get someone to investigate the claim that generating predictions with XGBoost is faster than LightGBM, you need to provide significantly more detail. The advice in "How do I ask a good question?" (Stack Overflow docs) may help you to create a report that's more likely to improve your understanding of LightGBM and help you to help improve LightGBM.

it cannot take lgb.Dataset object as the format of newdata

Right, today LightGBM doesn't have a prediction routine that can directly use the Dataset object.
There is at least one documented feature request for that for the R package, linking it here: #2666.

there are any methods to improve the prediction time of lightgbm?

See https://lightgbm.readthedocs.io/en/latest/Parameters-Tuning.html#for-faster-speed


Update mutation strategy to not use temporary tables

see https://github.com/hibernate/hibernate-orm/blob/main/documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc#non-temporary-table-bulk-mutation-strategies

Is this causing us a problem?  As far as I know we don't have permissions to create temporary tables anyway, so I thought we'd have seen an error?

Is this causing us a problem? As far as I know we don't have permissions to create temporary tables anyway, so I thought we'd have seen an error?

Have you added permissions to create the temporary tables now? We didn't have and we were getting errors because of not having permissions -- thus why we added the first property.

No, we have the same permissions as before.  So I'm wondering if this PR is needed?


Always update discovery info port when reserved port has changed

LGTM. Thanks @mrbrowning

retest this please

retest this please

retest this please

retest this please

@mrbrowning please take a look at last two commits

👍

retest this please

retest this please


MudFileUpload doesn't support drag/dropping the same file twice using Chrome and Edge browsers

Bug type
Component
Component name
MudFileUpload
What happened?
On Chrome and Edge browser when drag/dropping a file onto a MudFileUpload, the same file can't be dropped again after clearing the queue or uploading. This behavior can even be reproduced on the MudBlazor website example.
OnDragEnter/OnDragLeave fire as expected, OnFilesChanged doesn't after the first iteration.
As a sidenote: OnDragEnd doesn't seem to fire at all.
Calling MudFileUpload.Reset() after clearing or uploading doesn't change the behavior.
Expected behavior
The same file should be able to be dropped again on all browsers, regardless of clearing/uploading/resetting on previous attempts.
Reproduction link
https://mudblazor.com/components/fileupload#drag-and-drop-example
Reproduction steps
Tested on Chrome v112.0.5615.86 and Edge v112.0.1722.48

Drop a file on the drop zone
Hit the Clear button
Drop the same file again

Relevant log output
No response
Version (bug)
6.2.2
Version (working)
No response
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
On what operating system are you experiencing the issue?
Windows
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Related to #6311 #6451

Hi @Mr-Technician, I'm interested in contributing to this issue, but I wanted to check in first to avoid duplicating any work that may already have been done. Do you know what the status of this? If no work has been started yet, I'd be happy to take a stab at it.
Thank you

@joe-gregory Thanks for asking me, as I remember I discovered that adding a @key attribute to the file upload that is refreshed when FilesChanged is called fixed the issue but had other side effects. Feel free to take a crack at it because my solution was in very early testing stages.

Hi @Mr-Technician,
Sorry for the delay in my response. I'll take a crack at it. Would you mind sharing, if you remember, what were the unintended side effects of adding a @key attribute?
Thank you.

@Mr-Technician could this line also cause the problem?
https://github.com/MudBlazor/MudBlazor/blob/54c6a11c10b4a1e8fb447f54b534f8a707f877e7/src/MudBlazor/Components/FileUpload/MudFileUpload.razor.cs#L41

@Mr-Technician @ScarletKuro I continue to work on this problem. However, I have a question and would like to get your feedback if possible.
Testing the example code from the docs drag and drop example, I noticed that MudFileUpload.Files only stores the most recently dragged and dropped file.
I didn't see that mentioned in this bug or in 6311 or 6451, so I just want to confirm I am not making a mistake on my end.
I see this single-element assignment happen in the OnChange method of MudFileUpload:
 private async Task OnChange(InputFileChangeEventArgs args)
        {
            if (GetDisabledState()) return;
            if (typeof(T) == typeof(IReadOnlyList<IBrowserFile>))
            {
                _value = (T)args.GetMultipleFiles(MaximumFileCount);  //Here, GetMultipleFiles method returns a single element list as expected when files are dragged and dropped one at a time.
            }

Thank you

@joe-gregory I think you are on to something here. The _value should not be replaced when adding new files; new files should be added to the list. The only issue is this won't work with an IReadOnlyList. Also, I think the existing behavior makes sense for normal (not drag and drop) file uploads.
I guess we could add an option that would allow adding to the file list instead of replacing it?

Hi, @Mr-Technician @ScarletKuro  I have a few advancements and comments I would like to share for feedback.

I solved the issue with _value only holding the latest dragged and dropped file by changing the OnChange method in this portion from this:

if (typeof(T) == typeof(IReadOnlyList<IBrowserFile>))
  {
      _value = (T)args.GetMultipleFiles(MaximumFileCount);
  }

to this:
 if (typeof(T) == typeof(IReadOnlyList<IBrowserFile>))
  {
    List<IBrowserFile> newFiles = args.GetMultipleFiles(MaximumFileCount).ToList();
    IReadOnlyList<IBrowserFile> oldFiles = _value as IReadOnlyList<IBrowserFile>;
    if (oldFiles != null)
    {
        var allFiles = oldFiles.Concat(newFiles).ToList();
        _value = (T)(object)allFiles.AsReadOnly();
    }
    else
    {
        _value = (T)(object)newFiles.AsReadOnly();
    }
  }

One observation I want to make is that the example code uses a local fileNames list to store the file names and display the MudChips. I don't think this is a good idea and I think it is part of the reason many users were confused. Instead, I think the example code should utilize the FilesChanged event callback to populate fileNames. FilesChanged provides _value. Instead, the example is using the callback event OnInputFileChanged which provides the InputFileChangeEventArgs used by OnChange and leaves room for disparity between what is saved between the parent and child components.

I think the example should go from this:
private List<string> fileNames = new List<string>();

    private void OnInputFileChanged(InputFileChangeEventArgs e)
    {
        ClearDragClass();
        var files = e.GetMultipleFiles();
        foreach (var file in files)
        {
            fileNames.Add(file.Name);
        }
    }

To this:
private IReadOnlyList<IBrowserFile> myFiles;

private void OnFilesChanged(IReadOnlyList<IBrowserFile> files)
    {
        myFiles = files;
    }

Finally, the Clear() method in the example does not Clear the Files property (_value) of MudFileUpload. In only clears the UI and the dummy variable fileNames. I think there ought to be a way to clear _value, although I am unsure of what is the best way to implement this. A ref could be added

<MudFileUpload IReadOnlyList<IBrowserFile> @ref="fileUploadRef" ... />
...
@code{
    MudFileUpload<IReadOnlyList<IBrowserFile>> fileUploadRef;
    ....

    OnClear{
    fileUploadRef.ClearFiles();
    ...

But at that point, you don't even need the event to provide the value of Files. Do you have thoughts on this? Either way, it sounds more appropriate for a different PR if I interpret the guidelines correctly.
As for point 1 and 2, if you are Ok with these changes I can submit PRs which I believe should be 2 separate ones (one for the component and another for the documentation).
Thank you.

LGTM
Agreed, this would clean up the example code.
I was about to say that FileUpload is already clearable but this isn't the case according to the API. When I get home later I will double check which base class it inherits from. FileUpload should be clearable for consistency.

Please do go ahead and make PRs for these changes and request a review from me.

But at that point, you don't even need the event to provide the value of Files. Do you have thoughts on this? Either way, it sounds more appropriate for a different PR if I interpret the guidelines correctly.

I'm not quite sure what you mean by this. Are you suggesting that the @ref could be used to get the file values as well?

Hi @Mr-Technician,
Understood, I will submit the PRs for the first 2 points.
For the 3rd point, I meant to say that if you have a ref to the instance, you can use MudFileUploadRef.Files to access the files instead of using the FilesChanged event to get the value of Files. I was trying to say that if you have to use a ref in order to use a clear method, MudFileUploadRef.Clear(), the example could also use MudFileUploadRef.Files to get the list of files instead of relying on the event. Not sure how 'appropiate' it is to rely on refs. I am curious about your thoughts.
I hope this makes sense. Please let me know if it doesn't.

For the 3rd point, I meant to say that if you have a ref to the instance, you can use MudFileUploadRef.Files to access the files instead of using the FilesChanged event to get the value of Files. I was trying to say that if you have to use a ref in order to use a clear method, MudFileUploadRef.Clear(), the example could also use MudFileUploadRef.Files to get the list of files instead of relying on the event. Not sure how 'appropiate' it is to rely on refs. I am curious about your thought

Yes, one could do this but it would not be recommended and would result in a compile warning. Component parameters are only intended to be accessed through attributes, not through component references. The Clear method is different because it is not a property. Also, the two way binding of the Files/FilesChanged gives a notification that the files have changed.

@Mr-Technician, got it, that makes sense.

Hi @Mr-Technician , I made the PR that addresses _value only holding one file as we previously discussed.

I don't have the option to add you as a reviewer as you requested. Am I able to do that?

I failed a Codecov test because the new code is not being tested. Do I need to include a test? I ask because I modified an existing method rather than adding a new method so I would think it is covered. Please let me know if I need to get on that.

Before making the PR to update the documentation example, I am going to search for the Clear function as that will also address #6311 and #6451 . I haven't had a chance to get to that yet.

Thank you

It might be a permissions issue but Kuro took care of it!'
I will look at the code when I am able and get back to you on this. A new test may not be necessary.
Sounds good!

@Mr-Technician , one more thing. The current behavior is such that you can't drag and drop the same file in a row, but you can drag and drop the file after dragging and dropping a separate one. (You can't do A.txt twice in a row but you can do A.txt, B.txt, and A.txt again). Is this acceptable behavior?

It's not terrible because submitting the same file twice isn't standard behavior. I'm not sure what would be considered "normal."


dropbox service doesn't start

Issue description
services.dropbox fails while running dropbox manually works.
I'm supposed to be on bb6eb9b13e3d40a22633fb80cbc75347af5bed3c
jui 30 15:48:40 desktop systemd[1757]: Starting dropbox...
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]: Traceback (most recent call last):
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1603, in <module>
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:     ret = main(sys.argv)
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1592, in main
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:     result = commands[argv[i]](argv[i+1:])
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 862, in update
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:     download()
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 294, in download
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]:     import gi
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24368]: ModuleNotFoundError: No module named 'gi'
jui 30 15:48:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24369]: Starting Dropbox...
jui 30 15:49:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24369]: The Dropbox daemon is not installed!
jui 30 15:49:40 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[24369]: Run "dropbox start -i" to install the daemon
jui 30 15:49:40 desktop systemd[1757]: dropbox.service: Can't open PID file /home/bbigras/.dropbox-hm/.dropbox/dropbox.pid (yet?) after start: Operation not permitted
jui 30 15:49:40 desktop systemd[1757]: dropbox.service: Failed with result 'protocol'.
jui 30 15:49:40 desktop systemd[1757]: Failed to start dropbox.

Meta
Maintainer CC
@eyjhb
Technical details

system: "x86_64-linux"
host os: Linux 5.7.11, NixOS, 20.09pre-git (Nightingale)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.7
channels(bbigras): "nixpkgs-20.09pre236138.970b2b853d4"
channels(root): ""
nixpkgs: /home/bbigras/.nix-defexpr/channels/nixpkgs

@bbigras Could you verify that ~/.config/systemd/user/dropbox.service contains DISPLAY= inside the Environment field?

Thanks for the reply. I'm not home right now, so I can't test on my desktop.
I can test on my laptop, which uses a lot of the same config files and I do have DISPLAY= and the service works.
So I'm suspecting my desktop wasn't properly updated or something like that.

In general I have had some issues with hm not updating the services after a rebuld, where I have to delete the files first before they get added again.
But I have no further evidence of that... :) Might as well be me! - But it does sound like it does not have DISPLAY unset :)

@eyJhb If you've been having problems with services restarting then I would suggest trying the sd-switch branch. It completely replaces the systemd service switchover code.

@rycee Here it starts correctly, but the tray icon is not showing. Other problem is it set the Dropbox folder to ~/.dropbox-hm/Dropbox, not ~/Dropbox. I tried to set path to $HOME/Dropbox (and "${config.home.homeDirectory}/Dropbox";) but it didn't work.

I'm back home.
I also have DISPLAY= on my desktop but the service fails.
I have:
[Install]
WantedBy=default.target

[Service]
Environment=HOME=/home/bbigras/.dropbox-hm DISPLAY=
ExecReload=/nix/store/vssdbs9s059qm5rqpw5q25z3c2d065f7-coreutils-8.31/bin/kill -HUP $MAINPID
ExecStart=/nix/store/b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start
ExecStop=/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox stop
Nice=10
PIDFile=/home/bbigras/.dropbox-hm/.dropbox/dropbox.pid
PrivateTmp=true
ProtectSystem=full
Restart=on-failure
Type=forking

[Unit]
Description=dropbox

-- Reboot --
jui 31 19:02:06 desktop systemd[1737]: Starting dropbox...
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]: Traceback (most recent call last):
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1603, in <module>
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:     ret = main(sys.argv)
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1592, in main
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:     result = commands[argv[i]](argv[i+1:])
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 862, in update
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:     download()
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 294, in download
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]:     import gi
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1753]: ModuleNotFoundError: No module named 'gi'
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1770]: Starting Dropbox...
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1783]: Starting Dropbox...
jui 31 19:02:06 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1783]: at: /home/bbigras/.dropbox-hm/.d: No such file or directory
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1770]: The Dropbox daemon is not installed!
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[1770]: Run "dropbox start -i" to install the daemon
jui 31 19:03:07 desktop systemd[1737]: dropbox.service: Can't open PID file /home/bbigras/.dropbox-hm/.dropbox/dropbox.pid (yet?) after start: Operation not permitted
jui 31 19:03:07 desktop systemd[1737]: dropbox.service: Failed with result 'protocol'.
jui 31 19:03:07 desktop systemd[1737]: Failed to start dropbox.
jui 31 19:03:07 desktop systemd[1737]: dropbox.service: Scheduled restart job, restart counter is at 1.
jui 31 19:03:07 desktop systemd[1737]: Stopped dropbox.
jui 31 19:03:07 desktop systemd[1737]: Starting dropbox...
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]: Traceback (most recent call last):
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1603, in <module>
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:     ret = main(sys.argv)
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1592, in main
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:     result = commands[argv[i]](argv[i+1:])
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 862, in update
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:     download()
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 294, in download
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]:     import gi
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2967]: ModuleNotFoundError: No module named 'gi'
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2970]: Starting Dropbox...
jui 31 19:03:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2984]: Start/home/bbigras/.dropbox-hm/.dropbox-dist/VERSION: No such file or directory
jui 31 19:04:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2970]: The Dropbox daemon is not installed!
jui 31 19:04:07 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[2970]: Run "dropbox start -i" to install the daemon
jui 31 19:04:07 desktop systemd[1737]: dropbox.service: Can't open PID file /home/bbigras/.dropbox-hm/.dropbox/dropbox.pid (yet?) after start: Operation not permitted
jui 31 19:04:07 desktop systemd[1737]: dropbox.service: Failed with result 'protocol'.
jui 31 19:04:07 desktop systemd[1737]: Failed to start dropbox.
jui 31 19:04:08 desktop systemd[1737]: dropbox.service: Scheduled restart job, restart counter is at 2.
jui 31 19:04:08 desktop systemd[1737]: Stopped dropbox.
jui 31 19:04:08 desktop systemd[1737]: Starting dropbox...
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]: Traceback (most recent call last):
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1603, in <module>
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:     ret = main(sys.argv)
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 1592, in main
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:     result = commands[argv[i]](argv[i+1:])
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 862, in update
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:     download()
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:   File "/nix/store/8hhwccs47i8ihv9i48vvlhsmfbcy9vb3-dropbox-cli-2020.03.04/bin/dropbox", line 294, in download
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]:     import gi
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3451]: ModuleNotFoundError: No module named 'gi'
jui 31 19:04:08 desktop b6yq15096azj3wyggqpvydrqibd2i332-dropbox-start[3452]: Starting Dropbox...

I wonder if it's normal that I have:
/home/bbigras/.config/systemd/user/dropbox.service.d/override.conf
[Service]
Environment=DISPLAY=:1

@rycee Here it starts correctly, but the tray icon is not showing. Other problem is it set the Dropbox folder to ~/.dropbox-hm/Dropbox, not ~/Dropbox. I tried to set path to $HOME/Dropbox (and "${config.home.homeDirectory}/Dropbox";) but it didn't work.

That is by design, and should affect nothing as it will symlink the important files (.dropbox, .dropbox-dist) to your ~. This is to give the ability, to place the Dropbox folder where you want.
The icon wil not be showing, because DISPLAY is unset I would assume.

@bbigras  I guess the tray icon will not be showing, as the comment I left above. Would be weird for Dropbox to show the tray icon, when DISPLAY is unset (assumed).

Thanks. I don't get it why my override.conf file would prevent the service from starting. Unless the problem was fixed by running systemctl --user daemon-reload. Which was required after removing the override file.

Thanks. I don't get it why my override.conf file would prevent the service from starting. Unless the problem was fixed by running systemctl --user daemon-reload. Which was required after removing the override file.

The service cannot start with DISPLAY set, as it will try to import a depency that it does not have. So the override would have done so thay it couldn't start.
Not optimal, but a lot better than not working :) Dropbox-cli needs to be fixed upstream

One weird thing is that it is working now with my override file, I see the icon and it seems to be syncing.
But for some reason I had to log back in at some point and it seems to be redownloading everything that I already had. Maybe there was some problem with my computer running out of space earlier.

@bbigras  is it working well enough to close this? Could open a new/reopen if any more issues come up :)

I guess. I'm not 100% sure but I think it can cause a problem in the current state for "not yet authenticated" users since their browser won't open up automatically.
Did someone else beside me test it? I think I had to run dropbox manually but the same way to prevent it from using ~/Dropbox without the symlink.

Once you write dropbox status you get a link for activating Dropbox/linking it :)

Gotcha. Thanks.
I'll open another issue about maybe adding DISPLAY conditionally.

We need to fix the upstream issue then I would assume :/ But yeah! :)


Sync tosca-parser with upstream

Two projects are out of sync, but it doesn't looks like there are too much changes between them.
https://github.com/openstack/tosca-parser/compare/master...bura2017:master
Why not send PR upstream?

Pull requests were send to the upstream project tosca-parser, but it takes time for OpenStack developers to accept them

Looks like PRs are not here https://github.com/openstack/tosca-parser/pulls
Where are they located?

All contributions to the OpenStack projects must be made through https://review.opendev.org/q/status:open+-is:wip
Pull requests to github are ignored

Actually all my contribution commits were already added to the upstream, so I checked and tosca-parser can be used from upstream for now

Looks like this https://review.opendev.org/c/openstack/tosca-parser/+/735624
But for some reason the GitHub diff is still showing changes.

Ok, I have updated our forked tosca-parser repo, it had some small changes in setup.cfg and some other non code files


Is there any alternative to AvroParquetWriter so that we can avoid using IndexedRecord?

We are using Secor to write data from Avro records Kafka to Parquet records in Azure.
We use AvroParquetWriter to convert deserialized Avor records to Parquet, but as AvroParquetWriter works with IndexedRecord interface - schema evolution is very difficult as it matches on the index of record fields with schema.
Any out-of-order schema evolution leads to backward compatibility issues when converting to Parquet.

Not at the moment, it's probably not too hard to add an enhancement of
using field name lookup.
On Fri, Jul 23, 2021 at 12:25 AM shantam04 @.***> wrote:

We are using Secor to write data from Avro records Kafka to Parquet
records in Azure.
We use AvroParquetWriter to convert deserialized Avor records to Parquet,
but as AvroParquetWriter works with IndexedRecord interface - schema
evolution is very difficult as it matches on the index of record fields
with schema.
Any out-of-order schema evolution leads to backward compatibility issues
when converting to Parquet.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pinterest/secor/issues/2132, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABYJP72QLA25XCE7B7SKTX3TZEKQFANCNFSM5A3O6WWQ
.


Use "enabled" instead of "enable" for lbaas

Our internal envs had it listed wrong, so 'smart' was used all the time.
Rename it here so that everything matches up and fits convention.

retest

👍


Add badges to README

License, code of conduct, README style and DPG award.

Would they fit better under the two first paragraphs?

Well, according to the README style (which is one of the badges we add) it should go under the Title.


DIscussion forum for rust-analyzer

I'd love to have some forum for free-form discussion about rust-analyzer.
However, I also think that rust has a great potential as a language for implementing language servers, so I'd even love to have something more general: a forum for "implementing compilers/lanauge servers in Rust", of which rust-analyzer will be only a subtopic.
cc @DJMcNab @kjeremy @aochagavia @CAD97 @jD91mZM2 @brendanzab @Marwes what do you think about this all?
And what would be the best tool for this?

Gitter -- it is supper buggy
Discord -- nice, and that's what rust-lang uses. Not sure how setting up a server works though. Some folks don't like it because it's not open-source. I am fine with that personally.
Zulp -- that's what we use for salsa. Nice, has topics, but can't open several instances in one tab, and the electron-based desctop app is, well, and electron app.
Discourse -- I love Discourse, due to it timezone friendly and thoughtful feeling. This would be my personal preference.

I like Discord, but in the end it is more of a chat application than a discussion forum. I think Discourse is a good alternative, though we would have to self-host it somewhere (or pay $100/mo).

I like the idea of a chat more than a forum for having discussions, so I'm in favor for either discord or gitter. If somebody, like myself, is worried about discord not being open source, they can just use the web version which can't touch your system :)

I think that we want more of a chat centered experience over a forum, then create issues resulting from the discussion. However, it would be good if we could archive some of the discussions, so we can link to it in the issues created potentially.
Of the options, I have only used discord and gitter. I agree with  @CAD97 that gitter only just works, and I would not wish using it my worst enemy (maybe that's a bit of an hyperbole)! Discord doesn't allow us to have easily segmented discussions, which is important when we seem to be pretty well spread around the globe. I have taken part in one
All in all, although I haven't used it, my vote goes to Zulip, depending on how ergonomic it is and whether we can create permalinks to a discussion

and whether we can create permalinks to a discussion

I believe discord recently got hyperlinks to messages. Another option would be mattermost (self hosted)

If we are going for the chat option, I think Discord + GitHub issues may be a easy way to start. Creating a discord server takes less than a minute and we already have GitHub, so... Should we start with this setup and see how it goes?
Regarding segmented discussions, we could have a main room for general discussion and separate channels for particular topics.

Ok, let's go with Discord (named it rust-compilers): https://discord.gg/sx3RQZB.
We can always switch the medium later!

@matklad The old link has expired. Does anyone know an updated link?


1.2 dev branch

Unit tests Module
•	189 passing tests added covering both NuGet and CLI entry points under separate namespaces/classes
•	Improved overall code quality and reporting of invalid args/combinations
Overall Code Structure
•	Refactoring+rework for technical debt getting to 1.0 eliminating unused code, renaming, moving to isolate to right project
•	*Object results-based support for NuGet callers rather than json/text strings
•	*New support for First/Best match options for results (best match elevates higher confidence value matches)
•	Separation of CLI vs Operation argument options
•	All file output format and writters moved to CLI project
•	Cleaner isolation of functionality and readability
•	Text and Json output support added for all commands (previously limited to text for all but analyze)
•	Better use of inheritance to organize common arguments and override
•	Better use of polymorphism for checking arguments
Resolves #191

Suggest to download and review PR branch in it's entirely due to the size of change.
Notes:
Detailed Code Changes
CLI Module
•	All file writers moved to this project out of command/core module that return objects only
•	All command options include output args
•	All common options in base class
•	Check for output file path write before running op
•	Checks added for log write ability to specified path before operation starts
Command Module
•	All arguments exclude CLI only output options
•	All write statements related to output removed = no IO other than log
•	GetResult() method for each command returning Results object not json string
•	Result objects include standard result code and embedded objects that are serializable and only contain methods specific to the result data including the AppProfile class which is gone now
•	Renaming of classes, properties, variables for readabilty, accuracy e.g. MsgHelp, not ErrMsg, ScanResult not Issue in RulesEngine
•	Tag counter support outside of CLI entry point; no dependency on preferences using "Metric" tag type as key
RulesEngine Module
•	*Added support for First vs Best match (perf/quality) with AllowDuplicates option
Security
•	Check for log path being used to overwrite non app log file


Test Issue created at Tue, 07 Feb 2023 13:52:48 GMT

Test issue body  Tue, 07 Feb 2023 13:52:48 GMT

Comment on issue at Tue, 07 Feb 2023 13:52:52 GMT


Spell checker support

Currently the Notebook Editor does not support spell checker extensions (I have tried "Code Spell Checker" and "SpellChecker", and I have also tried the Insider version of the extension). As a non-native speaker, a functional spell check is very useful for me. I hope that at least for the markdown cell words can be checked. Any solutions or suggestions are welcome. (It is a pity that editing inside a browser started by JupyterLab also does not support spell checking.)

Thanks for filing this issue.
This should work in the preview notebook editor, as this is standard (supporting vscode extensions) functionality of native notebooks.
Closing this issue as this is solved with the native notebook.
For more information on native notebooks, please see here https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/


python312Packages.cyclopts: 2.9.1 -> 2.9.3

Diff: https://github.com/BrianPugh/cyclopts/compare/refs/tags/v2.9.1...v2.9.3
Changelog: https://github.com/BrianPugh/cyclopts/releases/tag/v2.9.3
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 324736 run on x86_64-linux 1

4 packages built:

python311Packages.cyclopts
python311Packages.cyclopts.dist
python312Packages.cyclopts
python312Packages.cyclopts.dist


use with horizontal listview

Works seamlessly with the vertical list view. but I want to use it in a horizontal list view. how can I do that ? Thank you

I have same issue

If others have the same problem:
In my case, the reason was that the ListTile had unrestricted width. Limiting the sizes of the tiles, helped.
Example:
Expandable(
  ...
  expanded(
     Column(children: [
        Text(),
        Text(),
        SingleChildScrollView(
           scrolLDirection: Axis.horizontal,
           child: Row(children: [
                Sizedbox(width: 200.0, height: 100.0, Text("..."),
                Sizedbox(width: 200.0, height: 100.0, Text("..."),
                Sizedbox(width: 200.0, height: 100.0, Text("..."),
          ])
      )
   ]))
)


Error in parseData

I tried all tasks but I am getting an error with parseData each time i run it -
py -2 bebop.py testTakeOff
METALOG: logs/meta_180123_190246.log
UNKNOWN Project 144
0 Flying State 2 hovering
1 2 3 AssertionError 23
4 5 6 Unknown Piloting State 12 04 7E 1F 2F 00 00 00 01 04 0C 00 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 00 00 00 01 00 00 00
7 NavigateHomeStateChanged 0 available finished
8 9
Taking off ... 0 Unknown Piloting State 14 04 7E 35 27 00 00 00 01 04 0E 00 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 01 00 00 00
1 Unknown Piloting State 15 04 7E 3A 0F 00 00 00 01 04 0F 00 00 00 00 00
2 3
Traceback (most recent call last):
  File "bebop.py", line 421, in <module>
    testTakeoff( robot )
  File "bebop.py", line 285, in testTakeoff
    robot.takeoff()
  File "bebop.py", line 176, in takeoff
    self.update( cmd=None )
  File "bebop.py", line 117, in update
    self._parseData( data )
  File "bebop.py", line 104, in _parseData
    parseData( data, robot=self, verbose=False )
  File "bebop_katrina\katarina\navdata.py", line 114, in parseData
    commandProject, commandClass, commandId = struct.unpack("BBH",  data[7:7+4])
struct.error: unpack requires a string argument of length 4

Thanks for the log file - I can confirm partial reproduction of the problem. The first issue is probably 1 2 3 AssertionError 23 when it stops properly parsing the data. There is a quick workaround (or rather "hack") in
https://github.com/robotika/katarina/commit/ccc9d6f5337d6dadc60e17dddc24dcd3afb762b5
but it is not sufficient:
python navdata.py logs\navdata_180123_190246.bin
...
Piloting State change 9
Unknown ACK: 04 7E 1C 10 00 00 00 00 11 01 00 03 00 00 00 01
Traceback (most recent call last):
  File "navdata.py", line 415, in <module>
    data = parseData( data, robot, verbose=True )
  File "navdata.py", line 317, in parseData
    assert frameSize == 15, len(data)
AssertionError: 890

and this is in if branch
elif frameId == 0x0: # ARNETWORK_MANAGER_INTERNAL_BUFFER_ID_PING

... which I have not seen before :(.


how to use methodchannel in a new isolate?

https://pub.dev/packages/flutter_isolate
https://pub.dev/packages/isolate_handler

Please use one of the community resources listed at https://flutter.dev/community#community-grid for questions.
Closing as this is not a bug or feature request.


Page resize problem

hello, when the screen size is changed, the pictures are deleted but the new ones are not loaded. The same thing is available in your demo. Mistake:
DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at Image.

I can see the error being logged but it doesn't seem to stop the script working?
Which browser are you using? Is there a specific page where you're seeing the issue?

https://codepen.io/craigbuckler/full/yPqLXW
For example, the bottom image on the page above opens in 480px, but when the screen expands and reaches 1080p, this error comes up. My browser is chrome.

Ahh, I see! Thanks - I'll look into it.

`window.addEventListener &&
window.addEventListener(
"load",
function () {
"use strict";
var e = document.body;
if (
e.getElementsByClassName &&
e.querySelector &&
e.classList &&
e.getBoundingClientRect
) {
var t,
n = "replace",
i = "preview",
s = "reveal",
r = document.getElementsByClassName("progressive " + n),
o =
window.requestAnimationFrame ||
function (e) {
e();
};
["pageshow", "scroll", "resize"].forEach(function (e) {
window.addEventListener(e, a, { passive: !0 });
}),
window.MutationObserver &&
new MutationObserver(a).observe(e, {
subtree: !0,
childList: !0,
attributes: !0
}),
c();
}
function a() {
t =
t ||
setTimeout(function () {
(t = null), c();
}, 300);
}
function c() {
r.length &&
o(function () {
for (var e, t, n = window.innerHeight, i = 0; i < r.length; )
0 < (t = (e = r[i].getBoundingClientRect()).top) + e.height &&
n > t
? u(r[i])
: i++;
});
}
function u(e, t) {
    e.classList.remove(n);
    var r = e.getAttribute("data-href") || e.href,
      a = e.querySelector("img." + i);
    if (r && a) {
      var c = new Image(),
        l = e.dataset;
      l &&
        (l.srcset && (c.srcset = l.srcset), l.sizes && (c.sizes = l.sizes)),
        (c.onload = function () {
          r === e.href &&
            ((e.style.cursor = "default"),
            e.addEventListener("click", function (e) {
              e.preventDefault();
            }));
          var t = c.classList;
          (c.className = a.className),
            t.remove(i),
            t.add(s),
            (c.alt = a.alt || ""),
            o(function () {
              e.insertBefore(c, a.nextSibling).addEventListener(
                "animationend",
                function () {
                 if(e && e.child && e.child.length>0){
                   e.removeChild(a), t.remove(s);
                 }

                }
              );
            });
        }),
        (t = 1 + (t || 0)) < 3 &&
          (c.onerror = function () {
            setTimeout(function () {
              u(e, t);
            }, 3e3 * t);
          }),
        (c.src = r);
    }
  }
},
!1

`);``
I solved the problem.

Perhaps you could issue a PR so I could check?

https://codepen.io/serhatk12/pen/NWgbRPa

This has now been fixed. The issue was caused by responsive srcset images retriggering an onload event. The event is now disabled once the image has loaded.


Verification emails not arriving at<EMAIL_ADDRESS>domain

Hi,
I'm not receiving PyPI verification emails at this domain stfc.ac.uk. My email is ag.stephens @ stfc.ac.uk . I have received verification emails for my other email address<EMAIL_ADDRESS>so I can confirm that it is working.
I am logged into the user portal (https://pypi.org/manage/account/#account-emails) and clicking the "Resend verification email".
Thanks

Hello @agstephens! I've confirmed that I can see three emails with Subject "[PyPI] Email verification" that reported to be successfully delivered to this address by our provider.
Dates (UTC):

Aug 6, 2018, 10:03:19 AM
Aug 6, 2018, 10:10:53 AM
Aug 6, 2018, 1:49:12 PM

The sender is<EMAIL_ADDRESS>

Thanks @ewdurbin, I have tried putting @pypi.org in my Junk Mail allowed senders list but no luck. I suspect it is getting filtered at the site firewall. I will chase it up with my colleagues. Many thanks for getting back to me so quickly.


Multiple login scenarios

Hello, I'm using your identityserver4 as my sso, this is a very great project, but now there is a problem that has been bothering me. I have 3 ClientA, ClientB, ClientC, all using mixed mode.
Now there is a problem: If I log in to account A on client A, then when I access ClientB, ClientC, it will automatically log in and will not jump to the login screen of SSO because I have logged in to client A. I read your document saying this is the self-certification rule.
But the effect I want now is: When I use A account to log in to client A, and then go to visit ClientB or ClientC, I can still jump to the login interface of SSO normally, so that I can use other accounts to log in.
Because I am now the client A, ClientB, ClientC account of the three systems is actually not universal, I just put it in a table only. How can I solve this problem? These three systems I have docked SSO01, because I want to deploy only a set of SSO. I want multiple systems can share the login interface of sso.

This seems to be a general question about IdentityServer - not a bug report or an issue.
Please use one of the our free or commercial support options
See here for more details.
Thanks!

i find some answer
https://stackoverflow.com/questions/48681426/identityserver4-force-user-to-re-enter-credentials?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
options.Events.OnRedirectToIdentityProvider = context =>
{
context.ProtocolMessage.Prompt = "login";
eturn Task.CompletedTask;
};


Feature request: An 'allow navigation' type option?

I've recently been asked to alter WAM behaviour so that clicking on an element in our main navigation (which is left exposed while dialogs are showing) would perform that navigation, rather than closing the dialog and cancelling the navigation, which is the current behaviour of Dialoger. Could we perhaps make this something configurable on init? Something like this would serve...
Dialoger.prototype.init = function(config) {
    var self = this;

    self.$dialogElement = getDialogElement();
    self.config = config || {};

    router.navigating.subscribe(this.canNavigate, this);
};

Dialoger.prototype.canNavigate = function() {
    // We assume that no links are possible in a dialog and the only navigation possible
    // would be by the back button.
    // So, in that case, we cancel navigation and simply close the dialog.
    var self = this;
    var currentDialog = this.currentDialog();

    if (currentDialog) {
        currentDialog.settings.close(null);
        if (self.config.allowNavigation) {
            return true;
        } else {
            return false;
        }
    }

    return true;
};

...but as always, I am very open to alternative suggestions that would get us to a solution. Or, in this case, alternative takes on what the problem actually is. Maybe I am trying to solve the wrong thing?

Yes.
Can you make the modification?
To prevent from creating a breaking change, I think we should put a default value of false to this configuration.

Thanks Max, I just pushed 0.3.1.


Add notebook example for grounding in Vertex AI

Overview

Adds a sample notebook for grounding in Vertex AI via Google Search results and Vertex AI Search results
Example for text generation grounded in Google Search results
Comparison of results of ungrounded LLM responses with grounded LLM responses
Example for text generation grounded in Vertex AI Search results
Examples for chat generation grounded in Google Search results and Vertex AI Search results
Examples for async text and chat generation grounded in Google Search results and Vertex AI Search results

Limitations
Note that when using the grounding_source kwarg in any of the chat.send_message methods (both sync/async, and both Google Search and Vertex AI Search), as in:
response = chat.send_message(prompt, grounding_source=grounding_source)

I received an error that the grounding_source kwarg is not supported, but I might not be using the correct/latest dev version of the Python client library. Otherwise, all other code examples and cells in the notebook worked as expected during my testing.

LGTM - Minor changes requested.
Also, general question. Can this be used without allowlisting?
If so, would be good to call that out and provide a link to the form to request access.


Implement a safe function to obtain device serial number

YDB uses block devices instead of a file system for storing data, and for the convenience of servicing clusters, it is important to identify these block devices by serial numbers. Information about the manufacturer, model, and firmware version of the device, is also of interest.
It is necessary to develop a C++ function that allows obtaining the required device parameters and a set of unit tests for this function. The function should take the path to the device as input and return detailed error information in a human-readable and machine-processable form and/or the actual information about the device.
The code should work correctly regardless of the types and interfaces of devices, i.e.: HDD, SATA SSD, NVMe SSD, etc.

A (buggy) implementation of the function can be found at https://github.com/ydb-platform/ydb/blob/6cf49bf7bef1e211d398a040fde87c83a4a2c474/ydb/library/pdisk_io/wcache.cpp


Error renaming file from Lowercase to Uppercase on macOS (using Case-Sensitive File System)

Type: Bug
#Steps to Reproduce:

Create a file, e.g., Errortemplate.html.
Rename it, changing the casing to ErrorTemplate.html.

#Expected Behavior:
VS Code should recognize the file with its new casing (ErrorTemplate.html) and allow it to be opened or edited without any issues.
#Observed Behavior:
After renaming: VS Code reports that the file does not exist. However, using the file system (Finder or Terminal), you can confirm that the file exists with the updated casing (ErrorTemplate.html). Despite this, VS Code cannot open or interact with the file.
#Additional Details:
This issue occurs specifically on macOS systems with a case-sensitive file system (e.g., APFS or HFS+ in case-sensitive mode). Here's what seems to be happening:

VS Code relies on file system events to detect changes. On case-sensitive file systems, renaming a file by only changing its casing (Errortemplate.html → ErrorTemplate.html) may not trigger the expected events, causing VS Code to cache the old file path.
Due to this, VS Code continues to look for the file with its original casing and fails to locate it under the new name.
Standard macOS file systems are case-insensitive, but this issue arises when working on a case-sensitive setup, which treats filenames like file.txt and File.txt as distinct.


Add link to ingredient page and back to cocktail page

I have added a link to the ingredient page and a link back to the cocktail page.
Please review and let me know if there are any issues.

Thank you for the review. I'm going to merge this.


New version: JetBrains.KtorCLI version 0.3.0

Checklist for Pull Requests

[ ] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.6 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@wingetbot run

Automatic Validation ended with:

Installation failed with exit code -1978335187
2024-11-18 09:46:29.963 [FAIL] Installer failed security check. Url: https://github.com/ktorio/ktor-cli/releases/download/0.3.0/ktor_installer.msi Result: 0x80004005

Automated error analysis suggests -1978335187 may mean Installer failed security check. Another script should retry this every 18 hours.
Automated error analysis suggests 80004005 may mean Resource missing
(Automated response - build 897.)

@wingetbot run

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\JetBrains\KtorCLI\ktor.exe returned exit code: 1

(Automated response - build 898.)


[RFC] Mark unstable features / tasks as Beta

🚀 Feature

Motivation
Currently it isn't clear which features / tasks within flash are stable vs which are subject to change.
Pitch
Add a way to mark tasks as beta, including:

a message in the docs page
a warning when the code is used

Sub-issues:
#1239
#1240
Alternatives
Just as we have now
Additional context
Suggested initial tasks / features for Beta designation (feel free to edit / suggest more):

point cloud
graph
vissl integration
flash zero

cc @krshrimali @Borda

yep, this is right was, just to be clear with users what is stable and what is rather experimental...


getCardByIndex issue

i use getCards method  to get total cards number and after that  i iterate using getCardByIndex method from 0 until total cards to get every card added on the device.
the problem is that many many cards show<PHONE_NUMBER> as card number and that number never was added to my device.
I noticed<PHONE_NUMBER> is equal to 2^32  so maybe are deleted cards or something more
when i use uhppote-cli / get-cards give me the right total of cards and no one its equal to<PHONE_NUMBER>
So, there is a better method to get all existing card in my device and total number too?
Sample of getCardByIndex with issue:
card: {
number:<PHONE_NUMBER>,
valid: { from: '', to: '' },
doors: { '1': false, '2': false, '3': false, '4': false },
PIN: 0
}
Regards

Hi Marcus,
4294967295 corresponds to 0xffffffff which is a marker for a deleted card. The CLI algorithm basically retrieves the card at index 0 and then steps through until it has retrieved the number of cards returned by get-cards, discarding any cards with 0 (not found) or 0xffffffff (deleted).
So yeah, you're pretty much on the right track - thought I had documented but I see it's only in the get-card-by-index example:
const uhppoted = require('uhppoted')
const ctx = require('./common.js')

const deviceID = 405419896
const index = 3

uhppoted.getCardByIndex(ctx, deviceID, index)
  .then(response => {
    switch (response.card.number) {
      case 0:
        console.log(`get-card-by-index: card @${index} not found`)
        break

      case 0xffffffff:
        console.log(`get-card-by-index: card @${index} deleted`)
        break

      default:
        console.log('\nget-card-by-index:\n', response)
    }
  })
  .catch(err => {
    console.log(`\n   *** ERROR ${err.message}\n`)
  })

I'll make a note to include that in the doc.

(oops, apologies ... meant Mauricio, not Markus :-()

Huh! That turns out to be more awkward than it should be! I've added get-all-cards to the  examples but Promises make it awkward enough that I'm considering adding it to the API.
Unless you have a cleaner way to do it?

its ok, the only issue its that cannot be paginated correctly and there is no way to get the real total of cards without iterate each index but i understand that is a hardware limitation :)

FWIW, I've never seen an incorrect card count from get-cards but there's nothing to say it couldn't happen. I guess we live with it like it is then :-).
I'll leave the get-all-cards as an example for now - if anybody else pops to ask it's easy to point at and I can then think about lifting it into the API.

Hi,
Going to close this out - the jsdoc updates and new examples will be in the next release. Feel free to reopen it if you need to though :-).


[SASS-6247] TechDebt - Swap helpers/Heading for components/Heading twirl component

Didn't want the PR to be too big so will make another PR for the same changes in the expenses journeys

Realised the component HeadingWithCaption makes more sense to be called HeadingWithHint so renamed it in this PR.
helpers/Heading is currently used in lots of places for headings without captions, and importantly by lots of summary pages that use it for headings AND captions.
When all the headings for pages that don't have captions are swapped from helpers/Heading to components/Heading, I can make another PR to create and use components/HeadingWithCaption which will do what this component has currently been doing. I can then delete helpers/Heading.


Use with Nuxt Preview (how to securely set sanity token?)

My Nuxt setup:

mode: universal
target: static

What I'm trying to do:

make unauthenticated requests to sanity when generating the static files (don't need to get document drafts)
make authenticated requests in preview mode (https://nuxtjs.org/docs/2.x/features/live-preview) where I do need to get any existing drafts, for preview

What I have so far (not working for what I need):
privateRuntimeConfig: {
    sanity: {
      token: process.env.SANITY_READ_TOKEN,
    },
  },

but this is no good because:

it includes the token client-side in the code - unsafe
it makes the nuxt generate fetch drafts too (authenticated request with token)

In the docs, I'm seeing a recommendation to get the token via a plugin:
export default async ({ req, $sanity }) => {
  const token = getTokenFromReq(req)
  $sanity.setToken(token)
}

But I don't understand how to get the token from the request? getTokenFromReq is not explained and I get I have to build that myself but how?
Do I need to pass the token as a URL parameter in the preview request? Like https://mysite.com/test/?preview=true&token=<mytoken>? If so, how would getTokenFromReq() look like? (I'm new to nuxt)
Thanks!

Yes, did manage to make it work with
// nuxt.config.js
{
  sanity: {
    ...configSanity,
    withCredentials: true,
  },
}

That way if a user is logged into the Sanity Studio app on the same browser, it uses those credentials and makes authenticated requests instead of public ones.

No worries! 😊
Ovi Savescu
OVS Websites
t:<PHONE_NUMBER> m: +40 (771) 161-907
w: ovswebsites.com http://ovswebsites.com e: @.***
@.***>
On Tue, Apr 6, 2021 at 1:03 PM Daniel Roe @.***> wrote:

@ovsw https://github.com/ovsw Great - and again, sorry I didn't get
back to you before now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nuxt-community/sanity-module/issues/99#issuecomment-813996479,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIPYZ5POLYB7OVRP4AF2DXDTHLL6JANCNFSM42DYI5UA
.


Add pyproject.toml for Custom Node Registry

Hey! My name is HaoHao and I'm from comfy-org! We would love to have you join the Comfy Registry, a public collection of custom nodes which lets authors publish nodes by version and automate testing against existing workflows.
Eventually, the registry will be integrated as a backend for the UI-manager where all nodes will go through a security scan. Nodes that pass these checks will have a verification flag (✅) beside their name on the UI-manager. Feel free to read up more on the registry here
Action Required:

[x] Go to the registry. Login and create a publisher id (everything after the @ sign on your registry profile).
[ ] Add the publisher id into the pyproject.toml file.
[ ] Merge the separate Github Actions PR, then merge this PR.

If you want to publish the node manually, install the cli by running pip install comfy-cli, then run comfy node publish
Otherwise, if you have any questions, please message me on discord at haohao_81202 or join our server!

hey @rgthree, wanted to send a small nudge and ask if you had any questions!

@rgthree, wondering if there's any way we can support you on this PR!

Sorry for the delay. Is this still relevant for Comfy-Org?

@rgthree Hey! Sorry for the long delay. We are launching registry next month and would love to get rgthree-comfy onto the registry.  Can you create a publisher on https://registry.comfy.org? Instructions here

Sure thing. this should all be setup now. thanks.


Data loss when parsing Char compressed sas7bdat file

Hi,
We have a char-compressed sas7bdat file which should have 98366 rows. But when use parso to read this file, we only get 90536  rows. The original uncompressed file works fine, all rows can be successfully parsed.
The schema of this file seems normal, about 30 columns with number, date and string types.
Any suggestion about this issue? Thanks

Hi,
Would it be possible for you to share this file with us? Are you using the latest version (2.0.8)?

sas.zip

@printsev Hi, sas file uploaded. Would you please help to take a further look? Thanks.

We are looking into this issue, looks like the issue is with writer, not with parso reader - you can use this as a workaround.


Add initializeCommand support to features

initializeCommand is a very useful lifecycle hook and it's the only way I found to run commands on the host machine, and devcontainer-feature.json does not support it, could it been supported in the future?

Such a feature would also be helpful in implementing my use case with minimal user interaction and re-usability through devcontainer-features.
My use-case:
I need host user groups and ids to match them inside the container similar to common-tools for the remote user.
Regarding security, afaik:

Features can request privileged
Features can request host mount points
Features can request caps and sec-opts
Features can access workspace folder ata.

If I were a malicious feature I would be able to do everything I need to escape the container or leak host info already. It would be more of a dev protection to not accidentally modify the host. So more a safety than security feature to prevent that. But if a feature decides to use any of the above settings it already must be sure to not leak or damage the host system by accident too.
Current implementation:

initialzeCommand + onCreate/postCreate,...

Alternative workarounds:

Init script or user var and replace postCreate with feature.
Compose service dependencies with volumes (bind to ws or shared volume).
Command hook script (overriding the the container executable path).
Use a permanent mountpoint (e.g., request mount point for host info to <...some devcontainer/feautre/path). This could leak info longer than actually needed.

Solutions improving my usecase:

The user can run command substitutions for env, options, ... to fill the values: $(cat .,..). Which can be filled with an overrideable default.
Having an initializeHook as requested (Possibly overriden by the user or disabled on default).
Temporary mounts (e,g. copying files to a volume or path the feature has access in the container) and is auto cleared.
Any other way to request host info or is available on default.

Best Regards,
Markus

As a reference I know implemented my example use case how I am currently able to achieve it: https://github.com/AIT-Assistive-Autonomous-Systems/devcontainer_features/tree/main/src/add-groups


New command: m365 pp models list

Usage
m365 pp models list
Description
List available AI builder models in the specified Power Platform environment.
Options

Option
Description

-e, --environment <environment>
The name of the environment for which to retrieve AI Builder models.

--asAdmin
Run the command as admin and retrieve AI Builder models for environments you do not have explicitly assigned permissions to.

Examples
List AI Builder models in the given environment.
m365 pp models list --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5

List AI Builder models in the given environment as admin.
m365 pp models list --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin

Looks good to me!

Nice suggestion!
Do you want to list all the available AI builder models from the UI or just all that are present in the environment?
Because there's a difference between prebuild and custom models. The custom models are the ones that you see in the UI and are customizable, the prebuilt aren't customizable

@nicodecleyre for me it feels we should do only the custom models; like you say the prebuilt models cannot be changed or removed so not much added value of retrieving those.

Thinking of it some more, is saying just models clear enough what the command is for? Would it be clearer to name it aibuildermodel instead?

Thinking of it some more, is saying just models clear enough what the command is for? Would it be clearer to name it aibuildermodel instead?

Exactly what I was thinking, model is quite abstract imo.

Happy with the suggested change; updated ;-)

No more comments, so ship it! 🚀

Can I work on this? 😄

All yours!


[BUG]在2024.2版本不工作了

Which Glance version and IDEA version?
2024.2
Can you show the complete config page picture and minimap picture?
默认的配置并未做修改
What is the file type used and provide text or an example of the issue that occurred?
更新idea到2024.2版本
What steps will reproduce the issue?
更新idea版本到2024.2

等2024.2 Publish了之后更新，暂时可以先用EAP


improvement: don't pin AshPostgres to an old version

Most users will not be able to use Ash + Backpex with this postgres version requirement as it pins to a very old version of AshPostgres.

Good catch, thanks!


Api to get phone BLE device id

That would be useful too, is there plan to add that api?

You get a BluetoothDevice from your scan method and that BluetoothDevice has an id property which is the Device Identifier. What else are you looking for?

@ericstephen I mean the ble mac id of the phone itself

@hanabi1224 have you Solvethe Problem?

The ble Mac ID is not exposed on all platforms for security reasons (iOS).  The typical workaround for this is to include it in Advertisment data or characteristic value.