Rule with regex does not properly replace built in rule

UnoCSS version
0.62.2
Describe the bug
Rule with regex does not properly replace built in rule. I took the example from docs
rules: [
  [/^grid$/, ([, d], { symbols }) => {
    return {
      [symbols.parent]: '@supports (display: grid)',
      display: 'grid',
    }
  }],
]

which doesn't actually work with grid, but does work with grid2 (a completely new rule).
Reproduction
play
System Info
No response
Validations

[X] Read the Contributing Guidelines.
[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 open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

This is actually how it works. Static rules are matched first for performance. In this case I guess it might be better to alter the merged config and remove the static one

I think either way is fine really (keeping static first for performance or having static/dynamic be the same level) but it should be mentioned in the docs somewhere.
Can the special symbols rule be a static rule and still use the symbols syntax? Aka this one:
[/^grid$/, ([, d], { symbols }) => {
    return {
      [symbols.parent]: '@supports (display: grid)',
      display: 'grid',
    }
  }],

If not I think replacing the static rule with the dynamic rule could be better for flexibility.

I had a problem with this again, I made a rule /^grid-area-(.?)$/ with grid-area: ${i} or something. This didn't do anything and I was a bit confused as to why, then I saw that grid-area-[] exists.
https://unocss.dev/interactive/?s=grid-area didn't show anything so I assumed it didn't exist, but noticed later it did, it shows up when searching for grid-area-[ in the interactive docs.
It's confusing because the rule I wrote doesn't work and there's no indication that I'm doing something wrong, in this case that grid-area- already exists.


Opening a file on windows crashes the program

Possibly this is an issue related to joining of paths as it gives the following error:
"stream did not contain valid UTF-8", src:main.rs:110:73

Seems to be fixed by 76239b289cee87b23bfff1e546ef7455c29ae908


Add UT to verify flavor template multipass

Adds tests coverage to verify that template vars are not resolved in the flavor processing since template multipass is the default template option. This allows downstream plugins to render additional vars that are not defined in the flavor plugin.
Signed-off-by: Steven Kaufer<EMAIL_ADDRESS>

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "flavor-template-mp-test" git@github.com:kaufers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353881184
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


Add per-sample flag to ignore sample for background database computation

Is your feature request related to a problem? Please describe.
Currently it is only possible to ignore entire projects for background database computation. While this allows ignoring data in test projects, there are use-cases, where samples need to be duplicated in multiple cases (analysis of a second index in the same family). The repeated samples from existing samples should not be included in the background database computation, whereas new samples should be.
Describe the solution you'd like
During case-creation a flag should exist, which can be used excluded individual samples from background database computation.
Describe alternatives you've considered
Cases with existing samples could be created in a separate project which is not included in background database computation. This would still not allow inclusion of new data in background database computation.
Additional context
Further in the future relatedness information in the form of a fingerprint should be made available to allow for more generalizable identification of duplicated samples.

This ticket is required for implementation necessary changes for fulfilling processing needs in the model initiative.

Can only be solved in the new data flows application.

Can be solved via case manifest attributes in imported phenopacket format.


Associations

I'm going to experiment with adding some purely client-side associations, which will aggregate data at query time:
import { useDocs, manyToMany } from "use-firestore"
import { getFirestore, query, collection, where } from "firebase/firestore"

const repos = useDocs(
  query(
    collection(getFirestore(app), "repos"),
    where("ownerId", "==", ownerId)
  ),
  manyToMany({
    field: "tagIds",
    collection: collection(getFirestore(app), "tags"),
  })
)

... and also some functions for deleting/dissociating docs:
await dissociateDocs(
  db,
  "tags",
  ["tag123"],
  manyToMany({
    collection: collection(getFirestore(app), "repos")
    field: "tagIds",
  })
)

After thinking about this a bit longer, I decided that there's not really any point in adding associations to queries because we can just use the Data Mapper Pattern to pretty efficiently get associated documents, and that's a lot simpler to maintain. This is implemented in #7.
Where we do need associations is in deletes, and so I added those in #8.
Therefore, closing this PR.


gulp watch, stylus and imports

Hi guys,
I got a problem with stylus importing  /app/app.styl. When I run the normal gulp default it builds the project correctly. But when I save a file and the watcher tries to build the css it give me this error.
Potentially unhandled rejection [2] Error: d:/project-path/node_modules/gulp-stylus/node_modules/stylus/lib/functions/index.styl:128:38
   124|
   125| // darken by the given amount
   126|
   127| darken(color, amount)
   128|   adjust(color, 'lightness', - amount)
---------------------------------------------^
   129|
   130| // lighten by the given amount
   131|

TypeError: expected rgba or hsla, but got ident:brand-primary
    at "& a:hover" (d:\project-path\app\layout\layout.styl:87:23)
    at ".sidebar-nav ul" (d:\jproject-path\app\layout\layout.styl:83:47)

the layout.styl imports the /app/app.styl... which defines some colors. I think this error happens because it does not import the app.styl in the watch cycle (just a guess).
Greetz
Jack10

ok sorry, with a path directing at a higher level folder you have to add the .styl ending at the import
@import "../app.styl"
...


Update babel coverage plugin

Continuation of #165 and #133.
@SethDavenport this should pass CI, but unfortunately istanbul is still not instrumenting all the files, even though it's supposedly configured to via .istanbul.yml. Still, this does bring the coverage plugin up to date so it will make greenkeeper happy for now.
Connected to rangle/rangle-starter#92.

Thanks @JaKXz


genpolicy sync with upstream [1/3]

Merge Checklist

[x] Followed patch format from upstream recommendation: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#patch-format

[x] Included a single commit in a given PR - at least unless there are related commits and each makes sense as a change on its own.

[x] Aware about the PR to be merged using "create a merge commit" rather than "squash and merge" (or similar)
[x] genPolicy only: Ensured the tool still builds on Windows
[x] genPolicy only: Updated sample YAMLs' policy annotations, if applicable
[x] The upstream-missing label (or upstream-not-needed) has been set on the PR.

Summary

genpolicy sync with upstream [1/3]
Test Methodology

https://dev.azure.com/mariner-org/mariner/_build/results?buildId=547078&view=ms.vss-test-web.build-test-results-tab [pass]

Good for merge once required checks pass


Add support for precompiled contracts

What was wrong?
The current implementation of message call doesn't handle the execution of precompiled smart contracts.
How can it be fixed?
The following section from the frontier yellow paper needs to be implemented.

As part of this implement at least one of the precompile for successful testing.

I went through some of the basic test fixtures for precompiles and it seems like to implement this I need Opcodes CALLCODE implemented to test it successfully. This issue depends on #230.


Add Catomic Bomb card

Remove the exploding kittens from the deck. Shuffle the deck. Put all the kittens face down on top. Your turn ends after playing this card.

This PR adds the Catomic Bomb card to the deck. There is only one copy of this card in the game, regardless of the amount of players.
When drawn the deck is shuffled, all remaining exploding kittens are put at the top and the player's turn is ended.
For this I also changed how Skip works. Before it would throw an error which was caught to end the turn. I've switched this to a variable, because throwing an error terminates the call activity. As a result any changes done to the deck are not propagated to the parent process.

@remcowesterhoud awesome. :tada: I love your contributions. :rocket:


FastReport.OpenSource.Web  Printable

in FastReport.OpenSource.Web, I want to display TextObject or other when preview and hide it when printing.
So I wrote the following code in PrintService:
// 定义事件处理程序方法
private void HtmlExport_CustomDraw(object sender, FastReport.Export.Html.CustomDrawEventArgs e)
{
    // 自定义绘制逻辑
    if (!e.reportObject.Printable)
    {
        e.css = string.Empty;
        e.html = string.Empty;
        e.done = true;
    }
}

private byte[] PrintHtml(WebReport webReport)
{
    webReport.PictureCache.Clear();

    using (var htmlExport = new HTMLExport())
    {
        htmlExport.CustomDraw += HtmlExport_CustomDraw;
       .....
    }
}

Is there any other way to implement it?

Hello!
To solve your problem, you can use the Printable property of your TextObject in the following way:
TextObject text1 = report1.FindObject(‘Text1’) as TextObject;
text1.Printable= false;

Best regards,
Bogdan


Autofill a choices single select

I'm trying to use the wonderful Choices for a credit card payment page and/or address page. Is there a way to have the autofill enabled?
Thanks!

Hey @thejmsill,
Are you using a text input or a select box for the credit card/address fields?
Thanks

I was using select box ... typically it's the date, country or province/state dropdowns.

Using setValueByChoice should achieve what you're looking for!

@jshjohnson I am wondering if this has to do with the browser autofill? I am having the issue where I select an address from the browser autofill and it does not update the select box for state/province or country for that matter.

Would love to see this supported.

You're right; it's being caused by browser autofill. Without disabling autocomplete entirely on inputs, I'm not sure of a clean solution to this problem 👎

@jshjohnson I'd like to bring up this issue again as its a big cause for concern for our usage of Choices.js and almost a deal breaker.  Choices.js is perfect for us except this one issue.
You can see by the following screen recording that I believe this is a simple fix: http://cloud.supportally.com/163g1T2X1907
I believe only two (simple) things need to be done to make this work:

All the options need to be added to the select box whether they are selected or not.  Adding a custom template for those options would be good as well.
Choices.js needs to listen to the changes on that select box and trigger the appropriate selection methods to change the selected items.

Thoughts?

 Will provide updates soon

Thanks @jshjohnson! I was able to get a workaround by using some custom Javascript to follow my two steps above and its working for me now. but would be nice if it was native :)

sorry for the bump but i agree with @benjaminprojas I never understood why choices felt the need to clear out the original select instead of just setting the selection to the right option in the background

I'm looking to solve this same issue.

@jshjohnson @SampsonCrowley @ingmferrer
Sorry for the delay in writing back about this! This is how I implemented it:
First, when I initialize the dropdown, I add the callbackOnInit option.
let states = new Choices($('.states')[0], {
	itemSelectText: '',
	shouldSort: false,
	placeholder: true,
	placeholderValue: 'Choose State',
	removeItems: true,
	search: true,
	callbackOnInit: choicesInitCallback
});

My callback function basically adds all the options that were removed back in and looks like this:
choicesInitCallback() {
	resetSelect(this);
}

resetSelect = (choices) => {
	let html = '',
		selected = '';

	$.each(choices.choiceList.children, function(i, v) {
		selected = $(v).data('value') == $(choices.element).val() ? ' selected' : '';
		html += '<option value="' + $(v).data('value') + '"' + selected + '>' + $(v).text().trim() + '</option>';
	});
	$(choices.element).html(html);
}

Then I needed to detect the auto fill changing the element and update it in Choices as well as reset the select once that has finished:
$('.states').on('change', onSelectStateChange);
onSelectStateChange = (event) => {
	states.setValue([
		{
			value: $(event.target).val(),
			label: $(event.target).find('option[value="' + $(event.target).val() + '"]').text()
		}
	]);
	resetSelect(states);
}

It's been a while since I did this, so things may have changed, but I hope that helps!

I had to end up writing my own components for this functionality. It's a MUCH more complicated issue than it looks like at the surface. If I don't forget, I'll post the way I solved this later


Allows user to change color theme of page and fixes code indentation.

This PR includes the content of the other PRs so I'm not sure what's different.
Consider using separate feature branches instead of piling everything into one branch.

This PR includes the content of the other PRs so I'm not sure what's different.
Consider using separate feature branches instead of piling everything into one branch.

Meagan and I discussed this and decided it would be best to just make everything one big CL (thus abandoning #4) for now. We'll work on making things more refined in future.


Suspend via button pressing and third-party apps on RM2 problems

Describe the bug
There as some issue related to suspend mode.
Issue no 1
** To Reproduce **

Open KORader / Xochitl
Wait for suspend.
Press Power button
KOReader / Xochitl is in the suspend mode
It's hard to wake it up, since pressing button causes suspend from oxide
Pressing power button multiple times sometimes help

Issue no 2
To Reproduce

Press Power button
Press Power button again
The device is not resumed.

Expected behavior
This has about 30% reproduction rate.
The device should be resumed
Screenshots
If applicable, add screenshots to help explain your problem.
Version Information:

Device: RM2
OS: 2.5
Version 2.1.x

Additional context
Add any other context about the problem here.

Could this be #97?

Could this be #97?

@Witos Can you confirm that issue 2 is resolved in the v2.1 release?

@Witos Can you confirm that issue 2 is resolved in the v2.1 release?

@Eeems , no change - it didn't help.

@Eeems , no change - it didn't help.

That's very odd. So it's not the same problem I was having with slow resume on the rM1, as that would eventually wake up and was due to wifi pinging blocking the main thread.

That's very odd. So it's not the same problem I was having with slow resume on the rM1, as that would eventually wake up and was due to wifi pinging blocking the main thread.

@Eeems , when 2.1 arrives in Stable i will update and grab some system logs.

@Eeems , when 2.1 arrives in Stable i will update and grab some system logs.

Should be the next merge window, so next week.

Should be the next merge window, so next week.

If this is the same issue I'm having, systmecl restart tarnish also is a stopgap resolution

If this is the same issue I'm having, systmecl restart tarnish also is a stopgap resolution

This was reported before the lockscreen was added I believe.

This was reported before the lockscreen was added I believe.

Is this a lockscreen issue? I'm not running into it on system restart, just on button press after suspend

Is this a lockscreen issue? I'm not running into it on system restart, just on button press after suspend

Is this a lockscreen issue? I'm not running into it on system restart, just on button press after suspend

No, this seems unrelated from initial information.

Is this a lockscreen issue? I'm not running into it on system restart, just on button press after suspend

No, this seems unrelated from initial information.

Should I create a new issue with what I'm observing and put the logs there? I'm on testing right now so I have 2.1

Should I create a new issue with what I'm observing and put the logs there? I'm on testing right now so I have 2.1

Should I create a new issue with what I'm observing and put the logs there? I'm on testing right now so I have 2.1

Is what you are seeing different than https://github.com/Eeems/oxide/issues/142?

Should I create a new issue with what I'm observing and put the logs there? I'm on testing right now so I have 2.1

Is what you are seeing different than https://github.com/Eeems/oxide/issues/142?

I am getting much surprising behavior around sleep and restart, such as splash screens largely not appearing ever since transitioning to oxide as main launcher, and poweroff resetting Oxide's sleep configuration. Been assuming it is all part of this issue.

I am getting much surprising behavior around sleep and restart, such as splash screens largely not appearing ever since transitioning to oxide as main launcher, and poweroff resetting Oxide's sleep configuration. Been assuming it is all part of this issue.

Yes-- rather than just not being able to interact with the screen, no icons appear

Yes-- rather than just not being able to interact with the screen, no icons appear

Yes-- rather than just not being able to interact with the screen, no icons appear

And you have a pin set on the lockscreen?

I am getting much surprising behavior around sleep and restart, such as splash screens largely not appearing ever since transitioning to oxide as main launcher, and poweroff resetting Oxide's sleep configuration. Been assuming it is all part of this issue.

On v2.1?

Yes-- rather than just not being able to interact with the screen, no icons appear

And you have a pin set on the lockscreen?

I am getting much surprising behavior around sleep and restart, such as splash screens largely not appearing ever since transitioning to oxide as main launcher, and poweroff resetting Oxide's sleep configuration. Been assuming it is all part of this issue.

On v2.1?

No pin set on the lockscreen-- apologies for burying the lede a bit there, I just know there were previous issues with pinless things, hence why I asked

No pin set on the lockscreen-- apologies for burying the lede a bit there, I just know there were previous issues with pinless things, hence why I asked

No pin set on the lockscreen-- apologies for burying the lede a bit there, I just know there were previous issues with pinless things, hence why I asked

So that would be #142, which is documented in the release notes with the recommended work around (Set a pin).

No pin set on the lockscreen-- apologies for burying the lede a bit there, I just know there were previous issues with pinless things, hence why I asked

So that would be #142, which is documented in the release notes with the recommended work around (Set a pin).

I have these same issues. There are also sometimes visual artifacts in the form of parts of the screen persisting when the device sleeps while Xochitl is running.

I have these same issues. There are also sometimes visual artifacts in the form of parts of the screen persisting when the device sleeps while Xochitl is running.

I have these same issues. There are also sometimes visual artifacts in the form of parts of the screen persisting when the device sleeps while Xochitl is running.

What version of Oxide?

I have these same issues. There are also sometimes visual artifacts in the form of parts of the screen persisting when the device sleeps while Xochitl is running.

What version of Oxide?

it was the latest one from the release page -- I don't know how to get the version number; will e.g. "oxide --version" do that?

it was the latest one from the release page -- I don't know how to get the version number; will e.g. "oxide --version" do that?

Unfortunately no. The only way to get the version information is to use a toltec package and check opkg list-installed. Or to know what it was that you installed.

Unfortunately no. The only way to get the version information is to use a toltec package and check opkg list-installed. Or to know what it was that you installed.

ok, I see you just built 2.1.2 a few days ago -- I am 90% sure I had 2.1.1 installed. (am currently in the process of getting rid of all the 2.1.1 related files so I can install 2.1.2 via opkg to see if things are fixed)

ok, I see you just built 2.1.2 a few days ago -- I am 90% sure I had 2.1.1 installed. (am currently in the process of getting rid of all the 2.1.1 related files so I can install 2.1.2 via opkg to see if things are fixed)

Same issues, specifically that when you come back from sleep, if it has been at least a few seconds, the screen stays on "reMarkable is sleeping." If you hit the power button again it does the black/white flash screen refresh to go back to sleeping mode, so something is happening when you try to "wake" it. It does not appear to turn its wifi back on when you "faux wake" it like this, though. I know this mostly because I cannot connect back to ssh.
Additionally I'm having a problem where ssh is unresponsive unless I tap the screen, when it starts responding again with whatever tried to last get it to do, but it is immediately unresponsive again unless I tap the screen again.

Same issues, specifically that when you come back from sleep, if it has been at least a few seconds, the screen stays on "reMarkable is sleeping." If you hit the power button again it does the black/white flash screen refresh to go back to sleeping mode, so something is happening when you try to "wake" it. It does not appear to turn its wifi back on when you "faux wake" it like this, though. I know this mostly because I cannot connect back to ssh.
Additionally I'm having a problem where ssh is unresponsive unless I tap the screen, when it starts responding again with whatever tried to last get it to do, but it is immediately unresponsive again unless I tap the screen again.

Additionally I'm having a problem where ssh is unresponsive unless I tap the screen, when it starts responding again with whatever tried to last get it to do, but it is immediately unresponsive again unless I tap the screen again.

SSH over wifi or USB?

Same issues, specifically that when you come back from sleep, if it has been at least a few seconds, the screen stays on "reMarkable is sleeping." If you hit the power button again it does the black/white flash screen refresh to go back to sleeping mode, so something is happening when you try to "wake" it. It does not appear to turn its wifi back on when you "faux wake" it like this, though. I know this mostly because I cannot connect back to ssh.

:( I can't replicate this on my device, so I'm not really sure what is happening. I'll try doing a reinstall again later to see if I can replicate it. Otherwise I'll need some help from someone who can replicate and debug it. Perhaps @Witos?

Additionally I'm having a problem where ssh is unresponsive unless I tap the screen, when it starts responding again with whatever tried to last get it to do, but it is immediately unresponsive again unless I tap the screen again.

SSH over wifi or USB?

Same issues, specifically that when you come back from sleep, if it has been at least a few seconds, the screen stays on "reMarkable is sleeping." If you hit the power button again it does the black/white flash screen refresh to go back to sleeping mode, so something is happening when you try to "wake" it. It does not appear to turn its wifi back on when you "faux wake" it like this, though. I know this mostly because I cannot connect back to ssh.

:( I can't replicate this on my device, so I'm not really sure what is happening. I'll try doing a reinstall again later to see if I can replicate it. Otherwise I'll need some help from someone who can replicate and debug it. Perhaps @Witos?

I have gotten this behavior once since upgrading to 2.1 (more identifiable with @jdkruzr 's comments than the OP). If it comes up again i'll grab system logs.

I have gotten this behavior once since upgrading to 2.1 (more identifiable with @jdkruzr 's comments than the OP). If it comes up again i'll grab system logs.

I have gotten this behavior once since upgrading to 2.1 (more identifiable with @jdkruzr 's comments than the OP). If it comes up again i'll grab system logs.

which system logs would be useful, do you think? I'd like to give it a shot after the next revision (am using remux for now).
@Eeems this was over WiFi.

I have gotten this behavior once since upgrading to 2.1 (more identifiable with @jdkruzr 's comments than the OP). If it comes up again i'll grab system logs.

which system logs would be useful, do you think? I'd like to give it a shot after the next revision (am using remux for now).
@Eeems this was over WiFi.

which system logs would be useful, do you think? I'd like to give it a shot after the next revision (am using remux for now).

journalctl -u tarnish

which system logs would be useful, do you think? I'd like to give it a shot after the next revision (am using remux for now).

journalctl -u tarnish

Ad. Issue no. 1
I had suspend option turned off via koreader settings. I discovered that it was triggered anyway - I don't know whether I used the setting wrong or there is a bug in koreader. Regardless - turning autosuspend plugin via koreader's "Plugin management" menu solved the problem.

Time to open an issue with KOReader?

I had the same problem, only KOReader it seems. I fixed the issue by remapping the button like so:
cat /opt/koreader# cat /opt/koreader/settings/event_map.lua
return {
    [116] = "noop",
 }

I had the same problem, only with KOReader it seems. I fixed the issue by remapping the button like so:
cat /opt/koreader/settings/event_map.lua
return {
    [116] = "noop",
 }

It works for me, the problem confused me a lot. By the way, for KOReader version 2021.07, the "event_map.lua" located at "/opt/koreader/frontend/device/remarkable/event_map.lua"

I love you all, having a work around for this is (no exaggeration) the best thing that's ever happened to anyone i'll stand by it. thank you!

I had suspend option turned off via koreader settings. I discovered that it was triggered anyway - I don't know whether I used the setting wrong or there is a bug in koreader. Regardless - turning autosuspend plugin via koreader's "Plugin management" menu solved the problem.

Time to open an issue with KOReader?

Just found this thread. But I think I opened this issue a few days ago! https://github.com/koreader/koreader/issues/8891
@Witos could you please elaborate on how you fixed this issue in KOReader with plugins?

Could this be related to this code in KOReader?
https://github.com/koreader/koreader/blob/3e78847c46d54e497fc3b1fce0febd96d0d2f65c/frontend/device/remarkable/device.lua#L185-L195
I notice the resume() function is empty..

Part of it is because Oxide handles its own automatic suspend, as well as suspending when the power button is pressed. It doesn't make sense to have applications that Oxide is running to also handle power, which is where the issue is. That said the main issue here is that the power button is not supposed to pass events to other applications. This works on the rM1, but on the rM2 the driver for the button is still passing events even though the interface is grabbed.

Thanks for the explanation! Sounds like an issue that can be fixed within Oxide, as well as on KOReader's side (which I've started: https://github.com/koreader/koreader/pull/8900#issuecomment-1066234034)

It's actually not an issue that can be fixed within Oxide that I'm aware of. It's a bug with the evdev device handling input on the rM2.

Yes, in case of rm2 applications that are handling the power button by itself (oxide, koreader, xochitl and other) are conflicting.

The compositor handles this with input handling now.


global refactoring to enhance consistency

Refactored all translators
Moved some logic to the BaseTranslator for reusability
Simplified code for the child translators
removed redundant code

@Vincent-Stragier I did some refactoring to make the code more consistent. Basically, all translators inherit now from the BaseTranslator, which makes more sense. Furthermore, I tried to solve the problem we discussed, about the engine variable. I implemented a straightforward solution since all translators are now children of BaseTranslator.
I thought you may find it interesting that's why I'm mentioning you here. I will wait before merging this PR in case you want to review it ;)


[Feature]: Audio Player in table

Is there an existing issue for this?

[X] I have searched the existing issues

Summary
I have the url of audio files. If I go to the url, it would show the audio player.
It would be nice to play the audio directly from the table rows. (Play , pause, etc on the row itself)
Why should this be worked on?
It would make the table more useful.

@AdithyaSanjay This will be convenient for the user for sure, thanks for the feature request.
Suggestion:
For now why dont you use the audio widget and use the table widget selected row to auto play the audio? Would that be a better UX for you?

Sure, that's a good idea too. I'll try it out. And thank you for accepting
my request. 😊
On Thu, 8 Sep, 2022, 12:51 pm Somangshu Goswami, @.***>
wrote:

@AdithyaSanjay https://github.com/AdithyaSanjay This will be convenient
for the user for sure, thanks for the feature request.
Suggestion:
For now why dont you use the audio widget and use the table widget
selected row to auto play the audio? Would that be a better UX for you?
—
Reply to this email directly, view it on GitHub
https://github.com/appsmithorg/appsmith/issues/16602#issuecomment-1240326411,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZ2FXTLH4T5C5QTBD2LJHKDV5GHV3ANCNFSM6AAAAAAQGO4MAA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Tight loop while trying too manage consistencyTest topic

Please use this to only for bug reports. For questions or when you need help, you can use the GitHub Discussions or use the community Slack chat.
Describe the bug
The test suite sometimes gets itself into a state where it logs the following ad nauseam.
2023-09-20 23:06:10 WARN  io.kroxylicious.testing.kafka.common.Utils:214 - Failed to create topic: __org_kroxylicious_testing_consistencyTest due to org.apache.kafka.common.errors.TimeoutException: The AdminClient thread is not accepting new calls.

The following stack trace is also logged regularly and is probably more indicative of the underlying cause.
2023-09-20 23:08:33 WARN  io.kroxylicious.testing.kafka.common.Utils:146 - Unexpected failure describing topic: __org_kroxylicious_testing_consistencyTest due to org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics
java.util.concurrent.CompletionException: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: describeTopics
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194) ~[?:?]
	at org.apache.kafka.common.internals.KafkaCompletableFuture.kafkaCompleteExceptionally(KafkaCompletableFuture.java:49) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.common.internals.KafkaFutureImpl.completeExceptionally(KafkaFutureImpl.java:130) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.common.KafkaFuture.lambda$allOf$2(KafkaFuture.java:93) ~[kafka-clients-3.5.1.jar:?]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194) ~[?:?]
	at org.apache.kafka.common.internals.KafkaCompletableFuture.kafkaCompleteExceptionally(KafkaCompletableFuture.java:49) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.common.internals.KafkaFutureImpl.completeExceptionally(KafkaFutureImpl.java:130) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient.lambda$completeAllExceptionally$1(KafkaAdminClient.java:420) ~[kafka-clients-3.5.1.jar:?]
	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1787) ~[?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient.completeAllExceptionally(KafkaAdminClient.java:420) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient.completeAllExceptionally(KafkaAdminClient.java:409) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient.access$3000(KafkaAdminClient.java:298) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$5.handleFailure(KafkaAdminClient.java:2005) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$Call.handleTimeoutFailure(KafkaAdminClient.java:851) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$Call.fail(KafkaAdminClient.java:817) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$TimeoutProcessor.handleTimeouts(KafkaAdminClient.java:947) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.timeoutPendingCalls(KafkaAdminClient.java:1026) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.processRequests(KafkaAdminClient.java:1380) ~[kafka-clients-3.5.1.jar:?]
	at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1344) ~[kafka-clients-3.5.1.jar:?]
	at java.lang.Thread.run(Thread.java:1623) [?:?]

To Reproduce
Steps to reproduce the behavior:

Use kroxylicious-junit5-extension like this ... /shrug
Run command 'mvn verify'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Logs
Attach or copy and paste relevant logs.
Additional context
Add any other context about the problem here.

The test run eventually finished with:
[ERROR] Failures:
[ERROR]   TemplateTest$Versions.afterAll:180 expected: <[latest-kafka-3.4.0, latest-kafka-3.1.2, latest, latest-kafka-3.2.3]> but was: <[]>
[ERROR] Errors:
[ERROR]   StaticFieldSubclassExtensionTest » ConditionTimeout Condition with io.kroxylicious.testing.kafka.common.Utils was not fulfilled within 2 minutes.
[ERROR]   TemplateTest$Versions.testVersions(TestcontainersKafkaCluster)[1] » ParameterResolution Failed to resolve parameter [io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster cluster] in method [public void io.kroxylicious.testing.kafka.junit5ext.TemplateTest$Versions.testVersions(io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster)]: Condition with io.kroxylicious.testing.kafka.common.Utils was not fulfilled within 2 minutes.
[ERROR]   TemplateTest$Versions.testVersions(TestcontainersKafkaCluster)[2] » ParameterResolution Failed to resolve parameter [io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster cluster] in method [public void io.kroxylicious.testing.kafka.junit5ext.TemplateTest$Versions.testVersions(io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster)]: Condition with io.kroxylicious.testing.kafka.common.Utils was not fulfilled within 2 minutes.
[ERROR]   TemplateTest$Versions.testVersions(TestcontainersKafkaCluster)[3] » ParameterResolution Failed to resolve parameter [io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster cluster] in method [public void io.kroxylicious.testing.kafka.junit5ext.TemplateTest$Versions.testVersions(io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster)]: Condition with io.kroxylicious.testing.kafka.common.Utils was not fulfilled within 2 minutes.
[ERROR]   TemplateTest$Versions.testVersions(TestcontainersKafkaCluster)[4] » ParameterResolution Failed to resolve parameter [io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster cluster] in method [public void io.kroxylicious.testing.kafka.junit5ext.TemplateTest$Versions.testVersions(io.kroxylicious.testing.kafka.testcontainers.TestcontainersKafkaCluster)]: Condition with io.kroxylicious.testing.kafka.common.Utils was not fulfilled within 2 minutes.
[INFO]
[ERROR] Tests run: 43, Failures: 1, Errors: 5, Skipped: 0

Which suggests the test containers integration was failing but we aren't handling that effectively

I also see
2023-09-20 23:12:11 ERROR tc.quay.io/ogunalp/kafka-native:latest-kafka-3.2.3:552 - Could not start container
java.lang.RuntimeException: java.io.IOException: Broken pipe
	at com.github.dockerjava.zerodep.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:195) ~[docker-java-transport-zerodep-3.3.3.jar:?]
	at com.github.dockerjava.zerodep.ZerodepDockerHttpClient.execute(ZerodepDockerHttpClient.java:8) ~[docker-java-transport-zerodep-3.3.3.jar:?]
	at org.testcontainers.dockerclient.HeadersAddingDockerHttpClient.execute(HeadersAddingDockerHttpClient.java:23) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.post(DefaultInvocationBuilder.java:124) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateNetworkCmdExec.execute(CreateNetworkCmdExec.java:27) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.CreateNetworkCmdExec.execute(CreateNetworkCmdExec.java:12) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.Network$NetworkImpl.create(Network.java:100) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.Network$NetworkImpl.getId(Network.java:64) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.GenericContainer.applyConfiguration(GenericContainer.java:891) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:390) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:356) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81) ~[duct-tape-1.0.8.jar:?]
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:346) ~[testcontainers-1.19.0.jar:1.19.0]
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:334) ~[testcontainers-1.19.0.jar:1.19.0]
	at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1623) [?:?]
Caused by: java.io.IOException: Broken pipe

Which lends further wait to problems with the cluster not being properly propagated.

I'll take a look.   Anything interesting in the container logs?

Can't reproduce it yet.   Could this have been related to a slow pull of the new image?

No I didn't get the container logs.
It not deterministic for me but I have seen it a few times.

I also see
2023-09-20 23:12:11 ERROR tc.quay.io/ogunalp/kafka-native:latest-kafka-3.2.3:552 - Could not start container
java.lang.RuntimeException: java.io.IOException: Broken pipe

Are you running under podman?  Are you applying?
https://github.com/kroxylicious/kroxylicious-junit5-extension/blob/main/DEV_GUIDE.md#podmantestcontainers-incompatibility

I finally got a failure.  If took several hours to appear.
2023-09-21 13:53:30 WARN  ForkJoinPool.commonPool-worker-3 io.kroxylicious.testing.kafka.common.Utils:214 - Failed to create topic: __org_kroxylicious_testing_consistencyTest due to org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: createTopics
TimeoutException is a RetriableException so that might explain the loop.
I wonder if we are leaking an admin client, or the loop within createTopics is continuing even though the client is closed?

Yeah, the admin client produces an exception with this message after the client is closed.   It seems bizarre for it to use a RetriableException.   The client isn't going to come back to life.    This seems like a very odd choice for the Kafka Client.
Short term, I think we special case based on this exception message.
I think the looping is probably a secondary cause.  I guess we are still looking for a root cause your initial failure.
    void call(Call call, long now) {
        if (hardShutdownTimeMs.get() != INVALID_SHUTDOWN_TIME) {
            log.debug("The AdminClient is not accepting new calls. Timing out {}.", call);
            call.handleTimeoutFailure(time.milliseconds(),
                new TimeoutException("The AdminClient thread is not accepting new calls."));
        } else {
            enqueue(call, now);
        }
    }

@SamBarker I only saw one test failure that looks like yours today, despite running in a loop for most of the day.  I did keep  seeing #183, but haven't investigated that yet.  I curious what you see with my PR.  I suspect that in your case the topic creation loop will be a secondary issue, and there will be a root cause failure that is still to be understood/dealt with.

@SamBarker I only saw one test failure that looks like yours today, despite running in a loop for most of the day. I did keep seeing #183, but haven't investigated that yet. I curious what you see with my PR. I suspect that in your case the topic creation loop will be a secondary issue, and there will be a root cause failure that is still to be understood/dealt with.

The topic creation loop is definitely a symptom yes.

Are you running under podman? Are you applying?
Yes, podman and apparently no it had been reverted :(

So that is probably the root cause.

Ok, so I think the createTopic loop still deserves to be fixed.

Nice find @k-wall ! Yes, it's definitely a bug in adminClient. I've filed KAFKA-15507 and see if anyone is interested in picking it up. Otherwise, I'll fix that later when available.


[BUG] AntdShowInferencer with custom id column name

Describe the bug
Currently, I have  to specify a custom id column name like this to the ShowInferencer:
<AntdShowInferencer meta={{
    currencies: {
      default: {
        idColumnName: "code",
      }
    }
  }} />

It doesn't take the idColumnName from meta in Refine component which I would assume it would be the correct way.
Steps To Reproduce

Set up Show route for a resource that has a different primary key than id
Use AntdShowInferencer

Expected behavior
I would expect that the ShowInferencer will take the meta property from the resources definition into account.
Screenshot
No response
Desktop
No response
Mobile
No response
Additional Context
No response

@aliemir I noticed that useOne also doesn't respect the idColumnName of the resource. Maybe that's the root of the issue?

Hey @jaulz, could be it. What is the version of your data provider? Btw, meta.idColumnName only implemented in @refinedev/supabase. If you happen to use any other data provider packages, you'll need to customize it to support meta.idColumnName or any other meta you wish to use. To customize the data provider, you can use the swizzle command

Hey @jaulz, interesting issue. I've checked with Antd Inferencer and others using the latest @refinedev/inferencer and @refinedev/supabase, inferencer successfully propagated meta values to the hooks and also generated the correct code (included the meta.idColumnName) and checked the requests which are also respected meta.idColumnName.
Can you share an example code + your network requests for both useOne and AntdInferencer for us to investigate your issue?

@aliemir here you go with the example. That's the corresponding table:

For this example I also added the id column so I could check that it works at all.

Thank you for the repro @jaulz, I will check it and get back to you as soon as possible.

@aliemir thanks for the detailed feedback and the explanation! 😊 For the time being, I can live with it but it might definitely be helpful for others as well.


✍ @Kendall's Blog : Learning PostgreSQL on the Fly: Building and Integrating Tables, Models, and Migrations Using Knex

📰 Dec 8th have rough draft in

Mentor reviews by 12/15

Dec 15th-20th turn in final draft

📋 Title: Learning PostgreSQL on the Fly: Building and Integrating Tables, Models, and Migrations Using Knex
Requirements
Questions to consider:

Who’s reading this? Where are they in your dev journey? What do they need to know before they can dive into this story?
Developers that are beginners to using/working with Postgres, those who are interested in working on Open Source projects but feel intimidated, those looking to learn new technologies but feel overwhelmed or daunted by it.
If people could leave with just one action, what would it be?
It's good to put yourself in challenging situations, as sometimes that's the best way to learn and grow. Also, most things aren't as difficult as they seem. Sometimes we stop ourselves from taking on something new because we think it will be too difficult or hard, but in reality it never is that bad.
Were there surprises or alternative problem solving you want to give a heads up to?
My surprise laid in the fact that the task I completed was not as difficult as I anticipated and I learned a great deal from completing it. It gave me the confidence moving forward knowing that if I want to learn a new technology, it is not so bad and it is helpful to learn by doing.

Outline

Introduction

Brief overview of the open source project and the specific issue/task undertaken.
Mention the unfamiliarity with PostgreSQL and the need to learn on the go.

Getting Started with PostgreSQL

Experience delving into PostgreSQL documentation for the first time.
Discuss initial challenges and key takeaways from the documentation.

Navigating the Codebase

Exploring the existing codebase to understand the context of the project.
How studying other tables in the codebase helped in guiding the process.

Utilizing Knex for Database Migrations

Introduction to Knex and its role in managing database migrations.
Learning how to set up and use Knex to create tables and schema.

Collaboration and Feedback

The importance of collaboration in an open source environment.
Working alongside other developers, seeking feedback on pull requests.
It's OK to ask for help!

Lessons for First-Time Contributors

Encouraging other first-time contributors with practical advice.
Sharing insights gained from the learning process.

Conclusion

Sometimes the best growth and learning comes from throwing yourself in unfamiliar waters.
Most things are not as difficult as we make them out to be.
Reinforcing the importance of continuous learning and adaptability in open source contributions.

References

Postgres documentation
Knex documentation
Amplify github repo

📰 Blog Rough draft: Format into a google doc
Questions to answer across draft

Why is this helpful for a reader?
What problem does this help them solve?
What kind of experience should the reader have or that you will provide so they’re up to speed
What larger problem is this solving?
Were there other ways of solving this problem - what made you choose the one that you did?
What were the positive tradeoffs? (Did it save time? Save hours? Was more secure?)
What is the best way to present the content (i.e. code snippets, graphics) ?
What additional resources can they provide the reader if they want more information?
Is there a call to action?

To do: when you complete the requirements, add "draft ready" label on your issue

[x] intro paragraph
[x] context of Amplify
[x] paragraph on problem
[x] paragrph compare your solution
[x] paragraph impact your solution
[x] Less than 600 words
[x] Drop link to your google doc (with permissions for edits) in review issue

Thanks @ktrudickm . When you get a chance update the ticket with your blog topic. I'm happy to take a look if you want

@unnamedrd Where/how do I update the ticket with my topic?

Okay thanks @unnamedrd! I'm not sure why, but the gear is not showing up for me.

@unnamedrd @Alex-is-Gonzalez Here is my rough draft: https://docs.google.com/document/d/1KQ7V3yNg99XKal-f5J39BAh1-RPgtZ0hpyMt0oh8704/edit?usp=sharing

@unnamedrd @Alex-is-Gonzalez  Here is my rough draft! https://docs.google.com/document/d/1KQ7V3yNg99XKal-f5J39BAh1-RPgtZ0hpyMt0oh8704/edit?usp=sharing
Feel free to add any feedback 😄
I also don't have the ability to add/change tags for this so if someone could change this to draft-ready that would be super helpful!

@Alex-is-Gonzalez @unnamedrd Also, here is the completed medium post: https://medium.com/@ktrudickm/learning-postgresql-on-the-fly-building-and-integrating-tables-models-and-migrations-using-knex-07c4c942f062

@ktrudickm not sure if you got a notification but there are some edits in there for you. :-)

@unnamedrd thank you for the edits! I went ahead and revised the file. Here is the link to the Medium post: https://medium.com/@ktrudickm/learning-postgresql-on-the-fly-building-and-integrating-tables-models-and-migrations-using-knex-07c4c942f062


onSuggestionPress does not work

Hi everyone,
The package works fine except when I select the value (mention or hashtag). It returns "undefined" inside the textinput. Whatever I do, whatever the platform. Please I'd like to know if anybody else got this issue, and how to fix it... ?
Thanks in advance for the reply.

Hi @LouisSyfer as I understood - it is kind of a feature. Make sure that your data (json) is structured into {name: "smthing", id: number}. name and id are mandatory parts of the data.

Hi @dzaiats
I modified the properties in utils/types files. It's easier, and flexible.
Thanks for your reply !

The question seems to be over. Closing issue.


Add contract error resolution

Fixes #9

Codecov Report

Merging #33 (faacba6) into master (08358c8) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #33   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            9         9
  Lines         1261      1267    +6
  Branches       246       245    -1
=========================================
+ Hits          1261      1267    +6

Impacted Files
Coverage Δ

pons/_client.py
100.00% <100.00%> (ø)

pons/_contract_abi.py
100.00% <100.00%> (ø)

pons/_provider.py
100.00% <100.00%> (ø)

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 08358c8...faacba6. Read the comment docs.


automating the subprocess measurement setup

Originally reported by Tibor (Bitbucket: tibor_arpas, GitHub: Unknown)

Subprocesses in test suits are a common occurence. coverage.py has an execellent way to measure their coverage but the set-up instructions are quite scary: http://nedbatchelder.com/code/coverage/subprocess.html
Also in the time of tox, continuous integration, virtualizations and containerizations, the manual process is quite beside the point.
What could we do to completely automate the described process?
There is an article by Ned http://nedbatchelder.com/blog/201001/running_code_at_python_startup.html
and a suggestion from @geoffbache
#!python
# sitecustomize.py
import os, sys
currDir = os.path.dirname(__file__)
sys.path.remove(currDir)
del sys.modules["sitecustomize"]
try:
    import sitecustomize
finally:
    sys.path.insert(0, currDir)

That script fails on my machine (MacOS, Python 2.7) with
#!stacktrace

Traceback (most recent call last):
  File "/Users/tibor/.virtualenvs/tmon/bin/../lib/python2.7/site.py", line 703, in <module>
    main()
  File "/Users/tibor/.virtualenvs/tmon/bin/../lib/python2.7/site.py", line 694, in main
    execsitecustomize()
  File "/Users/tibor/.virtualenvs/tmon/bin/../lib/python2.7/site.py", line 548, in execsitecustomize
    import sitecustomize
  File "/Users/tibor/tmonworkspace/testmon/sitecustomize.py", line 8, in <module>
    sys.path.insert(0, currDir)
AttributeError: 'NoneType' object has no attribute 'path'

But I would hope that it's the best approach.

Bitbucket: https://bitbucket.org/ned/coveragepy/issue/367

I've been using https://pypi.org/project/coverage_enable_subprocess/ recently and it works very nicely.

The set-up instructions are also somewhat meandering. Should I try my hand at fixing the docs?  It's really just  steps:

Write an explicit .coveragerc
Include parallel = true in it
Set COVERAGE_PROCESS_START to its absolute path (probably {toxinidir}/.coveragerc
ensure it's imported at process startup (by installing the aforementioned https://pypi.org/project/coverage_enable_subprocess/ )

In my humble opinion the way to fix this to be simpler would then be to remove non-parallel mode from coverage entirely, and have it take care of steps 1 (possibly putting coveragerc defaults in a temp dir) 3 (os.environ[...] = ...), and 4 (just ship the .pth file as part of coverage.py) automatically for you.

@glyph tell me more about how "removing non-parallel mode entirely" would work?  Wouldn't that mean that simple runs would always generate a numbered .coverage.xxx.yyy file?

@glyph tell me more about how "removing non-parallel mode entirely" would work? Wouldn't that mean that simple runs would always generate a numbered .coverage.xxx.yyy file?

That's what I'm suggesting, yes.  Is there any particular reason not to do this?

I don't understand what would happen to "coverage combine".  Today, "coverage report" (or html, xml, etc), only report on data in the .coverage data file.  Parallel files have to be combined first in order to be reported.
If we say everything is parallel from now on, does that mean that everyone has to run "coverage combine" before reporting? Or do the reporting commands all implicitly combine first?  Running coverage twice in a row would give two distinct data files, then implicit combining would combine them together?  That seems wrong.

Running coverage twice in a row would give two distinct data files, then implicit combining would combine them together? That seems wrong.

It's quite possible that my perspective is badly skewed by the fact that this is already the world I live in.  I don't have any projects with only a single test environment, and once you have 2, you want to be able to speed up runs with detox, so parallel coverage is de rigeur even if your test suite itself has zero parallelism.
But let me take it as a given that coverage run thing1; coverage run thing2; coverage report reporting only on thing2 is desirable behavior.  How do you get this with parallel coverage too?  One strategy that occurs to me is that we add a discrete notion of a "coverage group", and give it its own identity.  A coverage group would be a UUID with an optional descriptive label, and a timestamp.  (I confess that "group" might be a terrible name for this concept, but, just to have something to call it...)
$ coverage group new --label "lol"
2e843587-a60c-4fab-bfaf-dab910437bb0
$ coverage run --group 2e843587-a60c-4fab-bfaf-dab910437bb0
$ coverage report --group 2e843587-a60c-4fab-bfaf-dab910437bb0
report for 'lol' ...

Without --group, coverage run implicitly creates a new group, and coverage report reports on the group with the latest creation timestamp.
You could then have coverage group --list to give you a nicely presented list of timestamps, IDs, and labels.  (Groups would presumably be files with a naming convention, like .covgroup.$UUID with the timstamp and label in a very simple format inside them.)
To run a test suite that might run some subprocesses, you could then do, say:
$ coverage spawn detox
| / - \ | etc

Like run, this implicitly makes a new group, then runs detox as a subprocess with the coverage group ID as part of its environment.
$ coverage report

This reports on the group created by spawn, since it is the group with the most recent timestamp in the current directory.
Another advantage of this approach is that you could run multiple tests and report on their combined coverage at the same time in the same project, and you wouldn't need any special locking; .coverage files could be named .coverage.$GROUP.$HOST.$PID and commands like report could combine just the relevant files.

I don't understand what would happen to "coverage combine". Today, "coverage report" (or html, xml, etc), only report on data in the .coverage data file. Parallel files have to be combined first in order to be reported.

Further to what @glyph suggests, what if "coverage combine" (and/or just "read all the .coverage-* files) was the default, so "coverage report" would always be on "all the coverage data right here". That is, both "not-parallel mode" and "coverage combine" go away.
(I might also be biased, because the only time I don't do coverage combine is when I forget). I agree with the other comment that it would be better to have an explicit way to name "chunks of coverage" (if that's a feature people use).

@glyph I think you can achieve your coverage groups by setting COVERAGE_FILE to .../coverage.groupname and user parallel mode.
What I just did in Klein's Tox config is to set COVERAGE_FILE={toxworkdir}/coverage.{envname}, which (with parallel mode turned on) generate will generate a bunch of {toxworkdir}/coverage.{envname}.XXXX files, that I combine after the test run.  I can then set COVERAGE_FILE={toxworkdir}/coverage later to get a combined coverage file for all test runs.

This is related (duplicate) to #378.

Now I think the best approach is to not install a .pth file when coverage.py is installed at all, but instead, to create the .pth file when coverage measurement is started, and remove the file when it ends.
My theory is we only want to measure subprocesses when some "main" process (pytest?) is under coverage measurement itself.  So when the main process begins coverage, it can configure the mechanism for subprocess measurement.
Is there some reason that wouldn't work?

Now I think the best approach is to not install a .pth file when coverage.py is installed at all, but instead, to create the .pth file when coverage measurement is started, and remove the file when it ends.

This is a really obscure and nuanced point about packaging, but in general test suites should not assume that they can write to a sitedir.  We have bumped in to this problem a few times with Twisted, where sometimes you're testing an installed / built artifact, and not a virtualenv, but still want to have coverage measurement.
For example: let's say you're building a mac app (my favorite weird-build-use-case, everything's always broken here).  It's broken in production on users' machines but working in test. You want to ship an instrumented build and collect coverage information. The app bundle will be installed to /Applications with an administrator password and should not be writable by the user or its code-signing will break.  So the .pth file cannot be written in this context.
There are equivalent situations when shipping e.g. a debian package or even a docker container which installs as root but runs tests as a restricted user.

in general test suites should not assume that they can write to a sitedir.

I hear you, and I understand about the variety of environments. I assume the code will have to handle the case of not being able to find a writable directory in sys.path, and will simply have to issue a warning about that.  It's got to be an improvment over what we have now, which is a page explaining how to make your own .pth files, right?

I hear you, and I understand about the variety of environments. I assume the code will have to handle the case of not being able to find a writable directory in sys.path,

Note that .pth files are not processed on sys.path, but on the specific list of paths passed to site.addsitedir which includes site-packages and user-site but notably not anything on PYTHONPATH, so you need to be careful and selective about which specific paths you use.  Ideally you want to detect whether user site packages are enabled, whether the specific interpreter context you're executing in will have them enabled or disabled in subprocesses, whether you're in a virtualenv or not… there's a ton of logic here just to guess what might be a good spot.

and will simply have to issue a warning about that. It's got to be an improvment over what we have now, which is a page explaining how to make your own .pth files, right?

Sure, this would definitely be an improvement, but given this disadvantage, I don't quite understand what the benefit of adding the complexity of dynamically writing something at runtime rather than just shipping the .pth file at install time?  The install-time pth file can still have a conditional in it so that nothing gets loaded if not necessary.
Another issue you'll have to grapple with is the fact that overlapping coverage runs (which, previously, would have been able to coexist to some extent with -p) will now be installing .pth files into shared directories, potentially executing the relevant code more times than were expected.

I don't know how to express this as a concrete proposal to move forward, but a struggle I've often had with subprocess coverage is that one ends up "having" to implement custom code in the application to facilitate coverage (whether that's a command-line option or environment-variables, etc). The struggle here is that if an application produces subprocesses but doesn't have specialized knowledge of coverage.py, some of those subprocesses won't ever get coverage.
So if you're going to put custom "coverage" code into an application, it might as well use coverage.* APIs directly (rather than also learn the right environment / or atexit etc dances to do).
That is, applications are going to end up with with a --coverage option (or similar) in their subprocesses. So, a simple and reliable Python API is maybe all that's required here. (There's also some issues with atexit in general that perhaps could benefit here too).

@meejah a .pth file contains code that every Python process executes at startup, so the existing solution works fine without requiring applications to do this; I think the discussion here is mostly about how to execute that, rather than about whether to give up on it?

The conditional in the .pth file (actually in a function it calls) is about an environment variable.  There's no guarantee I can set an environment variable and have it carried over into subprocesses.   So every choice has a chance of failure, and needs to try to determine if it failed.  Which approach has the higher likelihood of succeeding?
Is it weird to try a combined approach?  Write a .pth at install time, and at run time, update the .pth with specific details (where the rc file is, and whether to measure).

The conditional in the .pth file (actually in a function it calls) is about an environment variable.

To @glyph's point as well, the above is still a problem: now I have to arrange for an environment-variable to be passed on to the subprocess, too. If it doesn't work, did I do that wrong? Did the .pth code not run? Something else?
So I think what I'm saying is: the only places I've gotten subprocess-using applications to produce coverage properly is when I've put custom code in them. So just give me reliable "start coverage now" and "end coverage now" APIs, and I'll put those in my applications (and then hopefully I don't have to debug .pth files, environment-variables and atexit minutiae all at once).

The conditional in the .pth file (actually in a function it calls) is about an environment variable. There's no guarantee I can set an environment variable and have it carried over into subprocesses. So every choice has a chance of failure, and needs to try to determine if it failed. Which approach has the higher likelihood of succeeding?

Personally, my experience is that environment variables are more likely to succeed.  In principle I guessed that this might cause issues, but in practice after using it on many projects over many years, it's mostly been set-it-and-forget-it.
Allowlist environment filtering does happen and is unpleasant to debug, but also, allowlist filtering is basically always a bug and it's easy to recommend that tools get rid of it.  Like, did you remember to inherit TMPDIR, XPC_FLAGS, XPC_SERVICE_NAME, LaunchInstanceID, and __CFBundleIdentifier on macOS, just in case one of the platform libraries that libc talks to might need one of those for some reason?  Whereas "making your site-packages read-only" is not a bug, and probably in fact a good operational practice.

Is it weird to try a combined approach? Write a .pth at install time, and at run time, update the .pth with specific details (where the rc file is, and whether to measure).

Given the possibility of multiple possible parallel coverage runs, I don't think there's any value to updating the .pth file when the .pth file can easily check other filesystem locations, if you want to avoid env vars as a communication channel.  You could, for example, have a parent process write to a path in f"~/.python-coverage/{os.getpid()}" and then have child processes use os.getppid() to determine where to read from.
My estimation is that this is an unnecessary fallback, and maybe not the best one; env vars should work well enough that I don't think this would be required. But as much as I know about weird deployment environments, coverage obviously has a distribution footprint way bigger than anything I've worked on, so I could see that everything has to be triple-redundant and an API like this might be a way to accomplish that.

So I think what I'm saying is: the only places I've gotten subprocess-using applications to produce coverage properly is when I've put custom code in them. So just give me reliable "start coverage now" and "end coverage now" APIs, and I'll put those in my applications (and then hopefully I don't have to debug .pth files, environment-variables and atexit minutiae all at once).

These APIs already exist.  Are you just saying that the status quo is better (less fragile, etc) than any of these solutions?

@glyph, yeah I think that is what I'm saying.
To be clear, that means the "good advice" for programs wanting subprocess coverage is to include some custom code in them (triggered however you like) that does cov = coverage.Coverage() ; cov.start() on startup and arranges for cov.stop() ; cov.save() to happen on shutdown.

I appreciate all of the advice, and the depth of (scarred) experience that informs these comments.  I wish there were something to do though, when I get issues like #1341.

@meejah

yeah I think that is what I'm saying.

Respectfully, I disagree. Any one of the solutions described here will still occasionally lead to a bad outcome where you'll need to debug something weird, but like 99.9% of the time they'll work just fine. In the remaining .1% of cases presumably the explicit API will remain.


Rocket.Chat 4.0.0 Desktop Client crashes on rootWindow.addListener('close', ...) when isTrayIconEnabled === false && process.platform === 'linux'

Search before asking

[X] I had searched in the issues and found no similar issues.

Operating System

[ ] macOS
[ ] Windows
[X] Linux

Operating System Version
Arch Linux
It happens on the web browser too?
No, it just happens on the Desktop app
Rocket.Chat Desktop App Version
4.0.0
Rocket.Chat Server Version
6.7
Describe the bug
When closing via X-Icon while the tray-icon has been disabled, the app crashes with the following message:
Uncaught Exception:
TypeError: Object has been destroyed
  at /opt/Rocket.Chat/resources/app.asar/app/main.js:2095:18
  at /opt/Rocket.Chat/resources/app.asar/app/main.js:2178:43
  at Array.forEach (<anonymous>)
  at App.<anonymous> (/opt/Rocket.Chat/resources/app.asar/app/main.js:2178:19)
  at App.emit (node:events:526:35)
  at App.emit (node:domain:488:12)
  at App.<anonymous> (/opt/Rocket.Chat/resources/app.asar/app/main.js:2432:18)
  at App.emit (node:events:526:35)
  at App.emit (node:domain:488:12)

Closing via Ctrl + Q or File => Quit Rocket.Chat doesn't trigger the error.
How to Reproduce

Go to settings
disable Tray Icon
Close via X

Describe your Expected behavior
The app should close like the other methods, without error.
Anything else
I've unpacked the app.asar and opened the affected file on the described line.
It shows me the following line:
https://github.com/RocketChat/Rocket.Chat.Electron/blob/b4aeef45bdfb7b0b74375697543cc6c9c83ad866/src/ui/main/rootWindow.ts#L283
The other methods utilize app.quit() as seen in.
https://github.com/RocketChat/Rocket.Chat.Electron/blob/b4aeef45bdfb7b0b74375697543cc6c9c83ad866/src/ui/main/menuBar.ts#L111-L115
Are you willing to submit a code contribution?

[ ] Yes, I am willing to submit a Pull Request!

Same here with Arch and V4.0.1


Types declaration file for typescript

In my app, when I do
import Loading from 'vue-loading-overlay';
I get the error:

Could not find a declaration file for module 'vue-loading-overlay'. '/home/ayush/Desktop/currycoins/head-vue/node_modules/vue-loading-overlay/dist/vue-loading.min.js' implicitly has an 'any' type.
Try npm install @types/vue-loading-overlay if it exists or add a new declaration (.d.ts) file containing declare module 'vue-loading-overlay';

I tried
npm i --save @types/vue-loading-overlay  but got the error:

npm ERR! code E404
npm ERR! 404 Not Found: @types/vue-loading-overlay@latest
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ayush/.npm/_logs/2018-03-08T03_30_04_370Z-debug.log

Any chance we can have a types declaration file?

I have no plans to learn or support type script.  Sorry.

Nope, if you open a PR, i wont be able to review it, because i don't even know the syntax.
Typescript is completely new to me.
Feel free to fork this repo, re-publish on npm and maintain it according to your needs.

At least the typescript definition to describe the API of the library could be cool.
Vuejs 3 now support typescript :)

Create a DefinitelyTyped package
http://definitelytyped.org/guides/creating.html
I will link back in readme

I think there is no issue with vue-loading-overlay in TS projects.
I've just created shims-loading.d.ts:
declare module "vue-loading-overlay";

Then I've included vue-loading in main.ts:
import Loading from "vue-loading-overlay";
import "vue-loading-overlay/dist/vue-loading.css";

Vue.use(Loading);
Vue.component("loading", Loading);

And without troubles I use vue-loading-overlay in my components:
<loading
      :active="!SocketConnected"
      :opacity="0.8"
      loader="bars"
      :can-cancel="false"
      :is-full-page="true"
    ></loading>


Make Executor handle function calls and returns by itself

So far the wasmi engine execution facilities were strictly divided into handling function calls and returns as well as executing a particular function until it returns.
This PR merges both divided implementations into the already existing Executor type that is now capable of doing everything.
The idea behind this is that this might allow rustc to optimize the wasmi engine hot path further. Let's see what the benchmarks are telling ...

The diff coverage is 90.72%.

@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
- Coverage   79.44%   79.44%   -0.01%
==========================================
  Files          71       71
  Lines        6193     6207      +14
==========================================
+ Hits         4920     4931      +11
- Misses       1273     1276       +3

Impacted Files
Coverage Δ

wasmi_v1/src/engine/stack/mod.rs
77.46% <50.00%> (-1.64%)
:arrow_down:

wasmi_v1/src/engine/mod.rs
83.95% <88.88%> (-0.90%)
:arrow_down:

wasmi_v1/src/engine/executor.rs
98.03% <92.50%> (-0.37%)
:arrow_down:

wasmi_v1/src/engine/stack/frames.rs
93.93% <100.00%> (+0.83%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

I declare this experiment to have failed due to the severe performance regression. Presumably the handling of function calls and returns in the Executor's hot loop makes it impossible for LLVM and the Rust compiler to properly optimize the heck out of this particularly hot path of the codebase.
Generally wasmi is very fragile with respect to performance and optimizations so we are better off with another approach to optimize wasmi further ...


Support Java 19

Expected Behavior
Java 19 compilation target is supported.
Current Behavior
[INFO] --- exec-maven-plugin:3.0.0:exec (gradle) @ quarkus-gradle-model ---

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/runner/work/quarkus/quarkus/devtools/gradle/settings.gradle'

* What went wrong:
Could not compile settings file '/home/runner/work/quarkus/quarkus/devtools/gradle/settings.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 63

  java.lang.IllegalArgumentException: Unsupported class file major version 63
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:199)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:180)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:287)
  	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
  	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
  	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
  	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
  	at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
  	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)
  	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:44)
  	at org.codehaus.groovy.ast.decompiled.TypeSignatureParser.visitEnd(TypeSignatureParser.java:110)
  	at groovyjarjarasm.asm.signature.SignatureReader.parseType(SignatureReader.java:206)
  	at groovyjarjarasm.asm.signature.SignatureReader.accept(SignatureReader.java:124)
  	at org.codehaus.groovy.ast.decompiled.ClassSignatureParser.parseClassSignature(ClassSignatureParser.java:74)
  	at org.codehaus.groovy.ast.decompiled.ClassSignatureParser.configureClass(ClassSignatureParser.java:32)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitSupers(DecompiledClassNode.java:185)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.isUsingGenerics(DecompiledClassNode.java:86)
  	at org.codehaus.groovy.ast.tools.GenericsUtils.nonGeneric(GenericsUtils.java:275)
  	at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:101)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lambda$createMethodNode$1(DecompiledClassNode.java:230)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.createMethodNode(DecompiledClassNode.java:236)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:203)
  	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getDeclaredMethods(DecompiledClassNode.java:122)
  	at org.codehaus.groovy.ast.ClassNode.tryFindPossibleMethod(ClassNode.java:1283)
  	at org.codehaus.groovy.control.StaticImportVisitor.transformMethodCallExpression(StaticImportVisitor.java:251)
  	at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:133)
  	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:108)
  	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
  	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:138)
  	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:111)
  	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:66)
  	at org.codehaus.groovy.control.StaticImportVisitor.visitConstructorOrMethod(StaticImportVisitor.java:108)
  	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructor(ClassCodeVisitorSupport.java:101)
  	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1089)
  	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:52)
  	at org.codehaus.groovy.control.CompilationUnit.lambda$addPhaseOperations$3(CompilationUnit.java:209)
  	at org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:942)
  	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:671)
  	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:635)
  	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
  	at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
  	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
  	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
  	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
  	at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:139)
        [...]

Context
Over at Quarkus we have a nighly build that's running with the current EA JDK, which is 19 since 18 switched to GA in March.
Apart from that, there will be users wanting to fully run on Java 19 once it reaches GA.
ASM 9.3 with Java 19 support was released yesterday: https://asm.ow2.io/versions.html

Hi there, I'm running into this same issue since yesterday and I need this to run tests on Project Loom(JDK 19) using gradle, and I'm not interested in using Maven at the moment for this. Is there a way to use some sort of trick or some sort of EA, RC release to this running? Further, I'm noticing that gradle 7.4.2 seems to work with this JDK 19 on a MAC, but I'm guessing this is not expected? Anyways, I made a github action to install JDK 19 and this action is using linux and that then it all seems to fail when the build runs. The Exception I get is exactly the same as reported here and I've already checked the PATH and the JAVA_HOME and it's all ok.

@jesperancinha Have you tried using https://docs.gradle.org/current/userguide/toolchains.html?

@marcphilipp , I moved on in the meantime with maven. I just tried it with the toolchain like this:
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(19)
    }
}

And I still get the same exception.
This is what I get with java -version:
openjdk version "19-loom" 2022-09-20
OpenJDK Runtime Environment (build 19-loom+6-625)
OpenJDK 64-Bit Server VM (build 19-loom+6-625, mixed mode, sharing)

And this with gradle -version
------------------------------------------------------------
Gradle 7.3.3
------------------------------------------------------------

Build time:   2021-12-22 12:37:54 UTC
Revision:     6f556c80f945dc54b50e0be633da6c62dbe8dc71

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          19-loom (Oracle Corporation 19-loom+6-625)
OS:           Mac OS X 12.3.1 x86_64

Any command that I run including gradle wrapper --gradle-version 7.4.2 doesn't seem to work as well. I am using a sub-module structure. I'm not sure if this has any influence to this. I can move on with Maven anyways, but that wasn't my initial intention. This maybe also a bit too soon for this. I see in Gradle compatibility matric that Gradle offers compatibility up to JDK 17. I just found it odd that it did work in some occasions but it could be that I ended up compiling with GraalVm for JDK 17 and then ran it with the JRE in the JDK19.

You need to use a supported version of Java to run Gradle (e.g. Java 17), i.e. gradle -version should print that version. If you use toolchains, Gradle will then use a different version for all compile tasks.

Indeed @xor-freenet .I run my project with JDK 19, not only to test the JDK but also to see how Project Loom works. And just for clarity, it is not my intention to build my project with gradle under a JDK 17 environment, which seems to be @marcphilipp ‘s  interpretation. Anyways, altough I very much like gradle, I had no choice but to convert the initial setup to maven, because maven does work for this and gradle afaik not yet.

@xor-freenet @jesperancinha We do exactly that for the JUnit 5 build on GitHub Actions. It requires installing two JDKs: one for running Gradle (we use JDK 17) and one for running the tests which is then passed to the build: https://github.com/junit-team/junit5/blob/9d23af35eda6fc079c6019f5a58a4245db537d6f/.github/workflows/cross-version.yml#L45
That project property is then read and used to configure Gradle to use that JDK for compilation and test execution here: https://github.com/junit-team/junit5/blob/9d23af35eda6fc079c6019f5a58a4245db537d6f/buildSrc/src/main/kotlin/java-toolchain-conventions.gradle.kts
While a bit more effort to set up, it completely decouples the two things and avoids having to deal Gradle not yet being compatible when a new EA releases comes out.
That being said, JDK 19 support is of course coming to Gradle. @gradle/bt-support It's currently slated for 7.6, correct?

Indeed @xor-freenet .I run my project with JDK 19, not only to test the JDK but also to see how Project Loom works. And just for clarity, it is not my intention to build my project with gradle under a JDK 17 environment, which seems to be @marcphilipp ‘s interpretation. Anyways, altough I very much like gradle, I had no choice but to convert the initial setup to maven, because maven does work for this and gradle afaik not yet.

How did you manage to run maven with jdk 19? May I have a look?

Hi @demidko, the only thing I did that was a bit different than what I normally do is having the JDK 19 installed manually. In maven, I just set up the version to 19 and in the command line or Intellij I just made sure to have it in some folder downloaded and unzipped and the JAVA_HOME correctly set up. I made some scripts to achieve this here: https://github.com/jesperancinha/good-story/blob/main/Makefile. But anyways, if you want to have a look at a running example of this I made two projects about this. One working example with the JDK19 here: https://github.com/jesperancinha/good-story and another, which is a GitHub action that I am using in the same project here: https://github.com/JEsperancinhaOrg/loom-action. Feel free to have a look at them.

Is there a roadmap available for when we get to have support for JDK 19? If someone could share, that would be awesome!

Testing with the latest 7.6 with Java 19, everything appears to be working:
builds.gradle.org/viewLog.html?buildId=54959159&buildTypeId=Gradle_Experimental_Check_Stage_ReadyforNightly_Trigger
what's left to do:

Update compatibility.adoc to say Gradle can run with JDK19
Add something to release-features.txt
Add something to release notes
Update CI configuration to allow tests to run with JDK19 on master/release
Look at the current matrix of test coverage on master/release and figure out where we add JDK19 coverage

We cannot call this done without us running some tests with JDK19 as part of the release pipeline.

@jesperancinha Thank you, your example helped test Project Loom in our project

Java 19 GA is coming in 4 days!!

Java 19 is now out, has this been addressed yet?

https://github.com/gradle/gradle/pull/21721 fixed all known issues. No release has been made with this yet.
CI coverage is still not complete, as indicated by https://github.com/gradle/gradle/issues/20372#issuecomment-1215170433

Cool!!

Yes, the release nightlies

Curious, when will Gradle v7.6 be released?

@ps-89 when it is ready :)
You can check the GitHub milestone for 7.6-RC1 here
https://github.com/gradle/gradle/milestones/7.6 RC1

Yes, the release nightlies

Updating my wrapper to use a nightly build sounds great, except...
This release-nightly link currently is showing 6.9.3-20221007060817+0000 as the latest, but my build is incompatible with Gradle < 7.x.
The nightly link here is showing 8.0-20221007221152+0000, but my build is incompatible with Gradle > 7.x.
The release candidates link here is showing 7.5-rc-5.
JDK 19 has been GA for 17 days.  I updated my mac to openjdk 19 using homebrew and reverting to 18.x isn't easily possible. I can use 17, but I need JDK 18+ features.
Any suggestions on how I can get a JDK-19-compatible gradle 7.x "release" to use with my gradle wrapper?  I'm totally blocked here.

@dbwiddis see gradle/wrapper/gradle-wrapper.properties

@dbwiddis
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-7.6-20220920234319+0000-bin.zip

Also remember that you do not necessarily need to use a nightly to compile with 19, it is only needed to run the Gradle daemon itself with Java 19 and update the default tool versions to 19-compatible versions. If you have a plain Java project, using toolchains to compile with Java 19 works in Gradle 7.5.1. Other projects may also work on a case-by-case basis.

From now on, checking the status of Gradle 7.6 RC1 will be the first thing I do after waking up in the morning

Also remember that you do not necessarily need to ...

I made a brief attempt to follow your link and understand what you said, but the practical matter is that I know whatever time I spend is going to be wasted and I want to do the minimum amount possible to get back to work until the official (and fully CI-covered!) release is out.  One-liner changes to config files or command-line updates are awesome and acceptable workarounds.  Changing a build system for a project on which I'm not a maintainer is not.

The originally reported Groovy compilation error is dependent on the Groovy version on the classpath, so 7.6 will not help you there. For that you need at least Groovy 3.0.11 (because you need ASM 9.3 - https://issues.apache.org/jira/browse/GROOVY-10569) and 4.0.2 if you need to set a JDK 19 target (https://issues.apache.org/jira/browse/GROOVY-10573).

@ice1000
https://docs.gradle.org/7.6-milestone-1/release-notes.html
https://docs.gradle.org/8.0-milestone-2/release-notes.html

@ice1000
https://docs.gradle.org/7.6-milestone-1/release-notes.html
https://docs.gradle.org/8.0-milestone-2/release-notes.html
🥳

Thank you! I can finally sleep

> ./gradlew wrapper --gradle-version=7.6-milestone-1
Downloading https://services.gradle.org/distributions-snapshots/gradle-7.6-milestone-1-bin.zip

Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle-dn.com/distributions-snapshots/gradle-7.6-milestone-1-bin.zip

😭

You have to remove snapshots from the URL, for example:

https://services.gradle.org/distributions/gradle-8.0-milestone-2-bin.zip

That line is verbatim from https://docs.gradle.org/7.6-milestone-1/release-notes.html

@ice1000 Can you file an issue for this?
It looks like our snapshot / non-snapshot logic is flawed in the wrapper task and does the wrong thing for milestones.

You have to remove snapshots from the URL, for example:

https:\//services.gradle.org/distributions/gradle-8.0-milestone-2-bin.zip

Exactly right 👌 (what i' did testing React Native) and full/latest list here

> ./gradlew wrapper --gradle-version=7.6-milestone-1
Downloading https://services.gradle.org/distributions-snapshots/gradle-7.6-milestone-1-bin.zip

Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle-dn.com/distributions-snapshots/gradle-7.6-milestone-1-bin.zip

This is strange, I just downloaded the 7.6 version, here's my gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-milestone-1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

How come a Java 19 compatible Gradle is still not available as a stable version two months after Java 19 release?
Maybe it should be considered how to make Gradle more future-proof, so it would run with any future Java version, like all normal Java apps do?

How come a Java 19 compatible Gradle is still not available as a stable version two months after Java 19 release?
Maybe it should be considered how to make Gradle more future-proof, so it would run with any future Java version, like all normal Java apps do?

They need to update asm & groovy. This is not Gradle's fault.
However, I still think there's something wrong that makes asm & groovy not being more future-proof.

I hope they'll switch to kotlin as long-term goal.

Just use maven ..unless you beleive the features gradle offers  actually are needed.  maven always have first class java building support

Gradle 7.6 is out with support for building and running code with Java 19: https://docs.gradle.org/7.6/release-notes.html

However, I still think there's something wrong that makes asm & groovy not being more future-proof.

Hopefully, this draft JEP is accepted and will provide automatic upgrades in the future, so this should eventually be resolved.
Another possibility is that Groovy could stop bundling ASM, though I imagine they do that for a good reason.

welcome everybody
I am facing this problem, is there a solution?

welcome everybody I am facing this problem, is there a solution?

Do you can up a gradle version to 7.6? From your stacktrace i suggest you have gradle 7.4

@jershell @rabee-abu-michael Judging from the screenshot you use VSCode. By default, the Java/Gradle integration will use the same JDK for Gradle as the Java tooling backend (Java 19 in this case).  According to the documentation, you can define a separate JDK for Gradle by configuring java.import.gradle.java.home.


Add Image of Logical model for Homework1

The image of the logical model between customer_purchases and market_date_info tables
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
What did you learn from the changes you have made?
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
Checklist

[ ] I can confirm that my changes are working as intended

HW1  Marked.


Script to generate test data

Add generate test data script

test_tools/gen_data/clean.sh

clean workload

test_tools/gen_data/config.yaml

config

test_tools/gen_data/deployment.yaml

template

test_tools/gen_data/README.md
test_tools/gen_data/run.sh
test_tools/gen_data/statefulset.yaml

template

./run.sh
./clean.sh
ref: 6665

Is it necessary to have dependencies on the existing pytest code? Can't we use shell scripts to simulate what we usually do in manual testing? WDYT

There are many ways to achieve the goal and looks like you already have shell script to do the same thing, could you share the code for some inspiration? many thanks.

Updated to shell script


add support for glassfish (jersey2) PATCH

Since the addition of the PATCH annotation, jersey2 has added proper patch support.  We should scan for both.
https://github.com/jersey/jersey/blob/2.6/examples/http-patch/src/main/java/org/glassfish/jersey/examples/httppatch/PATCH.java

added support with https://github.com/swagger-api/swagger-core/commit/8dc3bf6a66b3357ddf65490235fd32e3d1425b16#diff-e60f0d5e55fa012c526b248197a277a1R558


snaps not running in xrdp

xrdp version
0.9.17-2ubuntu2
Detailed xrdp version, build options
xrdp 0.9.17
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-asBei3/xrdp-0.9.17=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security
      LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations
      PKG_CONFIG_PATH=/build/xrdp-asBei3/xrdp-0.9.17/pkgconfig

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Operating system & version
Mint 21.3
Installation method
git clone & make install
Which backend do you use?
No response
What desktop environment do you use?
Cinnamon
Environment xrdp running on
physical with AMD Fury 64
What's your client?
Microsoft RDP
Area(s) with issue?
Other
Steps to reproduce
I have installed NVIDIA GeForce NOW on the server. It works fine when using the machine directly, but launching it from XRDP gets me the following error
✔ Expected Behavior
for geforce now to launch
❌ Actual Behavior
/user.slice/user-1001.slice/session-c3.scope is not a snap cgroup
Anything else?
This appears to be a common issue with snap applications in xrdp, see also https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1968908

Most likely cause on your version of Ubuntu is #1684
A possible workaround is described in this post. The issue is fixed in the development branch, but we haven't released that yet.

Thanks for that. I tried compiling the workaround, but get an error. I logged an issue with it.

@graylion - do you need any more input on this?

For anyone still reading this, see also #3053. This affects the xdg-desktop-portal.service which I believe is also used by snap applications.