Embed compilation cache contents via go:embed

Is your feature request related to a problem? Please describe.
At rgl/python-wazero-poc I'm playing with the idea of creating a single-file binary that embeds python and a python script.
Is this even possible? If, so, how? :-)
Describe the solution you'd like
Having a way to embed the compiled wasm module in the go binary (e.g. via //go:embed python.wasm.bin).

See:
https://github.com/ncruces/RethinkRAW/tree/master/pkg/dcraw
Or:
https://github.com/ncruces/go-sqlite3
https://github.com/ncruces/go-sqlite3/tree/main/embed
If you're creating a library, putting the embed file in another package that sets a variable in the main package gives your users flexibility to build their own. Otherwise, make it a const in your own package.

I do not want to embed the .wasm. I want to embed the compiled version of it; the one that is compiled by CompileModule and cached by wazero.NewCompilationCacheWithDir inside the, e.g., wazero-v1.5.0-amd64-linux/d791cfcf1399be1f136502c985eac5daf2ac828add3e4953ba304cad2c892236 file. The intent, is to skip the compilation step altogether at runtime (and just use the cached/compiled file), and have my application be a single file executable on disk.

I'll reopen, and leave it to the core team to address, but I'm pretty sure that won't happen any time soon.
I have in the past tried to adapt the compilation cache to  use embed. So, it is possible.
But it's not very practical, for various reasons.
You'd have to have a go generate to generate the cache.
You'd need to embed the WASM as well as the compiled code.
And the compiled code is large, like 10x larger than the WASM.

I don't think we have support for this considering the complexity vs the practical gain. Why not just use the temporary dir?

For me, one of the major appeals of the Go runtime/ecosystem is its focus on the operational simplification side. It typically has minimal runtime dependencies, e.g., it only needs the kernel, it only generates a single-file artifact/binary, and the binary can be run from a read-only filesystem. IMHO, this should also extend to Go based libraries/runtimes, like wazero. In wazero case, for me, it means, it should have a simpler operational side too; I see that as having a way to ship as a single-file binary that can also run from a read-only filesystem.
FWIW, I do not really known the wazero implementation. I've only actually used it for the first time yesterday, so I barely scratched its surface. I just wanted to say that this is one of its aspects that I find a bit unexpected, and it should have a way to load everything from the go fs.FS abstraction (or from an even simpler one, like a []byte). For me, having a bigger binary is not really a problem; having a cache is. As it has a tendency of leaking/leaving files around as time/versions churn on. And "cache (in)validation is one of the hardest problems in computer science".

cache is CPU-specific (not only just architecture but also depending on the generation of architecture). and you really don't want to embed inside the executable - how do you know exact CPU architecture of users of your executable?

what I am saying is the cache you mentioned wazero-v1.5.0-amd64-linux/d791cfcf1399be1f136502c985eac5daf2ac828add3e4953ba304cad2c892236 is not a Wasm at all but contains the native executable of amd64. So how do you know and how do you cache these file before the executable is executed and distributed?

that's why @ncruces mentioned and everyone in the community does is to embed .wasm and that works. E.g. https://xeiaso.net/talks/wazero-lightning-2023

Having said that @ncruces said also that it is possible to provide read-only caches - so what I really want to see is compelling use real world cases and real number of/reasons why embedding .wasm doesn't work. Hope this helps!

cache is CPU-specific (not only just architecture but also depending on the generation of architecture). and you really don't want to embed inside the executable - how do you know exact CPU architecture of users of your executable?

without knowing the long-term goals of wazero, one way is to redefine/simplify the problem and limit the emitted machine code like the go compiler does with GOOS/GOARCH.

that's why @ncruces mentioned and everyone in the community does is to embed .wasm and that works. E.g. https://xeiaso.net/talks/wazero-lightning-2023

indeed, that part was quite straightforward and worked nicely at my first try of the wazero library. not being able to embed all the compiled binary code is what surprised me. please note that embedding the .wasm was not really part of my question. my intent was/is to ask about the embedding of the compiled/cached wasm binary.

Having said that @ncruces said also that it is possible to provide read-only caches - so what I really want to see is compelling use real world cases and real number of/reasons why embedding .wasm doesn't work. Hope this helps!

I did look at the suggestion and I'm still trying to understand it. from what I can tell from the comments at https://github.com/tetratelabs/wazero/blob/v1.5.0/cache.go#L19-L27, it seems its not possible to provide our own cache implementation without forking wazero. and from what you've said, it seems that currently its-not/will-never-be possible to limit the emitted instructions, so this looks like it will be quite infeasible to implement/maintain outside wazero.

... so what I really want to see is compelling use real world cases and real number of/reasons why embedding .wasm doesn't work. Hope this helps!

as I've tried to describe, not having a cache eliminates a whole class of problems. having it embedded minimizes those problems, while compromising the instruction set that can be used.

cache is CPU-specific (not only just architecture but also depending on the generation of architecture). and you really don't want to embed inside the executable - how do you know exact CPU architecture of users of your executable?

without knowing the long-term goals of wazero, one way is to redefine/simplify the problem and limit the emitted machine code like the go compiler does with GOOS/GOARCH.

The compiled code actually does not (currently) depend on GOOS, I think. But there's a subtle class of issues that you're missing, and which is another reason I gave up on this idea.
A JIT can make an important assumption: the CPU generating the code is the same CPU that runs the code. This means it can test CPU features at compile time once, and then generate code accordingly. The Go compiler, OTOH, has to gate usages of these kinds of CPU instructions, or not use them at all.
This is not theoretical, here's two cases where the generated code already depends on optional features of the amd64 architecture:
https://github.com/tetratelabs/wazero/blob/3b8b3fba654d03e6c5c9e1a800975a7e9a3c86c8/internal/engine/compiler/impl_amd64.go#L1271-L1277
https://github.com/tetratelabs/wazero/blob/3b8b3fba654d03e6c5c9e1a800975a7e9a3c86c8/internal/engine/compiler/impl_amd64.go#L1334-L1340
Also, these code paths have been a source of issues in the past, because they're harder to test.

Having said that @ncruces said also that it is possible to provide read-only caches - so what I really want to see is compelling use real world cases and real number of/reasons why embedding .wasm doesn't work. Hope this helps!

I did look at the suggestion and I'm still trying to understand it. from what I can tell from the comments at https://github.com/tetratelabs/wazero/blob/v1.5.0/cache.go#L19-L27, it seems its not possible to provide our own cache implementation without forking wazero. and from what you've said, it seems that currently its-not/will-never-be possible to limit the emitted instructions, so this looks like it will be quite infeasible to implement/maintain outside wazero.

Yes, it's hard to maintain outside of wazero. I did that to understand if:

it'd work (it would)
the benefits would outweigh the costs (not sure here)
I could come up with a mergeable implementation (maybe)

Maybe you can take this forward?
ISTM wazero doesn't want to shoulder the complexities of this distribution model, and I actually agree with that sentiment. So, for (3) I think you want to figure out the minimal subset of APIs necessary to make it so you can handle the complexity outside wazero.
Then, if you still think the benefits (speed of instantiation) would outweigh the costs (much larger binaries, complex go generate pipeline to compile code for reuse, possibility of runtime crashes, undefined behaviour if compile CPU != runtime CPU, etc), I think if you make your case, we'll definitely listen.
I mean, if you find the right balance, I'll probably go as far as to add this option to my own libraries, so you have my upvote. I simple gave up after trying as "not worth the effort."

I'm probably kinda mistaken about this, but JIT != AOT, which wazero advertises itself as ("Compiler compiles WebAssembly modules into machine code ahead of time (AOT)"). To me, AOT sets some expectations in my mind, like, it can cross-compile the code in a way that is not tied to the current CPU/hardware, its only tied to whatever CPU/features/hardware I mention in the compilation options. Maybe the "compile mode" of wazero should come with some kind of disclaimer about that.
Since that is not what wazero currently does, it invalidates/answers the whole premise of trying to include the compiled wasm in the compiled go. It actually gave me another reason to be wary of the cache.
I did appreciate all the explanations! Thank You! :-)

JIT vs. ATO is blurry.
Yes, wazero is not compiling right before execution only the bits that actually get executed.
It compiles entire WASM modules at load time. Is “load time” “just in” or “ahead of time”? That's just naming.
The important thing to consider here, is that wazero can assume the runtime CPU is the same as the compile time CPU. So it can test the compile time CPU for features and generate code for that specific CPU.
If you break that with cache, it's on you to fix it.
Even beyond CPU features, wazero is not built to cross compile. You'd have to change it to produce arm64 binaries on amd64 and vice versa. I love it that Go makes cross compiling easy peasy, but it's also hard to maintain. If the choice is between focusing on this feature or implementing additional WASM proposals, I guess I'm fine with the choice being to deprioritize this one.


[POC] Wallet Modules

This PR Includes

Switch from built-in wallet IDs to direct imports. This allows future improvements for wallets that require specific settings without breaking the polymorphic architecture.
Added support for custom wallets without us becoming blockers with approving PRs etc. The required interfaces are exported in the entry file.

Work Remaining

[ ] Update README.
[ ] Test all three wallets.
[ ] Create guide for implementing a custom wallet.

I would rather separate them in packages. It's easier to make sure the code is not in the code and there is no tree-shaking required to be implemented in the project the wallet selector ends up in.

To get most of the value in this PR, I've pulled back the breaking changes initially implemented (direct imports instead of walletId strings). There's still some debate on how we should expose the wallet implementations (separate packages, namespacing with code-splitting support etc).


Passwords with spaces unable to authenticate

See https://github.com/42wim/matterircd/issues/116 for the original issue.
Looking at this, it appears that the handleServiceBot method, uses strings.Fields to parse out the various supported IRC commands.
commands := strings.Fields(msg)

I'm looking to replace that with a modified "shellwords" like parser, that doesn't do environment expansion, but does correctly handle quoted strings.
It would allow for logins like:
login user password
login server user password
login user 'long password'
login server team user 'long password'

Just want to make sure this is a reasonable route before I dig into it.

sure go ahead :)
https://github.com/mattn/go-shellwords looks interesting to use for this.

Its what I based my code off of, however I removed support for backtick expansion and shell $VARIABLE expansion.
The first being an unnecessary security problem and the second being unnecessary.  I'm cleaning up test cases before submitting the pull request.

Fixed in #8 thanks again


Incorrect types with switch?

RxJS version:
5.2.0
Code to reproduce:
import { Observable } from 'rxjs';

function foo(): Observable<number[]> {
    return Observable.of([1, 2, 3, 4, 5]);
}

function bar(n: number): Observable<string> {
    return Observable.of(n.toString().repeat(n));
}

interface ValNum {
    val: number;
}

function baz(n: number): Observable<ValNum> {
    return Observable.of({ val: n * 10 });
}

interface Payload {
    myNumber: number;
    myString: string;
    myObject: ValNum;
}

function allTogetherNow(): Observable<Payload[]> {
    // Get an Observable of a list.
    const numsObs = foo();

    // Map every item in the Observable list to a new Observable based on
    // the returns of the other two functions.
    return numsObs.map(nums => {
        // For every number in the list:
        return nums.map(num => {
            // Return that number as an Observable.
            const numObs = Observable.of(num);
            // Then compute the other two Observables.
            const strObs = bar(num);
            const valObs = baz(num);

            // Zip all three together into the Payload object.
            return Observable.zip(
                numObs, strObs, valObs,
                (myNumber, myString, myObject): Payload =>
                    ({ myNumber, myString, myObject })
                // And then flatten to get the latest result.
            ).switch();
        });
    });
}

// We get back an Observable of Payloads, right?
allTogetherNow().subscribe(payloads => {
    console.log('Got payloads: ', payloads);
    const first = payloads[0];
    // It should be a Payload object?
    console.log(`It's not an Observable, right? `,
        !(first instanceof Observable));
});

Expected behavior:
Logs a list of Payload objects. Objects should  not be instances of Observable.
Actual behavior:
Instead of Payload Objects in the subscribe function, I'm getting a list of Observables.
Here's the actual output I got:
Got payloads:  [ Observable {
    _isScalar: false,
    source: Observable { _isScalar: false, source: [Object], operator: [Object] },
    operator: SwitchOperator {} },
  Observable {
    _isScalar: false,
    source: Observable { _isScalar: false, source: [Object], operator: [Object] },
    operator: SwitchOperator {} },
  Observable {
    _isScalar: false,
    source: Observable { _isScalar: false, source: [Object], operator: [Object] },
    operator: SwitchOperator {} },
  Observable {
    _isScalar: false,
    source: Observable { _isScalar: false, source: [Object], operator: [Object] },
    operator: SwitchOperator {} },
  Observable {
    _isScalar: false,
    source: Observable { _isScalar: false, source: [Object], operator: [Object] },
    operator: SwitchOperator {} } ]
It's not an Observable, right?  false

Additional information:
This code is inspired by an Angular service I was working on. You can think of foo as getting a list of IDs from the backend, and bar and baz being other backend service calls that take IDs.
I don't know if switch is causing the bug, so the title of this issue may need to be updated.

I'm not really 100% sure what the underlying goal is, however the switch is in the wrong location.  And has almost no meaning (zip, is not Observable<Observable<any>>).
function allTogetherNow(): Observable<Payload[]> {
    // Get an Observable of a list.
    const numsObs = foo();

    // Map every item in the Observable list to a new Observable based on
    // the returns of the other two functions.
    return numsObs.map(nums => {
        // For every number in the list:
        return Observable.forkJoin(...nums.map(num => {
            // Return that number as an Observable.
            const numObs = Observable.of(num);
            // Then compute the other two Observables.
            const strObs = bar(num);
            const valObs = baz(num);

            // Zip all three together into the Payload object.
            return Observable.zip(
                numObs, strObs, valObs,
                (myNumber, myString, myObject): Payload =>
                    ({ myNumber, myString, myObject })
                // And then flatten to get the latest result.
            );
        }));
    }).switch();
}

I've made a jsbin with those changes here: http://jsbin.com/teqequsafe/1/edit?js,console,output
The big problem comes in with the array map in the middle, which makes this behavior look non-obvious (I've been bitten by it myself).  nums.map(num => { is Array<Observable<T>> as apposed to Observable<Observable<T>>.
The forkJoin in this case forks all the observables until they complete, grabbing the final value.  You can always use a different operator here like zip or combineLatest.

Thanks for the clarification -- your code does exactly what I want 😄
Basically, make a request that returns Obs<T[]> and map each T to a U, finally resulting in Obs<U[]> (the difficulty being that mapping T to U also uses intermediate Observables).
My understanding of zip is that it is similar to Promise.all. Is that correct?
All that being said, I still believe the types are wrong. Why is my editor telling me that the return type of allTogetherNow is Observable<Payload[]>, when it is provably not?

Promise.all is more like forkJoin (in that forkJoin waits for completion of all observables)
zip requires all observables emit the same number of items, if they don't then you'll only get the min number of items emitted.
combineLatest/combineAll will combine all values, kind of like zip on steroids.
As for the types remove the explicit type on function allTogetherNow(): Observable<Payload[]> { and it may change.  I don't think it will change drastically however since forkJoin by default returns an array.

Sure, I guess I'm just surprised that the types didn't show the issue with what I had -- that's how I got my initial "solution," fumbling around with the operators until I got the return type I wanted.

If this doesn't seem like a problem (at least with the types), feel free to close this issue. I'm perfectly happy with your solution.

Closing via #2690.


CreateBlpCheckpoint uses TRUNCATE TABLE to ensure the table is emtpy

See: https://github.com/youtube/vitess/issues/3431
Under some situations when rebuilding an existing setup that had vitess data on it the table may have existed and this table may not be empty. This extra TRUNCATE TABLE ensures the table is cleaned prior to later trying to insert data.

Do you think using IODKU would be better instead? This is also related to #3399. If there are formal ways to 'go back' from filtered replication to split-clone, then this error should never happen.
Once the workflows are implemented correctly, we should look at reverting this back to an error (with a more meaningful explanation). Something like: "A filtered replication is already running, please cancel it using xxx command before starting a new workflow".

With the new replication code, this is now unnecessary. You can now fine-control all resharding replication with the VReplicationExec command.
Also, the resharding commands will further be improved for properly canceling a resharding workflow.
So, I'll close this.


How to use nodejs api of google auth in axios fetch?

How to use nodejs api of google auth in axios fetch using API URL directly on anchor tag is not safe and fetching this using axios is not working as expected
// react js
fetch('http://localhost:5000/auth/google')
.then(response => {
// Handle response (e.g., redirect user to Google login page)
})
.catch(error => {
// Handle error
});
Node js API
export const authGoogle = asyncErrorHandler(async (req, res) => {
// Redirect to Google's OAuth consent screen
const url = googleAuthClient.generateAuthUrl({
access_type: "offline",
scope: ["email", "profile"],
redirect_uri: "http://localhost:5000/auth/google/callback", // Ensure this matches your actual callback URL
});
res.redirect(url);
});
export const googleCallback = asyncErrorHandler(async (req, res) => {
const { code } = req.query;
if (!code) {
res.status(400).send("No authorization code");
return;
}
try {
const { tokens } = await googleAuthClient.getToken(code);
// Set the credentials on the OAuth2 client.
googleAuthClient.setCredentials(tokens);
// Retrieve user information
const userInfo = await googleAuthClient.verifyIdToken({
  idToken: tokens.id_token,
  audience:
    "xxxx",
});

console.info("User information retrieved:", userInfo.getPayload());
res.send(userInfo.getPayload());

} catch (error) {
console.error("Error retrieving user info:", error);
res.status(500).send("Error retrieving user info");
}
});

How to use nodejs api of google auth in axios fetch using API URL directly on anchor tag is not safe and fetching this using axios is not working as expected

I do not understand this question, perhaps these resources can be of assistance:

https://github.com/googleapis/google-auth-library-nodejs?tab=readme-ov-file#a-complete-oauth2-example
https://github.com/googleapis/google-auth-library-nodejs/blob/409da97d633268ae6402cdbb22166a4644c29860/samples/puppeteer/oauth2-test.js
https://developers.google.com/identity/oauth2/web/guides/overview

Hi @danielbankhead,
Suppose I log in to Google and get redirected to a callback URL where I update my user information in the database using Node. How will my front end know whether the login was successful? Should I call an API to check whether the user was created successfully?
Many thanks
Ashish

Suppose I log in to Google and get redirected to a callback URL where I update my user information in the database using Node. How will my front end know whether the login was successful?

That would depend on your authorization model - if redirecting the successful response from the backend confirms a successful login.
To make this easier I would recommend the Google Identity Services JavaScript library for the frontend:

https://developers.google.com/identity/oauth2/web/guides/overview

Further reading:

https://developers.google.com/identity/oauth2/web/guides/choose-authorization-model
https://developers.google.com/identity/oauth2/web/guides/use-code-model#preventing_csrf_attacks


feat(validation): returns output from validate function

Issue number: #4797
Summary
Changes
The Validation feature has been updated to return the output of the fastjsonschema.validate() function.  When validating the payload, fastjsonschema returns the payload with default values populated where applicable.
User experience
Consider this line of code:
from aws_lambda_powertools.utilities.validation import validate

val_payload = validate(payload, schema)

Before the change, val_payload would be None.  After the change, it would be the original payload value, with any default values inserted for fields that were not provided.
Checklist
If your change doesn't seem to apply, please leave them unchecked.

[x] Meet tenets criteria
[x] I have performed a self-review of this change
[x] Changes have been tested
[x] Changes are documented
[x] PR title follows conventional commit semantics

Is this a breaking change? - No
RFC issue number:
Checklist:

[ ] Migration process documented
[ ] Implement warnings (if it can live side by side)

Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Hey @sthulb I made some changes in this PR and I need your review here, pls.


Leveraging AWS Credentials other than default

We currently have the needs to spin up EC2 Instances but not in our main account.
We have a "sandbox" account where molecule handles its testing.
Prior to molecule 3, we were able to do this by having a customized create.yml
What is the recommended approach for that now?
Is there a way to pass a profile name into the driver?
Thanks!

Actually I can handle this similarly to how I was previously. Thanks for this driver and the support for it.


DanUpdate

Add few rotations, enforced rotation for shards/crystal/cluster (code can be optimized, just make this changes to test (new to C#/Microsoft Visual Studio ), fail safe in gather preset against rouge nodes

I was looking into your code, and see that you were working in a way to identify if a node is unspoiled/legendary and stuff like that. I really enjoy this idea and propose like after 5.3 update create a FULL rotation with all unpoiled nodes for mining,botanist for each xpac.
https://ffxiv.consolegameswiki.com/wiki/Unspoiled_Mining_Nodes
Maybe instead loading the data from wiki, we can just start a db/or a text file like you did with shard/crystal/cluster and feed all unspoiled material than if a crafting item use this material enforce a full rotation in that xpac until hit all itens need.
Example: I need gold ore that only appear 9:00 AM ET, so miqo crafter will load full scenario will all nodes on ARR until reach gold ore for times need to get the number and we can set before 2-3-4 nodes stop using gp so it can maximize the number of itens collected at one run.
Anyway its a lot of work, but as i said before its best wait patch 5.3 to rework grids


lockUntil not set correctly

Hi,
I'm using 'net.javacrumbs.shedlock:shedlock-spring:4.44.0' together with 'net.javacrumbs.shedlock:shedlock-provider-mongo-reactivestreams:4.44.0'.
At my scheduler, I have this config:
@Scheduled(cron = "0 */30 * * * ?")
@SchedulerLock(name = "random_name",
lockAtLeastFor = "PT15M",
lockAtMostFor = "PT25M")
I can't figure out why document in my collection is:
_id: "random_name"
lockUntil: 2023-04-19T09:30:15.008+00:00
lockedAt: 2023-04-19T09:30:00.011+00:00
lockedBy: "podId"
I would appreciate any suggestions :)

Hi, can you please describe what you think is not correct? For example, do you look at the record when the task is running or already finished?

When it's already finished. Do I understand you correctly that value at lockUntil is a real value showing for how long it was actually locked? Since I have lockAtLeastFor = "PT15M" I was expecting lockUntil to be 2023-04-19T09:45:00.011+00:00.
Shouldn't be this way?

I see, I am quite confident that the code is correct, moreover, there are tests checking this. Can you please follow the Troubleshooting section and look at the DEBUG logs?

Just out of curiosity, what was the cause?

tbh, no idea :) I've changed PT15M -> PT20M and now it works as intended. But it seems stretched. Im keeping the scheduler config in values.yaml, maybe someone changed them.


[Refactor] action method, +Features, -Unused imports

Features: Seek forward/backward, control volume and mute

Can you ensure proper text formatting on the terminal? Every button click is repetitively printing the same text block redundantly. Possibly make a method and use it.

Closing, since other PR covers this as well.


Add tests

Tests are needed to validate no parser rules breaks from changes.
Many code snippet cases need to be made and validated for each commit with GitHub actions.
Ideally a command/file should be able to run to also do these checks locally.
For a good approach, see Acorn

Test implementation approach has been chosen.
I have issues where TS type errors within the test files are currently ignored by vitest. This is something i will haft to look into in the future.
Currently Variable declaration tests and two simple function declaration tests have been added.
More tests will be added as needed later.


Compiler bug: Function return type does not match operand type of return inst!

Bug Report
Got a Function return type does not match operand type of return inst while trying to implement a contain_exactly matcher for specs. (Fairly new to crystal, so please forgive my ignorance.)
Environment
$ crystal --version
Crystal 1.6.1 [fc61bd678] (2022-10-21)

LLVM: 13.0.1
Default target: x86_64-unknown-linux-gnu

How to reproduce
Reduced the original to this example:
def contain_exactly(actual_array, *expected_elements) : Bool
  Set.new(actual_array) == Set.new(expected_elements)
end

puts contain_exactly([1, 2], 2, 1)   # <-- works
puts contain_exactly([] of Int32, )  # <-- breaks [1]

# [1] The idea is to call `contain_exactly` with an empty list of expected_elements

Running this with crystal run src/example.cr yields
Module validation failed: Function return type does not match operand type of return inst!
  ret i8 %1, !dbg !109
 i1 (Exception)
  from /crystal/src/range.cr:450:9 in 'finish'
  from /crystal/src/compiler/crystal/codegen/codegen.cr:71:7 in 'codegen'
  from /crystal/src/compiler/crystal/compiler.cr:162:16 in 'compile'
  from /crystal/src/compiler/crystal/command.cr:215:5 in 'run_command'
  from /crystal/src/compiler/crystal/command.cr:64:5 in '__crystal_main'
  from /crystal/src/crystal/main.cr:115:5 in 'main'
  from src/env/__libc_start_main.c:95:2 in 'libc_start_main_stage2'
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

Comments
Looked at other compiler issues with the same error message but none seemed to be exactly the same (apologies if there is any that I've missed or misinterpreted).
Last but not least :) - thank you so much for crystal-lang!

Reduced:
struct Entry
  def key
    @key
  end

  def initialize(@key : NoReturn)
  end
end

entry = uninitialized Entry
entry_key = entry.@key
entry_key.object_id
0


Adding Show If

Thanks for sharing this package.
I just wondering how to implement showing fields or groups when selecting an option or thick.

Hi @tabunan,
thanks for your question. This is a pretty regular usage of dd-form. You can do this via :functions property. All is shown here in docs.

initialize the :functions prop
add new function which returns true, if the tick or option is selected (eg. return yourDataSet.yourTick)
now you can reference this function's key in description of the view you want to hide (in hidden property)

I could explain closer if I saw your data set or code. Hope this helps!


fix(protocol-designer): fix the display when dropdown menu option is only one

Overview
fix the display when dropdown menu option is only one

close RQA-3434

Test Plan and Hands on Testing

Changelog

Review requests
low

Risk assessment
low

[ ] update text


Sampling Protocol / Fisherman is gameable

Problem
The Sampling Protocol of the Fisherman (according to the spec) is able to be manipulated by ServiceNodes. According to the spec, there is a Consistent Sampling Delay between every benchmark/sample of all the service nodes in a session. An attacker could monitor his incoming requests, figure out the delay, and only give service to the Fisherman instead of to all applications.
The aim of the Sampling Protocol is to be discreet, so ServiceNodes do not know which requests are from the Fisherman or an application, and they are forced to give equal service to all requests. However, this is not the case.

How to attack the current system

Wait till two or more of your nodes are in the same session.
Monitor all incoming requests and send them to a shared server
Identify requests that came in at the same time
Identify another set of requests that came in at the same time
Subtract and determine the consistent sampling delay
Ignore all other requests between now + Consistent Sampling Delay

Solution
Change the Consistent Sampling Delay to a Random Sampling Delay, created from a private source of randomness.
Origin Document
https://docs.pokt.network/v1/utility#3.3-fisherman-protocol
Creator: DragonDmoney (Pierre)

@DragonDmoney Can you post this in https://github.com/pokt-network/pocket-network-protocol? Details related to the specification should be tracked and discussed in that repo.
This repo is meant to track the progress of the official Go client implementation.


chore: improve

Please describe the changes this PR makes and why it should be merged:
Status and versioning classification:

I dont know much about workflows and stuff, so hope you tested it

Yes I know, now I'm going to do some more tests but thanks to this the whole changelog will be kept in CHANGELOG.md, there will be better github releases and every time there is a new release a PR will be created which we have to approve.


Add Saleh as a contributor

Saleh has been joining the meetings and contributed with metric definitions.

@SMotaal are you okay with being listed on the README?

@GeorgLink certainly… thank you!


DateTimeRfc1123 Is Not Performant

DateTimeRfc1123 leverages OffsetDateTime.parse which creates a cache of all known RFC1123 String -> OffsetDateTime return values. Additionally, it performs a regex-like compilation every time parse is called resulting in additional CPU overhead.
Instead, given our limited usage of RFC1123 dates, we should investigate our own parser.

I've implemented a proof of concept parser here: https://github.com/JonathanGiles/RFC1123-parser


Add option to disable masking from RectTransformColliderFitter

Overview
This PR adds an option to disable the masking behaviour of RectTransformColliderFitter. This is useful when a component needs to extend beyond a masked region (i.e. pop out of a ScrollRect.)
Changes

Fixes this issue where components that pop out of a ScrollRect have their colliders disabled.

:)

Your popup menu looks fantastic, by the way! Feel free to open a PR for that too if you'd like!
I'm working on my own dropdown in another branch, but I'd love to take a look at yours as well.

I'm working on my own dropdown in another branch, but I'd love to take a look at yours as well.

I'd be happy to - though there are a couple of things to resolve before it'd be flexible enough and suitable for general consumption:

https://github.com/microsoft/MixedRealityToolkit-Unity/pull/10795
It's very easy to accidentally press through a popup and trigger the button or another piece of UI behind - can you suggest a strategy to work around this?
It needs the equivalent of a "clickaway" listener  - any suggestions?

@camnewnham

It's very easy to accidentally press through a popup and trigger the button or another piece of UI behind - can you suggest a strategy to work around this?
It needs the equivalent of a "clickaway" listener - any suggestions?

XRI doesn't really do "modality"; i.e., there's no way to push or pop layers of UI modally, so neither of these are really that easy to do with XRI. For the first one, I would suggest literally bringing the popup towards the user and increase the Z separation between the foreground popup and background.
Clickaway events are similarly tricky... clicking "away" implies that the thing itself has some sort of modal focus. In the future, we may ask XRI folks to either implement this sort of modality, or perhaps implement our own support for it as a subclass of the XRInteractionManager (or at least add "clickaway" event handling to the XRInteractionManager).
<EMAIL_ADDRESS>

/azp run

/azp run

I've updated this to add some clarity. The previous approach using a setter was slightly confusing because runtime changes in editor (toggling useMask) wouldn't be triggered, which made the logic harder to read.
Instead:

Use the serialized editor-friendly property useMask to determine the intent (should mask be applied or not)
Cache value maskApplied to know the current state of the mask (is the mask currently applied)
During a Fit() operation, ensure that the mask is applied or removed as required

/azp run


feat(operator): add version conversion rule for KeptnEvaluationProvider

Signed-off-by: Giovanni Liva<EMAIL_ADDRESS>

I think you also need to enable kustomizations, liek here https://github.com/keptn/lifecycle-toolkit/pull/569/files#diff-b4264f54ad8ffa078bdc5cf96dba3ba7af6f506d6f5b74ec49561352b86c6acaR36
and here
https://github.com/keptn/lifecycle-toolkit/pull/494/files#diff-b4264f54ad8ffa078bdc5cf96dba3ba7af6f506d6f5b74ec49561352b86c6acaR34

sorry to have more comments, but an integration test for the conversion would be great to verify if the thing works correctly

I will take this as follow-up of this PR and introduce multiple tests to also verify all the conversion webhooks we have. For that, I've created https://github.com/keptn/lifecycle-toolkit/issues/576


Ability to dual publish

Publish the same image to devcontainers and vscode/devcontainers by retagging

It might make sense to refer to the second spot just as "secondary registry" rather than calling out VS Code by name. e.g., we could at some point switch to some other container registry for publishing. Might make sense to also make it optional. Otherwise it looks like this would work!


imenu: fn items: match async/const and all pub variants.

r? @brotzeit
(rust_highfive has picked a reviewer for you, use r? to override)

cc @haroldcarr
This is my alternative proposal for #344.
fix #295
fix #344


Fix error for not assistable friendly unit in combat

Confirming this appears to resolve the issue on my client; unable to replicate problem after several minutes of testing.


destroy() -> remove()

destroy() wasn't a function, but updating it to remove() worked
is that what was intended to be here?

Coverage remained the same at 73.832% when pulling 71ca74558267ab9e402c3a8d6232a80575c838f3 on evykassirer:patch-1 into a0a90ab4741b7e032235af0c36ba1c5e9466e69d on mediaelement:master.

Yes my bad, this was a typo. There are destroy methods for other pieces of code, but this one is the right one.

PR merged. Thanks. Please star both https://github.com/mediaelement/mediaelement and https://github.com/mediaelement/mediaelement-plugins to continue improving the package and giving it more popularity; also tell your friends/coworkers/etc. that have a GitHub account to do the same to support the project, if you don't mind. It would be greatly appreciated it.


GPUImageiOSBlurFilter imageByFilteringImage returning nil

Running on simulator (4-inch) sometimes the following code results in imageByFilteringImage returning nil but when calling it again - it just works fine (the while loop is the workaround).
        UIGraphicsBeginImageContextWithOptions([[self view] bounds].size, NO, [[UIScreen mainScreen] scale]);

        [[self view] drawViewHierarchyInRect:[[self view] bounds] afterScreenUpdates:NO];

        UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

        GPUImageiOSBlurFilter *imageFilter = [GPUImageiOSBlurFilter new];
        [imageFilter setBlurRadiusInPixels:10.0];
        UIImage *blurImage;

        int errorCount = 0;
        //Loop workaround for some unknown GPUImage issue where sometimes the result is nil.
        while (! (blurImage = [imageFilter imageByFilteringImage:screenImage]) ) {
            ++errorCount;
        }

        //Track error.
        if (errorCount > 0) {
            NSLog(@"GPUImageiOSBlurFilter imageByFilteringImage error count: %i", errorCount);
        }

Any idea where to start looking? to maybe get some insight on the issue and what causing it?
My fear is that the issue will happen on the iOS devices at some point as well.

Same issue here. We just started using GPUImage (latest in CocoaPods) and blurred images are randomly nil.
So far we only noticed it in the Simulator though.

We also have the same issue on devices - just less often.

In our application I've simply did a limited retry (2 times - in all the times I've seen, 1 retry was enough on the device) - and if still failed, gave a notification to the user.

I have also experience the same issue. @ShaharHD retry workaround solved my issue, thanks

Any updates on the issue?

We still run into this bug. The retry has a little bit of a code smell to it. Any updates on a different workaround or fix?


how-to move player & tgt frames to center of screen?

we got in unit > player something like this:
position = {'TOPLEFT', UIParent, 34, -30},
how to do it on center of screen and player on left side of our character, and target on right side?
i tryed:
position = {'CENTER', UIParent, 34, -30}, < and tryed to change values but not working really, center value working - but numbers to move it - not.
Any ideas?

In the latest versions of oUF_Neav you move the player, target and focus frame by right-clicking and selecting unlock frame (or something like that) and just drag it with your mouse. The values in the config file are just the initial values after a clean install. However, you can also reset the position of a frame from the right-click menu, and it will reset to whatever position you have set if your config.lua file.
You could also delete your layout-local.txt file deep in your WTF folder (WTF/Account///) prior to logging in to reset the positions, a warning though, this might reset the position of other addons as well.


Price Component needs ability to render compareAtPrice above displayPrice

@nnnnat commented on Tue Jun 26 2018
The Price component needs the ability to render the compareAtPrice above the displayPrice.

I think this should just be a simple boolean prop something like hasPriceBelow to render the displayPrice below the comparAtPrice.

:tada: This issue has been resolved in version 0.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Swift 3

You might want to create a new branch that includes the Swift 2 version, and convert this to Swift 3.

Trust me, I want to do that. But I M busy with my work now ...
I'll start the Swift 3 version soon ~

No hurries, I'm still using Swift 2.2 anyways.

Migrate to Swift 3 done.


Question: Is it possible to keep the old instances after a bg-deploy --no-confirm

We would like to keep the old instances after a blue-green deployment so that we can switch easily after we found an issue that was not found by the pipeline.
Looking at cf bg-deploy --help, there seems to be no option.
Wdyt? Would you consider adding such an option?
The community cf-cli plugin for blue-green deployments of native apps also supports this https://github.com/bluemixgaragelondon/cf-blue-green-deploy

Hi Kiemes,
For such cases, we recommend doing a new bg-deployment with the previous version of the solution. The complete state of the solution is not persisted only in the cf app entities. E.g. even if the routes get manually switch back to the former apps, the services and service bindings with their parameters won't get updated back to the previous values.
MTA deployment takes care to update such and brings the whole package to the state defined in the  descriptor, which should be in the common case better tested & stable.
I understand that switching back only apps like this, though riskier in some cases, is much faster and may be of use. We're currently doing a change to the bg-deploy process - to switch back to the live-app names at the end of bg-deployment. After it's delivered (targeting Q1 2020), such a feature would be possible to implement as the old app versions would remain with an -old suffix and would be easily identifiable.
Even if this feature is to be implemented, one should consider doing a new deployment of the previous version for reasons as:

the targeted state is more predictable, as described in the mtad.yaml of the deployed package
the cf space would be left in a consistent state (no stopped apps from a new version, no mix with old apps & new service instance settings etc..)
better traceability & auditability - one can trace the events of concrete deployments with their versions and solution state/configs.

Thanks @ddonchev for your comments. I was consciously asking for this and still having the risks in mind. Especially DB related changes are dangerous and have to be handled with care. But this also is true for the regular MTA deployments.
Thanks also for the hint about the new upcoming version. Are you planning to leave the -old app always there after a successful deployment or do you plan to have a flag to remove the -old app after deployment?

In the initial scope, the old apps will get deleted. I'm taking your feedback and will bring this to the team to consider an additional feature for preserving the apps.
Regarding UI - in general my personal preferences tend towards global descriptor parameters. This brings better traceability and leaner cf cli interface. If this is not convenient enough for a certain case, cli options are not excluded.

thx. I am also fine with a global descriptor parameter ;)

A potential benefit of having an CLI parameter would be the easier handling in CI/CD pipelines. Here you would not need to modify the mtad.yml file or have multiple for the different use-cases.

I kind of started an off-topic about ui, but regardless - the idea of having parameters with defaults in the mtad.yaml is the ability to replace those defaults with extension descriptors (*.mtaext) at the teme of deployment. Creating those *.mtaext files is still more effortful than just specifying a cli option so the ui is decided on for each case.


Update plugin ID to match package name

Resolves #10

Thanks a lot for your quick response, much appreciated!
Is there a chance you could publish to npm as well so that cordova plugin install works?
(Maybe as 2.0.0, I'm not sure how it would affect anyone who already has it installed)
Thanks!

Did I not do it correctly? I already published a new version immediately after merging your commit.

My mistake, I didn't even think to look for some reason... :man_facepalming:
It works a treat, thanks!


Fixed #34834  -- Set corret GeneratedField get_col

Ref https://code.djangoproject.com/ticket/34838

Thanks for the patch @pauloxnet!
I wonder if we also need to account for the caching layer for the default Col of the Field instance.
@cached_property
def cached_col(self):
    from django.db.models.expressions import Col

    return Col(self.model._meta.db_table, self.output_field)

def get_col(self, alias, output_field=None):
    if alias =! self.model._meta.db_table and (
        output_field is None
    ):
        output_field = self.output_field
    return super().get_col(alias, output_field)

Thanks for continuing to investigate further @charettes :)
I applied your suggestions to the code of this PR, but feel free to modify the code in the branch if you feel it is appropriate to complete the patch, or open an alternative PR, because due to the time zone, I will be able to return to work on it in a few hours.

def get_col(self, alias, output_field=None):
    if alias != self.model._meta.db_table and (output_field is None):
        output_field = self.output_field
    return super().get_col(alias, output_field)

This version of get_col broke tests and the local queries.
I'm going to revert to this original version for now:
def get_col(self, alias, output_field=None):
    if output_field is None:
        output_field = self.output_field
    return super().get_col(alias, output_field)

@pauloxnet sorry for the back and forth, the issue you are encountering should be fixed here https://github.com/pauloxnet/django/pull/1.
Basically Col signature is (alias, target: Field, output_field: Field | None = None), I forgot that we need to keep passing target=self

Minor but the PR references ticket-34834 instead of ticket-34838

@charettes Thank you for your guidance so far. would you say that this PR is ready for checkin? I can review general style but it would need an approval from an ORM expert for the semantic changes before proceeding with a merge. Thanks!

@nessita I believe it is yes!

Thanks both :star2:


Make hack/test-go.sh friendlier to OS X bash by not using a -1 array index

Without this, everytime I run test-go.sh I get the following error:
./hack/test-go.sh: line 215: apiVersions: bad array subscript

LGTM


Remove unnecessary dependencies

Previous configuration caused exrm_deb to depend on ex_doc and
earmark at runtime, which is not needed.
Fixes #10

I'm not 100% sure of this, so please check this. Running mix hex.publish without actually going through should list dependencies that will be included.

Changes Unknown when pulling f0e17b78f581039c95dd675999a9a3b058311df7 on michalmuskala:extra-deps-fix into ** on johnhamelink:master**.

Thank you :smile:


For some reason, the github update kills something in the node_modules folder

If I replace the node modules folder with the backup, everything works great. As soon as github pushes the update, it doesn't work so good

I have no idea the cause, I wonder if the process is overwriting something in the node_modules too much

I think I fixed it by not building the node first. this is much faster, and what I wanted anyway. I also removed the --exclude *.git line. tell me if I should keep this in or not... @kemp

nevermind lmao


mod note

Coverage increased (+0.003%) to 68.165% when pulling a641d688cc476b3ef5b336bfe853a8a5c8f659c9 on yanhongwangg:mod_note into 3c6925ce4746e9dfd3b2de1afcf5d6f49223454b on apache:master.


Refactor StormLaws

In this PR I refactored StormLaws class with a way to test same Producer on both Storm and Memory platforms and compare their results. In future this approach can be extended to Scalding platform as well with a very unified way of testing.
Also I've included test for https://github.com/twitter/summingbird/issues/725, where we build Storm topology which fails with ClassCastException in runtime.

Codecov Report

Merging #727 into develop will decrease coverage by 0.8%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop     #727      +/-   ##
===========================================
- Coverage    71.38%   70.58%   -0.81%
===========================================
  Files          141      141
  Lines         3491     3491
  Branches       195      195
===========================================
- Hits          2492     2464      -28
- Misses         999     1027      +28

Impacted Files
Coverage Δ

...cala/com/twitter/summingbird/storm/TestStore.scala
70.58% <100%> (ø)
:arrow_up:

...a/com/twitter/summingbird/storm/StormTestRun.scala
60% <0%> (-30%)
:arrow_down:

...la/com/twitter/summingbird/storm/BuildSummer.scala
42.22% <0%> (-22.23%)
:arrow_down:

...ain/scala/com/twitter/summingbird/TestGraphs.scala
88.53% <0%> (-5.1%)
:arrow_down:

.../main/scala/com/twitter/summingbird/Producer.scala
75.75% <0%> (-1.52%)
:arrow_down:

Continue to review full report at Codecov.

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

@johnynek @pankajroark thoughts on this one?

👍
Nice cleanup.

@johnynek What I really like here is a fact we can introduce shared test suite for Storm and Scalding platforms after introduction of proper memory platform (with notion of time) and Scalding implementation for CreatorCtx.
Should I merge or better to wait for one more review from @pankajroark for example?

@johnynek @pankajroark Hi, I've reworked this change a lot with introduction of TestPlatform which corresponds to previous CreatorCtx, can you take a look? I think it's much more Summingbirdish approach.


Does mleap Imputer works for multiple columns?

According to https://spark.apache.org/docs/2.3.0/ml-features.html#imputer, we can impute multiple columns like this:
Imputer imputer = new Imputer()
  .setInputCols(new String[]{"a", "b"})
  .setOutputCols(new String[]{"out_a", "out_b"});
But I am not able to
import org.apache.spark.ml.feature.Imputer;
import org.apache.spark.ml.feature.ImputerModel;
I found the Imputer and ImputerModel in
import org.apache.spark.ml.mleap.feature.Imputer;
import org.apache.spark.ml.mleap.feature.ImputerModel;
However, that works for single column.
How to make it works for multiple columns?

I found the way, need a for loop for each column.


Stopping activities broken

Hi there,
First, awesome lib.  Great work.
However, using your examples turns devices on, but does not turn them back off.  Perhaps there was a shift in the API?
Any help would be appreciated :)

hi brian
what does getActivities() return? is there an activity with the id -1?
if so, API is most probably the same as before.
thx for confirmation,
manu

There is an item with -1.  Its label is 'PowerOff'.
startActivity -1 does turn everything off.
Is it possible to turn off a single device by id?

client.isOff().then(log) seems to always output true regardless of device state.  I think that's why your demo script doesn't toggle as it should.
Activities have a property controlGroup which hint at useful functionalities like Volume, Channel, DisplayMode.  Are these somehow accessible?

isOff and turnOff is meant to turn off the complete system, not specific devices.
if you are interested in interacting with your devices explicitly, have a look into the source code of https://github.com/swissmanu/orchestra-jsapi. that library tries to abstract this kind of interaction further away.

Thanks for the information.
I still think there's a bug though: isOff doesn't return false after turning a device on.
I'll take a look at orchestra-jsapi.  I'm guessing executeAction is what I'm looking for?

Main goal is to turn off a single device (by id or name).  Not sure if executeAction will accomplish this, or how.
Any help is appreciated!

@brian-gates  i know it's been 3 years, but i'm having the exact same problem.  Were you able to figure out how to end an activity?


Getters and setters on props

Hi!
Why prop decorator don't accept get and set option? Thanks
https://mongoosejs.com/docs/tutorials/getters-setters.html

When you ask such question(s), please always provide which versions you are using (mongoose & typegoose)

pushed it, when travis has build & github has updated, it can be found here

Closing this because get & set are confirmed working, but only in version 6


initial port of actors-dp-java to reactive style

Application code ported and compiles in IDE against a hacked KAR.java where the signatures of the SDK methods have been changed (but don't compile).

Completed ported kar-runtime-quarkus to the reactive style.
Actors-dp-java-reactive works.
Changed default to use http/2 for kar-runtime-quarkus to sidestep need to configure KarSidecar http/1 worker pool.


Fixes and adjustments

Adjustments made after attempt to spin up monitoring from scratch on Docker deployment of Rocket.Chat.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


awslogs: Record log line insert order for sorting

Fixes https://github.com/docker/docker/issues/24775
- What I did
When multiple log lines are emitted with the same timestamp, fall back to insertion order rather than allowing sort.Sort to pick the order.
- How I did it
Insertion order is recorded in a new wrapper struct internal to the logging driver.  Less now uses the insertion order when the timestamps are equal.
- How to verify it
Unit tests pass.
- Description for the changelog

Fixed a bug in the awslogs logging driver that could cause log lines to be recorded out-of-order under rare conditions.

Bump.  I believe the Jenkins failure is unrelated to my change.

@thaJeztah I've changed the name per your suggestion.  The Jenkins failure (again) looks unrelated.

LGTM

LGTM


fix: LFGList refresh button slightly functional.

Refresh button is now semi-functional. It will cycle between raid and dungeon and custom.
Its takes a second for results to show up, spamming the button will causes a lua error.

#46
#45  👈
working-trunk

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @juemrami and the rest of your teammates on  Graphite


Stack: update xml file path for .slc.full file if dir changed.

Stack: update the file path of .slc.full in its XML file so that code still works if dir changed.

tops/stripmap2vrt: add metavar to -b/-B options for easy usage

fix typo in workflows.md

@yunjunz just added codacy. The issue flagged not related to you edit, but pre-existing.


OLED: displaying param etc. labels

Currently we can capture custom param names if declared after the input prefix; for example param cv1_wet will map to cv1 and we store the param label as "wet". These labels are not yet being used in the OLED but should be.

Param view is added for the next update.  Looks like:
kn1 frequency 440.0
sw1 engage    0.00

etc.
I.e. shows the device mapping, the param label, and the current param value (in @min to @max range).
View will scroll via encoder for patches with > 8 params.
Any un-mapped param can be selected (push encoder to toggle); when selected, the encoder will modify the param value.
Encoder steps move in reasonable step sizes (such as powers of 2 or divisions down to 1/12 or of powers of 10) according to the param range, such that the full range is usually 3-4 twists.


Multi docker socket support to allow jobs on different machines + deploy to prod via separate socket

https://github.com/theSage21/jaypore_ci/discussions/23


During multi-selection: Just holding a label changes its status.

Just holding and subsequently sliding out of the label changes the label status. That's not expected and undesirable cause it can not be undone to the original state if the initial situation comprised notes of mixed labels and label status, and one of the only partially assigned labels was involved/held.
Noto v2.3.0-beta2
Fairphone 3
Android 10 with GMS updated to v23.13.12

Could you please provide a screenshot/screencast to help me understand the issue better?

The demo setup is two notes two labels. Each note has only one different label assigned.
I've switched on tap marks, so you can see when I touch and when I let go, and where.
https://github.com/alialbaali/Noto/assets/35634829/b3ddfde1-abb2-4f17-8ca8-b844e048eb82

I see what you mean. That's basically long clicking on the label changes the status. If you think long clicking isn't helpful in this case, I could disable it.

That!

Done!

Fixed, hooray! That made hesitantly scrolling a plague.


Update example GIF

I've converted the mov example in the README.md to a looping gif.
See below:

LGTM, worthwhile contribution!


Where to write the script for slot filling?

Rasa Core version: 0.10
Python version: 3.6
Operating system (windows, osx, ...): LINUX
Issue: can not able to fill the slots using script. where to write the script that will fill the slots properly.

Could you provide some more details on what's not working?

can anybody help me with the code of slot filling

I still need some more details on the exact issues you're having to be able to help 🙂 please provide some examples of your code and what's not working


Send doesn't check if listener (mqs & keybase) online

At send page we should detect that send will never work and explain that to user. Show message box and ask if he want to go to the Listeners page.
P.S. Marked as minor issue because listeners normally are doing well and error message said that wallet need to start listening first.

Verified with the latest build, hence closing this ticket.


TS-4250 clang-format breaks on Centos 6

Change clang-format.sh to use native sha1sum command
when available.

Seems reasonable.


Clarify Objectives of The Gridlock Arena of Mythos Challenge

Motivation
When trying this challenge, I have discovered that the description of the rules is rather vague at times.
In fact the official solutions for this challenge sometimes implement slightly different interpretations of the challenge description.
Therefore, I would like the clarify exactly how the moves and rounds are structured.
If I have misunderstood how the rules are supposed to be interpreted, please clarify, so I can update the description.
Followups
After it is clarified that this is indeed the intended way to solve the challenge, I will update the solution files to match the challenge description.

@microsoft-github-policy-service agree

Thanks for the PR @bKiralyWdf! Really appreciate it. Good clarifications and I like renaming "Battle Dynamics" to "Turn Order" to make that more clear. Thanks again! 🙏


Fix doc on getting the home directory

atom.fs is undefined in the current Atom version. The function getHomeDirectory() seems to be now only available in the Atom fs-plus package.

I believe you're right -- thanks for updating the docs :+1:

Sure, you're welcome :) Thanks for merging the PR.


Wave Pattern - Hololens PCD

Hi all,
could you tell me if the point cloud you extract from the Hololens also has this wave-like pattern? I made some tests which I want to share with you.
Results below are from scanning a completely flat floor.
Darkroom (long_throw_sensor):

Clear room (long_throw_sensor):

I also have some data from the short_throw_sensor. Those also show the wave pattern.
Here is the depth image:

There is a table (between other items). The point cloud shows a piece of the table deformed by the wave pattern.

Do you guys share the same result? Is there a way to avoid this pattern?
Thanks

Nobody having this issue?

@alemarro I had that exact issue, but mainly just ignored it. We ended up running some filtering functions to fill holes, and I think we tacked smoothing onto it as well. As far as I can tell, it's an accurate representation of the data.

@FracturedShader Just this week I started using Bilateral Filter to smooth most of the noise, but in order to get rid of it, I end up smoothing too much and losing detail.
I also made some comparison to SfM (structure from motion) with DSLR camera and the detail from the Hololens scans were not as good.
I might be trying to use the Hololens for the wrong purposes thou (as 3D scan).
Which filter are you using and parameters? If you dont mind me asking.
Thank you.

@FracturedShader Just this week I started using Bilateral Filter to smooth most of the noise, but in order to get rid of it, I end up smoothing too much and losing detail.
I also made some comparison to SfM (structure from motion) with DSLR camera and the detail from the Hololens scans were not as good.
I might be trying to use the Hololens for the wrong purposes thou (as 3D scan).
Which filter are you using and parameters? If you dont mind me asking.
Thank you.


Fix typo in CI test

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)

/retest

/retest


perf: replace simple object as key-value storage to map (#2018)

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Other... Please describe:

What is the current behavior?

Issue Number: #2018
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

So, need to decide which way we're gonna go.
If we don't want to change the storage() interface, we have two choices:

When accessing storage, we must transform Map to object with saving the state of storage.
Return Map with the object interface without saving data access to Map.

The first approach is slower because of the transformation but with the possibility of returning the data to the public API, but the second approach will be faster. If a new release with the change storage interface is coming soon, then can sacrifice performance for this time.

I've got a PR for v6 ready, if you want to set this to the Map return and add a changeset with the breaking changes explained I'll get them released at the same time

I've got a PR for v6 ready, if you want to set this to the Map return and add a changeset with the breaking changes explained I'll get them released at the same time

Got it. I'll do it soon


Split documentation into multiple files

The problem
Our README is exceedingly large. This is not ideal, as it makes it somewhat difficult to navigate (see #322). In addition, in Safari, the anchors don't work properly, which makes links to parts of the documentation unusable.
Possible solution
We need to split the README into multiple files. At the very list, subsections of Symbols and Functions should go into different files.
Likely, WolframModel and WolframModelEvolutionObject should be split into multiple files as well, probably one file per each property/option.
Additional context
A significant downside is that all links will be broken. We will have to go through all open issues and documents (README, contributing, and the research documents), and fix all of the links. Of course, we cannot fix the external links (although they would not be entirely broken, they will just lead to the main documentation page).

Hi @maxitg, could I take this issue? Thank you

@wawo9193, definitely! Thanks for your interest!

@maxitg Would a GitHub wiki with subsections be okay? Or is there another route that is preferred? Glad to help

@wawo9193, we want it to be version controlled, so putting them in the "Documentation" directory makes the most sense.

@maxitg I split up the sections, but not 100% on the choice of sections if it would be preferred to have it broken up even more.
For the links I took all the links that went to header positions on the readme and added a relative file path. i.e. #state would be changed to Properties.md#state, so that when it is clicked it goes to that point on the page. Image paths were updated as well.
Of course this is just the first run through, so if you see anything that needs changing, please let me know.

Thanks for helping out! I left comments in the pull request review.


Making the Cody UI configurable by Site Admin

Main Issue https://github.com/sourcegraph/sourcegraph/issues/58631
Related SourceGraph PR: https://github.com/sourcegraph/sourcegraph/pull/59229
To understand just watch

Video Description of this PR

How to connect Cody to SG Instance

UI Changes

New UI For Chat

New UI for Commands

New UI for Autocomplete

Test plan
Already described in the video

@toolmantim Thanks for the recommendations, All comments resolved.

@abeatrix @slimsag
Thanks for the review.
Offered commentary on most changes but feel free to push back on choices and offer more suggestions.

Can you use the VSCode context APIs and "when" enablement in the commands so users don't see commands they can't use in command palettes, editor tab strip, tree views, etc.?

@slimsag @toolmantim  Selective UI to only show the enabled commands look much better UX than what I have now.
If you are cool too I am down to implement it?

so users don't see commands they can't use in command palettes, editor tab strip, tree views, etc.?

Rather than remove them so users can't see them, what about still having them be there but just communicating on each clearly they are disabled by their admin?
I imagine two possibilities:

User doesn't see commands -> doesn't know Cody has those features -> assumes Cody is not as good as it actually is -> user values Cody less.
User sees commands -> sees that their admin disabled them -> voices opinion internally at company that their company should enable cody commands -> admin enables them -> users and us win

I'm hoping for option 2 above. Thoughts?

Option 2 is my preference too

@slimsag Option 2 makes a lot of sense now that you explain.
So hopefully this PR is good to go. Let me know if you have any concerns and I will fix the whole thing(merge conflicts etc) and we can merge this today.

@abeatrix Can I get 💚 if there aren't major blockers on this? Its rather hard to fix this PR as it touches many files that get changed with refactors in other places. If majority of the PR works good I am happy to merge this one then do follow up items on top of it if that works.
Thanks for the careful catches on the things I missed.

@abeatrix Can I get 💚 if there aren't major blockers on this? Its rather hard to fix this PR as it touches many files that get changed with refactors in other places. If majority of the PR works good I am happy to merge this one then do follow up items on top of it if that works.
Thanks for the careful catches on the things I missed.

no problem! The only major blockers I am seeing when connected to an older Sourcegraph instance (e.g. demo) are:

Autocompletes not working
this error message when a new chat is created:

@arafatkatze @slimsag I don't want to block anything for your team though, so if you think these are expected then feel free to ignore me 😄

@abeatrix That chaining cycle thing is a LEGIT issue that for some reason I didn't see in my debugger tests but it exists in testing. Apologies for this but lemme fix this stuff properly.


[Cherrypick] Fix query string contents in nextLink for REST (remove dupe $after query parameter)

Cherry picks #2006 to main
Fix query string contents in nextLink for REST
Why?
The change committed in #1895 was written to fix how DAB writes the nextLink value in a response body to a GET request using pagination.
The nextLink contents is a URL which includes a query parameter $after which contains base64 encoded pagination metadata.
#1895 inadvertently triggered the nextLink creation process to append an additional $after query parameter instead of overwriting the
$after query parameter present in the request.
Sample request:
GET https://localhost:5001/api/Bookmarks?$first=1

Response:
{
    "value": [
        {
            "id": 1,
            "bkname": "Test Item #00001"
        }
    ],
    "nextLink": "https://localhost:5001/api/Bookmarks?$first=1&$after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MSwiRGlyZWN0aW9uIjowfV0="
}

The $after query parameter's value is a properly formatted base64 encoded string as fixed in #1895. The value is an opaque string and
from the above sample response translates to:
[{"EntityName":"Bookmarks","FieldName":"id","FieldValue":1,"Direction":0}]

However, once the nextLink is used to fetch another page, the next page's results include an invalid response body because
the nextLink is improperly formed:
GET https://localhost:5001/api/Bookmarks?$first=1&$after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MSwiRGlyZWN0aW9uIjowfV0=

{
    "value": [
        {
            "id": 2,
            "bkname": "Test Item #00002"
        }
    ],
    "nextLink": "https://localhost:5001/api/Bookmarks?$first=1&$after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MSwiRGlyZWN0aW9uIjowfV0%3D&$after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MiwiRGlyZWN0aW9uIjowfV0="
}

The invalid and and unexpected value is: $after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MSwiRGlyZWN0aW9uIjowfV0%3D
Not only is it URL escaped, but it is a duplicate value that shouldn't be present.
What is this change?
This change essentially removes the old $after query parameter (key and value) from the queryStringParameters
NamedValueCollection passed in to CreateNextLink(...):
public static JsonElement CreateNextLink(string path, NameValueCollection? queryStringParameters, string after){}

Due the NamedValueCollection being a special object created by System.Web.HttpUtility.HttpQSCollection

The ParseQueryString method uses UTF8 format to parse the query string In the returned NameValueCollection, URL encoded characters are decoded and multiple occurrences of the same query string parameter are listed as a single entry with a comma separating each value.

The values are URI escaped and this change purges that uri escaped value:
// Purge old $after value so this function can replace it.
queryStringParameters.Remove("$after");

string queryString = FormatQueryString(queryStringParameters: queryStringParameters);
if (!string.IsNullOrWhiteSpace(after))
{
    string afterPrefix = string.IsNullOrWhiteSpace(queryString) ? "?" : "&";
    queryString += $"{afterPrefix}{RequestParser.AFTER_URL}={after}";
}

The above code:

Creates an initial queryString where the values are URL encoded.
Checks if a new after link is available to inject into query params
APPENDS a NEW and unique $after query param. (old code simply appended an $after query parameter even if one already existed.)
JSON Serialize and then JSON Deserialize probably to get rid of some sort of unexpected formatting.

How was this change tested?
Added integration test to ensure nextLink creation doesn't regress and to exercise acquiring
the nextLink from subsequent pages. The test setup makes an initial request formed to invoke DAB to return
a nextLink in the response. The assertions occur on the 2nd request which uses the nextLink returned from
the first request:

Response is 200 -> 400 would indicate issue with query parameter payload
Ensures nextLink value different from the value returned on the first request used during test setup -> ensures
DAB is not recycling a single $after query parameter/nextLink value.
Ensures nextLink query parameter $after does not have a comma, which would indicate that parsing of the query
string detected two instance of the $after query parameter, which per dotnet behavior, concatenates the values and separates
them with a comma.
Ensure $after value is base64encoded and not URI encoded.

Sample request
As illustrated earlier:
GET https://localhost:5001/api/Bookmarks?$first=1

Use the nextLink returned to send a follow up pagination request:
GET https://localhost:5001/api/Bookmarks?$first=1&$after=W3siRW50aXR5TmFtZSI6IkJvb2ttYXJrcyIsIkZpZWxkTmFtZSI6ImlkIiwiRmllbGRWYWx1ZSI6MSwiRGlyZWN0aW9uIjowfV0=

/azp run


Refactor tracing handling for events

Inspired by #687, I thought some more tidying up of the log file was in order.
The main differences are:

Higher-scale spans exist for key operations
Something is always logged for each event, but less for high-density eventskey
Less is logged for high-density events
Key repeats are no longer treated as high density
We no longer do extra work if the hover and focus paths haven't changed (which also means less logging)

This PR does not depend on #687

Re-requested review as I've not actioned the comment for making the trace spans include the widget's id.


Add a Statsd Chrome app

What This Does:

Allows statsd to run in a chrome packaged app (the same type you would download from the chrome app store)
Uses pure chrome APIs, so node.js is never needed
Runs in chrome, so it's still using the V8 JavaScript engine, so performance is still great
Makes statsd very easily portable, since all it relies on is chrome
The actual interface in the app is specified in app.js, it shows some basic stats and an embedded graphite window, by default
But the great benefit of this method is that graphite will, in the future, no longer be required, since any browser JavaScript data visualization toolkit could be built as a backend right into the app

How It Does It:

While lots of code changes were necessary to make this work, this merge only includes them in source/ and bundle.js, so as not to pollute the main repo
Uses browserify to handle the conversion, with chrome-net and chrome-dgram handling the wrapping of chrome's networking APIs

Why It Does It:

This project was done to assist Ripple Labs in easy tracking and monitoring of data, but the code created is fully general.

Caveats:

While the bundled chrome app can be run out of the box as is without any additional installations, browserify is required for compiling a new version, if that is ever needed
Config editing has to be done inside bundle.js (or config.js if you are planning on re-bundling)--this is unfortunate, but no obvious workaround presented itself

For more information, including all the code that went into this, see:
https://github.com/evhub/statsd

Hi,
sorry for the long delay. This looks like a really cool thing. But I don't think this should be included in StatsD. It might spur some confusion and we don't have the capacity to maintain a Chrome app. StatsD really is supposed to work on a server type system. So making this a standalone Chrome app type project seems like the more reasonable solution to me.
Thanks,
Daniel


[amendment transaction] Trying to remove all the address line by giving this path "/address/0/line" we are getting 202

When we tried to remove all the address line by giving this path /address/0/line are getting 202 but according to YAML file the post town should not be erasable for amendment transaction, in this case could you please confirm we should get 202 or 400.
{
"nhsNumber": "9999999999",
"gpCode": "2750922,295",
"gpTradingPartnerCode": "TES5",
"healthcarePartyCode": "XX1",
"freeText": "NOW AT THE ARTHUR ANDREWS CENTRE",
"patches": [
{
"op": "remove",
"path": "/address/0/line"
}
]
}

This is described in the README as unsupported and an invalid scenario


Added target_group_arns to ASG configuration

Tried using the target_group_arns parameter of the ASG, but it didn't work for me. Hence, adding a single Target Group as an attachment. In case there is no Target Group specified to the module, it still works since it's an optional parameter.
This is regarding issue:
https://github.com/hashicorp/terraform-aws-consul/issues/69

I realized an issue with this solution is one may want to configure multiple Target Group's for ALB/NLB (NLB also uses target groups), e.g. one for HTTP (port 8500) and one for DNS (port 8600). In this case the 1 attachment of a single Target Group would not work.
Hence, I went back to my initial attempt to get target_group_arns argument on the ASG to work, and I figured out what I was doing wrong - I didn't pass the parameter as ["${param}] (note the square brackets). Submitting a commit with the change shortly...

Hm, we actually removed target_group_arns in https://github.com/hashicorp/terraform-aws-consul/pull/57. See discussion in https://github.com/hashicorp/terraform-aws-nomad/issues/19 as to why.

Well, the current code doesn't seem to work since once the infrastructure with an autoscaling_group_attachment is created if we run terraform apply again, we runs into:
Terraform v0.11.7
Terraform will perform the following actions:

  ~ module.prod_consul_1.module.consul_servers.aws_autoscaling_group.autoscaling_group
      target_group_arns.#:         "1" => "0"
      target_group_arns.842221997: "arn:aws:elasticloadbalancing:us-east-2:423487953385:targetgroup/my-lb-tg/2f4d7259f471d85a" => ""

Not sure I follow. Are you saying that:

You add an aws_autoscaling_attachment resource to your code.
Run apply.
The attachment is created and you're able to use the ALB to talk to Consul.
You run apply again and Terraform removes the attachment?

Here's what happened:

The code I was testing was using v0.2.2, which contains target_group_arns argument:
https://github.com/hashicorp/terraform-aws-consul/blob/0e5a7b15cc3b2cdf03201381696842c6f8310c38/modules/consul-cluster/main.tf
I added an aws_autoscaling_attachment in my code, which apparently created a conflict with this argument. Looking at the aws_autoscaling_attachment doc, they've mentioned the conflict with load_balancers argument, but probably forgot to note the target_group_arns argument.
When I looked at the terraform-aws-consul code, I should have looked at v0.2.2. Instead I looked at the latest code, and since the argument is already removed, I got the impression ASG attachments clash with the module, which is not true for v0.3.5 (latest).

I switched to v0.3.5 (latest), and the issue went away. Thank you for your help figuring this out!


Bugfix/spread data nav axis

Provide a better comprehension of the axis indexing provided with the scanners definition
Should Close #224
by properly defining the content of the subclassed method get_indexes_from_scan_index
See below for instance how redefining as such for 1D scan make the indexing coherent with the scan definition. Only 2Dscan: back and forth and spiral are defined differently to display the scan in a viewer2D and not in a spread ViewerND
class Scan1DBase(ScannerBase):
    params = []
    n_axes = 1
    distribution = DataDistribution['uniform']

    def __init__(self, actuators: List = None, **_ignored):
        super().__init__(actuators=actuators)

    def get_nav_axes(self) -> List[Axis]:
        return [Axis(label=f'{self.actuators[0].title}',
                     units=f'{self.actuators[0].units}',
                     data=np.squeeze(self.positions))]

    def get_scan_shape(self) -> Tuple[int]:
        return len(self.positions),

    def get_indexes_from_scan_index(self, scan_index: int) -> Tuple[int]:
        """To be reimplemented. Calculations of indexes within the scan"""
        return (scan_index,)

As for the sorting. I agree that this should be done separately, for instance on plotting. This is why this PR introduces a new action button on the Viewer1D. This feature can be easily tested from the new mockexamples instrument plugin: daq_1Dviewer_MockRandom, which generate a noisy gaussian with an axis being randomly generated in the gaussian range. Tis gives that:

and by clicking on the sort button, this gives that:

The correlation is that I removed the sort 1D option in the general DAQ_Scan settings.
Thanks for testing this

Test MockRandom with sorting:
Overlay does not act on the sorted values but on the unsorted ones.


How to list available I2C Controllers and Devices?

Hi,
I've been trying to understand how to use the I2C API to list all available I2C controllers in the system and, potentially, list all available I2C devices too by attempting to get a handle for each of valid addresses in each of the controllers. I have seen the existence of GetControllersAsync() within windows::Devices::I2c::I2cController, but that requires a provider of type TryInto<InParam<'a, II2cProvider>, Error = E0> which I can't understand how to create this argument.
Could someone provide an example showing how to properly use GetControllersAsync()?
Best regards

@jonwis do you know who can help with an API question?

The classes/interfaces you're working with are meant for I2C providers looking to expose devices/controllers via Windows.Devices.I2c WinRT APIs. It sounds like you want to find devices connected to the system instead.
use windows::Devices::{Enumeration::DeviceInformation, I2c::I2cDevice};

fn main() -> windows::core::Result<()> {
    futures::executor::block_on(main_async())
}

async fn main_async() -> windows::core::Result<()>
{
    let devices = DeviceInformation::FindAllAsyncAqsFilter(&I2cDevice::GetDeviceSelector()?)?.await?;

    let num_devices_found = devices.Size()?;
    println!("{num_devices_found} I2C devices found.");
    for i in 0..num_devices_found {
        let device = devices.GetAt(i)?;
        println!("[{i}] {}({})", device.Name()?, device.Id()?);
    }

    Ok(())
}

[package]
name = "app"
version = "0.0.0"
edition = "2018"
publish = false

[dependencies.windows]
version = "0.40.0"
features = [
    "Win32_Foundation",
    "Devices_Enumeration",
    "Devices_I2c",
    "Foundation_Collections",
]

[dependencies.futures]
version = "0.3"

If you need additional Windows API help, try posting on Microsoft Q&A at https://docs.microsoft.com/en-us/answers/topics/windows-api.html. There are engineers actively monitoring that.


Building vue3 project with vuelidate import error

Describe the bug
Hi,
I am sorry if this is not a bug in vite-ssg but im finding it very hard to know whats causing this issue. If you could point me in the right direction I would appreciate it 😃 .
I am using the following packages:
"vite-ssg": "^0.20.2",
"@vuelidate/core": "^2.0.0-alpha.43",
"@vuelidate/validators": "^2.0.0-alpha.31",
In a test.vue file I then import useVuelidate from "@vuelidate/core";.
Package.json contains: "type": "module",
When i try to build the project using: vue-tsc --noEmit && vite-ssg build
I get the following error:
.vite-ssg-temp/assets/style.9e50c03e.css             70.19 KiB
(node:47652) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)

[vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
(node:47652) UnhandledPromiseRejectionWarning: C:\...\node_modules\@vuelidate\core\dist\index.esm.js:1
import { isReactive, isReadonly, computed, unref, ref, watch, reactive, isRef, nextTick, inject, provide, getCurrentInstance, onBeforeMount, onBeforeUnmount } from 'vue-demi';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async build (file:///C:/.../node_modules/vite-ssg/dist/chunks/build.mjs:171:87)
    at async Object.handler (file:///C:/.../node_modules/vite-ssg/dist/node/cli.mjs:20:3)
(node:47652) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:47652) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:47652) UnhandledPromiseRejectionWarning: C:\...\node_modules\@vuelidate\core\dist\index.esm.js:1
import { isReactive, isReadonly, computed, unref, ref, watch, reactive, isRef, nextTick, inject, provide, getCurrentInstance, onBeforeMount, onBeforeUnmount } from 'vue-demi';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async build (file:///C:/.../node_modules/vite-ssg/dist/chunks/build.mjs:171:87)
    at async Object.handler (file:///C:/.../node_modules/vite-ssg/dist/node/cli.mjs:20:3)
(node:47652) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

Note that if i set the ssgOptions format to cjs it seems to work however I dont understand why when package.json is set to "type": "module".
ssgOptions: {
         script: "async",
         format: "cjs",
         onFinished() {
            generateSitemap();
         },
      },

Reproduction
Try using vuelidate with vite-ssg
System Info
System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 15.68 GB / 31.92 GB
  Binaries:
    Node: 14.20.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.5.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.77)
    Internet Explorer: 11.0.19041.1566

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
[X] The provided reproduction is a minimal reproducible of the bug.

Note that after adding format: "cjs", I am running into another error but on CI:
failed to load config from /root/project/.../vite.config.ts
error when starting dev server:
/root/project/.../node_modules/vite-plugin-windicss/dist/index.js:239
            ].join("\n").replace("__POST_PATH__", (((_a = config.server) == null ? void 0 : _a.origin) ?? "") + POST_PATH);
                                                                                ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/project/participant/vite.config.ts:31:43)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.require.extensions.<computed> [as .ts] (/root/project/participant/node_modules/vite/dist/node/chunks/dep-689425f3.js:62006:20)
npm ERR! code ELIFECYCLE

Ran into the similar issue while using npm, even without modification to any file directly after clone and "npm i" the build fails. Need to investigate the compatibility issue. Pointers are welcomed!

I have a similar issue which might be related. I am unable to build the app.
I have a fairly standard vitesse setup with dependencies up to date. In my case I am using an internal web component library which I tried both via CDN and pnpm install. I know it is SSG related because the same library builds fine on an out of the box npm init vue@latest setup
Here's my log:
[vite-ssg] Build for client...
vite v3.0.9 building for production...
✓ 440 modules transformed.
(node:14253) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
rendering chunks (62)...[vite:esbuild-transpile] Transform failed with 1 error:
assets/app.61dd79f9.js:18326:2: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)

Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
18324|
18325|  if ({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}.VITE_MSW_ENABLED === "true")
18326|    await __vitePreload(() => import('./browser.9a68372b.js'),true?"__VITE_PRELOAD__":void 0);
   |    ^
18327|  const routes = setupLayouts(routes$1);
18328|  ViteSSG(_sfc_main, { routes, base: "/" }, (ctx) => {

PWA v0.12.4
mode      generateSW
precache  6 entries (7.94 KiB)
files generated
  dist/sw.js
  dist/workbox-f51ab5e4.js

[vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
/usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:1605
  let error = new Error(`${text}${summary}`);
              ^

Error: Transform failed with 1 error:
assets/app.61dd79f9.js:18326:2: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
    at failureErrorWithLog (/usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:1605:15)
    at /usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:1394:29
    at /usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:666:9
    at handleIncomingPacket (/usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:763:9)
    at Socket.readFromStdout (/usr/local/apple/okapi-admin-app-next/node_modules/.pnpm/esbuild@0.14.48/node_modules/esbuild/lib/main.js:632:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 2,
        file: 'assets/app.61dd79f9.js',
        length: 5,
        line: 18326,
        lineText: `  await __vitePreload(() => import('./browser.9a68372b.js'),true?"__VITE_PRELOAD__":void 0);`,
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)'
    }
  ],
  warnings: [],
  frame: '\n' +
    '\x1B[33mTop-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)\x1B[39m\n' +
    '18324|  \n' +
    '18325|  if ({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}.VITE_MSW_ENABLED === "true")\n' +
    `18326|    await __vitePreload(() => import('./browser.9a68372b.js'),true?"__VITE_PRELOAD__":void 0);\n` +
    '   |    ^\n' +
    '18327|  const routes = setupLayouts(routes$1);\n' +
    '18328|  ViteSSG(_sfc_main, { routes, base: "/" }, (ctx) => {\n',
  loc: {
    column: 2,
    file: 'assets/app.61dd79f9.js',
    length: 5,
    line: 18326,
    lineText: `  await __vitePreload(() => import('./browser.9a68372b.js'),true?"__VITE_PRELOAD__":void 0);`,
    namespace: '',
    suggestion: ''
  },
  code: 'PLUGIN_ERROR',
  plugin: 'vite:esbuild-transpile',
  hook: 'renderChunk'
}

Node.js v18.7.0

Same error, I think it cause by vite@3.

Confirmed this breaks with latest version of<EMAIL_ADDRESS>

Interestingly when I add type: "module" to package.json it works.

@amir20 can you tell me where you added type: "module" , to which package.json ?

@dobromir-hristov See my change https://github.com/amir20/amir20.github.io/commit/834b7a86ee2417c53d2b7cb8f2161ba4ff0c2f69#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R5
I added it to my own package.json file. I also saw the error which suggested the same thing.

Needs reproduction.