Resolve test warnings and make CI output cleaner

This PR includes three minor fixes:

8c124a6: When running CI, the output is currently littered with 49 PASSED lines (showing which ones that passed). This is quite unnecessary, as the only interesting information is if they failed or gave warnings! This commit removes the PASSED messages.
bd73829: @rhugonnet your opinion might be valuable here. Currently, if a SatelliteImage is read from disk, fn_meta will be None, meaning it will try to run SatelliteImage.__parse_metadata_from_file(), triggering the "not implemented" warning. In this commit, I've added a check so that the function will not be run if fn_meta is None. This consequently removes a ton of test warnings.
78dfcd8: This heavily relates to #220. The nodata value has to be set, or else Raster.reproject() complains. I've now set nodatas so that this warning disappears.

You need the warning filter even with the set_ndv fix?

Nope, I just wanted it to validate that there are no warnings anymore. There shouldn't be warnings, so I left it there!


Logical networks, accuracy, meta-data and, python modules (OSMNX, networkx and Shapely)

Having read the paper and slept on this I think there are a number of areas I'd want to consider:

A logical transport network: a model to help communication and decision making rather than a geographically accurate map Examples, would be the classic TfL tube map, or the bus route maps in Sheffield. Very heavily used in rail and for things like planning and operations systems.
Trivial simplification: There is a trivial simplification based on a projected geography where you simply round coordinates to an arbitrary value say, 1m. This effectively imposes a network grid on the data and implicitly simplifies the network. You may want to extend this to, say 5m, or use a difference base tiling geometry and build a network based on centre-points.
Meta-data simplification: Rather than simply aggregate a network based on proximity, you may also want rules based on other characteristics such as road classification. For example, there may be valid rules based on simplifying parallel cycle and pedestrian infrastructure with roads where it is legal, for example, a city road grid, but not where it is illegal. For example, where a segregated path runs along side a motorway. Where it is illegal to cycle or walk.
OSMX, networkx and Shapely: These comes with a whole set of things for simplifying and manipulating networks. It might be worth having a review of what is out there.

Arguably these are actually four "issues" and would take advice on how to manage these. I'm in the process of setting up my Quarto environment with the relevant emacs inferior-mode.
(With regards point 2, I would love to see what aperiodic tiling might do here, but perhaps should get out more)

Many thanks for your thoughts Will! Following a review, and some chat with people 1-2-1 and on social media (Twitter and Mastodon) I agree with your areas. Converting those into sections of a paper I'm thinking

Introduction: there is a need for simpler and easier to read network maps for various policy purposes, the one outlined in the draft paper being just one. I think we can talk about levels of simplification, with 'tube maps' being one extreme', in the intro, covering you "1."
Methods: there are many methods to choose from and seemingly no paper has yet systematically compared open options. This is somewhere this paper/project/codebase can add a lot of value I think. I think "rounding coordinates" and other things in your "2." and "3." can fit nicely into this pre-existing section, right? Maybe we should have a separate section, possibly after methods, on implementations, where we can actually demonstrate some of these packages, including osmnx, GRASS, other approaches, so should we add an 'implemenations' section after this one?  https://github.com/nptscot/networkmerge/blob/main/paper.md#methods

Good luck reproducing where we've got to, Quarto is a great system, let me know how you get on and happy to do a quick video call at some point to get you up-to-speed.

Closing for now, anything from this that can go into the paper let us know @anisotropi4


Events not being removed on destroy

Hi
I have a senario where i need to create a new select when a button is pressed and destroy it when its updated. The change fires a call to the server via the .on("select2:select".....
if i toggle the button a number twice the event fires twice, three times and so on
to get round it ive added the following to get round it for now
$('#taskdetails_taskfor').select2().unbind();
$('#taskdetails_taskfor').select2('destroy');
Cheers
James

It sounds like you are saying that select2: prefixed events are not removed when Select2 is destroyed. This would make sense, because Select2 doesn't not bind these events (it only triggers them), so Select2 will not unbind them.

'change' event is also not unbinded

@tyburczyk the event should be unbound on this line, after calling select2('destroy') because it is registered under the select2 namespace.


Add light curve method and write tests

First item of work is to add the light curve and power spectrum classes and write appropriate tests for them.

👍


Debug smoke test failures

  4) Debug start debugging:
     Error: undefined: Timed out after 20 seconds.
      at SpectronClient.<anonymous> (out/spectron/client.js:183:31)
      at Generator.next (<anonymous>)
      at fulfilled (out/spectron/client.js:8:58)
      at <anonymous>

  5) Debug focus stack frames and variables:
     Error: Waiting for Stack Frame: looking for layer.js: Timed out after 20 seconds.
      at SpectronClient.<anonymous> (out/spectron/client.js:183:31)
      at Generator.next (<anonymous>)
      at fulfilled (out/spectron/client.js:8:58)
      at <anonymous>

  6) Debug stepOver, stepIn, stepOut:
     Error: Waiting for Stack Frame: looking for response.js: Timed out after 20 seconds.
      at SpectronClient.<anonymous> (out/spectron/client.js:183:31)
      at Generator.next (<anonymous>)
      at fulfilled (out/spectron/client.js:8:58)
      at <anonymous>

  7) Debug continue:
     Error: connect ECONNREFUSED <IP_ADDRESS>:80
      at Object._errnoException (util.js:1024:11)
      at _exceptionWithHostPort (util.js:1046:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

  8) Debug debug console:
     Error: Not allowed to run nested waitFor calls!
      at SpectronClient.<anonymous> (out/spectron/client.js:174:23)
      at Generator.next (<anonymous>)
      at out/spectron/client.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/spectron/client.js:7:12)
      at SpectronClient.waitFor (out/spectron/client.js:172:16)
      at SpectronClient.<anonymous> (out/spectron/client.js:127:25)
      at Generator.next (<anonymous>)
      at out/spectron/client.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/spectron/client.js:7:12)
      at SpectronClient.waitForActiveElement (out/spectron/client.js:126:16)
      at QuickOpen.<anonymous> (out/areas/quickopen/quickopen.js:54:40)
      at Generator.next (<anonymous>)
      at out/areas/quickopen/quickopen.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/areas/quickopen/quickopen.js:7:12)
      at QuickOpen.waitForQuickOpenOpened (out/areas/quickopen/quickopen.js:53:16)
      at QuickOpen.<anonymous> (out/areas/quickopen/quickopen.js:22:24)
      at Generator.next (<anonymous>)
      at fulfilled (out/areas/quickopen/quickopen.js:8:58)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:228:7)

  9) Debug stop debugging:
     Error: Not allowed to run nested waitFor calls!
      at SpectronClient.<anonymous> (out/spectron/client.js:174:23)
      at Generator.next (<anonymous>)
      at out/spectron/client.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/spectron/client.js:7:12)
      at SpectronClient.waitFor (out/spectron/client.js:172:16)
      at SpectronClient.<anonymous> (out/spectron/client.js:64:25)
      at Generator.next (<anonymous>)
      at out/spectron/client.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/spectron/client.js:7:12)
      at SpectronClient.waitAndClick (out/spectron/client.js:63:16)
      at Debug.<anonymous> (out/areas/debug/debug.js:97:40)
      at Generator.next (<anonymous>)
      at out/areas/debug/debug.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/areas/debug/debug.js:7:12)
      at Debug.stopDebugging (out/areas/debug/debug.js:96:16)
      at Context.<anonymous> (out/areas/debug/debug.test.js:140:39)
      at Generator.next (<anonymous>)
      at out/areas/debug/debug.test.js:11:71
      at new Promise (<anonymous>)
      at __awaiter (out/areas/debug/debug.test.js:7:12)
      at Context.<anonymous> (out/areas/debug/debug.test.js:138:16)

This is just the usual unreliabnes of the smoke test I believe.
Closing as there is nothing specific that I can do for the debug tests (since they always pass for me)
fyi @joaomoreno

Did you check the screenshots?

@joaomoreno good point.
@jrieken could you please attach the screenshots?


CollapsableText doesn't support anchor elements

Problem
The CollapsableText component currently only supports strings, as it uses string.substring() to trim the text. This limitation prevents the use of anchor elements within the text, making it impossible to display a shrunken description containing hyperlinks.
Example
Suppose we want to use the CollapsableText to display a block of text containing marketing campaign and hyperlinks to units:

This is the result when that text is wrapped in CollapsableText:

Observed Result
The Collapsable Text component doesn't handle text containing an anchor tag at all and may through an error due to a call to string.substring() on a react element.
Desired Result
CollapsableText should support anchor elements, allowing them to be displayed properly within the component. The component should be able to trim the text, including any tags, and correctly shrink the content with hyperlinks and other HTML elements.

This was completed by @JeremyRH


Hi dev, I really appreciate this excellent project, so I've submitted a pull request (PR).

Debug:

The black strap between every grid may caused by img.thumbnail(dims) , Using resize(dims) resolves the issue.

New Features:

arg [shuffle] (default False):

Whether to set grids_list in random order. The base branch is always ascending because getBestMatchIndex() always returns the index of the minimum distance.
If True, every output image will be unique, potentially generating more valid output (I'm not entirely sure about that, but it dose increase variety).

arg [alpha] (default [255,0]):

[alpha_of_imgs, alpha_of_original_img]
Can mix the generated image with the original image. Automatically selects export as PNG or JPEG.

arg [magnify] (default 1.0):

Magnification for the final output image, providing higher resolution.
(e.g., magnify=2, original size=(400,400), so final size is (800,800))
(I think this is useful, for example, when using album covers of favorite music to generate the target image).

The [Mosaic_noStrap_MixAlpha.jpeg](https://github.com/NoonieBao/Photo_Mosaic/blob/master/data/Mosaic_noStrap_MixAlpha.jpeg) is generated by command lines
python scripts/Mosaic_Creator.py --target data/Tree.jpg --images data/Trees/ --grid 100 100 --output data/Mosaic_noStrap_MixAlpha.jpeg --alpha 200 25 --magnify 1 --shuffle

By setting magnify and alpha, the output img is more vivid, like this.


Authorisation will allow app systems to create rules, when enable_auth_for_cloud=true

Unless I'm reading this code wrong (which seems to happen alot today), setting enable_auth_for_cloud=true would not only allow application systems to check if clouds/systems are authorised, but also add new authorisation rules themselves (AuthACF.java):
    if (AuthorizationMain.enableAuthForCloud) {
      if (!requestTarget.contains("mgmt") || (requestTarget.endsWith("intracloud") && method.equalsIgnoreCase("post"))) {
        String[] clientFields = clientCN.split("\\.", 2);
        return serverFields[1].equalsIgnoreCase(clientFields[1]);
      } else {
        return clientCN.equalsIgnoreCase("sysop." + serverFields[1]);
      }
    } else {

Yes. The intention is that there should be two modes in the LC regarding who can add authorization rules.

Only operators, i.e. humans, through the management UI and API with the proper certs should be able to add authorization rules.

Service Provider systems could, in some cases, give authorization to potential consumers on their own.

Hmm, think this calls for split into two settings then. The enable_auth_for_cloud is described as (in the AUTH configuration file):
#Allow querying access to the authorization tables for application systems (true/false - only has effect in secure mode)

I saw the enable_auth_for_cloud setting as the one to enable the older certificate based security option, where app. systems could query the AUTH directly - and without allowing providers to create their own rules.
Was actually considering whether this could be an option for allowing a non-Arrowhead system to push data into an Arrowhead Provider...


Create 5.8 stable candidate release path

Unifi 5.8 now has a stable candidate release 5.8.16 (https://community.ubnt.com/t5/UniFi-Wireless-Beta/UniFi-5-8-16-Stable-Candidate-has-been-released/m-p/2345115). However, there is still a 5.7 release path as well (5.7.26 as of a few days ago).
Is there a plan to create a 5.8 sc tag to pull from?

Done. 5.7 sc moved to unifi57 branch, 5.8 sc added to master branch.


Adjust font sizes and label width when based on view bounds

The font sizes and label sizes assume a large enough width for DayView. With a smaller view, labels start to overlap. Should additional params like DaySelectorStyle.dateLabelWidth and SwipeLabelStyle.labelFont be added to styles. The alternative would be to automatically size the element proportionally.

@diegorozen could you attach the screenshot?
Both solutions are OK, there could be value like DateLabelWidthAuto to force automatic width.

Adding an exaggerated small one to make the issue evident:

@diegorozen, I submitted a pull request a little while ago to support dynamic font sizes; this may, at least partially, help with this problem.


Page Sizing Issue

FYI - this page didn't size correctly on my iPad in landscape mode (it was too wide)
http://foundation.zurb.com/docs/gems.php
Thanks for zurb / foundation - very exciting.

Andy

I'm guessing what you saw was the Mobile Safari bug where rotating to landscape messes up the zoom (and thus the page look much too larger). Doing a straight load of the page on our testing iPad seems to be okay.


Use "interaction_radius" as alternative to "radius" for collision detection

Currently, collision detection in e.g. ph4 uses the 'radius' property of particles.
It would be beneficial to have an optional 'interaction_radius' property (not sure of the name), which would take precedence over the 'radius' property if defined.
This would make 'radius' available to store the actual stellar radius from stellar evolution.

Did we actually ever make a move on this? It would simplify a channel in my code to have the attributes split.
~ Joe G.

We did not.

Circling back to this because I am getting back to active development, I can implement the change and do a merge request. @rieder 's idea of just having it check for a interaction_radius in the gravity codes and use it over radius seems like the most straight forward method that wouldn't involve any major changes to documentation.
However, we should decide on exactly what we want to call it.
~ Joe G.


feat: add "deferred resources"

We now support a per-route decision to render an entire route asynchronously, so that things like meta tags and titles in the HTML head can be deferred until data are loaded. This is fine but could be improved.
"Deferred resources" would allow a finer-grained asynchronous rendering. In this model, if there are any "deferred resources" to be rendered, the initial stream chunk would wait for those resources to load, even if you're using out-of-order streaming. This would mean you could wait for a subset of resources to load (to set HTML metadata as above), but load other resources in a non-blocking way.

+1 for this, would love to defer for some things but not others

Merged.


Add dataFilter defaults of {} to batch statistical

The regular statistical API already did that. However it did that in a mutable way, which we now avoid by copying elements that are to be adjusted.

@zigaLuksic Tested for normal stats and batch stats and both worked


Client synchronization improvements

Makes a few changes to packet ordering during player loading to increase reliability in the client.

Moves a few things from PC_ENTER handler to LOADING_COMPLETE handler, fired only once. This way we don't risk packets getting missed.

MOTD
Auto-fail missions
Buddy list sync (fixes bug where buddy list sometimes doesn't populate on login)

For Academy only, work around a client-side race condition causing players with high latency to not see their equipped nanos in the nanocom (fixes #262)

The tradeoff here is that we need to send out the nanobook twice: once before PC_ENTER_SUCC and once after first load.
On top of that, there is a minuscule delay on loading nano skill icons on login.
However, this fix is deterministic and gets rid of the bug completely, even with ridiculously high latency. Whether you guys think this is worth it or not is up to you; I can take it out of the PR upon request.

I will merge this after testing on the public server for a day or two


plugin doesn't load

I wanted to try this but i couldn't get the plugin to load. I tried it both in lite and lite-xl and both by copy the directory to plugins and as copying init.lua to plugins/nagview.lua
below is a screenshot of the log: (i guess it would be useful to be able to select text and save the log, but that's a different issue, for a different repo ;)

That's probably because treeview (or something that splits the root node) loads before this plugin. Make sure you are using 4787e380c82c05196ff48843b8ce0f1c530191a5.

Nice! I got it working on lite, but not lite-xl, same error (latest master branch of lite-xl). Plugin looks just as naggy as it should. One small thing is that my mouse cursor changed to "resize" when hovering the bottom border of the bar. But I think this is great, and feels a lot more correct then the popup dialog window.

I'll be investigating them later.

lite-xl made a lot of changes to lite. I will try to port the plugin to lite-xl, but (since I only uses lite) I might not be able to maintain it.

I pushed a monkey patch to make lite-xl work for now. There are a lot of things that I'm missing out (like proper saving dialog vs. overriding core.quit. I am planning to create another file specifically for it.


Add HeavyDBTimestampType

Can you rebase with RBC main branch? Also, restrict the test to heavydb 6.0 or greater.

I added the skip. For the rebase, this branch is already up to date with main

@tupui, to fix the current error. Change buffer.py::truncate_cast_or_extend calls to
if isinstance(value.type, (ir.IntType, ir.FloatType, ir.DoubleType)):
    value = truncate_cast_or_extend(builder, value, buf.type.pointee, signed)

@tupui, to fix the current failure, apply the following patch
diff --git a/rbc/heavydb/timestamp.py b/rbc/heavydb/timestamp.py
index f1764aa..62f6224 100644
--- a/rbc/heavydb/timestamp.py
+++ b/rbc/heavydb/timestamp.py
@@ -32,6 +32,9 @@ class HeavyDBTimestampType(typesystem.Type):
         return 'Timestamp'

+extending.make_attribute_wrapper(TimestampNumbaType, 'time', 'time')
+
+
 @extending.type_callable(Timestamp)
 def type_heavydb_timestamp(context):
     def typer(arg):
diff --git a/rbc/tests/heavydb/test_timestamp.py b/rbc/tests/heavydb/test_timestamp.py
index 6792591..37cbad2 100644
--- a/rbc/tests/heavydb/test_timestamp.py
+++ b/rbc/tests/heavydb/test_timestamp.py
@@ -33,7 +33,7 @@ def test_timestamp(heavydb):
     def timestamp_extract(x, y):
         set_output_row_size(len(x))
         for i in range(len(x)):
-            y[i] = x[i]
+            y[i] = x[i].time
         return len(x)

     heavydb.register()
@@ -41,4 +41,4 @@ def test_timestamp(heavydb):
     table = 'time_test'
     query = f'select * from table(timestamp_extract(cursor(select t1 from {table})));'
     _, result = heavydb.sql_execute(query)
-    assert list(result) == [1,<PHONE_NUMBER>000]
+    assert list(result) == [(1,),<PHONE_NUMBER>000000000,)]

@guilhermeleobas can you have another look?

I made the changes @guilhermeleobas

Yes that would be a good thing to do IMO. Thanks for the review 😃
@pearu do you want to have a look?


[bug] footer: two column breakpoint on global footer not present

On the lower menu, it looks like we’re missing a breakpoint that puts them into 2 columns. The live versions go from 3 down to 1.
What I did

added in a new 2 column for the primary-links in the global-footer view for one of the mobile breakpoints
refactored and reordered the tokens to better align with the XD mockups
added tests for checking grid and flex layouts for global-footer primary/secondary links at multiple breakpoints

Code review

https://github.com/RedHat-UX/red-hat-design-system/commit/e40662ea31c7a9d622f521b53067d59404b1d008

Testing Instructions

Visit https://deploy-preview-491--red-hat-design-system.netlify.app/components/footer/demo/
Check that each of the following breakpoints match the correct grid column and flex layout per the design specs

Breakpoints:

mobilePortraitBreakpoint = 320px
mobileLandscapeBreakpoint = 576px
tabletPortraitBreakpoint = 768px
tabletLandscapeBreakpoint = 992px
desktopSmallBreakpoint = 1200px
desktopLargeBreakpoint = 1368px

Screenshots

Current mitigations
// Grid and layout fixes for global footer.
rh-global-footer::part(links-secondary) {
    grid-template-columns: 1fr;
}
rh-global-footer::part(links-primary) {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
@media screen and (min-width: 601px) {
    rh-global-footer::part(links-secondary) {
        grid-template-columns: 1fr 1fr;
    }
}
@media screen and (min-width: 700px) {
    rh-global-footer::part(links-primary) {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
@media screen and (min-width: 1008px) {
    rh-global-footer::part(links-primary) {
        display: flex;
    }
}

Looks good to me, the only thing I'm seeing (and maybe I'm missing it) is I don't see in the XD docs where we're supposed to go into the single column layout?  Unless that's just a fallback for when the screen is just too small to display it all on two lines?
It looks like we're flipping it to the single line layout at the mobileLandscapeBreakpoint breakpoint.

Looks good to me too, except what Brian brought up. The smallest screen size never has the secondary set of links go to one column in the specs --> https://xd.adobe.com/view/835616bd-1374-483d-ab10-6ae92e0e343c-d605/screen/9921ee27-fe0e-4c16-8c26-16ce65626ef7

@wesleymiles @brianferry I updated secondary links to be two columns at mobile like primary links:

@wesleymiles good catch!  I think this might have been a change since we originally implemented it.  I remember we had to do some magic to get the copyright into the same grid as the secondary links on mobile.

@wesleymiles I broke this out into its own issue so we can get the rest of these bug fixes merged for now.


Add Vue linting

Turns out the .vue files were not linted at all, so I added that as well as re-indented the file to 2-space and fixed all reasonable issues that came up except one case of a unintended side effect for which I have no idea how to fix it, so the rule was disabled.

🚀


Simplify error handling

This PR simplifies error handling by changing all Result<_, &'static str> to Result<_, String> so there are no more memory leaks.
It also uses .map_err(...)? to make the code a lot more concise

That's really good and important PR, but please use the provided template next time to introduce some consistency here :sweat_smile:
Thanks for contributing nonetheless!


oro/platform 4.1.4 requires ext-pcntl

Hi,
The php extension ext-pcntl seems to be missing in the following images
kiboko/php:7.3-cli-orocommerce-ce-4.1-mysql
kiboko/php:7.4-cli-orocommerce-ce-4.1-mysql
Got error
Problem 1
  - oro/platform 4.1.4 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
  - oro/platform 4.1.4 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
  - Installation request for oro/platform 4.1.4 -> satisfiable by oro/platform[4.1.4].

Thanks for your works.

@vpietri-tbd I cannot reproduce your issue, it seems it has been fixed a few weeks ago already.
Could you make a docker pull for both images ?
My checks :
gplanchat$ docker run --rm -ti kiboko/php:7.3-cli-orocommerce-ce-4.1-mysql php -m | grep pcntl
pcntl
gplanchat$ docker run --rm -ti kiboko/php:7.4-cli-orocommerce-ce-4.1-mysql php -m | grep pcntl
pcntl

I am marking this issue as fixed.
Feel free to reopen if needed.


writePredictedSpeculativeRetryPerformanceMetrics computes extra replica snapshot once

While reviewing some JFRs, AbstractReadExecutor.writePredictedSpeculativeRetryPerformanceMetrics() and PredictedSpeculativeRetryPerformanceMetrics.maybeWriteMetrics(ColumnFamilyStore cfs, Collection<Long> latencies, Optional<Snapshot> extraReplicaSnapshot) pop up with heavy allocations that we can reduce by computing the extra replica snapshot once per writePredictedSpeculativeRetryPerformanceMetrics invocation

lgtm, cutting rc to smoke test


Recommended webpack-dev-server dies on larger wasm in Chromium

Will also file an upstream bug, but perhaps we have work arounds for now? Such as a different dev server to recommend?
wasm_game_of_life_bg.wasm:4 Uncaught (in promise) RangeError: WebAssembly.Instance is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.instantiate.
    at eval (wasm_game_of_life_bg.wasm:4)
    at Object../wasm_game_of_life_bg.wasm (0.bootstrap.js:78)
    at __webpack_require__ (bootstrap.js:58)
    at eval (wasm_game_of_life.js:18)
    at Object../wasm_game_of_life.js (0.bootstrap.js:67)
    at __webpack_require__ (bootstrap.js:58)
    at eval (index.js:2)
    at Object../index.js (0.bootstrap.js:11)
    at __webpack_require__ (bootstrap.js:58)

Indeed! The hello world example has a caveat for this as well as updated scripts for chrome. The fix for this is coming in https://github.com/webpack/webpack/pull/6709 but I'm not sure the status of that

Upstream bug filed https://github.com/webpack/webpack-dev-server/issues/1365

Just FYI @alexcrichton the instantiateStreaming PR is not staled, the Webpack folks just have other priorities atm.


Fixed logging bug

Updating block time triggered caused "only 53 bits of precision" error. Discovered when issuing evm_increaseTime RPC. Apparently block timestamps are already numbers.

I discovered this via stacktrace!
vim /usr/local/lib/node_modules/ganache-cli/build/cli.node.js +90697


Add support for cancelling input with Escape

I think in certain contexts it make sense for Escape to cancel entering an input, similar to Ctrl-C or Ctrl-D. When entering a : command in vim, for example, hitting escape will return you to normal mode.

But rustyline has only normal and insert mode, no command line mode.
And on unix, a single escape is always ambiguous: escape sequence versus single escape depending on how fast you type.
Have you try to rebind this key ?

Rebinding the Escape key works fine (you essentially make it the same as Ctrl-U.

But with Windows Terminal, you may have the same issue as on unix if we activate ENABLE_VIRTUAL_TERMINAL_INPUT...

But with Windows Terminal, you may have the same issue as on unix if we activate ENABLE_VIRTUAL_TERMINAL_INPUT...

Not really.  I have mapped Esc to clear-line like this and it works just fine:
    // On Windows, Esc clears the input buffer
    #[cfg(target_family = "windows")]
    rl.bind_sequence(
        Event::KeySeq(smallvec![KeyEvent(KeyCode::Esc, Modifiers::empty())]),
        EventHandler::Simple(Cmd::Kill(Movement::WholeBuffer)),
    );

But rustyline has only normal and insert mode, no command line mode.

I wasn't referring to vim-mode in Rustyline, just using vim as an example of a program that allows using Escape to cancel entering input in readline-like contexts. You can also use Escape to cancel entering a search pattern after pressing / in vim.
I understand that escapes are fundamentally ambiguous, but there are workarounds for that -- lots of programs allow configuring a timeout where, if no data is supplied after reading an Escape byte, it'll register as an Escape press. And those programs also often support setting that timeout to 0. I think the rough assumption is that you'll basically never read half an escape sequence, so if you ask to read 64 bytes, but only get a single escape byte back, it's pretty likely that's an actual Escape press.
I tried binding a sequence, but it didn't seem to work:
rustyline_editor.bind_sequence(
    KeyEvent::new('\x1B', Modifiers::empty()),
    Cmd::Interrupt,
);

Using a different character -- just 'a', for example -- does work. (Also, what's the difference between Cmd::Abort and Cmd::Interrupt? I would expect Cmd::Abort to stop editing and return an Err, but it didn't seem to do anything.)

I think Escape is treated differently.  You have to bind via:
Event::KeySeq(smallvec![KeyEvent(KeyCode::Esc, Modifiers::empty())])

I understand that escapes are fundamentally ambiguous, but there are workarounds for that -- lots of programs allow configuring a timeout where, if no data is supplied after reading an Escape byte, it'll register as an Escape press. And those programs also often support setting that timeout to 0. I think the rough assumption is that you'll basically never read half an escape sequence, so if you ask to read 64 bytes, but only get a single escape byte back, it's pretty likely that's an actual Escape press.

See https://docs.rs/rustyline/latest/rustyline/config/struct.Config.html#method.keyseq_timeout
"By default, no timeout (-1) or 500ms if EditMode::Vi is activated."
So you can use Escape as the Meta key.

I tried binding a sequence, but it didn't seem to work:
rustyline_editor.bind_sequence(
    KeyEvent::new('\x1B', Modifiers::empty()),
    Cmd::Interrupt,
);

Using a different character -- just 'a', for example -- does work. (Also, what's the difference between Cmd::Abort and Cmd::Interrupt? I would expect Cmd::Abort to stop editing and return an Err, but it didn't seem to do anything.)

This should work by either pressing Escape twice or modifying the default timeout.
And Cmd::Abort is currently used only to abort completion or history search.

This does not work for me when using Behavior::PreferTerm, running on macOS 13.6.2, using rustyline 13.0.0:
use rustyline::history::MemHistory;
use rustyline::Editor;

fn main() {
    let editor_config = rustyline::config::Config::builder()
        .behavior(rustyline::config::Behavior::PreferTerm)
        .keyseq_timeout(0)
        .build();

    let mut editor = Editor::<(), MemHistory>::with_history(editor_config, MemHistory::default()).unwrap();

    editor.bind_sequence(
        rustyline::KeyEvent::new('\x1B', rustyline::Modifiers::empty()),
        rustyline::Cmd::Interrupt,
    );

    let result = editor.readline("Enter first command: ");
    println!("Initial input: {:?}", result);
}

If I delete the .behavior(rustyline::config::Behavior::PreferTerm) line, then it does work.

I've dug more into this, and discovered the root cause. To detect single-escapes vs escape sequences, after reading a single \x1B byte, rustyline polls the input input fd to see if it has more input to read. When using Behavior::PreferTerm, the input fd is /dev/tty, and calling poll does not work on devices on MacOS.
Here are some blog posts that explain potential workarounds.
I'm not sure how feasible it is to use one of these workarounds, but there may be a more straightforward solution when keyseq_timeout is set to 0. Since the input is buffered, we can just check if there is any additional buffered input, and assume that it is a single escape if there is no buffered input, and it is an escape sequence if there is buffered input, and not bother ever calling poll at all.
It seems like this scenario is already checked for debugging purposes?
if key == E::ESC {
    if !self.tty_in.buffer().is_empty() {
        debug!(target: "rustyline", "read buffer {:?}", self.tty_in.buffer());
    }
    ...
}

I'm not sure if there's any simple workaround when keyseq_timeout is some non-zero value however.
I've made a PR to fix this here: https://github.com/kkawakam/rustyline/pull/802


env: reject program with --null, error stderr

Can you add that --null doesn’t work with a command to the help text as well?

@Arcterus done.
Although when I compared with GNU's coreutils, they don't state that either in the help. So I was wondering whether we are trying to replicate things 1:1 here or make "improvements" here and there? (was wondering the same thing when I changed all error messages to go to stderr)

I think if it's a genuine improvement it's fine to change something as long as the commands (not including --help and --version) don't lose backwards-compatibility.  The fact that GNU doesn't state that --null only works without a command seems like an oversight to me.


Move from nose to pytest or nose2

https://nose.readthedocs.io/en/latest/ -- nose is on life support. I personally prefer pytest, but nose2 may also be considered. Has this been discussed very much yet?

I've been wanting to propose switching to pytest, but I was hesitant to rip the rug from under the feet of people used to the older setup just for the sake of my convenience.
However, this situation with nose EOL may be a good excuse to take the leap. +1 from me.


Feat - First draft of our POC

This proves the mechanism from redux -> angular shitty form api rendering
We need to work A LOT on the reducer, building up combined reducers that handles specific stuff like skills, etc
the very root form reducer will handle common operation among multiple forms like clear, maybe save, etc

@renvrant I guess this is a good start, we can talk tomorrow or whenever you have some time =]

I really like the fact that if you reload the site or leave and come back, the form is in the exactly same state it was before =]

👍


Type error : Fail to fetch

I have set heartbeatTimeout value to 5 mins even though API trigger every 1 mins with error : "Type error : Fail to fetch"
Can anyone help :

to find out the cause for this issue and
why heartbeatTimeout is not working in this case.
Thanks

Hi @Yaffle
Yes I have tried without polyfill, getting timeout error.
I have a question related to pollyfil, I have set heartbeatTimeout to 5 mins. However the API is being called every 1 min. I was expecting that by setting the heart beat timeout to 5 mins, a separate call would be made to the API after 5 mins of not getting any response.
Can you please help me understand this behavior?

@priyapitroda1712 , there is another thing - "retry" timeout, which is 1 second by default.
The native EventSource allows to set it from the event stream itself by using:
retry: 10000\n
And the polyfill allows to set it the same way.
This means, that it will try to reconnect after 1 second (by default) after the "fetch error".
"heartbeatTimeout" is to detect disconnects on the application level.
The polyfill uses "Fetch API" inside, I don't know if the browser has some timeout here.

Thanks @Yaffle
Yes, may be the browser has some timeout here.

Thanks @Yaffle for your all support
I am closing this as I'm able to solved this issue by continuously open the connection from API side until not getting the expected response.

Hey @priyapitroda1712 ,
I have the same issue. Can you tell more about how you solved it?
Thanks,
Alex

ok thanks, I understand!


Fix loc.end in multi-line jsx attribute values, basic test runner

This PR ensures multi-line jsx attribute values get the correct loc.end info. Previously it didn't handle newlines, so it treated it as if it were just one really long line. This bad data would cause some really weird behavior when transforming and reprinting via recast. See the updated test and commit message in c3bf25e for more info.
I also brought back just enough of the old test runner code to make sure i didn't break anything ... now npm run test works again :smile:

Thanks for contribution! I left a few small comments for clean-up, could you please update PR and I'll gladly accept it?

changes made! let me know if anything else needs tweaking :+1:

Thanks! Merged and published as 1.0.1.


Refactor README.md to descripe infra repo not DevOps course

We need to refactor README.md to describe our own infra repo not aech lesson in DevOps course.

Also I should move information with lessons to separate project.

#15 done part of this issue


[SPARK-48135][INFRA] Run buf and ui only in PR builders and Java 21 Daily CI

What changes were proposed in this pull request?
This PR aims to ru n buf and ui tests only in PR builders and Java 21 Daily CI.
Why are the changes needed?
Currently, Apache Spark CI is running buf and ui tests always because they finish quickly.
https://github.com/apache/spark/blob/32ba5c1db62caaaa2674e8acced56f89ed840bf9/.github/workflows/build_and_test.yml#L102-L103

buf job
https://github.com/apache/spark/blob/32ba5c1db62caaaa2674e8acced56f89ed840bf9/.github/workflows/build_and_test.yml#L571-L574

ui job
https://github.com/apache/spark/blob/32ba5c1db62caaaa2674e8acced56f89ed840bf9/.github/workflows/build_and_test.yml#L1049-L1052

However, ASF Infra team's guideline recommends to maintain the job concurrency level under or equal to 15. We had better offload buf and ui from per-commit CI.

https://infra.apache.org/github-actions-policy.html

All workflows SHOULD have a job concurrency level less than or equal to 15.

Does this PR introduce any user-facing change?
No because this is an infra update.
How was this patch tested?
Pass the CIs and manual review because PR builders will not be affected by this.
Was this patch authored or co-authored using generative AI tooling?
No.

Could you review this PR when you have some time, @viirya ?

Thank you, @viirya !
Merged to master.


Handling Custom Device versions

Description of changes
An additional flag custom_firmware_version = has been added to the standard environment [env] and is used for all standard boards as it gets not overwritten (no additional flag in the boards environment).
The custom device .ini files do have also this additional flag, but for each board a different version can be defined (or even the same, but than it should be changed into a common definition).
The get_version.py script checks if this additinal flag has a value, and if so this value is used for the firmware version within the filename. Otherwise the built version is used as for the filename as before.
Within OnGetInfo() both informations, the new flag and the existing built version, are send back to the connector.
First the new flag is send back as before, so it's still the firmware version. But it could be another one than for the standard boards. Additional the built version is send back which reflects the core version on which the FW is based. This is still required to check which functionalities the board supports (changing name, custom devices, ...)
An example message for OnGetInfo() could be:
10,Kav Mega,MobiFlight Mega,SN-3ED-CB1,1.0.5,2.5.0;

In this case  custom_firmware_version = 1.0.5 was defined.
If nothing is defined, the response would be:
10,Kav Mega,MobiFlight Mega,SN-3ED-CB1,2.5.0,2.5.0;

Changes in the connector would also be required to evaluate the additonal message as core version to check for functionalities. For now the connector just ignores the additional message, in case of a custom device with a "low" version some functions are not available.
CAUTION! The get_CustomDevices.py script is changed temporarily to download the `main' branch from the custom device repo. The changes in this repo are required to get it compiled. Once these changes are part of the next release from the custom device repo, this has to be implemented in this script.

I will close this PR as the handling for custom devices will be done in a complete different way.


mypy: Need type annotation for "graphql_app"  [var-annotated]

Since strawberry-graphql==0.169.0 mypy gives the following error on graphql_app = GraphQLRouter(schema):
app.py:16: error: Need type annotation for "graphql_app"  [var-annotated]
Found 1 error in 1 file (checked 1 source file)

Describe the Bug

pip install in your virtualenv:
pip install mypy fastapi strawberry-graphql==0.169.0

Take the example web application:
import strawberry

from fastapi import FastAPI
from strawberry.fastapi import GraphQLRouter

@strawberry.type
class Query:
    @strawberry.field
    def hello(self) -> str:
        return "Hello World"

schema = strawberry.Schema(Query)

graphql_app = GraphQLRouter(schema)

app = FastAPI()
app.include_router(graphql_app, prefix="/graphql")

Then run mypy:
$ mypy app.py

app.py:16: error: Need type annotation for "graphql_app"  [var-annotated]
Found 1 error in 1 file (checked 1 source file)

System Information

Operating system: Linux
Strawberry version (if applicable): 0.171.1

Additional Context

The problem does not happen in version 0.168.2:
$ pip install strawberry-graphql==0.168.2
$ mypy app.py
Success: no issues found in 1 source file

A workaround is to just annotate the graphql_app variable manually:
graphql_app: GraphQLRouter = GraphQLRouter(schema)

Of course it would be nicer if it can get fixed.

hi @yunzheng!
I think this is because I made GraphQLRouter (and all the other views) generic, can you try with:
graphql_app = GraphQLRouter[object, object](schema)?
(first type is the context type, second is the root value)

This works!, however it's unclear to me that I should define it like that. Also the examples are not updated to use this.

hi @yunzheng!
I think this is because I made GraphQLRouter (and all the other views) generic, can you try with:
graphql_app = GraphQLRouter[object, object](schema)?
(first type is the context type, second is the root value)

Is this still the best way to do this?

I hit this when I put pyright in strict mode

Type of "graphql_app" is partially unknown Type of "graphql_app" is "GraphQLRouter[Unknown, Unknown]" Pylance(reportUnknownVariableType)

And it took some master level Google fu to dig up anything helpful, like this conversation. Hopefully my copy-n-paste of that message helps others who search in the future.
Does it make sense to write
GraphQLRouter[None, None](schema, graphql_ide=None)

I don't have a root value or context object, so "None" sounds right. At the very least, "None" made the message go away.

@Topher-the-Geek yes, it makes sense :)
I think we can now use default on typevars now to make this go away 😊


ros_babel_fish: 0.9.3-1 in 'noetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository ros_babel_fish to 0.9.3-1:

upstream repository: https://github.com/StefanFabian/ros_babel_fish.git
release repository: https://github.com/StefanFabian/ros_babel_fish-release.git
distro file: noetic/distribution.yaml
bloom version: 0.11.0
previous version for package: 0.9.2-1

ros_babel_fish
* Added some more information to exception messages.
* Add libssl-dev as a build-export dependency
* Contributors: AR Dabbour, Stefan Fabian

ros_babel_fish_test_msgs

No changes

Holding for Noetic sync


Migrating swift5

migrating to swift 5.

Thanks for the update! How’s the extension otherwise working for you?


Update json dependency

In order to get the ruby client working with my Rails 5 based project, I had to remove the json dependency constraints as well as activesupport and rest_client constraints since I was locked to newer versions of these.
In theory this client should be designed to work with whatever json package is used by the project that it gets included in, rather than bringing in it's own json dependency.

[x] specs pass with this change except for one spec that seems to depend on launching an actual server to test against.
[x] client works with my Rails 5 project
[ ] maybe would be a good idea to update specs to test against different json gems?

NB: the specs call the to_json method in Enum. My project calls the as_json method in Enum so the as_json case is not currently covered in the specs.
Let me know if this seems like a good direction. I couldn't tell if this was the final version of the ruby client or if there's still a new version in the works. Cheers!

This PR can't be merged until the build is fixed, thanks.

@jamesdbloom I spent a little while with this and was unable to make headway. It seems like there is some configuration for the Snap CI build that I don't have access to? It needs to be updated to install a new ruby version on the CI runner. Things I tried:

Update travis.yml to bump the ruby version
Ran the tests locally (there was one failure but unrelated to the ruby client)
Ran the tests on my own Snap CI - (this didn't run ruby tests at all since it didn't auto-detect it)

If you can give me an idea how I can work with that Snap CI build, I'm happy to keep working on it.

The snap-ci build could be updated, however if we update the version of ruby that'll force users of the client to also upgrade.
For MockServer there is a policy of using the lowest version feasible to ensure that people working in restrictive commercial environments that can't easily upgrade their dependencies can continue to use the latest version of the libraries.
Can I please understand more about why we need this upgrade.
Thanks

Hmm thinking this through from the current point:

The ruby upgrade is needed because the latest version of active_support needs it
ActiveSupport needs it because removing the ~> 4.1 restriction causes it to install <IP_ADDRESS>
active_support in the gemspec needs to be updated from ~> 4.1 because that will lock it to the 4.x range and keep it from working for Rails 5 projects.

Perhaps we could update tests to explicitly use ActiveSupport 4.x then the tests will run against that version and the ruby upgrade won't be necessary?
Or perhaps make a separate Rails 5 compatible branch?
Or maybe the client code could be updated to not depend on ActiveSupport?
Generally, I think the direction of removing the json restrictions will only help to make it more compatible. The tricky part there is how to test with the various possible json gem options out there and make sure they still work? Probably best to start by setting up the test environment to have certain gems installed and at least cover the use cases it had before this change to ensure that if people had it working in a given environment, it should continue working there?
That's a lot of question marks... Sorry for generating more questions than answers. I'm happy to tackle one or more of these solutions though once I have an idea what you'd like to see.

@jamesdbloom @radixhound Hey. guys. I read all the comments from this issue and it seems that for a good period of time nothing happened. Is this PR abandoned? I have the same issue with integrating the gem with a Rails 5 application due to the activesupport dependencies. I think it's a big deal to not be able to use it with Rails 5 and we should definitely do something to fix it.

@ovidiubite This branch is working very well for us on our Rails 5 project. I'd love to help get this update merged in but my hands are tied without some guidance.

@radixhound I think I'm also gonna use your branch until we manage to merge the update. Another potential issue for this repo is that end of life for Snap Ci https://blog.snap-ci.com/blog/2017/02/06/2017-02-06-snap-announcement/ but this is another topic.

Unfortunately this PR can't be merged as its failing the build.

On the topic of Snap CI no longer supporting builds, I'm looking at move back to Travis or drone.io to resolve that.

the ruby client has moved to https://github.com/jamesdbloom/mockserver-client-ruby please raised any PRs for this client on that repository


Generated Code Projects Stored in Two Places

System Information (please complete the following information):

Model Builder Version: 16.0.1905.641
Visual Studio Version: 15.9.12

Describe the bug
After the model is trained and evaluated. In the Code step, after clicking Added Projects, as expected they are added to the current solution. However, they also persist in the default save location therefore storing the generated code contents in two places.
Expected behavior
After projects are added to the current solution, the generated code stored in C:\Users\%USERNAME%\AppData\Local\Temp\MLVSTools should be cleaned up / deleted.
Screenshots

#76

It's not uncommon to leave stuff in Temp and windows has settings to Auto Clean ... but it should be easy to do.


Crash when ending level

Not consistently reproducible, but:

only observed when shield is active
typically with multiball (9+ balls current)
on breaking the last brick or second to last brick, it just crashes with no debug output

The revised code that runs now hasn't caused this again, but it's also not relying on free() any more, just normal queue_free() calls.


Unable to run end-to-end test Teraform Test

I am following the following commands as per the tutorial, but still getting error. I am having Windows10 Laptop.

Also sharing the rsa file
id_rsa.txt

Hi @KarlErickson  @TomArcherMsft , any help on this please?Tnx.

@sayom88 Apologies for the delay. I'm copying in one of the team that wrote that series of articles to help you.
@jcorioland Could you please assist?

Hello @sayom88 - if you are using PowerShell, instead of doing:
export TEST_SSH_KEY_PATH="/home/USER/.ssh/id_rsa"

to configure the TEST_SSH_KEY_PATH environment variable, please try to use the following syntax:
$Env:TEST_SSH_KEY_PATH = '/home/USER/.ssh/id_rsa'

You can read more about PowerShell and environment variables here.
Hope this helps
Julien
cc @TomArcherMsft

Thanks @jcorioland
@sayom88, I'm closing the doc issue, but please let us know if you need further assistance.


Adding doc(hidden) non-defaulted item is permissible if other doc(hidden) non-defaulted items exist

Which lint or lints are the issue
trait_associated_type_added
Known issues that might be causing this

[ ] Is the flagged item defined in another crate, or a re-export of such an item? (#638)

Steps to reproduce the bug with the above code
We are experiencing this issue with the KnownLayout trait in zerocopy, specifically from this commit: https://github.com/google/zerocopy/commit/b573d832ca02f2b735359c87dd92de151e7d8b33
In isolation, this bug may be reproduced by defining a trait with doc(hidden) non-defaulted items:
trait KnownLayout {
    #[doc(hidden)]
    fn only_derive_is_allowed_to_implement_this_trait()
    where
        Self: Sized;
}

Then, add an associated type:
  trait KnownLayout {
+     type MaybeUninit;

      #[doc(hidden)]
      fn only_derive_is_allowed_to_implement_this_trait()
      where
          Self: Sized;
  }

Actual Behaviour
cargo-semver-checks registers this delta as a breaking change.
Expected Behaviour
Because MyTrait already contains doc(hidden) non-defaulted items, its consumers have opted out of SemVer stability. In practice, this situation arises when the trait is documented as being implementable by a particular proc macro (e.g., zerocopy's KnownLayout, so no breakage occurs for any users who are respecting this contract.
Verbose Lint Output
$ cargo semver-checks check-release --package zerocopy --only-explicit-features --features __internal_use_only_features_that_work_on_stable --verbose
     Parsing zerocopy v0.8.10 (current)
             Features: __internal_use_only_features_that_work_on_stable
    Updating crates.io index
     Locking 6 packages to latest compatible versions
 Documenting zerocopy v0.8.10 (/home/ubuntu/projects/zerocopy)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.92s
      Parsed [   1.189s] (current)
     Parsing zerocopy v0.8.10 (baseline)
             Features: __internal_use_only_features_that_work_on_stable
   Compiling proc-macro2 v1.0.89
   Compiling unicode-ident v1.0.14
   Compiling zerocopy v0.8.10
   Compiling quote v1.0.37
   Compiling syn v2.0.87
   Compiling zerocopy-derive v0.8.10
 Documenting zerocopy v0.8.10
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.00s
      Parsed [   4.324s] (baseline)
    Checking zerocopy v0.8.10 -> v0.8.10 (no change)
    Starting 94 checks, 0 unnecessary on 72 threads
        PASS [   0.018s]       major        auto_trait_impl_removed
        PASS [   0.002s]       major        constructible_struct_adds_field
        PASS [   0.006s]       major        constructible_struct_adds_private_field
        PASS [   0.003s]       major        constructible_struct_changed_type
        PASS [   0.011s]       major        declarative_macro_missing
        PASS [   0.026s]       major        derive_trait_impl_removed
        PASS [   0.002s]       major        enum_marked_non_exhaustive
        PASS [   0.003s]       major        enum_missing
        PASS [   0.002s]       minor        enum_must_use_added
        PASS [   0.004s]       major        enum_no_repr_variant_discriminant_changed
        PASS [   0.002s]       major        enum_now_doc_hidden
        PASS [   0.005s]       major        enum_repr_int_changed
        PASS [   0.003s]       major        enum_repr_int_removed
        PASS [   0.003s]       major        enum_repr_transparent_removed
        PASS [   0.003s]       major        enum_struct_variant_field_added
        PASS [   0.003s]       major        enum_struct_variant_field_missing
        PASS [   0.003s]       major        enum_struct_variant_field_now_doc_hidden
        PASS [   0.003s]       major        enum_tuple_variant_changed_kind
        PASS [   0.004s]       major        enum_tuple_variant_field_added
        PASS [   0.003s]       major        enum_tuple_variant_field_missing
        PASS [   0.003s]       major        enum_tuple_variant_field_now_doc_hidden
        PASS [   0.003s]       major        enum_unit_variant_changed_kind
        PASS [   0.004s]       major        enum_variant_added
        PASS [   0.003s]       major        enum_variant_marked_non_exhaustive
        PASS [   0.003s]       major        enum_variant_missing
        PASS [   0.003s]       major        exported_function_changed_abi
        PASS [   0.004s]       major        function_abi_no_longer_unwind
        PASS [   0.003s]       major        function_changed_abi
        PASS [   0.002s]       major        function_const_removed
        PASS [   0.003s]       major        function_export_name_changed
        PASS [   0.003s]       major        function_missing
        PASS [   0.004s]       minor        function_must_use_added
        PASS [   0.003s]       major        function_now_doc_hidden
        PASS [   0.003s]       major        function_parameter_count_changed
        PASS [   0.003s]       major        function_unsafe_added
        PASS [   0.005s]       major        inherent_associated_const_now_doc_hidden
        PASS [   0.006s]       major        inherent_associated_pub_const_missing
        PASS [   0.015s]       major        inherent_method_const_removed
        PASS [   0.010s]       major        inherent_method_missing
        PASS [   0.011s]       minor        inherent_method_must_use_added
        PASS [   0.010s]       major        inherent_method_now_doc_hidden
        PASS [   0.017s]       major        inherent_method_unsafe_added
        PASS [   0.019s]       major        method_parameter_count_changed
        PASS [   0.002s]       major        module_missing
        PASS [   0.004s]       major        non_exhaustive_struct_changed_type
        PASS [   0.002s]       major        pub_module_level_const_missing
        PASS [   0.003s]       major        pub_module_level_const_now_doc_hidden
        PASS [   0.002s]       major        pub_static_missing
        PASS [   0.002s]       major        pub_static_mut_now_immutable
        PASS [   0.002s]       major        pub_static_now_doc_hidden
        PASS [   0.004s]       major        repr_c_removed
        PASS [   0.004s]       major        repr_packed_added
        PASS [   0.005s]       major        repr_packed_removed
        PASS [   0.008s]       major        sized_impl_removed
        PASS [   0.004s]       major        struct_marked_non_exhaustive
        PASS [   0.003s]       major        struct_missing
        PASS [   0.004s]       minor        struct_must_use_added
        PASS [   0.004s]       major        struct_now_doc_hidden
        PASS [   0.003s]       major        struct_pub_field_missing
        PASS [   0.003s]       major        struct_pub_field_now_doc_hidden
        PASS [   0.004s]       major        struct_repr_transparent_removed
        PASS [   0.004s]       major        struct_with_no_pub_fields_changed_type
        PASS [   0.004s]       major        struct_with_pub_fields_changed_type
        PASS [   0.004s]       major        trait_added_supertrait
        PASS [   0.004s]       major        trait_associated_const_added
        PASS [   0.002s]       major        trait_associated_const_default_removed
        PASS [   0.003s]       major        trait_associated_const_now_doc_hidden
        FAIL [   0.003s]       major        trait_associated_type_added
        PASS [   0.002s]       major        trait_associated_type_default_removed
        PASS [   0.003s]       major        trait_associated_type_now_doc_hidden
        PASS [   0.003s]       major        trait_method_added
        PASS [   0.005s]       major        trait_method_default_impl_removed
        PASS [   0.002s]       major        trait_method_missing
        PASS [   0.003s]       major        trait_method_now_doc_hidden
        PASS [   0.002s]       major        trait_method_unsafe_added
        PASS [   0.003s]       major        trait_method_unsafe_removed
        PASS [   0.003s]       major        trait_missing
        PASS [   0.003s]       minor        trait_must_use_added
        PASS [   0.003s]       major        trait_newly_sealed
        PASS [   0.002s]       major        trait_no_longer_object_safe
        PASS [   0.003s]       major        trait_now_doc_hidden
        PASS [   0.003s]       major        trait_removed_associated_constant
        PASS [   0.002s]       major        trait_removed_associated_type
        PASS [   0.004s]       major        trait_removed_supertrait
        PASS [   0.003s]       major        trait_unsafe_added
        PASS [   0.002s]       major        trait_unsafe_removed
        PASS [   0.001s]       major        tuple_struct_to_plain_struct
        PASS [   0.002s]       minor        type_marked_deprecated
        PASS [   0.002s]       major        union_field_missing
        PASS [   0.002s]       major        union_missing
        PASS [   0.004s]       minor        union_must_use_added
        PASS [   0.002s]       major        union_now_doc_hidden
        PASS [   0.003s]       major        union_pub_field_now_doc_hidden
        PASS [   0.003s]       major        unit_struct_changed_kind
     Checked [   0.032s] 94 checks: 93 pass, 1 fail, 0 warn, 0 skip

--- failure trait_associated_type_added: non-sealed public trait added associated type without default value ---

Description:
A non-sealed trait has gained an associated type without a default value, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/trait_associated_type_added.ron

Failed in:
  trait associated type zerocopy::KnownLayout::MaybeUninit in file /home/ubuntu/projects/zerocopy/src/lib.rs:742

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [   5.608s] zerocopy

Generated System Information
System information:
Software version
cargo-semver-checks 0.36.0
Operating system
Linux 5.15.0-1064-aws
Command-line
/home/ubuntu/.cargo/bin/cargo-semver-checks semver-checks --bugreport

cargo version
> cargo -V
cargo 1.83.0-nightly (80d82ca22 2024-09-27)

Compile time information

Profile: release
Target triple: x86_64-unknown-linux-gnu
Family: unix
OS: linux
Architecture: x86_64
Pointer width: 64
Endian: little
CPU features: fxsr,sse,sse2
Host: x86_64-unknown-linux-gnu

Cargo build configuration:
[build]
rustflags = ["--cfg=zerocopy_unstable"]
rustdocflags = ["--cfg=zerocopy_unstable"]
[doc]
browser = ["/home/ubuntu/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/bin/helpers/browser.sh"]
Build Configuration
No response
Additional Context
https://github.com/google/zerocopy/pull/2055#issuecomment-2487001039

Thanks! This is an instance of a broader issue around sealed traits and SemVer. It's definitely fixable, though will require some (relatively intricate) new analysis.
I made #999 for the broader problem.


python3Packages.vtk_9 not building

Describe the bug
Trying to build a nix-shell with python3Packages.vtk_9 I'm getting this error:
nix-shell -p 'python3.withPackages (ps: with ps; [ ps.vtk_9 ])' --show-trace                                                     [ ]) (ps: ps; ps.vtk_9 python39.withPackages with
error: --- TypeError ------------------------------------------------------------------------------------------------------------------------------------------------------ nix-shell
at: (69:16) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/lib/customisation.nix

    68|     let
    69|       result = f origArgs;
      |                ^
    70|

anonymous function at /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/development/libraries/vtk/generic.nix:2:1 called with unexpected argument 'python'
------------------------------------------------------------------------------------ show-trace -------------------------------------------------------------------------------------
trace: while evaluating 'makeOverridable'
at: (67:24) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/lib/customisation.nix

    66|   */
    67|   makeOverridable = f: origArgs:
      |                        ^
    68|     let

trace: from call site
at: (77:41) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/lib/customisation.nix

    76|       # Re-call the function but with different arguments
    77|       overrideArgs = copyArgs (newArgs: makeOverridable f (overrideWith newArgs));
      |                                         ^
    78|       # Change the result of the function call by applying g to it

trace: while evaluating anonymous lambda
at: (77:32) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/lib/customisation.nix

    76|       # Re-call the function but with different arguments
    77|       overrideArgs = copyArgs (newArgs: makeOverridable f (overrideWith newArgs));
      |                                ^
    78|       # Change the result of the function call by applying g to it

trace: from call site
at: (51:5) in file: /home/thiago/.config/nixpkgs/overlays/pkgs/python_overlays.nix

    50|   vtk_9 = python-super.toPythonModule (
    51|     pkgs.vtk_9.override {
      |     ^
    52|       inherit (python-self) python;

trace: while evaluating 'toPythonModule'
at: (73:20) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/top-level/python-packages.nix

    72|   # Convert derivation to a Python module.
    73|   toPythonModule = drv:
      |                    ^
    74|     drv.overrideAttrs( oldAttrs: {

trace: from call site
at: (50:11) in file: /home/thiago/.config/nixpkgs/overlays/pkgs/python_overlays.nix

    49|
    50|   vtk_9 = python-super.toPythonModule (
      |           ^
    51|     pkgs.vtk_9.override {

trace: while evaluating the attribute 'vtk_9'
at: (50:3) in file: /home/thiago/.config/nixpkgs/overlays/pkgs/python_overlays.nix

    49|
    50|   vtk_9 = python-super.toPythonModule (
      |   ^
    51|     pkgs.vtk_9.override {

trace: while evaluating 'hasPythonModule'
at: (58:21) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/top-level/python-packages.nix

    57|   # Check whether a derivation provides a Python module.
    58|   hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python;
      |                     ^
    59|

trace: from call site
trace: while evaluating 'requiredPythonModules'
at: (61:27) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/top-level/python-packages.nix

    60|   # Get list of required Python modules given a list of derivations.
    61|   requiredPythonModules = drvs: let
      |                           ^
    62|     modules = filter hasPythonModule drvs;

trace: from call site
at: (15:13) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/development/interpreters/python/wrapper.nix

    14|   env = let
    15|     paths = requiredPythonModules (extraLibs ++ [ python ] ) ;
      |             ^
    16|     pythonPath = "${placeholder "out"}/${python.sitePackages}";

trace: while evaluating the attribute 'passAsFile' of the derivation 'python3-3.8.6-env'
at: (7:7) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       name = lib.strings.sanitizeDerivationName name;
      |       ^
     8|       inherit buildCommand;

trace: while evaluating the attribute 'buildInputs' of the derivation 'shell'
at: (7:7) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/build-support/trivial-builders.nix

     6|     stdenv.mkDerivation ({
     7|       name = lib.strings.sanitizeDerivationName name;
      |       ^
     8|       inherit buildCommand

The same problem is not happening with vtk_7 and vtk_8.  The interesting is that with python3.9 it is building.
To Reproduce
Steps to reproduce the behavior:

❯ nix-shell -p 'python3.withPackages (ps: with ps; [ ps.vtk_9 ])'
Shows the error

Expected behavior
Create a new nix-shell with vtk_9 python module.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I'm using NixOS-unstable with flakes.
Notify maintainers

@lheckemann
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.3, NixOS, 21.03.20201229.733e537 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4pre20201201_5a6ddb3`
 - channels(root): `"nixos-21.03pre250162.34ad166a830"`
 - nixpkgs: `/etc/nixpkgs`

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

You seem to be using some other channel than the two revisions (733e537, 34ad166a830) reported with nix-info. I cannot reproduce the issue with either of them.

You seem to be using some other channel than the two revisions (733e537, 34ad166a830) reported with nix-info. I cannot reproduce the issue with either of them.

Pfff, you have an overlay. Remove it, because python3.pkgs.vtk_9 exists on master already.

Pfff, you have an overlay. Remove it, because python3.pkgs.vtk_9 exists on master already.

Lol. I forgot the overlay.

Lol. I forgot the overlay.


Feature/rst 170 search

https://triadmoj.atlassian.net/browse/RST-170
Originally I separated the search into another controller, but the shared view is building URLs based on active controller. Which didn't work for search controller without creating duplicated views. So I decide to do a simple version.

@leoapost fixed.


added ppi calc to OSX

this shoudl be about right...  Also added the headers to the framework target.

@tesch1 Thanks for the PR. I've updated your code a bit to reflect non square pixels (it's possible), and hidpi displays.
Please let me know if that works for your use case, and I will merge

Great!
(small pedantry comment, it's your project, but - sqrt is probably slightly faster than pow, and I would personally use *25.4 since it's more recognizeable and succinct :)

Done

Were good suggestions thanks!
I've cut a new release with this included: 5.1.0


stress test playground cluster buildout

Migration to chaos mesh 2.1.5 + westus2->westus3

Somehow this ended up being hardcoded. I probably missed it in my initial commit. I think it can either be removed or replaced.

LGTM for provision related changes. As we talked about the doc and script updates on the user side will be a follow-on update.

/check-enforcer reset

/check-enforcer override


this function is not aware of "tiff squashing".

https://github.com/bluesky/ophyd/blob/df60483867e521dcda83648756cab8fc7b80dd17/ophyd/areadetector/detectors.py#L77
At XPD, we always use "tiff squashing" There is a key called "number_of_sets".
I do this change manually for py file here :/xx//site-packages/ophyd/areadetector/detectors.py
    #shape = (self.cam.num_images.get(),
             #self.cam.array_size.array_size_y.get(),
             #self.cam.array_size.array_size_x.get())
    #if proc plugin is being used
    shape = (self.number_of_sets.get(),
             self.cam.array_size.array_size_y.get(),
             self.cam.array_size.array_size_x.get())

The quick-fix is to over-ride this at XPD/PDF, the long-term fix is to push this method down into the plugins.  You could imagine there being two

@tacaswell on a local conda environment, I was manually editing /xx//site-packages/ophyd/areadetector/detectors.py as shown above. But this is not ideal. Because I cannot edit files such as "/nsls2/conda/envs/2022-2.3-py39-tiled/lib/python3.9/site-packages/ophyd/init.py". Is there a way to apply this fix without editing source code? Thanks

via a local subclass.


No condition field provided when calling condition API

This is the provided code to request the next condition number if not using jsPsych:
const response = await fetch("https://pipe.jspsych.org/api/condition/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Accept: "*/*",
  },
  body: JSON.stringify({
    experimentID: "myExpIDHere",
  }),
});

However, though I can get the response, the condition field does not appear to be in the JSON. I keep getting the error "Cannot read properties of undefined" when I use the value response.condition to index into an array of four elements.

Hi @adityac95 ,
Can you provide the surrounding context code as well? Is it in an async function?

Yes. The relevant code is:
let participantMelodies = [];
let participantRatings = [[], []];
let currTrialNum = 0;
let currRatingNum = 0;
let trialConditions;
let currCondition;
let currMelodyToRate = '';
let emailId = '';

// get condition assignment
async function getCondition() {
	const response = await fetch("https://pipe.jspsych.org/api/condition/", {
		method: "POST",
	  	headers: {
	    	"Content-Type": "application/json",
	    	Accept: "*/*",
	  	},
	  	body: JSON.stringify({
	    	experimentID: "NNaz4BL5YVIv",
	  	}),
	});
	console.log(response);
	return response
}

async function initExperiment() {
    let response;
    try {
        response = await getCondition();
    } catch (error) {
        console.error("Error fetching condition:", error);
        // Fallback to a random condition if fetch fails
        response = { condition: Math.floor(Math.random() * conditionPairs.length) };
    }

    trialConditions = conditionPairs[response.condition];

    // Set up the initial trial
    setupInitialTrial();
}

function setupInitialTrial() {
	// set the condition
    currCondition = trialConditions[currTrialNum];
}

// Call this function to start the experiment
initExperiment();

The TypeError is raised when setupInitialTrial() is called inside the initExperiment() function.


Plugin system in different languages

Ok, this is a stretch and more a question than I real issue..
Would you think it could be possible to implement a sort of API for plugins and just speaks to chunkwm over the socket?
I am not proficient with objc, but I have a lot of experience with python and go and maybe having other languages will make writing plugins easier..
Another option I am considering is just use cgo and write native plugin in golang.
This is not a priority, just an idea I had in mind from some time ago.

Well, it is certainly possible to establish a protocol to allow this. Many server, client types of applications do this. I'm not sure yet how we would make both systems run in parallel.
I'm sure it should be possible to create some sort of binding for the current interface though, that would let you write the majority of the code in python.
The plugin API design did not turn out completely the way I had hoped at first, due to the rise of macOS Sierra. See comment here. On another note, I really dislike objc. I'm not a fan of modern C++ either, which is why most of the codebase is very primitive C++ code.

Well the python binding part looks to the the simpler one from a consumer point of view. I did some cgo binding to objc and it is a real pain to encapsulate objc object inside golang one :(

Some docs regarding integrating python: https://docs.python.org/2/extending/embedding.html

@crisidev Maybe I'm completely wrong about this, but as long as you can compile shared libraries in go, you could theoretically do everything from go without a binding, as long as the shared library exports the necessary format that chunkwm expects upon calling dlopen, dlsym.

@koekeishiya correct. The only part needed is an header file with the function which need to be exported to chunkwm (aka what you defined in the API pdf). These functions will have to follow the API for parameter and returns, using cgo. The rest can be pure go. The problem is if you use complex types as arguments or return values. These need to be translate into go types using cgo and vice versa to c++ types. This is what I understood about cgo writing PAM modules.

@crisidev The types passed between chunkwm and plugins are as follows:
passed to plugins during init / event:
chunkwm_api
chunkwm_payload
macos_window
macos_application
other from /common/:
macos_space
macos_display
If code from /common/ is used, std::vector is also utilized for some parts.

I'll try to take a look to it next week and maybe try to build a query plugin on golang if you are not already working on it in objc.

I took a look over the types used and

chunkwm_api should be easy
chunkwm_payload should be easy

All the macos_* are more complex since the types contain other internal complex types which I think are referred to OSX library type like AXWindow and so on. Anyway, I'll try to start working on a wrapper ASAP.

@crisidev I have not started on anything related to queries yet.
Info about the macOS types that can come in handy. Some of the types requires some more investigation I suppose.
From ApplicationServices/Frameworks/HIServices/AXUIElement.h:
AXObserverRef:
An AXObserverRef is a CFTypeRef.
typedef struct CF_BRIDGED_TYPE(id) __AXObserver *AXObserverRef;

AXUIElementRef:
An AXObserverRef is a CFTypeRef.
typedef const struct CF_BRIDGED_TYPE(id) __AXUIElement *AXUIElementRef;

ProcessSerialNumber:
struct ProcessSerialNumber {
   unsigned long highLongOfPSN;
   unsigned long lowLongOfPSN;
};

CGFloat:
When you build for a 64-bit CPU, the CGFloat type is a 64-bit,
IEEE double-precision floating point type, equivalent to the Double type.

When you build for a 32-bit CPU, the CGFloat type is a 32-bit,
IEEE single-precision floating point type, equivalent to the Float type.

CGPoint:
struct CGPoint {
    CGFloat x;
    CGFloat y;
};
typedef struct CGPoint CGPoint;

CGSize:
struct CGSize {
    CGFloat width;
    CGFloat height;
};
typedef struct CGSize CGSize;

So far I was able to implement a golang mock of PLUGIN_MAIN_FUNC and PLUGIN_VOID_FUNC.
The rest is more complex. I am expanding all the macros with clang++ -E src/core/chunkwm.mm to see if it is doable :)

I did some research and looks like cgo does not support building .mm files.
Between this and some of the macros (namely CHUNKWM_PLUGIN) which do not expand properly in cgo, I see building a golang interface VERY VERY complex :(
I will do other researches anyway. Regarding the query plugin, it will be way more easy to build it in objc. If we want to pursue the golang / python plugin way, IMHO API interaction via socket is the better approach. Otherwise I think some rethink will be needed inside chunkwm core and plugin internal structure. That said I am no expert in objc and I did not used cgo that much to be 100% sure I am not saying BS :D

Hm the macros just define a couple of pretty primitive functions, so you don't need to actually use the macros.
I don't know how cgo or go works in general, so I can't really provide much help here.
You don't really need to touch any objc though. The plugin interface can be used from more or less a simple C89 application. If you understand and can read / write basic C programs, that should be enough.
Depending on what the plugin is going to do, you might need support for interfacing with isolated objc code, the way I do to create borders or access NSWorkspace. None of the objc specific types are exposed outside their .mm file.

The problem are the types passes to every primitive function used to register a new plugin. It is not matter of objc / c / c++ but types.
Cgo can be used in two ways:

import and use current C / C+ code. This is very complex because of what I said above. Cgo is not able to compile mm code and you are using std::vector in headers, which is totally unsupported. Simply it does not build without changing chunkwm quite a lot
rewrite the plugin API in go and export functions to C, following the plugin API. This mean reimplement all the types passed as arguments and returned by exported functions in go. Basically it is rewriting the full plugin part in go.

Due to the fact that we have to interact with windows / applications through their AXUIElementRef types, any plugin that wants to actually interact with the system needs to be able to represent this type.
The easiest solution from my perspective, would thus be to leave the chunkwm C-API intact.
You then build a "control" protocol on top of the command system that chunkwm exposes to their plugins.
Roughly what this might look like
command -> socket -> chunkwm
chunkwm -> plugin->run -> "custom dispatch protocol"
"custom dispatch protcol" -> socket -> <entry to code in whatever language>

<code in whatever language> -> socket -> chunkwm -> plugin->run -> "custom command protocol"

Lets take the example of moving and resizing windows.
The plugin that chunkwm loads subscribes to the window-related events per normal.
You now create wrapper functions that can move a window by identiying it uniquely with its window id, (pid if application and so on).
You dispatch the same event, replacing the window data structure with the format your protocol requires, (probably use window id as identifier), and pass the new primitive data to the plugin written in go or something else.
When you want to move a window from the go plugin, dispatch a message following your protocol back to the C-plugin, through the chunkwm command system. The C-plugin reads understands your protocol and maps the window id (or whatever info) back to a macos_window struct and can call the AX-API functions on it.

@crisidev
Regarding the above approach. Instead of defining a text protocol through the command system, we could have a minimal C-plugin that interfaces with chunkwm. This plugin could then dlopen some other shared library (a go library), which defines its own ABI.
Events received from chunkwm to the minimal C-plugin could then call handlers inside the shared library with the appropriate arguments.
The reason I don't want to do this directly in chunkwm, is that I do not want plugins to have to interact with the AXUIElementRefs through chunkwm.

@koekeishiya I think this is a good approach!

If you are interested in trying something like the above, that would be cool. I don't have any experience with go etc, so I can only contribute with the C-parts that you may need help with.
I think the dlopen approach is better than the text-based protocol.

I would love to do it. This week I am really busy with thou.. I can start poking around next week. We should first define an API for the C part I think.

This is a pretty interesting idea :). I've begun taking a stab at making an RPC plugin with a minimal Python plugin.
I haven't worked out the specifics of what the best way create an interface in the other language (given all of the C function calls to fetch or manipulate stuff), but I've been thinking about the border plugin as a milestone.
(If you're curious, you can check out the WIP code here)

I've been trying to remove all C code in the plugin template (not that I hate C), which has worked out quite great.
But there was one thing I stumbled upon, which is the disability to export statics in Rust.
So, @koekeishiya, might it be possible to change the exported plugin_details Exports to a function like plugin_details GetExports()?

@splintah
You should be able to do the plugin_details Exports in  rust like this:
#[repr(C)]
pub struct plugin_details {
    number: i32,
}

#[no_mangle]
pub static Exports: plugin_details = plugin_details {
    number: 10,
};

and just fill in the struct members and the initialization values instead of the dummy ones that I've placed above.
Then compile the rust code to a shared library: rustc --crate-type cdylib
The following c-code can then load the rust library and retrieve the static Exports variable that was declared in global scope ( in rust ):
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>

struct MyStruct {
    int32_t number;
};

int main()
{
    void *handle = dlopen("libmain.dylib", RTLD_LAZY);
    if (handle) {
        struct MyStruct *my_struct = (struct MyStruct *) dlsym(handle, "Exports");
        printf("%d\n", my_struct->number);
        dlclose(handle);
    }
}

Owh, hmm, I thought exporting statics in Rust was unsupported.
Well, thank you!

The #[no_mangle] pub static Export approach works, but the problem is that *const c_chars (const char * in C) can't be created as a static from regular Rust &'static strs. The current implementation uses fn name() -> &'static str (and the same for version) to specify the plugin's name, and since const fn isn't stable yet, those cannot be used for statically exporting the strings.
When const fn will be stable, std::ffi::CString::new(...) can be used to create the C-compatible pointer.
One way to fix this problem is to use a struct contains a *const u8, like explained here. The create_bridge! macro could receive these strings as arguments.
But the problem is that strings should be declared like b"string contents\0". The macro usage would look like
create_bridge!(Plugin, b"plugin name\0", b"version\0")

which isn't great...
Another option I thought of was using lazy_static!, but this does not work since the static isn't actually a static, but a singleton that gets initialised at runtime.

Hmm I would've thought something like this would work
const fname: *const u8 = &b"filename\0"[0];
const pname: *const u8 = &b"pluginname\0"[0];
const pvers: *const u8 = &b"0.0.1\0"[0];

#[repr(C)]
pub struct plugin_details {
    api_version: i32,
    filename: *const u8,
    plugin_name: *const u8,
    plugin_version: *const u8,
}

#[no_mangle]
pub static Exports: plugin_details = plugin_details {
    api_version: 10,
    filename: fname,
    plugin_name: pname,
    plugin_version: pvers
};

I'm not very familiar with rust though, so yeah

Well, using a pointer does work, like:
const fname: *const u8 = b"file name\0" as *const u8;

but a nul character must be added, and it must be defined as bytes.

I'll agree that is looks a bit messy like that, but if it works I personally think that is the best approach.
The alternative is that chunkwm does a dlsym to get a function that returns a singleton structure of type plugin_details, which would require us to do a dlsym followed by a function call, rathern than just the dlsym that is done today. I'd prefer not having to do that.

The alternative is that chunkwm does a dlsym to get a function that returns a singleton structure of type plugin_details, which would require us to do a dlsym followed by a function call, rathern than just the dlsym that is done today. I'd prefer not having to do that.

Yeah, I understand. I will try to come up with other alternatives, and otherwise I will probably use the b"\0" method.


Mame box art or video snaps not working

Hello,
I finally got everything working on arkos using ambernic rg351mp. the only issue im having is that the mame roms dont show box art or video snaps, i dont see any thing different as far as the folder structures go, all other system do show video art and video snaps, i re scraped the mame roms but it just scans thru them quickly and does not fix the issue.
any suggestions?

i have a folder called video for the snaps and one for images for the box art, seems to work on all the other systems

disregard, i was able to re scrape the system and even though it did download anything it some how scanned the existing art and videos and now they work, not sure how but im good with that  :)


Multiline not working, color working partially

As you can in the image, some of the coloring works, and multiline doesn't work at all

Some info on my setup/system
$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

$ rails -v
Rails 5.2.3

$ gem -v
3.0.3

$ bundle -v
Bundler version 2.0.1

$ spring -v
Spring version 2.0.2

$ cat ~/.irbrc
require 'awesome_print'
AwesomePrint.irb!

$ cat ~/.pryrc
require 'awesome_print'
AwesomePrint.pry!

▶ bundle show

▶ bundle show

Gems included by the bundle:
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
  * aasm (5.0.5)
  * actioncable (5.2.3)
  * actionmailer (5.2.3)
  * actionpack (5.2.3)
  * actionview (5.2.3)
  * active_admin_role (0.2.2)
  * active_material (1.4.2)
  * active_model_serializers (0.10.9)
  * activeadmin (2.1.0)
  * activeadmin_addons (1.7.1)
  * activejob (5.2.3)
  * activemodel (5.2.3)
  * activerecord (5.2.3)
  * activestorage (5.2.3)
  * activesupport (5.2.3)
  * arbre (1.2.1)
  * arel (9.0.0)
  * awesome_print (1.8.0)
  * aws-eventstream (1.0.3)
  * aws-partitions (1.174.0)
  * aws-sdk-core (3.54.2)
  * aws-sdk-kms (1.21.0)
  * aws-sdk-s3 (1.42.0)
  * aws-sigv4 (1.1.0)
  * babel-source (5.8.35)
  * babel-transpiler (0.7.0)
  * bcrypt (3.1.13)
  * best_in_place (3.1.1)
  * bootsnap (1.4.4)
  * builder (3.2.3)
  * bundler (2.0.1)
  * byebug (11.0.1)
  * cancancan (3.0.1)
  * case_transform (0.2)
  * coderay (1.1.2)
  * concurrent-ruby (1.1.5)
  * crass (1.0.4)
  * devise (4.6.2)
  * dotenv (2.7.2)
  * dotenv-rails (2.7.2)
  * erubi (1.8.0)
  * execjs (2.7.0)
  * ffi (1.11.1)
  * formtastic (3.1.5)
  * formtastic_i18n (0.6.0)
  * geocoder (1.5.1)
  * globalid (0.4.2)
  * has_scope (0.7.2)
  * i18n (1.6.0)
  * image_processing (1.9.0)
  * inherited_resources (1.10.0)
  * jmespath (1.4.0)
  * jquery-rails (4.3.3)
  * jsonapi-renderer (0.2.1)
  * kaminari (1.1.1)
  * kaminari-actionview (1.1.1)
  * kaminari-activerecord (1.1.1)
  * kaminari-core (1.1.1)
  * listen (3.1.5)
  * loofah (2.2.3)
  * mail (2.7.1)
  * marcel (0.3.3)
  * method_source (0.9.2)
  * mimemagic (0.3.3)
  * mini_magick (4.9.3)
  * mini_mime (1.0.1)
  * mini_portile2 (2.4.0)
  * minitest (5.11.3)
  * msgpack (1.2.10)
  * nio4r (2.3.1)
  * nokogiri (1.10.3)
  * orm_adapter (0.5.0)
  * pg (1.1.4)
  * prettier (0.12.3)
  * pry (0.12.2)
  * puma (3.12.1)
  * rack (2.0.7)
  * rack-cors (1.0.3)
  * rack-test (1.1.0)
  * rails (5.2.3)
  * rails-dom-testing (2.0.3)
  * rails-html-sanitizer (1.0.4)
  * railties (5.2.3)
  * rake (12.3.2)
  * ransack (2.1.1)
  * rb-fsevent (0.10.3)
  * rb-inotify (0.10.0)
  * require_all (1.5.0)
  * responders (2.4.1)
  * ruby-vips (2.0.14)
  * ruby_dep (1.5.0)
  * sass (3.7.4)
  * sass-listen (4.0.0)
  * sass-rails (5.0.7)
  * sassc (2.0.1)
  * sassc-rails (2.1.1)
  * select2-rails (4.0.3)
  * spring (2.0.2)
  * spring-watcher-listen (2.0.1)
  * sprockets (3.7.2)
  * sprockets-es6 (0.9.2)
  * sprockets-rails (3.2.1)
  * thor (0.20.3)
  * thread_safe (0.3.6)
  * tilt (2.0.9)
  * tzinfo (1.2.5)
  * warden (1.2.8)
  * websocket-driver (0.7.1)
  * websocket-extensions (0.1.4)
  * will_paginate (3.1.7)
  * xdan-datetimepicker-rails (2.5.4)

▶ cat Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.3'
gem 'awesome_print', :require => 'ap'
gem 'rails', '~> 5.2'
gem 'pg', '~> 1.1'
gem 'puma', '~> 3.11'
gem 'active_model_serializers', '~> 0.10'
gem 'will_paginate', '~> 3.1'
gem 'geocoder', '~> 1.5'
gem 'aws-sdk-s3', '~> 1'
gem 'image_processing', '~> 1.9'
gem 'activeadmin'
gem 'devise'
gem 'best_in_place'
gem 'aasm'
gem 'activeadmin_addons'
gem 'sass-rails'
gem 'active_admin_role'
Use ActiveStorage variant
gem 'mini_magick', '~> 4.8'
Use Capistrano for deployment
gem 'capistrano-rails', group: :development
Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
group :development, :test do
Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'pry', '~> 0.12.2'

gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'dotenv-rails'
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "prettier", "~> 0.12.3"

Anything I could be missing?
Thanks in advance for any help (and a great gem!)

Have you tried this? https://github.com/pry/pry/wiki/FAQ#awesome_print

I'm not using pry, I'm using irb by running $ rails console

Well, no idea. It works for me with a very similar configuration. I've also removed pry form my Gemfile and added required: 'ap' to match yours.
Just a note: once you're using AwesomePrint.irb! or AwesomePrint.pry! you don't need to call ab on the console, it will format every output.

gotcha, well, if you can't reproduce. might as well close this issue? or label it?
thank you for the help regardless :)

Do me a favor and make an SSCCE. The example you posted has too much noise to be able to diagnose.

 The example you posted has too much noise to be able to diagnose.

closing as I'm no longer working with this

closing as I'm no longer working with this


NullPointerException when VerdictStatement::executeQuery is used for queries that yield no results (e.g., DDL - CREATE TABLE..)

When VerdictStatement's executeQuery() method is used for say DDL commands like CREATE TABLE, which returns no resultset, it will cause NullPointerException like the following:
java.lang.NullPointerException
	at org.verdictdb.jdbc41.VerdictResultSet.<init>(VerdictResultSet.java:58)
	at org.verdictdb.jdbc41.VerdictStatement.executeQuery(VerdictStatement.java:60)
	at org.verdictdb.core.scramblingquerying.RedshiftUniformScramblingQueryTest.setupRedshift(RedshiftUniformScramblingQueryTest.java:110)
	at org.verdictdb.core.scramblingquerying.RedshiftUniformScramblingQueryTest.setupDatabases(RedshiftUniformScramblingQueryTest.java:79)

We need to handle this case properly.
@pyongjoo This case does not seem to be specific to Presto. As you can see, I replicated this error with RedShift, simply changing execute() to executeQuery() for "CREATE SCRAMBLE TABLE" in one of our test cases.

I see. Is this something that can be prevented by rejecting DDL statements passed to executeQuery()? If so, can you add a logic for it?


Tail recursive hover and bug fix for correctly marking if else as tail recursive

This is an exploration of showing information about whether a function or closure is tail recursive.
It shows when hovering the function definition:

And in diagnostics:

This required me to change tail-recursive info gathered during canonicalization. I'm unsure if i can now remove the "mark_def_recursive" function or if there is some other kind of recursion I've not thought of.

I ended up passing around a is_tail parameter into a lot of the canonicalization functions that are able to be tail recursive. I could have stored this in env, but it felt kind of awkward to keep setting the environment to be tail rec and then not tail rec all over the place. I'll happily switch it if that's preferable.


openblas_set_num_threads not changing the number of threads

I compiled openblas for Android to be used by caffe. I am calling openblas_set_num_threads before loading a caffe model and experimented with various values of num_threads and I don't see any difference in run time. I then printed the values of openblas_get_num_threads and openblas_get_num_procs() and it always returns 8 (max number of cores available on my Android device).  I confirmed that I have the fix for #762 by using the develop branch instead of deep_learning.
I compiled openblas with the following configuration:
NO_LAPACK=1 TARGET=ARMV7 USE_THREAD=1 NUM_THREADS=16 USE_OPENMP=1

Another question I have is how many number of threads openblas uses by default if openblas_set_num_threads is not specified and nor is the environment variable OMP_NUM_THREADS.
How can I experiment with setting num of threads with openblas as the above method isn't working for me. Am I not using the right APIs?

@jainanshul ， could you try to test gemm instead of caffe?

If you look in interface/gemm.c
#ifdef SMP
  mode |= (transa << BLAS_TRANSA_SHIFT);
  mode |= (transb << BLAS_TRANSB_SHIFT);

  nthreads_max = num_cpu_avail(3);
  nthreads_avail = nthreads_max;

#ifndef COMPLEX
  MNK = (double) args.m * (double) args.n * (double) args.k;
  if ( MNK <= (65536.0  * (double) GEMM_MULTITHREAD_THRESHOLD)  )
        nthreads_max = 1;
#else
  MNK = (double) args.m * (double) args.n * (double) args.k;
  if ( MNK <= (8192.0  * (double) GEMM_MULTITHREAD_THRESHOLD)  )
        nthreads_max = 1;
#endif
  args.common = NULL;

  if ( nthreads_max > nthreads_avail )
        args.nthreads = nthreads_avail;
  else
        args.nthreads = nthreads_max;

you can set args.nthreads=num_cpu_avail() instead (or near the end) and control number of threads in sgemm using variables.
64k & co stuff is optimized for amd64 CPUs with 128/256k core-exclusive cache
Typical caffe model runs sgemm on say 200x300 matrices, i.e 200k which would be suboptimal to drag around between multiple CPU caches on x86, but you may get measurable gain from splitting it along per-cpu caches of ARM SoC (or cache shared by 2 cores as in some SoCs)
Would be interesting to know your /proc/cpuinfo and if you gain anything from 2 and more threads


Response: Field 'metadata.maintainer' invalid

I'm getting this error when trying to upload this cookbook to a Chef Server using berkshelf
Uploading yum-mysql-community [0.1.21]
ERROR: The data in your request was invalid
Response: Field 'metadata.maintainer' invalid

That's pretty bizarre...
It's pretty standard looking: https://github.com/chef-cookbooks/yum-mysql-community/blob/master/metadata.rb#L2
Do you have the same problem with say, yum-centos? https://github.com/chef-cookbooks/yum-centos/blob/master/metadata.rb#L2

Apologies, looks like that error message was misleading, the problem is not within this cookbook.  Closing the issue!


[pulsar-broker] Fix create invalid partitioned topic when allowAutoTopicCreationType=partitioned

Motivation
In certain circumstance (allowAutoTopicCreation=true, allowAutoTopicCreationType=partitioned), client use default deadLetterPolicy may create invalid partitioned topic that topicName contains -partition-.
Modifications

Prevent create partitioned topic which topicName contains -partition- on broker side
Use topicNameWithoutPartition in default deadLetterTopic and retryLetterTopic on client side

Verifying this change

[x] Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:
(example:)

BrokerServiceTest#testShouldFailIfGetPartitionsForNotExistInvalidTopic

Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (yes) It use topicNameWithoutPartition instead of original topic as part of default deadLetterTopic.
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

Documentation
Check the box below or label this PR directly.
Need to update docs?

[x] no-need-doc
bugfix

@codelipenghui @Technoboy- PTAL

Closed as stale and conflict and no consensus. Please rebase and resubmit the patch if it's still relevant.


test: raise exception on assertionless tests

What problem is this PR intended to solve?
Raise exception if a test makes no assertions.
See https://railsatscale.com/2024-01-25-catching-assertionless-tests/
And this PR cleans up all of the assertionless tests that were found.

some were not useful (doing a thing in a loop might have been useful
early in nokogiri development, but not anymore) and were deleted
some needed explicit refute_raises
some needed explicit refute_valgrind_errors
some just needed rewriting with assertions

cc @nvasilevski :heart:

Exciting, thanks! ❤
Sorry about the tests that had to become more verbose but I genuinely believe that setting explicit assertions helps with readability especially for new contributors

@nvasilevski I recently looked at https://github.com/seattlerb/minitest-proveit/blob/master/lib/minitest/proveit.rb which might be what I move to at some point