Expose TL node(s) in periphery

This exposes the TL SPI nodes so that the MMCDevice/FlashDevice can be attached to them in the system that has the corresponding mixin (i.e. HasPeripherySPI / HasPeripherySPIFlash).
Background Info:
Currently sifive-blocks has both an MMCDevice and FlashDevice that can be bound to a TL SPI node to append to the DTS/DTB (https://github.com/sifive/sifive-blocks/blob/5945cde07f187b022599263e4f9ee150503166d7/src/main/scala/devices/spi/TLSPI.scala#L151-L175). So far as I know, the main way to add one of these devices is to do something like the following:
ResourceBinding {
  Resource(new MMCDevice(tlSpiNode.device, 1), "reg").bind(ResourceAddress(0))
}

where the tlSpiNode is the TL SPI node that you want to add the DTS snippet to. This method of adding to the DTS was done in the Freedom platform (https://github.com/sifive/freedom/blob/943ab4ac2cefbbabdeda9447ec0f6231f6235f1e/src/main/scala/unleashed/DevKitFPGADesign.scala#L88-L91).
However, in newer versions of sifive-blocks this functionality was removed since the TL node is never exposed (only the IO's are exposed). This PR re-exposes the TL node like before while keeping the default functionality.

What's the timeline to merge this PR?

The benefits of HasPeriphery mix-ins cannot be exploited when they expose sinks instead of actual IORegisterRouter instances. Therefore, this patch must be applied everywhere, similar to the state prior to "spi: converted to PeripheralPuncher" commit.

To be more clearer, one can do things like this, if TLSPI instance from attachto(Subsystem) is available
trait HasCustomImp extends LazyModuleImp
{
val outer : RocketSubsystem with HasPeripherySPI
val spicontrol = Wire(outer.spis(0).module.ctrl)
// good things follow
}

Chipyard (https://github.com/ucb-bar/chipyard/) is looking to do a release with this change within the next week or two (https://github.com/ucb-bar/chipyard/pull/747). Would it be possible to get this merged in (or re-reviewed) by then? Thanks.

Hi @abejgonzalez we are taking a look

Is there any update on the timeline on this? It has some implications on the Chipyard release @abejgonzalez mentioned.

Is there any update on the timeline on this? It has some implications on the Chipyard release @abejgonzalez mentioned.

Hi @alonamid , thanks for your patience as things were slow over the holidays. Merging now!

Hi @alonamid , thanks for your patience as things were slow over the holidays. Merging now!

Thanks!

Thanks!


Feat: support GitHub’s new Checks API

GitHub has introduced a new, more detailed way of displaying statuses called the Checks API, and they can have a lot more states than statuses could. Our main use of these is checking whether CI tests pass, so we were interested in Octokit’s old getCombinedStatusForRef API. We’d pass in a branch SHA whenever a status event arrived and get back failure if any of the status…es was not success. We need to find the equivalent for the Checks API.
⚠The Checks API is in beta and requires the application/vnd.github.antiope-preview+json Accept header.
1. Receiving Check events
Where previously we listened for status events from GitHub, we’ll now also have to listen for CheckRunEvent, which requires Greenkeeper to have the checks:read permission:

If your GitHub App has the checks:read permission and subscribes to the check_run webhook event, you'll receive the created and updated action payloads for all check runs in your app's repository.

I’d assume the interesting one is updated. The payload includes an optional check_run.conclusion key that have the value success. However, this is only one check of possibly many. We need the combined status of all of them.
2. Getting the combined status.
At first glance it seems like the new CheckSuite feature would allow us to get a grouped result for all runs, but a CheckSuite only includes CheckRuns from a single GitHub app (maybe like when Travis runs multiple times for different node.js versions), so that’s out.
Instead, it seems like we need to List the CheckRuns for a specific ref, which returns an array of check_runs, in which each CheckRun object contains a conclusion key, which is exactly what we want.
⚠ This seeeeeems to return all CheckRuns, even old ones, unless you specify filter: 'latest' in the request. This hopefully means that if two CI services ran multiple times, it would always return the latest of each possible CheckRun. If not, we can fetch all runs and dedupe by the CheckRun’s name key.
2.1 What do the conclusions mean?
Conclusions can be success, failure, neutral, cancelled, timed_out, or action_required. Currently, we require all statuses to be success, but that was a binary option, the only other one was failure. Now things are more ambiguous. My initial assumption is that if all of the runs have either the success or neutral conclusion, Greenkeeper should consider the branch as intact and the build as passing, but we should definitely have a little think about that.
🤔Note: This is my understanding of the docs as they are, none of this was actually tested yet.
Possible Complications

Can a repo have both Statuses and Checks?
Do we assume that all checks that can report failure are non-optional for the repo?

Note to self: re-runs of things checked by the Checks API automatically replace previous runs, so latest isn’t actually needed. Example: you re-run a Travis build. Querying Checks will still return the same amount of results, it just returns the most recent instance of each.

Update with the reason why this is taking so long: we send the combined statuses payload all over the place and also store it in the DB, so we can’t just extend or overload that easily without being certain that our solution is backward-compatible and also works if we only have checks and no statuses. Here’s how deep the combined rabbithole goes:
The combined statuses payload is passed into various jobs and then stored in the branch docs, from where it is loaded and used, for example to compose fail issue bodies (unfold the statuses details): https://github.com/greenkeeperio/greenkeeper/issues/654
Flow
From
status.js (and in the use-kits branch its helper on-branch-status.js)
combined goes into and is upserted into the DB by:
jobs/create-initial-pr-comment
jobs/create-initial-pr
jobs/create-initial-subgroup-pr-comment
jobs/create-initial-subgroup-pr
however, these don’t actually do anything with combined.
after the jobs are started in status.js, combined is then passed to
lib/handle-branch-status.js

if combined.state === 'success' -> upserts combined into the branchDoc in the DB as part of a change object when it sets the branch to deleted
if combined.state === 'failure' -> passes combined into open-issue.js, where it is passed on to

content/fail-issue.js
which iterates over the statuses array from the combined object to display status info
It looks like these are actually the only two places statuses are actually used for anything:

lib/handle-branch-status.js uses them to determine whether to open a fail-issue
content/fail-issue.js uses them to display info

Merged with #842


Image package and several others are failed to build with MSVC 2015 and a solution.

Image package is failed to build on 2015 because jpeg.lib contains unresolved references to __iob_func, fprintf, and fscanf. After some investigation, I found that conda installs packages which may not match the current compiler version (in my case, jpeg [vc9] was installed instead of jpeg [vc14]). Due to the internal changes of MSVC2015's standard libraries, library files built by previous MSVC versions cannot be linked.  The following patch solves this issue.
msvc2015_build.patch.txt

Merged. However it sounds like a bug for conda if it is true, or there are some other issues undiscovered.


Ruby 2.7 and update rubocop

Pull requests into Cypress require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable ("N/A") and :white_check_mark:.
Submitter:

[ ] This pull request describes why these changes were made.
[ ] Internal ticket for this PR:
[ ] Internal ticket links to this PR
[ ] Code diff has been done and been reviewed
[ ] Tests are included and test edge cases
[ ] Tests have been run locally and pass

Reviewer 1:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Reviewer 2:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Pulled in as part of this PR https://github.com/projectcypress/cypress/pull/1540


VSCode on CUBIC via Code Server

So far two comments:

add some explanation why we do not recommend to directly use local vscode to access cubic projects (i.e. may create files under personal user account)
if facing the error when installing nvm:
bash: line xxx: /cbica/projects/ProjectName/.bashrc: Permission denied
try:
$ cd ~
$ chmod +w .bashrc


[All] (troubleshooting) added mac runtime logging info

@davidchesnut Are you ready to merge this to master?

@davidchesnut I notice you've merged this PR without incorporating any of the feedback. Was that intentional?

@davidchesnut FYI, I'm going to submit another PR to fix the issues I noted during review of this PR -- to prevent this article from being published as-is (with a malformed Note and issues that will cause problems with localization, etc.).

PR submitted and merged, to fix issues with this article before publication: https://github.com/OfficeDev/office-js-docs-pr/pull/1309.


Python 2.7 support dropped?

hello, was the Python 2.7 support dropped?
ERROR: Package u'pypandoc-1.7.0' requires a different Python: 2.7.18 not in '>=3,<4'

Not per the PyPi page. Let me check and get back to you.

Forgot to add. Try with pypandoc = 1.7.1 and check if that fixes the issue

thank you for the quick response! we just forced the previous version but wanted to let you know

So what version are you using now.
Do python 1.7.1 work?

1.6.4 works for us, but 1.7.0 doesn't, and 1.7.1 brings another error when trying to install that specific version:
pip install pypandoc==1.7.1 -v
(...)
Found link https://files.pythonhosted.org/packages/85/6a/17ac43e5a1ad4caeb99c19da24e4cc39a272b1d6d8fd579e3feb9d03e5a1/pypandoc-1.7.0.tar.gz#sha256=ff2aa68bef804396721f88c5dfac2747220980b22abe75c598dd0163c87742a8 (from https://pypi.org/simple/pypandoc/), version: 1.7.0
  Skipping link: none of the wheel's tags match: py3-none-any: https://files.pythonhosted.org/packages/ac/42/2262c8e24746cff8b97cf5b1ffb25c031efd8ab4a64dba179c76e5117cf6/pypandoc-1.7.1-py3-none-any.whl#sha256=2e6da1c21206191f6aecb24bbeeecac035482f1ea09ecb76d32ce1a0ef5abf39 (from https://pypi.org/simple/pypandoc/) (requires-python:>=3,<4)
  Link requires a different Python (2.7.18 not in: u'>=3,<4'): https://files.pythonhosted.org/packages/d7/20/e335725546c837cc2c7319d4fb5944215cea6ac5c55e467f2e9c3649708f/pypandoc-1.7.1.tar.gz#sha256=cc1e1951ab39a8e37a43c820d048aaa2d3fb8ded50fb28b4381b1ddd3ea524d2 (from https://pypi.org/simple/pypandoc/) (requires-python:>=3,<4)
Given no hashes to check 0 links for project 'pypandoc': discarding no candidates
ERROR: Could not find a version that satisfies the requirement pypandoc==1.7.1 (from versions: 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.6.0, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.3.0, 1.3.1, 1.3.3, 1.4, 1.5, 1.6.3, 1.6.4, 1.7.0)
Cleaning up...
Removed build tracker '/private/var/folders/l1/jjf9vf8s5rs17rqzb6qc46gm0000gn/T/pip-req-tracker-HFe_Uv'
ERROR: No matching distribution found for pypandoc==1.7.1

this should be fixed. Can you conform that pip install git+https://github.com/NicklasTegner/pypandoc.git works

it does:
(py2.7) ➜  pip install git+https://github.com/NicklasTegner/pypandoc.git
Collecting git+https://github.com/NicklasTegner/pypandoc.git
  Cloning https://github.com/NicklasTegner/pypandoc.git to /private/var/folders/l1/jjf9vf8s5rs17rqzb6qc46gm0000gn/T/pip-req-build-LnzpJy
  Running command git clone -q https://github.com/NicklasTegner/pypandoc.git /private/var/folders/l1/jjf9vf8s5rs17rqzb6qc46gm0000gn/T/pip-req-build-LnzpJy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pypandoc
  Building wheel for pypandoc (PEP 517) ... done
  Created wheel for pypandoc: filename=pypandoc-1.7.2-cp27-none-any.whl size=29891 sha256=323911ec0d7ec7e86f2ec7c7a92616178bd9002ef30b8be25b04c2d5961f274b
  Stored in directory: /private/var/folders/l1/jjf9vf8s5rs17rqzb6qc46gm0000gn/T/pip-ephem-wheel-cache-lvPiPP/wheels/18/3e/58/cf037209fdca9372ca0e71c41161a53a9f7bbcde541462c60d
Successfully built pypandoc
Installing collected packages: pypandoc
  Found existing installation: pypandoc 1.6.4
    Uninstalling pypandoc-1.6.4:
      Successfully uninstalled pypandoc-1.6.4
Successfully installed pypandoc-1.7.2

so my guess is all automatic python 2.7 based builds requiring pypandoc should start working after that gets uploaded to PyPI
thank you for the quick reaction and the work you're doing here!

Fantastic. This should be on PyPi within 10 minutes. If it doesn't work when getting pushed to PyPi feel free to let me know.
And if you find anything else, or have any feature requests, feel free to open another issue.


Missing std::bind() in thread_pool.hpp

Hi, upon looking for modern C++ task pools I came across your Youtube video "How C++23 made my Thread Pool twice as fast". I wanted to compare the performance of modern C++ constructs to my experiments, so I tried using your implementation. Turns out you were missing an std::bind() when creating the std::packed_task which unfortunately wasn't discovered by the way you have been using your thread pool thus far.

BTW, I would be interested in the results of your comparison! If you have anything to share go ahead.

Sure @ZenSepiol , though as of now I can only provide some apples vs oranges comparisons. My thread pool compromises on a few things to shave off overhead:

Tasks can only return void and may only have a single parameter, being a pointer to a context
The order of tasks started may not be the same order they were enqueued
Currently load balancing is not implemented but this is WIP, however it will probably add a small overhead again for perfectly balanced workloads, while improving performance for unbalanced loads

Here are the numbers for a few small benchmarks  (always only 1 writer although both pools support multiple):

Raw function call overheads (modified both pools to only start processing once everything was enqueued):

Empty Tasks: 10.000.000

My thread pool: 222ms
Your thread pool: 4715ms

Concurrency scaling:

Empty Tasks: 10.000.000

Sequential: 0ms
Thread count: 1

My thread pool: 283ms
Your thread pool: 3209ms

Thread count: 4

My thread pool: 419ms
Your thread pool: 5158ms

Thread count: 16

My thread pool: 336ms
Your thread pool: 17887ms

Small Tasks: 10.000.000

Sequential: 262ms
Thread count: 1

My thread pool: 329ms
Your thread pool: 3335ms

Thread count: 4

My thread pool: 469ms
Your thread pool: 5671ms

Thread count: 16

My thread pool: 324ms
Your thread pool: 18718ms

Medium Tasks: 10.000.000

Sequential: 47168ms
Thread count: 1

My thread pool: 47251ms
Your thread pool: 50123ms

Thread count: 4

My thread pool: 11911ms
Your thread pool: 13701ms

Thread count: 16

My thread pool: 3497ms
Your thread pool: 18850ms

Medium+ Tasks: 10.000.000 (Note: the workload got trippled compared to the previous tasks, yet the performance improved for your thread pool)

Thread count: 16

My thread pool: 10284ms
Your thread pool: 10890ms

Large Tasks: 100.000

Sequential: 47409ms
Thread count: 1

My thread pool: 47393ms
Your thread pool: 47445ms

Thread count: 4

My thread pool: 11948ms
Your thread pool: 11943ms

Thread count: 16

My thread pool: 3253ms
Your thread pool: 3370ms

As you can see, the overhead of all the generality provided by the standard library is pretty high. As expected, the performance of both pools converge towards the same limit for increasingly bigger tasks but especially for small tasks your implementation really suffers when there is high contention between threads. My implementation on the other hand scales somewhat with thread count even for empty tasks as by design contention between writing thread and reading threads is reduced the more readers there are.
These numbers were generated on a system with a ryzen 5800X3D running windows 11 with minor background stuff. C++23 enabled compiler was used with optimization level 2. (I did not find time to do linux tests yet but from earlier experiments you should find that on linux your thread pool does comparatively better vs mine than on windows)
If you want I can follow up with more numbers once I find time again to work a little more on my pool, get some real world workloads as benchmark and maybe get to compare it to some state of the art implementations.

Thank you very much for sharing!
As you said, there is no thread-pool that ticks all the boxes. Each problem can be individually optimized by adapting the pool.
I expected some of the overhead. Some of the results for the 16 threads are somewhat weird. I suspect there is some sort of caching issue going on. But overall the results seem plausible.

I assume you mean the 16 thread results of your pool. Technically it is a caching issue but you normally don't refer to it as such. Essentially what is happening here is that you only have a single synchronisation point being your condition variable (Apparently this condition variable does not internally track threads and spread the synchronisation points). So every time any of your threads comes in contact with the condition variable it has to change it (telling other threads you are there, sort of). In this process the condition variable first has to be fetched by thread A, changed and then commited to cache again. Afterwards another thread B on a different core has to do the same thing when it tries to aquire a lock. Now if A and B are rapidly trying to aquire the lock (see empty or small tasks) then that will also happen interchanged. Therefore the condition variable is bouncing between the caches of the cores A and B are on. This is expensive. And you can imagine, the more threads you have the more the variable will be bouncing.
#Rant :D


Specify Explicit React Native Version For Init

npx react-native init is not guaranteed to pull in react-native@latest. When the bootstrapping CLI is mismatched from the react-native version it tries to install, it may not work correctly.
Currently, this means if you previously installed RN 0.70, you may end up using react-native init from RN 0.70, using CLI 9.2.1, to bootstrap your React Native 0.71 app. This seems to lead to the CLI not correctly generating the template app. Most visibly, files like _rbenv are not converted to .rbenv.
This seems like a CLI bug. --version exists to allow CLI to bootstrap different RN version, so it should support this scenario. But we can change the example to one that prevents users from hitting it.

Related to https://github.com/npm/cli/issues/6179

They closed https://github.com/npm/cli/issues/4108 before as not a bug 🤷♀.

@Simek this is good to go 👍

@Simek this is good to go 👍

I can also merge.


Es translation

updating spanish translation

Can you fix the conflicts?

I just pushed another update, please sync to that

Can you fix the conflicts?

I think it's done! Hope nothing breaks! :)

CI reports errors.  You can run "make check" to find problems.

Looks like you also need to update src/po/vim.dexktop and src/po/gvim.desktop to make CI pass.

Looks like you also need to update src/po/vim.desktop and src/po/gvim.desktop to make CI pass.

I did it. I updated the *.desktop.in files adding missing GenericName[es]  field
(thanks for your patience!)

Wrong way around, a line needs to be removed from the .in files.  I'll do that and check it.
You'll see it after the next runtime files update.

Wrong way around, a line needs to be removed from the .in files.

oops! don't know what is needed to remove.
There's something else what is needed to be translated or review?

Wrong way around, a line needs to be removed from the .in files.

oops! don't know what is needed to remove.
There's something else what is needed to be translated or review?

Not right now.  After the next runtime file updates, please check if
things look OK.  And if there are any changed messages (I try to
minimize this, but we also wan to make sure the messages are good).
--
hundred-and-one symptoms of being an internet addict:
207. You're given one phone call in prison and you ask them for a laptop.
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


Change apiclient structure v0.3.0

After reviewing other wrappers looking to change apiclient to be similar to twilio:

[x] trading.login()
[x] trading.keep_alive()
[x] trading.logout()
[x] trading.navigation.*
[x] trading.betting.*
[x] trading.account.*
[x] trading.scores.*
[ ] trading.streaming.*
[ ] trading.in_play_service.*

Enables the wrapper to more closely resemble the API as well as removing the spaghetti code that is apimethod. This will of course break everything that is built using this wrapper, welcome any comments.

V0.3 now in production, streaming and in_play_service not live


Perfect tool for my workflow but some features are missing..

I have been looking for this tool since I discovered that my opus encoding workflow is subject to the issues you describe in the README and I was ecstatic.
I therefore cloned and compiled it to see if I can switch to using opusgain for maintaining the loudness gain of my audio collection and therefore replace "loudness" that is the tool I'm using now, and the result of my test is this issue.
Opusgain seems to have what I need AND fix my issue but it also is missing a couple of features:

I'm used to be able to pass a recursive (-r) flag to quickly scan and update my whole collection. Would id be possible to add it?
Most other tools automatically decide that all opus files in a certain directory are part of the same album. Would this be possible after adding the -r flag?
I would sometimes prefer for the tool to avoid changing the modified time of the files it touches. Would that be also possible?

I will of course help out for testing the changes, but unfortunately I'm unable to contribute code (yet) as I'm not familiar with Rust
Thanks

Hi, just wanted to say I've been looking into/thinking about both the things in this issue.
Regarding modification times, while this is possible, I do have a concern about its affect on backup/file-synchronization. Many tools of this form use the combination of a modification timestamp and the file size to determine if a file has changed. Rewritten media files have a decent chance of remaining the same size, so it's not unlikely that a processed file might be considered to be unchanged by a backup or file synchronization tool, I've been thinking about (and commited to develop) an option that when enabled attempts to increment the modification timestamp by the smallest amount possible (though this is dependent on the underlying filesystem being used so it can be anything from 1 nano-second to 2 seconds for most filesystems in common use). It would be helpful to understand precisely why you'd prefer to keep the modification timestamp unchanged?
Regarding the recursive option, it should be possible to shell-script this behaviour. I believe loudgain includes a separate script to do this for example. I think it get a bit messy though, in which case I can see the benefit for some basic support inside the tool. I'm not keen on this option assuming or prescribing a particular layout of media files though. vorbisgain's recursive option considers all files in the same folder to be part of the same album, but I can imagine layouts where this behaviour might cause all singles from an artist to be normalized as if they belonged to an album, which isn't ideal.
I am curious what folder layout you have for files, and how it distinguishes between albums and singles. Also, what platform you are on, as this determines the shells available to you for scripting.

Hi. Thanks for your changes and for the long comment. It took me a while for replying because I wanted to experiment a little bit changing the rgbpm script for the implementing the recursive update. I initially thought that the performance would not be great but I got it right opusgain is internally multithreaded and the performance is actually quite good (kudos for that).
In terms of layout my collection uses the standard setup of one folder per CD and while I agree hypothetically there may be problems in some cases, I don't think that happens for my library as most of my collection is full CDs encoded in opus from the FLAC master.
I loved the solution you implemented for the modification times, but when I tried it for real I realized that with this solution the ONLY timestamp that is updated by a single ns is the modification one while the others are updated normally. That result in pretty weird looking times for the files. That may or may not work for I'm trying to achieve, but I need a bit more time for experimenting.
As I said my workflow always start with the original FLACs and the opus files are expendable, I don't quite care about backing them up as I can always recreate them from the originals. What I instead to is setting the opus file times exactly like the ones of the FLAC originals since some player will use the file time for sorting the latest additions to my collection.
I hope this clarifies my needs a bit more..

I've just merged some changes to make it easier to specify album folders on the command line. While I imagine it will not entirely remove the need for shell scripting, it might reduce the complexity.

I think the most relevant change for me is the interpret-paths switch with the folders-are-albums value. This is very convenient when used for tagging a single album. It doesn't seem to work very well for the mass-tagging when re-encoding everything from flac. The other tool I am used to is inflexible in the definition of "album" (a leaf folder with audio files in it) but it would work in both the single album and the mass tagging case. Not that I'm complaining, just to give my 2c worth of perspective..

It doesn't seem to work very well for the mass-tagging when re-encoding everything from flac.

Let me repeat my test and come back to you..

Let's assume your music is in ~/music/opus.
Let's also assume some files in there:
~/music/opus/single_1.opus
~/music/opus/single_2.opus
~/music/opus/album_1/track_1.opus
~/music/opus/album_1/track_2.opus
~/music/opus/album_1/track_3.opus
~/music/opus/album_2/track_1.opus
~/music/opus/album_2/track_2.opus
~/music/opus/album_2/track_3.opus
~/music/opus/album_3/disc_1/track_1.opus
~/music/opus/album_3/disc_1/track_2.opus
~/music/opus/album_3/disc_2/track_1.opus
~/music/opus/album_3/disc_2/track_2.opus
~/music/opus/album_3/track_3.opus

The to normalize this, you would go to ~/music/opus/ then run opusgain -i folders-are-albums *. This would get expanded by the shell to opusgain -i folders-are-albums single_1.opus single_2.opus album_1 album_2 album_3 (you can see the expansion by just preceeding the command with echo, e.g. echo opusgain -i folders-are-albums *).
The result should be that single_1.opus and single_2.opus are normalized as singles. album_1 and album_2 are normalized as albums as expected. All tracks from album_3  are normalized together as if they are a single album, despite the disc_1 and disc_2 sub-folders.

Yeah, that was clear to me now, thanks. My issue is that my folder structure depth is not constant. Sometimes I have subfolders like HighRes that contain high-res albums, for instance. What's constant is the view from the leaves. A leaf folder normally contains a disc and sometime the disc is part of an album (one level up).

Anyway, nothing to worry about, the quirky nature of my folder structure is a problem known to me and I also know how I could fix it (by using tools like beets and renaming/restructring all my collection) but that is a daunting task per se and that I also balk at making for other reasons.
One last thing. One of the reasons why I originally did not really read well/consider your README about using "*" is that I normally dislike using globbing on very large folders because the globbing may fail due to lack of space (NCARGS). I was thinking whether passing the list of files/folder thru a file (à la rsync "--files-from") would be possible. But please, consider that what's already there is totally fine for me. I switched to using opusgain a month ago and for the time being I'm just tagging on a per album basis and this already works absolutely fine. Thanks a lot again for your support.


jupyter-ai v2.12.0

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

This is a bit odd - it doesn't appear that CI ran on this PR?
In any case, the build on main failed with a SHA mismatch:
 RuntimeError: SHA256 mismatch: 'c5ad7449de8f5a11e5fc8af39c7099804828bce9cb67939f0e1383802fd2ab9b' != '41eb47bdb6526e3edd494a1d2854744e4fb77e1b88e40360ffb944a446851882'

https://github.com/conda-forge/jupyter-ai-feedstock/runs/22539636714

...and if I look on PyPI the hash does indeed seem to be incorrect here:


Timer freezes at 01 second left

I'm on Android 7.0, without any modifications on a Moto C.
The clocks runs fine but the work section never actually ends. The timer just stops at 01 second left, wheter the screen is on or off or the app is open. The app is not frozen since it keep responding to other actions and whenever I can manually end the session and it registers just fine and then play the notification that the timer is up.
I'm not sure if this is the default behavior because I can't really remember the instructions from when I first used the app (the ones that tell me what swiping in each direction does) and I couldn't find a way to replay it or if it is an issue with the app or my own phone, since I don't have another one to test it on, so I'm opening an issue.
I've tried searching for another one and nothing showed up, which may suggest that this is either an issue with my phone or something particular.

Sounds like an issue on your phone. Does it happen all the time?
When the timer reaches 0, it should reset to the current session duration and a notification and dialog will pop-up.
For you, the notification plays after you swipe down to manually stop the timer?
Did you disable battery optimization for this app? You'll find a shortcut for this in the settings. The battery optimization usually breaks or delays the alarm.

Yeah, it happens every time and I did disable the battery optimization for
the app. When I swipe the notification pops up no problem.
I suspect that the battery optimizer os just ignoring my settings because
there are other things breaking that are supposed to get fixed by disabling
the optimization but that just wont work (my status bar clock just stop
updating, for example). So I’ll try exploring in that direction.
Thanks for your help and time :)
On Fri, Mar 8, 2019, 04:11 Adrian Cotfas<EMAIL_ADDRESS>wrote:

Sounds like an issue on your phone. Does it happen all the time?
When the timer reaches 0, it should reset to the current session duration
and a notification and dialog will pop-up.
For you, the notification plays after you swipe down to manually stop the
timer?
Did you disable battery optimization for this app? You'll find a shortcut
for this in the settings. The battery optimization usually breaks or delays
the alarm.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/goodtime-productivity/Goodtime/issues/127#issuecomment-470829570,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANZEloNrTNU5F4r-0xk64qscNRWy80j9ks5vUg0pgaJpZM4bkVCn
.

same issue on Realme 8, Adndroid 12, battery optimisations disabled. it does not notify until i open app screen, then i see 00:00 on timer, i need to touch it as pause, it starts blinking, then i touch again as resume and it takes another 1-2 sec until session finished popup appears with alarm. In this sense it is unusable :(

I tried again today, and the issue persists. The alarm stops at 00:00, and I receive no notification. I'm using the latest Android 13 on my device. By the way, your app is the only one among those I've tried where notifications don't work.

hmm so i found it is related to interval set to just 1 minute... so maybe you should fix it or make settings slider minimum from time greater then 1  :)


Text is different than on iOS or Javascript, looks streched

Environment details
Pixel 6a, Android 13
Maps compose: 2.10.0
Using Google Play Services Maps "18.1.0"
Google Play Services version on the device: 34.7.10-21 [0] [PR] 512129822
Android SDK Version: compile SDK 33
Steps to reproduce

Display the SDK maps
Zoom on any area that has POIs

Output
On the right is the android compose sample app. The text looks stretched.

This also happens using the XML/Fragment version of the library.
There is an issue on the issue tracker that mentions this https://issuetracker.google.com/issues/271731840

This isn't something that's controllable via this library. According to the response on the issue tracker, this is working as intended. I suspect it's just the reality of having different text rendering systems on each platform.


[Fix][UI] Support only one file upload on the file manage page.

Purpose of the pull request
This pull request supports only one file upload on the file manage page.
Related Issue
close #9996

Codecov Report

Merging #10007 (3db1161) into dev (99b1c40) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev   #10007      +/-   ##
============================================
- Coverage     40.79%   40.79%   -0.01%
+ Complexity     4605     4604       -1
============================================
  Files           834      834
  Lines         33856    33856
  Branches       3752     3752
============================================
- Hits          13811    13810       -1
  Misses        18725    18725
- Partials       1320     1321       +1

Impacted Files
Coverage Δ

...dolphinscheduler/remote/future/ResponseFuture.java
81.96% <0.00%> (-1.64%)
:arrow_down:

Continue to review full report at Codecov.

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


🐛 BUG: "Listener is IPv4, but writing to IPv6 remote" error is usually unhelpful

What version of nebula are you using? (nebula -version)
1.9.4
What operating system are you using?
Linux
Describe the Bug
When the Lighthouse tells a host about an IPv6 address and it attempts to handshake, this error occurs if the host has IPv4 disabled or listen.host set to <IP_ADDRESS>. This confuses a lot of users into thinking it's the cause of (whatever issues they happen to be having.)
Maybe we can make this message warning-level, debug-level, less frequent, more informative, or occur in fewer configurations?
Logs from affected hosts
n/a
Config files from affected hosts
n/a

You mention "if the host has IPv6 disabled" ?


Support mapping additional modes

Thanks for the plugin! :heart:
This adds a map_modes option to specify additional modes to map, such as the terminal. And also a small cleanup to use <Cmd> for the mappings, which avoids flickering.
Two things I'm not sure about yet:

Do you mind if I go ahead and use vim.tbl_deep_extend() to merge config and user_config? That would remove some duplication, but I'm not sure exactly when Neovim added this (I believe it's available in 0.5 so backwards-compatibility should be fine?)
I'd also like to clean up the configuration section in the README up a bit, since documenting this new option becomes a bit weird otherwise :grinning: Do you mind if I shuffle some things around?

Hey, thanks for the pull requests!
At first glance the changes here look good to me. I think what you're aiming at is to have something like:
{ 'alexghergh/nvim-tmux-navigation', config = function()
    require'nvim-tmux-navigation'.setup {
        disable_when_zoomed = true, -- defaults to false
        keybindings = {
            normal = {
                left = "<C-h>",
                down = "<C-j>",
                ...
           },
           terminal = {...}
        }
    }
end
}

right?
I'm happy with those changes, though we need to make sure to properly check modes are correct (i.e. we don't encounter a godzilla mode and don't know how to map that).
A README update is always welcome, of course!
I might need a few more days to go through this and make sure that everything is going smoothly, but otherwise thank you for the work!

I think what you're aiming at is to have something like:

@alexghergh hmm actually I wasn't thinking of this approach, since I just want to map Ctrl-hjkl additionally in the terminal. So specifying the modes would be easier for me vs. having to repeat them for the normal and terminal tables, but it's not really a big deal :wink:
We could also have this approach where each key can specify modes:
keybindings = {
  left = '<C-h>',                  -- normal only
  left = { 't', '<C-h>' },         -- terminal only
  left = { { 'n', 't' }, '<C-h>' } -- normal and terminal
}

What do you think? I'm happy to go with your suggestion too.
I'll update the README afterwards, and pushed a commit now to switch to vim.tbl_deep_extend().

Hey, sorry for the radio silence for a while,
Hmm, your suggestion seems to me a little bit unintuitive for the end-user. You would still have to repeat { { 'n', 't' }, ... for each key mapped, right (i.e. left, right, up, down)? That would make it a bit hard to follow in my opinion.
I'm not saying that my solution is better in any way, though. It still feels a bit repetitive and I don't like it that much either, but at least it's a little bit clearer and easier to mentally parse, I feel.
If we were to go with your solution, I would probably extend it to something like:
keybindings = {
  left = '<C-h>', -- normal only (single string specifed, defaults to keymap in normal mode)
  left = { keymap = '<C-h>' }, -- normal only (full config table specified, but missing 'modes' key, defaults to normal)
  left = {
    modes = 't', -- terminal only
    keymap = '<C-h>'
  },
  left = {
    modes = { 'n', 't' }, -- normal and terminal
    keymap = '<C-h>'
  },
  left = {
    keymap = '<C-h>', -- of course, order shouldn't matter now
    modes = { 'n', 't', 'v', 'x', ... },
  }
}

I am totally down with this solution (which also keeps backwards compatibilty, unless I'm missing something), and also makes it explicit what each argument means inside the table, though this would probably be a bit more work to do. Let me know how you feel about this! Great work and thanks for contributing!
Have a great one!

@alexghergh thanks, I do like your original suggestion and implemented that now, and figured I'll just add a config.keybindings.modes array for the use case where you want to have the same maps in multiple modes (I'm currently trying out Ctrl-hjkl in normal/terminal/command/visual mode).
So you can now do:
keybindings = {
  left = "<C-h>", -- mapped in normal mode, as before
  modes = { "normal", "terminal" }, -- map in terminal mode too

  command = {
    right = "<C-l>", -- only map in command mode
  },
}

Some notes:

Most configuration keys are now validated and raise errors.
Invalid values (both the keys of config.keybindings, and the values of modes) are ignored and don't raise errors. I'm not sure how to do that easily with vim.validate, I guess we could pass functions to check all keys.

What do you think?

@alexghergh also updated the README now, was a bit easier with this syntax :grinning:

Hmm, I honestly find this version the most confusing for the user.
keybindings = {
  left = "<C-h>", -- mapped in normal mode, as before
  modes = { "normal", "terminal" }, -- map in terminal mode too

  command = {
    right = "<C-l>", -- only map in command mode
  },
}

This seems a bit odd to me, i.e. you have basically 3 ways of specifying what the mode of a mapping should be. I would, as mentioned above, rather go with your initial version, where you have to specify the mode of a keymap per key, instead of having the keymaps and the modes separate. I.e., I would rather have:
keybindings = {
  left = '<C-h>',                  -- normal only
  left = { 't', '<C-h>' },         -- terminal only
  left = { { 'n', 't' }, '<C-h>' } -- normal and terminal
}

OR, the version suggested by me with the improvements to naming.
I think having the command/visual/normal and modes keys in the top-level table alongside normal key maps is not a good solution, simply because it offers multiple ways of mapping a key and is confusing to the users. I also have thought about this, and I think my initial solution is too verbose. Your solution was much simpler and easier to understand. I think my current stance is to go with the version suggested in my last comment (potentially adjusting key names or other minor things). Otherwise the changes to the README look good!
As always, thanks for taking your time to contribute to the plugin!

Closing this, I ended up moving to https://github.com/mrjones2014/smart-splits.nvim :wink:


CDI-481 Introduce AnnotatedParameter.getJavaParameter()

@cdi-spec/eg please review.

Looks good but why putting the code in the API and not in the implementation ?


Doesn't answer the question "How do I allow external forwarding"

This article provides lots of background information, but doesn't answer the question "Where do I go in the Admin console to allow a user to forward externally?" It doesn't even link to this information.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 43299e41-87fe-d6f1-20f7-83791d8ef90b
Version Independent ID: e5e69845-7040-f5b7-b922-e2d2fd9a7d5e
Content: Configuring and controlling external email forwarding in Microsoft 365. - Office 365
Content Source: microsoft-365/security/office-365-security/external-email-forwarding.md
Product: m365-security
Technology: mdo
GitHub Login: @MSFTTracyP
Microsoft Alias: tracyp

The article links to Configure outbound spam filtering in EOP at the end of the initial section. The linked article explains the necessary steps for both the Defender portal and Exchange Online PowerShell module.

Yes, but the referenced article is also only a generic discussion of spam rules in general, and not specific to the question of "How to allow external forwarding."
What you really need is something like this:
https://docs.helpscout.com/article/1424-enable-external-forwarding-in-microsoft-365
It's a perfect, step-by-step instruction manual to doing this specific task.

@ChaosFreak Thank you for your feedback. The article before this (as mentioned by @DMoenks ) talks about how to configure outbound spam policies and it talks in detail not just about forwarding but other features as well. Adding this information to https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/external-email-forwarding?view=o365-worldwide will mean that it is duplicated in two successive documents.
Hope this helps!
Thanks
Sri

@msbemba Thank you very much for the contribution and sharing this explanation. @ChaosFreak Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


OpenSSF

Hello,
if it possible for you to submit a score to openSFF please?
https://github.com/ossf/scorecard?tab=readme-ov-file
So we can build a picture of the security around the repo?

Thanks @leonsparrowJM I have added it.
Need to check all the warning. Some are AL-Go for Github related. So that I cannot fix.


Reduce compulsory field for the addstu command

Change

UI: Move nusnet up in the person card

Breaking change

addstu now only takes name and nusnet as compulsory argument

Remarks

Not sure how to do conditional rendering in javafx. For now, any optional fields are rendered with placeholders (this person does not have <field_name>)

Resolves: https://github.com/AY2324S2-CS2103T-F13-1/tp/issues/44

LGTM! Thanks so much for working on this feature! I think it has great impact on our usability for our target audience.
A minor consideration I would like to suggest is - should the placeholder message be shorter? remove the "this person has"? What do you think?

Updated, thanks for the review


PDFx won't see links in some PDFs

PDFx won't see most of the links in the PDF below. Is this a known issue? Is there a fix for it?
Many thanks!
https://webarchive.nationalarchives.gov.uk/20160613090753/https://www.litvinenkoinquiry.org/files/Litvinenko-Inquiry-Report-web-version.pdf

There are actually several problems with link processing in pdfx and pdfminer.  I'm working on a pull request to address as many of them as I can, but in the interim the attached
simple patch (against pdfx version 1.3.0) will fix the most serious one.
This patch increases the number of links recovered from the above linked file by harvesting Link annotations (as opposed to those scraped from the text) from 3 to 1067.
backends_patch.txt


Update Composer dependencies (2021-02-08-00-04)

Visual regression test passed!
View the visual regression test report


[processor] First iteration issues

General:

[x] merge stacks because of stack quota on Tutum?
[x] deploy to tutum only on tags?

Index:

[x] script has a memory leak

FIXED


Add cookiecutter-django-gulp to Django projects

Current coverage is 99.65%

Merging #648 into master will not affect coverage as of e00eb87

@@            master    #648   diff @@
======================================
  Files           13      13
  Stmts          572     572
  Branches         0       0
  Methods          0       0
======================================
  Hit            570     570
  Partial          0       0
  Missed           2       2

Review entire Coverage Diff as of e00eb87

Uncovered Suggestions

+0.35% via ...ookiecutter/utils.py#27...28

Powered by Codecov. Updated on successful CI builds.

:+1:


Why is the instance of a SubjectSpek shared across its tests?

Doesn't this go against the idea of having tests independent from each other?

Nvm, my mistake.


For Testshops - Adds/changes robots.txt to stop crawling

For Testshop environments, robots.txt should be set to Disallow: /

Thanks. Whoopsiee. didnt saw that


Add comment syntax for SILE

Sile is a typesetter somewhat similar to LaTeX that uses two different
possible input formats. Input can be XML which is already covered or
there is a TeX like input format. The normal file extension for the
latter is .sil.

Fork notice: With the upstream project sitting stale after nearly 8 months since the last activity, 71 outstanding pull requests, no comments from the original developer, and dozens of developers duplicating efforts while scratching their own itches, I've decided to step in and run a fork for a while. Hopefully the original developer will eventually consider picking this plugin up again or adding more maintainers so that the user base doesn't end up fragmented, but for now I would invite anyone interested in the latest updates to consider installing from and contributing pull requests to my fork.
About this PR: This was the itch that I scratched myself ;-)


Icon request: Blender

Icon Request
https://www.blender.org/

Icon name: blender
Tags of this icon: blender, design
Use case: For 3D design
Screenshots of similar icons:

Hi Chiru, this icon has been added in v3.1.0


[Enhancement] Splitting of Renderer.java into smaller, more modular classes

DrawUtils (Drawing)
LightUtils (Light rendering)
CameraUtils (Camera Rendering)

All of which will come together in the Renderer class

Not needed yet as of the port…


return user on auth

This PR makes the AuthManagers implementations return a full user object instead of just the id.

oidc and ldap already provide the user metadata as part of the authentication process

more specifically:

the credentials are extracted using a credential strategy in the chain
they are passed to the gateway which will handle basic or bearer auth with the configured auth provider
the auth provider returns all user metadata

before this PR the auth provider would only return an id, which the gateway then used to look up a user in the user provider

this allows us to authenticate user with oidc bearer auth (and fetch the user metadata from the userinfo endpoint) as well as ldap basic auth (and fetching the user metadata from ldap)
if the metadata needs to be extended, or only users should be allowed in via oidc that are also avaliable in ldap a separate middleware / inspector should handle that.

the user manager is only used to search users for sharing

[x] update json & demo auth manager to return all metadata

[ ] update examples

[ ] requires https://github.com/cs3org/cs3apis/pull/46 / https://github.com/cs3org/go-cs3apis/pull/20

@butonic it makes sense, let me start reviewing the cs3 apis first.

merged as part of https://github.com/cs3org/reva/pull/393


feat(i18n): sync, add ca and link to translation project

This PR:

synchronizes translations
adds Catalan locale
adds link to IPFS Translation Project at Transifex to the LanguageModal

should improve the discoverability for people who want to add/improve translations

@jessicaschilling done, now looks like this:

Let me know if it is ok to merge.
FYSA I'd like to create a new webui release with recent fixes we all did (including this one) and try to ship it with go-ipfs 0.6 so more users can benefit from this :pray:

We also may need to reconsider style for links overall
(link blue turns teal-ish after link is visited)
but thats something for future PRs :-) merging!


NVIDIA or Intel GPU, which one is applicable to run the code ?

Hi All,
I did not have NVIDIA GPU on my local machine. I am trying to run the code on Intel GPU but did not got success.
I wanted to confirm that can I run this code on Intel GPU or not ?
Many Thanks,
Kinjal

Hi Kinjal, sorry for late reply. I don't think you can use Intel GPU for running this code since it is not supported by CUDA.


allow for partial access of hugemem nodes.

Allow for partial access of hugemem nodes.
This also fixes a bug in the dynamic num cores and adds the 2 newest versions.

I need to rebase.


kadmin package design meta-issue

It may be worth it to add a kadmin package that provides convenience functions for interacting with Kafka in an "admin" like way. This would include creating / deleting topics, listing groups, getting the lag for groups, etc.
I've avoided adding this because I'm not sure how to do this in a forward compatible way as Kafka can add new fields to requests or responses at any time. If an API can be designed such that methods are either specific enough to not need extending, or generic enough that they can be extended in necessary, then a kadmin package would be great.
At a high level, the following should be supported:

create topics
delete topics
query topic (likely metadata request for an individual topic)
list groups
get lag for groups

The list above is to be extended as more needs come up. This comment will grow to eventually encompass an actual design, and once settled, this issue will track adding the kadmin package. Or, in the worst case, a kadmin package just cannot have a clean design and is not worth implementing.

A kadm package has been added in https://github.com/twmb/franz-go/commit/e0d6ab19218824d3cf76a9a2041b68af9f247ae5
This currently exists as a separate module, but I plan to merge this into franz-go soon (drop the go.mod and go.sum files).
The aim is to add some wording to the README, add an example, and some comment in kgo.

Does kadm package ready to use ?
I found some package private methods still no  implementation.  ex.
func (cl *Client) CreateTopics(
	ctx context.Context,
	partitions int32,
	replicationFactor int16,
	configs map[string]*string,
	topics ...string,
) (CreateTopicResponses, error) {
        // can not found where's implementation
	return cl.createTopics(ctx, false, partitions, replicationFactor, configs, topics)
}

Or maybe I missed something ?

That's on line 128.
The kadm package is not 1.0 tagged yet meaning the API can change slightly (for improvements). But, it builds and is working today, if you're willing to tolerate some small breakage in the event of much better APIs coming along.

Thank you very much !


Wrong height and width in some annotations

@xiaojie1017 Thanks for building and open-sourcing this dataset!
However, I noticed that the height and the width are wrongly annotated in some xml files.
To verify such errors exist, you could refer to the xml annotations of the two images below.

01e070bf7ddddf7afca0d4556418f7bdaa841a29.jpg
0cde37c020e9bfb176f0748ecb10107fbfdf9047.jpg

The similiar error exists in around 10% or more of this dataset. It cause problems when the width and height are directly read from the xml annotation instead of the image file (I found this problem when I try to convert these annotations into yolo format).
A revision on the annotation would be nice, or there should be a note in the readme suggesting that the height and width in xml files are not trustworthy.

@fei-chang Thank you for bringing this issue to our attention and for your valuable feedback on the dataset. I apologize for the inconvenience caused by the incorrect annotations for height and width in some XML files. I am committed to fixing these errors promptly.
To address this, I will include a Python script in the dataset repository that automatically generates the correct width and height for each image, ensuring that the data can be used reliably without manual corrections. This script will help maintain the integrity of the dataset and facilitate its use in various formats, including YOLO.
If it's possible, could you also share the script you used to convert the annotations to YOLO format? It would be immensely helpful for ensuring that our dataset can be seamlessly integrated into different workflows.
Thank you once again for your contribution, and I look forward to resolving this issue quickly.


Support HTCondor execute points

Enhance htcondor-configure

Create service account for HTCondor execute points
create basic HTCondor execute point configuration file

Create htcondor-execute-point module

create an instance template from which execute points will be created
create a managed instance group (MIG) for execute points
create a Toolkit runner to configure the autoscaler to scale the MIG

Submission Checklist

[X] Have you installed and run this change against pre-commit? (pre-commit install)
[X] Are all tests passing? (make tests)
[ ] Have you written unit tests to cover this change?
[X] Is unit test coverage still above 80%?
[X] Have you updated all applicable documentation?
[X] Have you followed the guidelines in our Contributing document?

Sorry for the force push. Want to avoid re-review after a squash. I believe 2 of the comments do not require action.


Model tests after Istanbul

Currently, the tests just check that after instrumentation, the contract still compiles. Of course we actually want to check that it compiles correctly, and returns the right instrumentation information. @cgewecke identified istanbul's tests as the sort of thing to aspire to, which makes sense given the use of istanbul in this project!
The below snipped is a (very rough and ready) reimplementation of the first test in our test suite (NB with the throw removed from the test contract, which stops any events from firing). It takes the contract, instruments it, compiles it, deploys it to a chain in memory, calls a function, and then compares the results to what we'd expect our instrumentation to conclude.
Obviously, this all needs to be put into a wrapper so that the rests of the tests are DRY, and similarly should use the same code that runCoveredTests.js uses, rather than just copying it into the helper.
I also don't like the use of async here, but that's a discussion for another issue, and is a consequence of me basing this off of a tutorial in `ethereumjs-vm, which I hadn't used before.
  it('should compile after instrumenting else statements with brackets',function(done){
    var contract = util.getCode('if/else-with-brackets.sol');
    var instrumentedContractInfo = getInstrumentedVersion(contract, "test.sol", true);

    var coverage = {};
    var canonicalContractPath = path.resolve('./../originalContracts/' + "test.sol");
    coverage[canonicalContractPath] = { "l": {}, "path": canonicalContractPath, "s": {}, "b": {}, "f": {}, "fnMap": {}, "statementMap": {}, "branchMap": {} };
    for (idx in instrumentedContractInfo.runnableLines) {
        coverage[canonicalContractPath]["l"][instrumentedContractInfo.runnableLines[idx]] = 0;
    }
    coverage[canonicalContractPath].fnMap = instrumentedContractInfo.fnMap;
    for (x=1; x<=Object.keys(instrumentedContractInfo.fnMap).length; x++ ){
        coverage[canonicalContractPath]["f"][x] = 0;
    }
    coverage[canonicalContractPath].branchMap = instrumentedContractInfo.branchMap;
    for (x=1; x<=Object.keys(instrumentedContractInfo.branchMap).length; x++ ){
        coverage[canonicalContractPath]["b"][x] = [0,0];
    }
    coverage[canonicalContractPath].statementMap= instrumentedContractInfo.statementMap;
    for (x=1; x<=Object.keys(instrumentedContractInfo.statementMap).length; x++ ){
        coverage[canonicalContractPath]["s"][x] = 0;
    }

    var output = solc.compile(instrumentedContractInfo.contract, 1);
    var code = output.contracts.Test.bytecode;

    var VM = require('ethereumjs-vm')
    var Account = require('ethereumjs-account')
    var utils = require('ethereumjs-util');
    var Transaction = require('ethereumjs-tx');
    var Trie = require('merkle-patricia-tree');

    var stateTrie = new Trie();
    var vm = new VM({state: stateTrie});
    //code needs to be a buffer
    code = new Buffer(code, 'hex')

    //we will use this later
    var storageRoot;

    //Don't use this address for anything, obviously!
    var secretKey = 'e81cb653c260ee12c72ec8750e6bfd8a4dc2c3d7e3ede68dd2f150d0a67263d8';
    var address = new Buffer('7caf6f9bc8b3ba5c7824f934c826bd6dc38c8467', 'hex');

    function setup(cb) {
      //create a new account
      var account = new Account();

      //give the account some wei.
      //This needs to be a `Buffer` or a string. all strings need to be in hex.
      account.balance = 'f00000000000000000';

      //store in the trie
      stateTrie.put(address, account.serialize(), cb);
    }

    var rawTx = {
      gasPrice: '1',
      gasLimit: 'ffffff',
      data: code
    };

    var createdAddress;

    function runTx(raw, cb) {
      //create a new transaction out of the json

      var tx = new Transaction(raw);

      tx.sign(new Buffer(secretKey, 'hex'));

      //run the tx
      vm.runTx({tx:tx}, function(err, results) {
        if (err){
          return cb(err)
        }
        createdAddress = results.createdAddress;
        cb();
      });
    }

    var rawTx2 = {
      gasPrice: '1',
      gasLimit: 'ffffff',
      data: utils.bufferToHex(utils.sha3('a(uint256)')).substr(0,10) + "0".repeat(63) + "1" ,
      //Note even though the contract is a(uint), uint is just an alias for uint256 so we have to use
      //that when working out the hash.
      nonce: 0x1
    };

    var seenEvents = "";

    function runTest(raw, cb){
      raw.to = utils.bufferToHex(createdAddress);
      var tx = new Transaction(raw);
      tx.sign(new Buffer(secretKey, 'hex'));
      vm.runTx({tx:tx}, function(err, results) {
        if (err){
          return cb(err)
        }
        results.vm.runState.logs.map(function(log){
          var toWrite = {};
          toWrite.address= log[0].toString('hex');
          toWrite.topics = log[1].map(function(x){return x.toString('hex')})
          toWrite.data = log[2].toString('hex');
          seenEvents += JSON.stringify(toWrite) + '\n'
        })

        cb();
      });
    }

    function checkTest(cb){
      var events = seenEvents.split('\n').slice(0,-1);
      events.map(function(event){
        event = JSON.parse(event);

        if (event.topics.indexOf("b8995a65f405d9756b41a334f38d8ff0c93c4934e170d3c1429c3e7ca101014d") >= 0) {
            var data = SolidityCoder.decodeParams(["string", "uint256"], event.data.replace("0x", ""));
            var canonicalContractPath = path.resolve('./../originalContracts/' + path.basename(data[0]));
            coverage[canonicalContractPath]["l"][data[1].toNumber()] += 1;
        }else if(event.topics.indexOf("d4ce765fd23c5cc3660249353d61ecd18ca60549dd62cb9ca350a4244de7b87f")>=0){
            var data = SolidityCoder.decodeParams(["string", "uint256"], event.data.replace("0x", ""));
            var canonicalContractPath = path.resolve('./../originalContracts/' + path.basename(data[0]));
            coverage[canonicalContractPath]["f"][data[1].toNumber()] += 1;
        }else if(event.topics.indexOf("d4cf56ed5ba572684f02f889f12ac42d9583c8e3097802060e949bfbb3c1bff5")>=0){
            var data = SolidityCoder.decodeParams(["string", "uint256", "uint256"], event.data.replace("0x", ""));
            var canonicalContractPath = path.resolve('./../originalContracts/' + path.basename(data[0]));
            coverage[canonicalContractPath]["b"][data[1].toNumber()][data[2].toNumber()] += 1;
        }else if(event.topics.indexOf("b51abbff580b3a34bbc725f2dc6f736e9d4b45a41293fd0084ad865a31fde0c8")>=0){
            var data = SolidityCoder.decodeParams(["string","uint256"], event.data.replace("0x", ""));
            var canonicalContractPath = path.resolve('./../originalContracts/' + path.basename(data[0]));
            coverage[canonicalContractPath]["s"][data[1].toNumber()]+= 1;
        }
      })
      assert.deepEqual(coverage[canonicalContractPath].l, { '5': 1, '6': 1, '8': 0 })
      assert.deepEqual(coverage[canonicalContractPath].b, { '1': [ 1, 0 ] })
      assert.deepEqual(coverage[canonicalContractPath].s, { '1': 1, '2': 1, '3': 0 })
      assert.deepEqual(coverage[canonicalContractPath].f, { '1': 1 })

      cb();
    }

    async.series([
        setup,
        async.apply(runTx, rawTx), //Deploy the contract
        async.apply(runTest, rawTx2), //Call the contract
        checkTest
    ], done);

  })

Fantastic! Wow. 👍  👍  👍  :boom:


Fix odo config view

Signed-off-by: anandrkskd<EMAIL_ADDRESS>What type of PR is this?
/kind bug
What does this PR do / why we need it:
Current odo config view fails if we run this command in a dir not containing devfile.
This PR fixes odo config view command for any directory not containing devfile.
Which issue(s) this PR fixes:
Fixes #?
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[ ] Documentation

[x] I have read the test guidelines

How to test changes / Special notes to the reviewer:
Steps to test changes
make install
cd /path/to/dir
odo config view

How to Reproduce the failure
neo@matrix [11:07:42 PM] [~/work/demo]
-> % ls
nodejs-ex
neo@matrix [11:07:43 PM] [~/work/demo]
-> % odo config view
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb8 pc=0x2832c23]

goroutine 1 [running]:
github.com/devfile/library/pkg/devfile/parser.DevfileObj.GetMetadataName(...)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/vendor/github.com/devfile/library/pkg/devfile/parser/configurables.go:147
github.com/openshift/odo/pkg/component.ToDevfileRepresentation(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/pkg/component/devfile_repr.go:12 +0xa3
github.com/openshift/odo/pkg/odo/cli/config.(*ViewOptions).Run(0xc0000220b0, 0xc0001afb80, 0x0, 0x0)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/pkg/odo/cli/config/view.go:62 +0x145
github.com/openshift/odo/pkg/odo/genericclioptions.GenericRun(0x35c0680, 0xc0000220b0, 0xc0001afb80, 0x49a2488, 0x0, 0x0)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/pkg/odo/genericclioptions/runnable.go:97 +0x479
github.com/openshift/odo/pkg/odo/cli/config.NewCmdView.func1(0xc0001afb80, 0x49a2488, 0x0, 0x0)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/pkg/odo/cli/config/view.go:89 +0x5e
github.com/spf13/cobra.(*Command).execute(0xc0001afb80, 0x49a2488, 0x0, 0x0, 0xc0001afb80, 0x49a2488)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/vendor/github.com/spf13/cobra/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003ee280, 0xc00005c0d8, 0x2ec1ec0, 0x49a2488)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/vendor/github.com/spf13/cobra/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/vendor/github.com/spf13/cobra/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/vendor/github.com/spf13/cobra/command.go:890
main.main()
   /builddir/build/BUILD/gocode/src/github.com/openshift/odo/cmd/odo/odo.go:70 +0x426
neo@matrix [11:07:51 PM] [~/work/demo]

@anandrkskd that's a nice catch and looks like an elegant fix to me. I have just one question - do you think adding a test would help so that we don't end up having a regression some day? I am inclined to a "yes", but I'll leave it up to you.
And thanks for the code contribution! 👍🏾

do you think adding a test would help so that we don't end up having a regression some day?

I agree, I will add a test for this ASAP.

/lgtm
/approve


URLs are not correctly detected.

Hello!
Thanks for great app of my dream :)
I have an issue with iTerm configuration: it just don't works and I got this:

(nowhere is a command I tried to execute)
Part of configuration:
	"terminal": "iTerm",
	"iTerm_version": "nightly",
	"open_in": "tab",
	"launch_at_login": true,
	"show_ssh_config_hosts": true,

Works great with basic Terminal.app.
I have latest nightly iTerm 2 release and OS X 10.11.1. Tried to:

use stable as version
reinstall iTerm shell integration
assign iTerm with ssh:// URLs
and nothing helps :(

Thanks for advance!

If you don't mind could you send me your not working .JSON file. My email address is on my github page.  Having your json file will help me troubleshoot the issue.

Thats it:
{
	"_comments": [
		"Valid terminals include: 'Terminal.app' or 'iTerm'",
		"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
		"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
	],
	"terminal": "iTerm",
	"iTerm_version": "stable",
	"open_in": "tab",
	"launch_at_login": true,
	"show_ssh_config_hosts": true,
	"ssh_config_ignore_hosts": [],
	"ssh_config_ignore_keywords": [],
	"hosts": [
		{
			"name": "My Dev Server",
			"cmd": "ssh<EMAIL_ADDRESS>		},
		{
			"Transmit disk": [
				{
					"name": "<IP_ADDRESS>",
					"cmd": "nowhere"
				},
				{
					"name": "Kill all",
					"cmd": "killall -c \"Transmit Disk\""
				}
			]
		},
		{
			"Personal": [
				{
					"name": "My blog",
					"cmd": "ssh<EMAIL_ADDRESS>				},
				{
					"Spouse": [
						{
							"name": "Her blog",
							"cmd": "ssh<EMAIL_ADDRESS>						}
					]
				}
			]
		},
		{
			"Vagrant": [
				{
					"name": "precise32",
					"cmd": "ssh<EMAIL_ADDRESS>-p 2222 -i ~/.vagrant.d/insecure_private_key"
				}
			]
		}
	]
}

Same here, can't get the iTerm to work. Using latest nightly. Here is my json file.
{
  "_comments": [
    "Valid terminals include: 'Terminal.app' or 'iTerm'",
    "In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
    "Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
    "For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
  ],
  "editor": "subl",
  "iTerm_version": "nightly",
  "launch_at_login": true,
  "show_ssh_config_hosts": true,
  "ssh_config_ignore_hosts": [  ],
  "ssh_config_ignore_keywords": [  ],
  "terminal": "iTerm",
  "hosts": [

  ]
}

@madhur Are you passing a theme?

@digitalhitler
You say I have latest nightly iTerm 2 release and OS X 10.11.1
Make sure you change your version to nightly   "iTerm_version": "nightly",
Regarding your error screenshot... change "nowhere" to a command like "ps aux | grep foo"
After changing the version to nightly and "nowhere" to a command your config is working for me. Please contact me if you have questions

@digitalhitler If you want nowhere to be sent to terminal you need to change the name from                     "name": "<IP_ADDRESS>", too  "name": "192 168 1 2", Seems there is a bug with numbers in the name of the command.

@thshdw I do not see any theme setting in iTerm like the Terminal app.  I do have two profiles

Madhur
Hotkey Window

Apart from that, its pretty much default. Exact version is Build 2.9.20151117-nightly

@madhur Sorry... :) I meant to ask what your default profile was in iTerm. If its not default then you have to set the default in your json file

@madhur I think what you and @digitalhitler are experiencing are different issues. Regarding @digitalhitler issue... This is a bug in the url checking. Tagging as such. @madhur I think your issue is related to #147

@digitalhitler discovered a bug with the URL detection. shuttle checks the command to see if its a URL then opens that URL in the default app.
Example:
"cmd": "cifs://myServer/c$"

Should open the above path in finder.
I have a fix in my sandbox branch but I need to test it for the 1.2.6 release.

Huh, so hot discussion here and I am so far from my home to check it.
Its doesnt matter now but I tried everything before reporting an issue: use real commands, full path to binary, "open" command before my command, stable, nightly builds etc. but i doesnt tried to define url schema before command.
Thanks! I'll try it when come back home and tell you if it works. Btw, what schema I need to use? Something like iterm:// or what?

I meant any terminal command above, not CIFS connection. E.g. Something like iterm://uptime.

@digitalhitler
In your command you have the following:
            "Transmit disk": [
                {
                    "name": "<IP_ADDRESS>",
                    "cmd": "nowhere"
                },

This is what happens... cmd (due to a bug) is not correctly checking if its a URL. The bug incorrectly parses name (because of the IP address) and uses name as  a part of the command. The code incorrectly then detects your cmd as a URL (which it is not) and then tries to open your cmd in the default application.
Unless you are trying to open a url like a website or a file path your solution would be to take the . out of your name and replace them with spaces.  "name": "192 168 1 2",

Oh, yeah, now I've got understood you, thanks a lot for detailed explanation for slowies like me.

@digitalhitler You're welcome! Thanks for discovering the issue. :+1:

fixed in release v.1.2.6 pull #165


MacOS: Read-Only access prevents execution

Executing Python code in MacOS throws an error. This happens because the plugin is note allowed to execute the file it generated.

Possible solution: Passsing the source code from the code block directly to node / python / etc

node: "node -e"
python: "python -c"

Thank you! This could possibly be a solution.
Unfortunately I can't test this by myself because I don't own a Mac.


Weather Forecaster using python

Modified the code with comments and added the readme file with more info regarding the project

Thank you for contributing @rahulch-1. Make sure to check your contributions on GitHub Pages.


Why did dep not used my imported version?

Warning: I am testing dep out on Kuberentes, and am using a few fixes to the godep config file to get this far.
go version: go version go1.8.3 darwin/amd64
dep version: v0.2.1-1-ga085554 ( PR #938 )
The dependency on cloud.google.com/go was for 0.1.0-115-g3b1ae45, specifically the untagged revision 3b1ae45. After running dep init and importing the config from godep, that preferred/imported revision was ignored during solve. Or at least that's the way it looks.
dep init -v
Importing configuration from godep. These are only initial constraints, and are further refined during the solve process.
Detected godep configuration files...
  Loading /Users/carolynvs/go/src/k8s.io/kubernetes/Godeps/Godeps.json
Converting from Godeps.json ...
  ... TRUNCATED
  Using ^0.1.0-115-g3b1ae45 as initial constraint for imported dep cloud.google.com/go
  Trying * (3b1ae45) as initial lock for imported dep cloud.google.com/go
  ... TRUNCATED
Root project is "k8s.io/kubernetes"
 1506 transitively valid internal packages
 439 external packages imported from 112 projects
(0)   ✓ select (root)
   ... TRUNCATED
(3)	? attempt cloud.google.com/go with 1 pkgs; 15 versions to try
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(4)	✗<EMAIL_ADDRESS>not allowed by constraint ^0.1.0-115-g3b1ae45:
(4)	    ^0.1.0-115-g3b1ae45 from (root)
(3)	    try<EMAIL_ADDRESS>(3)	✓ select<EMAIL_ADDRESS>w/2 pkgs

I was expecting to see a line like this instead:
  try cloud.google.com/go@3b1ae45

It's not clear from the output why the revision wasn't considered before those other versions? Is it because the constraint is for a version and not a branch?

that is indeed odd - i would've expected to see it up at the top. the first thing i'd check is that it is, indeed, actually making it into the Lock that's passed to the solver. after that, i'd start debugging in solver.findValidVersion() to see what the queue that's actually built for cloud.google.com/go looks like.

Thanks! I'll try that.

@sdboyer  Okay here is what is happening:

The imported manifest has a semver constraint.
The imported lock has an untagged revision.
solve calls getLockVersionIfValid which detects that the revision doesn't strictly match the constraint. It checks if there's a tag for that revision which would match, doesn't find one, and it breaks the lock.

From the code perspective I get what happened, though we should at least logged something in this case, as otherwise that's a pretty sneaky thing for gps to do. 😀 I'm going to add an issue for that in a minute.
From a human perspective, when I have a constraint like >= 1.0.0, and a revision which if you ran git describe --tags on, returned 1.0.0-2-abc123, I would personally consider that to satisfy the intent of the constraint.
Do we want dep to stick with this current behavior, essentially seriously making it hard for someone to lock to an untagged revision while still trying to use semver in the manifest? In the distant future maybe that's not a huge deal when more things are properly tagged, but right now, that would quickly convince me to stop using semver, and go back to constraining to just master.
Obviously I prefer that dep be a bit looser about revisions matching semver constraints... What do you think?

Just adding this here so that I don't forget. 😊  If we end up not changing gps's behavior, the importers all need to stop turning strings like v1.0.0-2-abc123 into a semver constraint, and instead fall back to the any constraint to avoid lock breaks.

crap. sorry, i missed this, my bad.
maybe we can find a nice middle ground - if the semver value that comes back has prerelease data on it (which i believe is how these suffixes get interpreted), then we just drop the constraint. would that cover our problems?

I think that unless the revision that they are currently locked to is tagged, we shouldn't add a constraint during import. If they are currently on a prerelease version, then it should be safe to add a constraint, for example every moby release is now a prerelease thanks for their creative CE versioning scheme, e.g. 17.03.1-ce. But I think dep will handle that just fine (i.e. not change the locked rev during solve) as long as the revision is tagged.

sure, ok - that's probably easier and less complex. and that's really worth doing, given that it was trying to be perhaps a bit too smart that got us into this in the first place 😉
let's just make sure that we've got some pretty exhaustive tests for the possible combinations!

Working on this today and as part of it, all the logic for the importers is going to be consolidated into a single function. That way importers only deal with the config parsing, and none of the logic about converting rando strings to locks/constraints is handled individually in each importer.


files: sqlite/mysql support for localFileTransferRepository

Right now the fileTransferRepository is hardcoded to be localFileTransferRepository (test values) and we should support sqlite/mysql as another data store.

This is already done. I'm just adding a test for mysql.


⚠ Bofrost.fr has degraded performance

In c0c0273, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1357 ms

Resolved: Bofrost.fr performance has improved in 623fbce.


Avoid flattening global only server settings

Summary
This PR fixes the bug to avoid flattening the global-only settings for the new server.
fixes: #11507
Test Plan

This might not be the correct solution because now the empty initialization options fail to deserialize.

There is a test :)
https://github.com/astral-sh/ruff/blob/0b9fd71e68bcea1b3901554bd19c08361b53a511/crates/ruff_server/src/session/settings.rs#L710-L715


Node.js usage.

Hi, I did some research, looking for an inline Worker+Blob API library. Basically, the three clear options on npmjs are operative, threadless, and paralleljs.
paralleljs seems like something that would be built on top of threadless or operative, so I dropped that out of the picture, looking just for the basic inline worker implementation.
So between operative and threadless, operative has the cleanest API. threadless is more like a C/Java programmer approach, and the required err argument for the callbacks can get annoying.
That being said, threadless shines because it works in both server-side nodejs and client-side browser.
Ultimately I'd like a single API across both environments. threadless does it, but operative's API is so nice.
Would you be willing to adopt the workerjs library that threadless is depending on to make operative work everywhere?
I feel that multi-threading will be necessary in the upcoming years as the web evolves into more of a 3D world, not just simple documents. Libraries like http://famo.us, for example, aren't using workers yet but I think it will become necessity for them do start using them in the new age of 3D web. Three.js is of course using workers already. It makes sense for highly performant applications.

Hi @trusktr! Thanks for opening this issue. Node.js support was requested before, but at the time I wasn't sure whether it should be just another degraded variation vs. utilizing child processes / VMs, so opted to leave it out. I also couldn't really envisage a usage for Operative in both client and server envs. But I guess it could be worth having a single codebase that can easily be run in both.
I've been experimenting a bit with this today, and shall continue to do so. I'll update this issue when I have a workable branch / some progress.
So far my only question is around dependencies. Operative allows arbitrary remote dependencies to be passed in, ..
// Create interface to call lodash methods inside a worker:
var lodashWorker = operative(function(method, args, cb) {
    cb(
        _[method].apply(_, args)
    );
}, [
    'http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.3.1/lodash.min.js'
]);

I'm not sure how this would ideally behave in the Node.js env... Maybe it can just be an interface to local require calls? What do you think?

Also, re: the workerjs lib, I think I'd rather just interface directly with child_process. Fortunately it all looks quite simple to do.

For sure. But yeah, the benefit is having a single API on both sides. If it's child processes in nodejs, all the same from outside the API. And yeah, a require interface might be it for nodejs too, but still it'd be all the same outside the API. I don't think I'll be using URL dependencies like though. I'm primarily interested in handling my own dependencies, then using inline workers.
To give a worker a dependency, are you injecting the whole code of the dependency into the function?

On the client-side, dependencies would either be a <script> in the degraded iframe or would be loaded via importScripts inside a worker (and so would end up exposing themselves globally).
I think it's fair to simply disable this functionality while in a Node env, since you can freely require() inside of your operative anyway, i.e.
var uniq = operative(function(array, cb) {
  var _ = require('lodash');
  cb( _.uniq(array) );
});

Does that look okay?

Yeah, that looks nice!

Worth a mention: Passing data to/from child processes in Node seems very slow (since it's just JSON-serialization).

Yeah. :(

Given that transferring data is such a huge bother (and so very slow), right now, it doesn't seem worth bringing node.js support to operative. I'm also not too happy about the dependency-loading inconsistency implicit in such support. Gonna close this issue for now.

@padolsey For the Node.js, you could use an existing thread library (server-side) or just spawn children, but then wrap the API in your operative so it exposes the same API as for the browser. The advantage might be that on the server side you can pass objects, not just JSON.

Yeh, I do agree that it'd be nice to have a consistent API present on the server as well as the client. I'll re-open this issue for now... But I don't currently have time to implement it fully (and am still not sure what to do about dependency loading, as mentioned).

Node's child_process has special form of spawn called fork. Not sure when it was appeared.
Here's two things about it:

It establish «communication channel», child will have process.send & process.on('message') and parent can child.send and child.on('message') (API is pretty symmetric).
fork accepts modulePath, not a function. Not sure is it good or bad for operative but it looks similar to Worker which accepts path too.

Here's might be the same perfomance issues, since communication is a JSON too.
I don't see any issue with dependencies, since node's child processes spawns/forks will have appropriate require. Maybe I don't understand the real issue here.


Allow range of dbt_utils versions

Description & motivation
PR for ticket: https://github.com/Velir/dbt-ga4/issues/241 .
Since this package is not using safe_subtract, it doesn't require dbt 1.1 (and certainly doesn't require 1.1.1 which is just a readme change).  On the other hand, future versions before 2.0 are not supposed to be breaking changes, so it should be safe to allow them.  Allowing a broad range of dbt_utils versions makes it much easier for companies to use this package along with other packages that also have dbt_utils version requirements.
Checklist

[X] I have verified that these changes work locally
[ ] I have updated the README.md (if applicable) (N/A)
[ ] I have added tests & descriptions to my models (and macros if applicable) (N/A)
[X] I have run dbt test and python -m pytest . to validate existing tests

thanks!


pull request for e2e test at 11/13/2016 08:26:08

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


chore(packages): add spec packages

remove "react" keyword from components
move scripts object higher in package.json's
sort carbon object in package.json's
format markdown files

Closes #2389
New component spec packages are private for now. These initial packages only include the base carbon configuration package.json objects which are documented in the PR. Component specification content will get moved to these packages in subsequent efforts.
Things to review:

/docs/developing.md
Directory naming for spec packages
package.json for one of the spec packages
/tasks/sync.js

it looks like quite a few markdown files are only changing due to a line length rule. is that intentional?

@emyarod intentional by modifying a prettier config. But, I shouldn't have done this prior to getting all repos in this repo. Lots of conflicts to merge upstream now. I'll clean up this PR so it's only spec changes, and I'll do a separate PR for markdown formatting.


Update typings for Tether-Shepherd v1.2.0

Added the showOn? function to the Tour Options Interface for version 1.2.0

tether-shepherd/tether-shepherd.d.ts
to author(@mtgibbs). could you review this PR?
:+1: or :-1:?
check list

[ ] pass the Travic-CI test?

thanks mate!


Fix  Unsupported operand types: int + string

Sending a integer value for seconds in php 8.0 is causing the following error:
[message] => Unsupported operand types: int + string
    [exception] => TypeError
    [file] => /application/vendor/m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php
    [line] => 109
    [trace] => Array

👍 @Oliboy50 you can tag a new release if you want

released in v5.0.1


error read on closed response body

When I try to do normal get request this error message appears:
http: read on closed response body

my code is:
res, err := goreq.Request{Uri: "http://www.google.com"}.Do()
if err != nil {
    panic(err)
}
fmt.Println(res.Body.ToString())

i'm using go 1.51

@mostafadahab this is because that request returns a 302. If you print res.StatusCode you can check that.
In order to work you need to specify the MaxRedirects parameter to the Goreq struct.

@marcosnils This seems counter-intuitive, so I only have to close the body if the statusCode is in the range 300-399 ? Otherwise goreq will close for me?
There are also cases where a redirect might have a body.


Unable to map different levels of nesting (AKA bug mapping EDIFACT message)

Describe the Bug with repro steps
In the following screenshot, you can see I have an array called CNILoop1, then a child array called STSLoop1. Underneath STSLoop1is NADLoop2 and LOC_3, both at the same level directly under STSLoop1. When I try to map a value from each of these, the YAMl (and therefore the XSLT) thinks that both are under NADLoop2. Only NAD01 is under NADLoop2.
Screenshots or Videos

Version
2.72
Additional context
No response
AB#25587805

Adding this screenshot that captures the whole issue in one photo


refactor: move locale switching logic out of state

https://github.com/makeswift/makeswift/assets/10539418/68577ce9-7dc2-47f2-adbc-7bff68457e50

Need a ♻ for the changeset

Why are our deployments failing? 🤔

Why are our deployments failing? 🤔

I'm not apart of the Vercel team, so I can't see why the pages router version is failing, but the app router version is failing due to the next/router import, which I want to tackle separately from this PR.

Why are our deployments failing? 🤔

I'm not apart of the Vercel team, so I can't see why the pages router version is failing, but the app router version is failing due to the next/router import, which I want to tackle separately from this PR.

Ok. I can see why it's failing and it's a weird error. It sucks that our CI isn't green but we can move on...


⚠ Fortnite has degraded performance

In 50b2247, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1648 ms

Resolved: Fortnite performance has improved in 09b529c.


DistributedSnapshot with NCCL

I want to use DistributedSnapshot with NCCL. However, current _get_ranks_from_env only accept environment variables for MPI and MV1.
In pytorch documentation, they use the environment variables: WORLD_SIZE, RANK, and LOCAL_RANK, for specifying a process.
https://github.com/pfnet/pytorch-pfn-extras/blob/8b16df9433a024c63d786c76f1e7ccbb88847283/pytorch_pfn_extras/training/extensions/_snapshot.py#L473-L488

Hi, thanks for the feedback, this is because use to run our training directly with mpirun so we rely in these variables.
I agree this is not correct and I am going to fix it now.

I just sent a fix for this in #58
I hope this will fix it 😇


Used callbacks with printers

This change is

Reviewed 8 of 8 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Shop information

Coverage remained the same at 100.0% when pulling 711ec8a20d8b21f2ded185c238d32e1ca440458e on 132-shop-data into 7479c4a716665eeb921e438888d806a6cbcae3e4 on master.


Form reset event should call the datePickers "change" event

Pressing the reset button/input of a form should call the datePickers "change" event.

Fixed in latest snapshot.


Adds stm extra install to pyproject.toml

LGTM. I guess you guys fixed the git dependency in pynxtools-stm?

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
11 unchanged lines in 4 files lost coverage.
Overall coverage remained the same at 45.763%

Files with Coverage Reduction
New Missed Lines
%

pynxtools/dataconverter/readers/em_spctrscpy/utils/hspy/em_hspy_adf.py
2
11.38%

pynxtools/dataconverter/convert.py
2
80.99%

pynxtools/dataconverter/readers/em_spctrscpy/utils/hspy/em_hspy_eels.py
3
9.38%

pynxtools/dataconverter/readers/em_spctrscpy/utils/hspy/em_hspy_xray.py
4
8.59%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
3597

Relevant Lines:
7860

💛  - Coveralls

LGTM. I guess you guys fixed the git dependency in pynxtools-stm?

I just made the dependency a submodule 😬

LGTM. I guess you guys fixed the git dependency in pynxtools-stm?

I just made the dependency a submodule 😬

Ok, a bit ugly, but as long as it work :D

I have removed the nanonispy as submodule but brought the code from that repo with the git history.
LGTM!


Dynamic analysis: "Tracing system call error: ESRCH: No such process"

Describe the bug
For some of binaries, after press enter at "Dynamic" tab, i see a "ESRCH: No such process" error.
To reproduce
cargo new hello
cd hello
cargo build
binsider ./target/debug/hello

Screenshots / Logs

Software information

Operating system: Ubuntu 24.04.1 LTS
Rust version: rustc 1.81.0 (eeb90cda1 2024-09-04)
Project version: binsider 0.1.0

Yeah, not sure why it happens yet. Also reported here: https://github.com/JakWai01/lurk/issues/48

Unfortunately it dont help for me

This will be fixed in #48 :)

@godzie44 ! did it fix for you? I have the same issue with a simple hello world program in C. I simply ran cargo run install --force after pulling the latest changes. I am assuming the changes are incorporated in the binary.

I was too confident about the fix 😅 The issue seems to be still there and I'm even more puzzled by it now. It apparently works for some files and not for others. Can you share the file you are trying this with?

Btw it fails for this function:

@orhun I am on phone right now, but this was the source code.
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

I then compiled it with gcc  -o hello.elf hello.c.
Finally, binsider hello.elf.
Thank you for looking into it!

Looks like this dont fix for me too :(

I'm quite puzzled by this, @JakWai01 any ideas? 👀

@orhun I just tried to replicate in in lurk. On this side, it seems to work:
$ lurk ./hello.elf
[7414] execve("", "", "") = 0
[7414] brk(0x0) = 0x555555559000
[7414] arch_prctl(12289, 0x7FFFFFFFDDB0) = -22
[7414] mmap(0x0, 8192, 3, 34,<PHONE_NUMBER>, 0) = 0x7FFFF7FBB000
[7414] access("/etc/ld.so.preload", 4) = -2
[7414] openat(4294967196, "/etc/ld.so.cache", 524288) = 3
[7414] newfstatat(3, "", 0x7FFFFFFFCF00, 4096) = 0
[7414] mmap(0x0, 100467, 1, 2, 3, 0) = 0x7FFFF7FA2000
[7414] close(3) = 0
[7414] openat(4294967196, "/lib/x86_64-linux-gnu/libc.so.6", 524288) = 3
[7414] read(3, "ELF\u0002\u0001\u0001\u0003", 832) = 832
[7414] pread64(3, "\u0006", 784, 64) = 784
[7414] pread64(3, "\u0004", 48, 848) = 48
[7414] pread64(3, "\u0004", 68, 896) = 68
[7414] newfstatat(3, "", 0x7FFFFFFFCFD0, 4096) = 0
[7414] pread64(3, "\u0006", 784, 64) = 784
[7414] mmap(0x0, 2264656, 1, 2050, 3, 0) = 0x7FFFF7D79000
[7414] mprotect(0x7FFFF7DA1000, 2023424, 0) = 0
[7414] mmap(0x7FFFF7DA1000, 1658880, 5, 2066, 3, 163840) = 0x7FFFF7DA1000
[7414] mmap(0x7FFFF7F36000, 360448, 1, 2066, 3, 1822720) = 0x7FFFF7F36000
[7414] mmap(0x7FFFF7F8F000, 24576, 3, 2066, 3, 2183168) = 0x7FFFF7F8F000
[7414] mmap(0x7FFFF7F95000, 52816, 3, 50,<PHONE_NUMBER>, 0) = 0x7FFFF7F95000
[7414] close(3) = 0
[7414] mmap(0x0, 12288, 3, 34,<PHONE_NUMBER>, 0) = 0x7FFFF7D76000
[7414] arch_prctl(4098, 0x7FFFF7D76740) = 0
[7414] set_tid_address(0x7FFFF7D76A10) = 7414
[7414] set_robust_list(0x7FFFF7D76A20, 24) = 0
[7414] rseq() = 0
[7414] mprotect(0x7FFFF7F8F000, 16384, 1) = 0
[7414] mprotect(0x555555557000, 4096, 1) = 0
[7414] mprotect(0x7FFFF7FFB000, 8192, 1) = 0
[7414] prlimit64(0, 3, 0x0, 0x7FFFFFFFDB10) = 0
[7414] munmap(0x7FFFF7FA2000, 100467) = 0
[7414] newfstatat(1, "", 0x7FFFFFFFD6C0, 4096) = 0
[7414] ioctl(1, 21505, 0x7FFFFFFFD620) = -25
[7414] getrandom(";EÐ\u0007", 8, 1) = 8
[7414] brk(0x0) = 0x555555559000
[7414] brk(0x55555557A000) = 0x55555557A000
[7414] write(1, "Hello, World!", 13) = 13
[7414] exit_group(0) = ?

Yeah, it works fine in lurk for me as well. I guess I'm doing something wrong in tracer.rs, can you take a look at that file as well?
Most notably, I'm spawning a new thread for executing the binary and I wait for the execution to complete via waitpid. When I remove the thread, the whole thing just gets stuck in wait() call in lurk. Otherwise I fail to get the pid of the child process I guess.

@godzie44 to replicate this, you can try moving the binary outside of $PWD and running that way:
$ lurk /home/orhun/gh/binsider/test.elf
Error: ESRCH: No such process

@JakWai01 to replicate this, you can try moving the binary outside of $PWD and running that way:
$ lurk /home/orhun/gh/binsider/test.elf
Error: ESRCH: No such process

So - when I got this I ran it with a few small test binaries written in C....seems to happen when using small bins that exit quickly for me? might be barking up the wrong tree, but I can get it working when I use something a bit more substantial...

So - when I got this I ran it with a few small test binaries written in C....seems to happen when using small bins that exit quickly for me? might be barking up the wrong tree, but I can get it working when I use something a bit more substantial...
EDIT - actually seems to be a bit hit and miss even with larger files...weird.

I think I have reproducible recreation steps because this also occurs when running a tiny 32-bit program on my 64-bit machine, which coincidentally segfaults after printing "Hello world!".

The assembly:

section .text
global _start
_start:
    mov edx, len
    mov ecx, msg
    mov ebx, 1
    mov eax, 4
    int 0x80

section .data
    msg db "Hello world!"
    len equ $ -msg

Then prepared with:
nasm -f elf32 -o hello.o hello.asm && ld -m elf_i386 -o hello hello.o

Invoking ./hello yields:
./hello
Hello world![1]    550486 segmentation fault (core dumped)  ./hello

and then binsider hello gives Tracing system call error: ESRCH: No such process when I run it under the dynamic table.

Thanks for looking into it. I'm not sure how that reproduce steps help here though. At this point it is failing for any local executable.


This function contains external libraries. Uploading a new file will override these libraries.

When I view the browserfied lambda file on AWS I get this Warning:
This function contains external libraries. Uploading a new file will override these libraries.
The function seems to work correctly as all dependencies are within the single file. But I'm wondering what is triggering this warning?

If I copy and paste the function code that is uploaded via serverless into a new Lambda function via AWS UI, I don't see this warning. Furthermore, the code size of the function I manually created is 25% smaller! The functions are (presumably) identical. Thoughts?