Running debugger under conda fails to load _sqlite3

Issue Type: Bug
Hello,
After editing some documents in a repository, staging the changes, adding a commit message, and then trying to commit, I get an error with the following Command output.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Traceback (most recent call last):
  File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\__main__.py", line 1, in <module>
    from pre_commit.main import main
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\main.py", line 13, in <module>
    from pre_commit.commands.autoupdate import autoupdate
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\commands\autoupdate.py", line 20, in <module>
    from pre_commit.store import Store
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\store.py", line 4, in <module>
    import sqlite3
  File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Traceback (most recent call last):
  File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\__main__.py", line 1, in <module>
    from pre_commit.main import main
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\main.py", line 13, in <module>
    from pre_commit.commands.autoupdate import autoupdate
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\commands\autoupdate.py", line 20, in <module>
    from pre_commit.store import Store
  File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\store.py", line 4, in <module>
    import sqlite3
  File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

I did try importing those same python modules in a python session in a terminal (in the same anaconda environment) and I did not get any issue.
As far as I can tell, this is only happening one of the two workspaces I normally use.
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info

Item
Value

CPUs
11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 1690)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.73GB (5.55GB free)

Process Argv
--crash-reporter-id c4587ea1-65de-4590-a2c4-cb48d86b4f8b

Screen Reader
no

VM
0%

Extensions (15)

Extension
Author (truncated)
Version

languagetool-linter
dav
0.19.0

typescript-notebook
don
2.0.6

gitlens
eam
11.7.0

gitlab-workflow
Git
3.40.1

todo-tree
Gru
0.0.215

gitlab-mr
jas
1.4.3

git-graph
mhu
1.30.0

python
ms-
2021.12.1559732655

vscode-pylance
ms-
2022.1.1

jupyter
ms-
2021.11.1001550889

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.4

powershell
ms-
2021.12.0

rust
rus
0.7.8

rewrap
stk
1.15.4

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30421291
pythonvs932:30410667
vscop804:30404766
vscop940:30404999
vsrem710:30416614
vsccppwtstudy:30421978

@lszomoru I've gone ahead and transferred the issue to the vscode-python repo.
@Astlaan please let us know if you are still having this issue as we have completely reworked our conda support since you last reported anything.

Hi @brettcannon .
Now the issue I was having got replaced by this error message:

This is the console output:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

That's due to git not finding python anywhere as you probably don't have python on PATH if you're using conda. So that isn't due to anything in the Python extension and more about how git is being run and how your system is set up.
@lszomoru do you want this moved back to the vscode repo since this more about git and how it executes commands?

This might be that when run in VS Code it is not running in a activated environment. Can you try this?

Anaconda prompt and cd to your workspace.
Activate the environment using conda activate
Start VS Code using code .

related #10626

@karrtikr
Thanks.
Indeed the previous error doesn't appear to pop up anymore.
I'm facing another possibly weird behaviour, but not sure if this is an issue from VS Code.
If I try "debug test", initially I get the debugger control buttons, as expected.

However, after running it seems the debugger quits and I am not left in a debugger session.

In contrast, if I run the equivalent bash command (with --pdb in order to debug the test):
pytest -k test_identical_pulses_compile --pdb

I am left with a running debugging session, as expected:
>       import jkjdfg
E       ModuleNotFoundError: No module named 'jkjdfg'

tests\scheduler\backends\test_qblox_backend.py:822: ModuleNotFoundError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> c:\users\user\desktop\qblox\code\quantify-scheduler\tests\scheduler\backends\test_qblox_backend.py(822)test_identical_pulses_compile()
-> import jkjdfg
(Pdb)

@Astlaan, sadly there is an issue with conda run when running it from a terminal that already has an activated environment (https://github.com/conda/conda/issues/11305, https://github.com/conda/conda/issues/11174) due to which conda ends up using the base environment python instead, and hence results in errors such as "No module named 'jkjdfg'". So unfortunately there isn't much to do to be done here atm.
We're looking to activate conda environments in a different way with https://github.com/microsoft/vscode-python/issues/11039, which should also help solve this issue, closing in favor of that.
As a workaround, you can use extension version which predates 2021.12.0 (9 December 2021), where we do not use conda run, that should not result in the module not found error.


Can not Target

After patch 2.0.8 i have been unable to target anything. When i switch back to 2.0.8 i have no issues

Do you have the option Require Target to Use turned on?  This was fixed to work around 2.0.8.
TimothyLuke

On 21 Feb 2017, at 6:24 pm, Zakarume<EMAIL_ADDRESS>wrote:
After patch 2.0.8 i have been unable to target anything. When i switch back to 2.0.8 i have no issues
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Ok. Just updated to 2.0.14 and still have the issue. I went to WoD Garrison to training dummy. I can not target. Require Target to use is checked

Update.  Just went back and UNCHECKED  Require Target to use. And now it works. Even did a reload and logged out of game and still it works

Turn that option off.  That option is working as it's supposed to.
TimothyLuke

On 21 Feb 2017, at 7:21 pm, Zakarume<EMAIL_ADDRESS>wrote:
Ok. Just updated to 2.0.14 and still have the issue. I went to WoD Garrison to training dummy. I can not target. Require Target to use is checked
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


v6 Support

[x]  Channel Types
[x]  Message Types
[ ] CALL_CREATE/CALL_UPDATE/CALL_DELETE
[ ] VOICE_STATE_UPDATE
[ ] CHANNEL_RECIPIENT_ADD / CHANNEL_RECIPIENT_REMOVE

I'm going to include the new events as part of this PR too


fontdata wont work

i used the following code, but the font does not appear:
     'response' => [
        'formatters' => [
            'pdf' => [
                'class' => 'robregonm\pdf\PdfResponseFormatter',
                'options' => [
                    'fontdata' => [
                        "sourcesanspro" => [
                            'R' => "../../../../frontend/web/fonts/SourceSansPro-Regular.ttf",
                            'B' => "../../../../frontend/web/fonts/SourceSansPro-Bold.ttf",
                        ],
                    ]
                ]
            ],
        ]
    ],

but when i put this:
     "sourcesanspro" => [
              'R' => "../../../../frontend/web/fonts/SourceSansPro-Regular.ttf",
              'B' => "../../../../frontend/web/fonts/SourceSansPro-Bold.ttf",
     ],

directly into $this->fontdata in mpdfs's config_fonts.php, its working fine. i wonder why?

Because, this library integrates a shortcut for params like that one.


Partial updates from mina repo version

Closing, this is contained in #65, and is too small to be worth reviewing separately.


Exclude / tree-shake Blueprint icon package dependency

The Blueprint icons package contributes a fair amount of weight to our builds, but we don't use the icons (at least not deliberately/directly). However the icon package (as a whole) is included as a dependency of blueprintjs/core.
See https://github.com/palantir/blueprint/issues/2193 for webpack based workarounds we should look to implement.

@amcclain I've confirmed in my local machine that the suggestions in that issue convo work.
I tried:
            new webpack.NormalModuleReplacementPlugin(
              /.*\/generated\/iconSvgPaths.*/,
              path.resolve(hoistPath, 'static/emptyIconSvgPaths.js'),
            ),

It saves does reduce the weight of the build, but it did not cut down build time.
Some client apps do use blueprint icons.  I know of one app where the dialogs use the blueprint top right close button.

Is your idea that this should be an option that defaults to useBluePrintIcons = false?  And it can be set to true by passing useBluePrintIcons: true into webpack.config.js for an app that needs the icons - or vice-versa?
We could also maybe have that config accept a file path to a file that contains the icon svg code just for the icons the app is using..
With Icons  Compiled successfully in 1.14m

Without Icons  Compiled successfully in 1.18m

Here are the branches to run locally to see the app without the icons:
Hoist React: https://github.com/xh/hoist-react/tree/noBluePrintIcons
Hoist Dev Utils: https://github.com/xh/hoist-dev-utils/tree/noBluePrintIcons

Thanks for looking at this!
The use of the BP icon in dialogs is probably common given that we are still using their dialog directly out of kit. If we can get back on the horse with #1809 (I need to help by catching up there!) seems like we could avoid that particular usage.
I think it would make a lot of sense to introduce the change to exclude the icons along with a boolean flag to put them back. I would default that to false so apps pick up the reduction in bundle size automatically, but it would provide a ready-made escape hatch.
If we find apps wanting to include some subset of icons we can look further - although then I would want to understand the use case.
I vote we try to get dialog done to avoid that one very common usage, then make this change.

@amcclain Ok, I think other hard to avoid icons are the popover arrows.  Popover is a pretty popular component, I think, and it uses icons to make the little pointer arrows.

Got it, so the other very reasonable seeming option is to inventory the icons we know are used / likely to be used, and create that optimized SVG file with just those ones.  That way we're not blocking on the dialog work but could still ~120k (gzipped!) off the builds.
If you have a sense of how that would fit together, would be great to try

ok, will put that file together next.


CM-178: addressed seo issues with page and park templates

Jira Ticket:
CM-178
Jira Ticket URL:
https://bcparksdigital.atlassian.net/browse/CM-178
Description:
This is an attempt to fix some of the more egregious SEO errors on the page templates. Mainly has to do with meta tags.

Do we need to have seo component for site page as the same as park page?

Yes, I've now added that.

Do we need to pull seo component out from the content list at page collection? To make it consistent with protectedArea and parkSubPage collections.

Probably, but it's messy. The whole way the pages are set up might just be better to not touch.


'numpy.ndarray' object has no attribute 'type' & Prediction is Array of NAN

Hello,
I am trying to integrate the depth estimation into my obstacle avoidance project with a drone.
I have installed Python 3.7.9, set up a virtual environment, installed torch 1.8.2 with cuda 11.2, as well as timme 0.4.5 and OpenCV <IP_ADDRESS>. However, I have noticed the following things:

When I follow the instructions under Setup (downloading weights, input/output, etc.), I get the following console output:

If I then adjust the following in utils.py, the error disappears. However, the warning remains.

Next, I noticed that I get a black image as output.

When I add a print statement, I have found that the prediction contains an array of NAN values.

I don't know if there is something wrong with my installation or if it is a problem with MiDaS. I would be grateful for any help.

Greetings, I don't think, that there is necessarily something wrong with your installation. I had the same problem. After hours of struggle i resolved it by deleting lines that transform input with function half(). The same applies for model. Let me know if it works.


CirrusD should not kick members

@quantumagi the DI approach was too complicated and will require a lot of refactoring. This will work for now.

Something like this would be better:
        public static async Task MainAsync(string[] args)
        {
            try
            {
                var nodeSettings = new NodeSettings(networksSelector: CirrusNetwork.NetworksSelector,
                    protocolVersion: ProtocolVersion.CIRRUS_VERSION, args: args)
                {
                    MinProtocolVersion = ProtocolVersion.ALT_PROTOCOL_VERSION
                };

                ((PoAConsensusOptions)nodeSettings.Network.Consensus.Options).AutoKickIdleMembers = false;

Cool will fix in the next hour :)

@quantumagi done and tested 👍


Comparison with cv.glmnet(alpha=1)

I am looking into the mean cross-validation error of the best model selected in LassoNet with (M set to 0.0) and hidden_dims=(1,) and cv.glmnet() [documentation: https://www.rdocumentation.org/packages/glmnet/versions/1.6/topics/cv.glmnet ] with the same set of lambda values for a classification problem.  However, they do not yield similar results. The parameters used are exactly as follows:
lambdas = (0,0.00001,0.0001,0.001,0.01,0.1,1,10,100,1000,10000)
LassoNet=
LassoNetClassifierCV(hidden_dims=(1,),M=0.0,random_state=0,lambda_seq=lambdas,torch_seed=0,cv=LeaveOneOut())
Glmnet=
cv.glmnet(X, Y, family = "binomial", alpha = 1, lambda =lambdas, type.measure = "class", nfolds = 34)   [there are 34 instances in the dataset, so nfolds=34 is same as LeaveOneOut()]
If you could explain why these two are behaving differently, it would be really helpful. Also, do you consider the matrix multiplication of skip.weight and layer.weight of the output layer equivalent to feature coefficients in the logistic regression with lasso penalty?

Hey that's perfectly normal because... LassoNet is not Lasso.
You could try https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html with a L1 penalty.

I understand that the lassonet is not the same as the lasso, but if I want to force Lassonet to behave as a logistic regression classifier with L1 penalty what will be the constraints I need to apply on Lassonet?

Set M=1e-10 (I'm not sure that M=0 will not produce an error). However even if the models will be the same, the optimization is not so you will not reproduce the same coefficients.


UnicodeEncodeError at /admin/categories/category/

When i tried to add a Greek name for a category, the following error occurs
UnicodeEncodeError at /admin/categories/category/
'ascii' codec can't encode characters in position
Error during template rendering
In template ....python2.7/site-packages/categories/editor/templates/admin/editor/grappelli_tree_editor.html, error at line 46
{% result_tree_list cl %}

Same happened to me after upgrading to 1.5.1. Cannot use it this way, please fix ASAP.

@flaiming please submit your pull request fixing the issue ASAP! :)

@epicserve there it is :)

Thanks!

This should be fixed in 1.5.2.


ld-wrapper: use a temporary file for reponse file

Description of changes
This changes ld-wrapper to use a temporary file for the response file passed to ld instead of using process substitution.
ld64 does not handle long command-lines when reading from the response file, which defeats the point of using a response file to handle long command-lines. cctools-port was patched to work around this, but nixpkgs is now using Apple’s source release directly instead of the port.
Since it’s preferable not to patch Apple’s release heavily (to reduce the difficulty of updating to new versions and to match upstream’s behavior), use the approach that was adopted in cc-wrapper to work around issues with response files in newer versions of clang.
Related PRs (cctools-port):

https://github.com/NixOS/nixpkgs/pull/213831
https://github.com/tpoechtrager/cctools-port/pull/132

Related PRs (cc-wrapper):

https://github.com/NixOS/nixpkgs/pull/245282
https://github.com/NixOS/nixpkgs/pull/258608

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Obsoleted by https://github.com/NixOS/nixpkgs/pull/307880/commits/1cb1853573de833ff506579c8ece3d1f896e15d8.


Missing manifest annotations.

I don't know if I'm doing anything wrong, but I've used oras.WithManifestAnnotations() to push my artefact with some metadata, that worked well because if I curl the repo directly I see it there:
$ curl -sL -u"user:pass" https://my-repo/v2/oso-plugins/manifests/oso-legacy | jq .
{
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.unknown.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/vnd.oci.image.layer.v1.tar",
      "digest": "sha256:8e985dc2c81bd5e8bfafb2858b9a9cb420c02a29d5a96f32eb00f5850556410a",
      "size": 755,
      "annotations": {
        "hook": "chmod +x ~/.oso/bin/oso-legacy",
        "org.opencontainers.image.title": "oso-legacy"
      }
    }
  ],
  "annotations": {
    "caveats": "to get auto-completions do this...",
    "description": "a bridge to the past",
    "shortDescription": "a plugin"
  }
}

But then when I pull it using desc, artefacts, err :=  oras.Pull(...) I can loop through the artefacts and get the annotations from each of them, but desc.Annotations is empty...
The result of fmt.Println(desc.Annotations) is:
Annotations: map[]

And now, with the recent changes from https://github.com/oras-project/oras-go/pull/8 I don't know how to access the metadata from the individual layers, as mentioned in a comment in the PR, the Copy function doesn't return the list of descriptors for the pulled layers like Pull used to, I guess I can work around this issue by storing my metadata in the config layer, but I was hoping to be able to use the annotations...

storing my metadata in the config layer,

That isn't necessarily wrong, but storing annotations on individual descriptors of any kind is valid according to the spec, so you should be able to there as well, and retrieve it.

don't know how to access the metadata from the individual layers, as mentioned in a comment in the PR,

Understood. I commented there; let's see if the proposed direction works.

desc.Annotations is empty

I find that odd. I am going to dig a little deeper. It just does from.Resolve to get the original desc.

@luisdavim do you have a publicly available root manifest like the above, so I can just run Copy() against it?

Thanks for the reply, I don't have anything public, but I let me see what I can do.

BTW, meanwhile I've updated my code to use the new version and Copy() and I get the same result, even when I print the annotations from then descriptor I get from "pushing" they are empty, so the same issue in either direction. Could this be because I'm using the file store?

I am not sure, but we can try to replicate it. Share your sample code?

I've pushed a branch with some changes to the advanced example to support annotations https://github.com/oras-project/oras-go/pull/24
And I've noticed that with the new Copy() method my manifest annotations are not even getting pushed as they were before with Push() but I might be doing something wrong here...

I think I see what is going on here.
With the old Pull(), we were generating a root manifest on the fly, so it made sense to add the annotations at that point.
With Copy(), we take a more "trust the target" approach, and copy the Descriptor "as-is". In the example you linked to above #24, by the time we Copy(), we must have a manifest available in the target. That is why there is File.GenerateManifest() and Memory.GenerateManfifest(). (side note: OCI doesn't need it, because an OCI-compliant layout must have the manifest to be entered).
So when you do Copy(... , WithManifestAnnotations), it does nothing, because it has nothing to do. Unlike Pull(), it does not try to generate a manifest during a Pull() (which can lead to unpredictable results, not to mention mangling hashes), but just takes it as is. The right place to put it is when running GenerateManifest().
Now, if it still has those annotations and still loses them, that would be a different issue.

Ok, so to add the config annotations I'd do something like
				if value, ok := annotations[annotationConfig]; ok {
					configDesc.Annotations = value
				}

Instead of using WithConfigAnnotations but how would I get my annotations passed to the generated descriptor from GenerateManifest?

Hang tight, got a PR coming to test

Thanks for working on this, https://github.com/oras-project/oras-go/pull/25 solves the issue of uploading the annotations, so it solves the regression, but the original issue is still there.
Upload a file:
$ ./advanced copy my-repo/oso-plugins:cake --from files --to registry cake.txt --manifest-annotations foo=bar,bar=foo
WARN[0000] reference for unknown type: application/vnd.unknown.config.v1+json
v1.Descriptor{MediaType:"application/vnd.oci.image.manifest.v1+json", Digest:"sha256:415617200d07ba9e41f49d92ef842410f1467ed6717f60fc634926252c93018f", Size:433, URLs:[]string(nil), Annotations:map[string]string(nil), Platform:(*v1.Platform)(nil)}

The annotations are there 🎉 :
$ curl -sL -u"user:pass" https://my-repo/v2/oso-plugins/manifests/cake | jq .
Enter MFA code for arn:aws:iam::814074717971:mfa/luis.davim:
{
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.unknown.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/vnd.oci.image.layer.v1.tar",
      "digest": "sha256:f5244e13720ccfb68afc0112821207fee6f4c14a65f634e1ab7be136f27ee433",
      "size": 9,
      "annotations": {
        "org.opencontainers.image.title": "cake.txt"
      }
    }
  ],
  "annotations": {
    "bar": "foo",
    "foo": "bar"
  }
}

But if I download it, the annotations are not part of the descriptor:
./advanced copy my-repo/oso-plugins:cake --to files:cakes.txt --from registry
v1.Descriptor{MediaType:"application/vnd.oci.image.manifest.v1+json", Digest:"sha256:415617200d07ba9e41f49d92ef842410f1467ed6717f60fc634926252c93018f", Size:433, URLs:[]string(nil), Annotations:map[string]string(nil), Platform:(*v1.Platform)(nil)}

Meanwhile, as a workaround, I was trying to do the following after copying into store:
_, rootManifestBytes, err := store.Ref(opts.targetRef)
if err != nil {
return err
}
var rootManifest ocispec.Manifest
if err := json.Unmarshal(rootManifestBytes, &rootManifest); err != nil {
return err
}
fmt.Println(rootManifest.Annotations)

Where store is a File store, but I get a 404...

OK, so half the issue is solved with that. Let's get that merged in and then solve the other.

@luisdavim are you sure it isn't working? I ran a simple test, from local files to oci, in order to generate and save the manifest, and then from one local oci to another local oci. The manifest itself includes the annotations both in the first and second oci layout.
The descriptor pointing to the manifest does not, but it should not either.
go run . copy my-repo/oso-plugins:cake --from files --to oci:/tmp/reg  cake.txt --manifest-annotations my.annotation=foo.bar,other=bar.val
``

When that is done, I end up with the following in `/tmp/reg`:

```console
.
├── blobs
│   └── sha256
│       ├── 288114bd0a979404a875def75db19e79adda6378971247317291a057bfb4e262
│       ├── 3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41
│       └── 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
├── index.json
├── ingest
└── oci-layout

Looking at index.json:
{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41",
      "size": 453,
      "annotations": {
        "org.opencontainers.image.ref.name": "my-repo/oso-plugins:cake"
      }
    }
  ]
}

That makes sense. That is at the registry level. It is the Descriptor pointing to sha256:3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41, and has the annotation showing the name:
      "annotations": {
        "org.opencontainers.image.ref.name": "my-repo/oso-plugins:cake"
      }

If I look at that one via cat blobs/sha256/3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41 | jq:
{
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.unknown.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/vnd.oci.image.layer.v1.tar",
      "digest": "sha256:288114bd0a979404a875def75db19e79adda6378971247317291a057bfb4e262",
      "size": 5,
      "annotations": {
        "org.opencontainers.image.title": "cake.txt"
      }
    }
  ],
  "annotations": {
    "my.annotation": "foo.bar",
    "other": "bar.val"
  }
}

That all works. That is my actual manifest, with the annotations I added.
Now I run a copy from there to another:
go run . copy my-repo/oso-plugins:cake --from oci:/tmp/reg  --to oci:/tmp/other

And look in /tmp/other:
.
├── blobs
│   └── sha256
│       ├── 288114bd0a979404a875def75db19e79adda6378971247317291a057bfb4e262
│       ├── 3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41
│       └── 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
├── index.json
├── ingest
└── oci-layout

That all looks right. index.json is built correctly:
{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:3c554aaf97d785cbb144167ee2007a7a14695bb73f946adc63a018e9becffe41",
      "size": 453,
      "annotations": {
        "org.opencontainers.image.ref.name": "my-repo/oso-plugins:cake"
      }
    }
  ]
}

And the root manifest to which it points:
{
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.unknown.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/vnd.oci.image.layer.v1.tar",
      "digest": "sha256:288114bd0a979404a875def75db19e79adda6378971247317291a057bfb4e262",
      "size": 5,
      "annotations": {
        "org.opencontainers.image.title": "cake.txt"
      }
    }
  ],
  "annotations": {
    "my.annotation": "foo.bar",
    "other": "bar.val"
  }
}

Annotations all copied over fine.
So it looks like all of the copying is working fine.
Where is it not copying annotations?

Oh, yeah, that works the issue is that the descriptor I get back from the copy doesn't have the annotations, this was about that from the beginning.

So, I have ways to work around my issue, like I could copy to a temp local OCI like you did and then parse the index to move stuff into the right place, but I was trying to keep it simple and just use the file store to copy directly to the final destination and then read the metadata to do the rest of the stuff I want to do....

Here's a snippet to give you an idea of what I'm going for:
func install(opts pullOptions) error {
	ctx := context.Background()
	if opts.debug {
		logrus.SetLevel(logrus.DebugLevel)
	} else if !opts.verbose {
		ctx = ctxo.WithLoggerDiscarded(ctx)
	}

	// by default we only pull files and folders, skipping the config manifest
	if opts.allowAllMediaTypes {
		opts.allowedMediaTypes = nil
	} else if len(opts.allowedMediaTypes) == 0 {
		opts.allowedMediaTypes = []string{content.DefaultBlobMediaType, content.DefaultBlobDirMediaType}
	}

	registry, err := content.NewRegistry(opts.RegistryOptions)
	if err != nil {
		return err
	}
	store := content.NewFile(opts.output)
	defer store.Close()
	store.DisableOverwrite = opts.keepOldFiles
	store.AllowPathTraversalOnWrite = opts.pathTraversal

	copyOpts := []oras.CopyOpt{
		oras.WithAllowedMediaTypes(opts.allowedMediaTypes),
		oras.WithPullStatusTrack(os.Stdout),
	}

	// if a name is provided for the config manifest pull it as a file with that name
	// if opts.manifestConfigRef is empty, it should take the name from the annotation
	// if the annotation is also missing or empty the config will not be pulled
	// so to pull the config, we need to either specify the name here when pulling
	// or set the ocispec.AnnotationTitle annotation when pushing
	if opts.manifestConfigRef != "" {
		copyOpts = appendCopyManifestConfigHandlers(copyOpts, opts.manifestConfigRef)
	}

	// pull the layers referenced by opts.targetRef into the store
	desc, err := oras.Copy(ctx, registry, opts.targetRef, store, "", copyOpts...)
	if err != nil {
		if errors.Is(err, reference.ErrObjectRequired) {
			return fmt.Errorf("image reference format is invalid. Please specify <name:tag|name@digest>")
		}
		return err
	}

	// update the index of installed plugins
	if err := updateIndex(opts.targetRef, desc); err != nil {
		return err
	}

	if desc.Annotations["hook"] != "" {
		hook := hookCommand(desc.Annotations["hook"])
		logrus.Debugf("running plugin hook: %s", hook)
		if res := hook.Exec(); res != 0 {
			return fmt.Errorf("failed to run hook")
		}
	}

	// TODO: figure out how to loop through what was pulled from oras.Copy()
	// for _, a := range artifacts {
	// 	name := a.Annotations[ocispec.AnnotationTitle]
	// 	if a.Annotations["hook"] != "" {
	// 		hook := hookCommand(a.Annotations["hook"])
	// 		logrus.Debugf("running plugin hook: %s", hook)
	// 		if res := hook.Exec(); res != 0 {
	// 			return fmt.Errorf("failed to run hook for %s", name)
	// 		}
	// 	}
	// }

	// TODO: tried using the manifest to run hooks this doens't work and resutls in a 404
	// _, rootManifestBytes, err := store.Ref(opts.targetRef)
	// if err != nil {
	// 	return err
	// }
	// var rootManifest ocispec.Manifest
	// if err := json.Unmarshal(rootManifestBytes, &rootManifest); err != nil {
	// 	return err
	// }
	// fmt.Println(rootManifest.Annotations)
	// if rootManifest.Annotations["hook"] != "" {
	// 	hook := hookCommand(desc.Annotations["hook"])
	// 	logrus.Debugf("running plugin hook: %s", hook)
	// 	if res := hook.Exec(); res != 0 {
	// 		return fmt.Errorf("failed to run hook")
	// 	}
	// }
	// for _, l := range rootManifest.Layers {
	// 	name := l.Annotations[ocispec.AnnotationTitle]
	// 	if l.Annotations["hook"] != "" {
	// 		hook := hookCommand(l.Annotations["hook"])
	// 		logrus.Debugf("running plugin hook: %s", hook)
	// 		if res := hook.Exec(); res != 0 {
	// 			return fmt.Errorf("failed to run hook for %s", name)
	// 		}
	// 	}
	// }

	// plugins need to be executable
	files, err := ioutil.ReadDir(opts.output)
	if err != nil {
		return err
	}

	for _, file := range files {
		if file.IsDir() {
			continue
		}
		if err := os.Chmod(filepath.Join(opts.output, file.Name()), 0o755); err != nil {
			return fmt.Errorf("failed make %s executable: %w", file.Name(), err)
		}
	}

	fmt.Println("Pulled", opts.targetRef)
	fmt.Println("Digest:", desc.Digest)
	fmt.Println("Annotations:", desc.Annotations)

	return nil
}

But desc.Annotations is always empty.

I think the problem is the registry resolver never sets the annotations: https://github.com/containerd/containerd/blob/main/remotes/docker/resolver.go#L375-L379

I think the problem is the registry resolver never sets the annotations:
https://github.com/containerd/containerd/blob/main/remotes/docker/resolver.go#L375-L379

That isn't it. That mixes together the resolver and the manifest:

Request tag, get Descriptor that points to manifest - this is what Resolve() does
Request manifest by hash (based on above Descriptor), get manifest - this is a blob that has the annotations

I might be reading something wrong and might have taken some wrong turn somewhere but, If I follow the code, that's where it gets me, that's the Resolve() implementation for from.Resolve() in the Copy() method when the from is a registry and the result of if is what Copy() returns as the descriptor.

So, the problem might be that Copy() should not be returning that and should instead return the descriptor of the target, what was created by the copy.

It was pretty close. We are passing back the descriptor of the target, rather than the content pointed to by that descriptor. It isn't too hard. Almost got it here.

Question, if I copy from registry to a File store named store shouldn't I be able to do the following to get the manifest?
desc, err := oras.Copy(ctx, registry, opts.targetRef, store, "", copyOpts...)
// ...
_, rootManifestBytes, err := store.Ref(opts.targetRef + "@" + desc.Digest.String())

OK, actually, I don't see any way to do this. We have two artifacts we could return:

The root descriptor (that which the tag resolves to)
The manifest (that which the descriptor points to)

The root descriptor is going to look like this:
type Descriptor struct {
	// MediaType is the media type of the object this schema refers to.
	MediaType string `json:"mediaType,omitempty"`

	// Digest is the digest of the targeted content.
	Digest digest.Digest `json:"digest"`

	// Size specifies the size in bytes of the blob.
	Size int64 `json:"size"`

	// URLs specifies a list of URLs from which this object MAY be downloaded
	URLs []string `json:"urls,omitempty"`

	// Annotations contains arbitrary metadata relating to the targeted content.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Platform describes the platform which the image in the manifest runs on.
	//
	// This should only be used when referring to a manifest.
	Platform *Platform `json:"platform,omitempty"`
}

It will not have your annotations, because the annotations don't actually get appended to that. E.g. if you pull an image from a registry, it generates (or sends you) that descriptor as is.
If you look at the root manifest, it will be either an index:
type Index struct {
	specs.Versioned

	// Manifests references platform specific manifests.
	Manifests []Descriptor `json:"manifests"`

	// Annotations contains arbitrary metadata for the image index.
	Annotations map[string]string `json:"annotations,omitempty"`
}

or a manifest:
type Manifest struct {
	specs.Versioned

	// Config references a configuration object for a container, by digest.
	// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
	Config Descriptor `json:"config"`

	// Layers is an indexed list of layers referenced by the manifest.
	Layers []Descriptor `json:"layers"`

	// Annotations contains arbitrary metadata for the image manifest.
	Annotations map[string]string `json:"annotations,omitempty"`
}

Or something else entirely, as the list of potential root artifacts expands.
Those will have whatever annotations you set on them, as we saw with the "foo=bar" example, but that is not a Descriptor, but a different artifact (that which is pointed to by the Descriptor).
Here is the plan:

For root Descriptor, you already get it from Copy.
I will modify the PR #27 to return the json of the root manifest; you can parse it to your heart's content (it is beyond oras's scope to worry about what format it is and then unmarshal it).

Beyond that, I don't know what you can do. The distribution spec does not provide for a way to control the root Descriptor AFAIK.  That is not content you uploaded, but content generated by the distribution implementation (aka registry)./

Yeah, for now I'm making an extra http call to the registry to get the manifest and unmartial it so if I could get it from the copy operation that would be great :)
But why can't I resolve the manifest ref from the store as in my question above?

Question, if I copy from registry to a File store named store shouldn't I be able to do the following to get the manifest?

Not quite. I think you are misconstruing how File works.
File is set up to read files (which will be layers, and potentially config as well) from disk. It then builds the additional artifacts  needed (optionally config, manifest) to complete a valid spec to send to a target (oci, registry, etc.) in memory. It then sends those.
So when you use a File as a to, it isn't really keeping those in memory. The File as a target for pushing just discards anything without a proper name annotation.
In theory, it would be possible to have it keep those artifacts that are just manifests/indexes and do not have a name in memory, so as long as the struct is around, you would be ok. But that is a life and a separate issue.

That might be a cleaner solution than just returning the raw JSON don't you think?

This is not really solved, can it be reopened?

@luisdavim let's try to bring this back to the beginning.
Where are you adding annotations, and where are they not showing up? If we look at a sample image (I am using the current docker.io/library/alpine:3.14 as a sample tree):
docker.io/library/alpine:3.14 -> v1.Descriptor {
        MediaType: "application/vnd.docker.distribution.manifest.list.v2+json",
	Size: 1638,
	Digest: "sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a",
	Annotations: map[string]string nil,
   }

sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a ->
{
	"manifests": [
		{
			"digest": "sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a",
			"mediaType": "application\/vnd.docker.distribution.manifest.v2+json",
			"platform": {
				"architecture": "amd64",
				"os": "linux"
			},
			"size": 528
		},
		{
			"digest": "sha256:b06a5cf61b2956088722c4f1b9a6f71dfe95f0b1fe285d44195452b8a1627de7",
			"mediaType": "application\/vnd.docker.distribution.manifest.v2+json",
			"platform": {
				"architecture": "arm64",
				"os": "linux",
				"variant": "v8"
			},
			"size": 528
		},
                ....
                ....
	],
	"mediaType": "application\/vnd.docker.distribution.manifest.list.v2+json",
	"schemaVersion": 2
}

The first descriptor (resolved from the tag) is completely out of your control, as provided by the registry (although in theory a registry can open it up, I have not seen it).
The second one is completely in control of whoever pushes it.
So which case are you talking about? If it is the first, we can pull it as is, but cannot control what goes in it. If it is the second, we can (and do) add annotations, and when we copy, we get the annotations.
I am not sure which case is the problem.

@luisdavim I'm closing this issue as this issue is in an inactive state for a long time. Meanwhile, oras-go has evolved into v2 and maybe you can try again with v2 APIs.
Additionally, I think there is a concept misunderstanding. The annotations field of the manifest descriptor is not the same as the annotations field of the manifest itself. The annotations field of the manifest will not and should not be populated to the annotations field of the manifest descriptor by default. Therefore, fetching the raw JSON of the manifest and extracting the annotations field is not a workaround but the right way to do so.


autocraft problem

Issue description:
here I have craft or an item can be used several times in the same craft (durability or no durability) so that the auto craft says that it must be full of item that we want craft while he only 1 example Mystical Agriculture. in the old version we could do ctrl + maj to launch the autocraft even if we do not give the craft of this item because the craft wanted to recreate the item while it needs only 1 except in the Refined version Storage 1.6.12 we can no longer force the craft which block.

Minecraft: 1.12.2
Forge: 1.12.2-<IP_ADDRESS>72
Refined Storage: refinedstorage-1.6.12

Does this issue occur on a server? [yes/no] yes

help

RS no longer handles damaged items during autocrafting. Please read previous issues about this, I've closed enough of these already!


:sendmail delivery method is broken in Rails

I tried to switch from :smtp to :sendmail delivery in my Rails apps due to performance. I noticed that ActionMailer didn’t raise an exception on failure even when the sendmail/exim binary was missing.
y-yagi wrote that there was a fix. Unfortunately, it is not merged to any stable release. I tried to use the last ref from master (ff17438). I couldn’t send the email at all.
In its current form, the :sendmail delivery from Rails is broken.
https://github.com/rails/rails/issues/35330

That must have been confusing. You'd expect "raise on errors" to mean "shows me the incorrect configuration issue I just had to chase down," but it doesn't. One thing is communicated, but the another thing is implemented!
To unbreak :sendmail delivery, correct your configuration. Note that Rails raise_delivery_errors won't raise any other delivery errors, so you may have issues troubleshooting other configuration with your local mail transfer agent. Once the message is queued for delivery, you'll need to inspect logs for evidence of errors, as no exception will be raised.
When Mail 2.8 is released, #1149 will be included to raise on non-zero exitstatus. That's a breaking change, so it's destined for the next minor release rather than backporting to stable releases.

When software tries to do its primary task by calling an executable, and it swallows the non-standard exit status or the fact that the binary is missing, it’s broken. It says the mail was delivered when it couldn’t even execute the binary that was supposed to deliver it.
It’s not clear to me what you mean with the broken configuration. I set the executable’s path to 'i/excel/in/hiding'. Do you believe I thought it was the path of the exim binary?
It’s called testing.
That binary has a different location on Linux, FreeBSD, and MacOS. Besides, there can be many other reasons for non-zero exit status that could happen.
I don’t expect anyone to fix it fast. I understand that it’s a lot of work to do it. But until it’s fixed, this feature shouldn’t be advertised because it’s not stable.
Over the years, I didn’t experience anything similar to this when it’s used with SMTP. It was always reliable.


Order Handling

Hi, I have a couple of questions on how best to handle orders as they go through various status. Please let me know if there are better ways to handle the description I provide below on how I am managing orders. Thanks
Right now given my theoretical price, my algo will submit a new order with PlaceLimitOrderAsync method.  Once that is submitted, and I am return with a OrderResponse object, I will call on OnOrder method that will update my internal variables that track the open orders I have in the market.  A couple of things can happen after this:

The algo order was manually cancelled on the website (human intervention). Once I submitted an order, I am calling GetOrderByIdAsync on every tick to get the status of the order. From the examples on the front page, this isn't a paged response but will I ever get IP blocked for constantly requesting this information? Next when I manually deleted the order, calling GetOrderByIdAsync doesn't seem to return anything anymore. Is there a way to get information on that order? If it is cancelled, I would need to be notified somehow so I can change my internal records. I think if there is a way for Coinbase to notify me about the status of the order, I wont have to constantly call GetOrderByIdAsync .

The order is filled. Will I get some sort of event from Coinbase telling me my order is filled? From looking at the code and the docs, it seems its my responsibility to determine whether I am filled or not. What is the best/fastest way to determine whether I am filled or not? All the GetFills method are paged so I have a limit as to the number of times I query...

I am a bit confused on how to handle the above, love to hear how others are doing it thanks.

Ok for 2. I think the solution is to listen to OnMatch messages and check if the trades that are coming through have any thing relating to the order id i have.

@guanm326
There shouldn't be a problem with calling GetOrderByIdAsync as long as you stay within their rate limits. You can read about them here: https://docs.pro.coinbase.com/#rate-limits.
If you want to go the websocket route the OnMatch will let you know when a trade has occurred between two orders. But I think what you want is the OnDoneReceieved event to let you know when the order is no longer on the order book. This results from an order being cancelled or filled. This will come back with a remaining size and a reason (such as filled). You should subscribe to the full channel for that. Read more about Done here https://docs.pro.coinbase.com/#the-code-classprettyprintfullcode-channel.
let me know what you think

Yup I think that makes sense.
With your suggestion now I have another problem I am not sure how to work around. When my theo price changing constantly I need to be able to cancel orders after a new theo price event occurs.
Right now I have no problem sending orders on a theo price change but I am not able to cancel the old orders asynchronously. For example, lets assume I receive a tick and calculate my theo price. With new theo price, I send my order. Now before I get any order response or any other order information acknowledging my order, I receive another tick which requires another order change. On this second theo price change, I can't find information on my first order to cancel since I haven't received anything yet. Given its asynchronously processing order submission, I now have 2 orders in to market. I only want the second order. How would you go about handling this?

unfortunately, i dont think I would be able to provide any help on this issue. Thinking out loud, you should essentially not send another order on a subsequent tick until the previous order was received and a cancellation was requested. You should wait on the first order to actually return a cancellation response before sending a new order. This may mean missing opportunities though which may or may not be okay depending on your strategy. In terms of implementing this I am not sure tbh. i haven't run into this issue but perhaps someone else has that could provide a more helpful response 😄

thanks Doug. I actually figured it out with my developer. We coalesce the theo to avoid rate limits and utilized another separate thread (with queue) to sychronized the entire process.

excellent 😄 will close this issue


Android will not build due to moshi

SDK version: 1.0.1-alpha.2
Hello, I've completed the steps to have the sdk working on IOS, but I am now running into an issue when building on android. I'm not extremely strong in my ability to debug issues with android so if anyone has any suggestions, it would be greatly appreciated.
Logs
Execution failed for task ':app:mergeDebugJavaResource'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform moshi-1.13.0.jar (com.squareup.moshi:moshi:1.13.0) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for JetifyTransform: /Users/user/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.13.0/da685586facab9eb5c4fb630ce248be14e7da21b/moshi-1.13.0.jar.
         > Failed to transform '/Users/user/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.13.0/da685586facab9eb5c4fb630ce248be14e7da21b/moshi-1.13.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 60. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

Describe the bug
I have maven { url 'https://maven.gist.build' } within by build.gradle file and I have tried putting it within my settings.gradle as well.
Screenshots

Additional context
React native version 0.63.4

@Shahroz16 Thank you for your response!
I tried to first add the suggested line in gradle.properties
I got an error that looks identical to the previous one:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform moshi-1.13.0.jar (com.squareup.moshi:moshi:1.13.0) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for JetifyTransform: /Users/user/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.13.0/da685586facab9eb5c4fb630ce248be14e7da21b/moshi-1.13.0.jar.
         > Failed to transform '/Users/user/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.13.0/da685586facab9eb5c4fb630ce248be14e7da21b/moshi-1.13.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 60. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

Next I tried to upgrade the AGP but am getting an error to upgrade my gradle:
Failed to apply plugin 'com.android.internal.version-check'.
   > Minimum supported Gradle version is 7.3.3. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in /Users/lucaswong/renaissance_projects/ren-app/android/gradle/wrapper/gradle-wrapper.properties to gradle-7.3.3-all.zip

I upgraded to 7.3.3 then resulted in seeing other errors.

I appreciate the reply @mrehan27
I wasn't able to upgrade AGP the using the upgrade assistant past  7.0.3. SO I figured I was on an old version of android studio. To solve this I upgraded android studio so now I'm on this version

I followed the steps to upgrade and indulged in the recommended steps:

After all of that my sync has now failed:
Error: Package name not found in /Users/user/app/android/app/src/main/AndroidManifest.xml    at Object.projectConfig (/Users/user/app/node_modules/@react-native-community/cli-platform-android/build/config/index.js:74:11)    at Object.get project [as project]

Also, when running react-native run-android at this point I'm running into an error where my project isn't found:
Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location. Run CLI with --verbose

This was likely due to the changes in AndroidManifest.xml and in app/build.gradle:
AndroidManifest:
Before:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="packageName">
After:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

app/build.gradle
Before:
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
}

After:
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
    namespace 'packageName'
}

I reverted those changes in those files and ran react native run android and now I'm seeing an error:
* Where:
Settings file '/Users/user/app/android/settings.gradle' line: 10

* What went wrong:
A problem occurred evaluating settings 'app'.
> Could not read script<EMAIL_ADDRESS>as it does not exist.

I installed the npm package:  @react-native-community/cli-platform-android not knowing what to do and I receive a different error
* Where:
Build file '/Users/user/app/android/app/build.gradle' line: 294

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'compile' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

Line 294 is this:

Thanks in advance for any help in advance.

Thanks for providing all the details @lucasbeatdapp. I'm really sorry that we cannot provide exact steps to overcome these challenges as the problem is more related to gradle plugin upgrades and may keep giving you different errors based on your project. But I can surely share some tips that can help you resolve these issues:

Make sure to have a backup of your project and revert your changes if anything goes wrong
When opening React Native project in Android Studio, please make sure you select the android folder and not the root project folder, e.g. AwesomeProject/android ✔, AwesomeProject ✖
You can skip Move package from Android manifest to build files, and if you do, please keep other changes and revert the Android manifest file to version that contains package (Read more details here on this change)
Before running the project after AGP upgrade, try cleaning all build files and node modules folder to avoid unwanted conflicts, install dependencies and then run the project. If you are on macOS, you can run the following command

rm -rf node_modules && yarn install && react native run android
OR
rm -rf node_modules && yarn install && npx react-native run-android

If you are using compile statements in your dependencies or other blocks, make sure to replace them with implementation or other relevant configuration (Read more details here and here) e.g. the code sample you shared should look like

task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

Try cloning our Sample AmiApp to compare your gradle and other relevant files and see if it helps

I hope these will help you resolve your issues and get your project running soon with AGP upgrade 🤞🏻

Closing due to inactivity. Please feel free to reopen if this doesn't help fixing the issue.


Get missing events from k8s Node resource

The Storage reconciler wasn't running when the k8s node resource changed. This is because the enqueuing function wasn't specifying the namespace in the namespacedname struct.
Also, fix the Requeue() function so that it specifies a requeue in the result. In the delete path, the Requeue=true result doesn't always result in a requeue. Use RequeueAfter=1sec instead. This was only an issue when the workflow was deleted without waiting for teardown to complete first. Teardown normally removes the container and port resources that were causing the issue.

Update the copyright in nnf_workflow_controller_helpers.


Create a challenge for PEP 646: variadic generics and TypeVarTuple

PEP 646

There are always edge cases for which more challenges can be added. This usage seems uncommon, but I see no reason why we can't have one challenge for it.


Migration failed with internal error while restoring database

Issue Type: Bug
Hi all,
Using Azure SQL Migration extension in Azure Data Studio for a migration of WideWorldImportersDW from local SQL Server 2019 to Azure SQL Managed Instance I get a message:
"Migration for Database 'WideWorldImportersDW_offline_fromADS' failed with error 'An internal error occurred while restoring the database. Please retry the restore request later.'."
Retrying restore later and even the next day gave the same error.
Manual restore from SSMS had a more meaningful message indicating the issue:
'Msg 41915, Level 16, State 1, Line 13
Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.
Msg 3013, Level 16, State 1, Line 13
RESTORE DATABASE is terminating abnormally'
After taking the easy route and scaling my Managed instance from General Purpose service tier to Business Critical, the migration was successful, ending in "migrationState": "Succeeded".
Please review if the message in Azure SQL Migration extension is eligible for improvement to give a more meaningful message leading to easier troubleshooting.
Thank you and kind regards, Inge
Extension version: 0.1.8
Azure Data Studio version: azuredatastudio 1.32.0 (4a45ba7cf20dd4129f1a08e5e776dfb33e3d1d1e, 2021-08-16T18:08:28.086Z)
OS version: Windows_NT x64 10.0.22473

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.60GB (4.33GB free)

Process Argv

Screen Reader
yes

VM
0%

Our service has been updated to improve error messaging and now includes a troubleshooting link to further assist with configuration issues. If this issue still persists, feel free to reopen the issue.


Customizable obscuringCharacter

Description
Previously, the character used to obscure text fields with obscureText was hardcoded to the bullet character  •.  Now it can be customized with the obscuringCharacter parameter.

Related Issues
Closes https://github.com/flutter/flutter/issues/36377.
Tests
I added the following tests:

In editable_text_test, verify that the character passed to obscuringCharacter replaces the field input.

Updated for code review, thank you!

sorry to bother, is this already available now ?

@jiangyh1024 No worries!  This is available now on the master channel.  You can see the version that the merge commit went into here: https://github.com/flutter/flutter/commit/de8cf8b530dea716d778bdec41c6ec4b32a2071d

oh， the version I am using is

Do u mean I should upgrate it to

one of these versions above ?
I am new to Flutter

Yes exactly.  You can run flutter channel master and then flutter upgrade.

how to know when this pull request make it to stable??

This PR is available in 1.18.0-9.0.pre and above, and it looks like stable is at 1.17.4 right now.

how to add this feature to my TextFormField now cause i can't wait that much and i can't switch to master @justinmc

@bero93 you can find the information in
the commit link https://github.com/flutter/flutter/commit/de8cf8b530dea716d778bdec41c6ec4b32a2071d

you can see the version info in the card

If you can switch to master, there is not much thing you can do except waiting for the stable release.
You can try to make a clone widget from by copying the entire textfield into your own app.

very good!


[FALSE-POSITIVE]

Domains or links
schoolunified.net
More Information
How did you discover your web site or domain was listed here?

Incorrectly marked as Phishing on virustotal

Have you requested removal from other sources?
No
Additional context
Site redirects to and is owned by redherring.sdcoe.net, which is an authorized simulated phishing awareness platform used to promote cybersecurity awareness to employees.
:exclamation:
We understand being listed on a Phishing Database like this can be frustrating and embarrassing for many web site owners. The first step is to remain calm. The second step is to rest assured one of our maintainers will address your issue as soon as possible. Please make sure you have provided as much information as possible to help speed up the process.
Send a Pull Request for faster removal
Users who understand github and creating Pull Requests can assist us with faster removals by sending a PR to mitchellkrogza/phishing repository, on the falsepositive.list file

https://github.com/mitchellkrogza/phishing/blob/main/falsepositive.list
Please include the same above information to help speed up the whitelisting process.


CommandHandlerInterceptor annotated method in aggregate root doesn't work when command handling entity not created

Basic information

Axon Framework version: 4.6.0
JDK version:  11
Complete executable reproducer if available (e.g. GitHub Repo): https://github.com/aupodogov/axon-aggregate-test

Steps to reproduce

Create aggregate with optional aggregate member
Create command handler interceptor in aggregate root that intercept command for aggregate member and breaks command handling if it doesn't exists
Send command that must be handled by aggregate member

Please see test in sample project
Expected behaviour
Command successfully handled (as were in version 4.5.15 for example)
Actual behaviour
AggregateEntityNotFoundException is thrown

Closing this issue since pull request #2412 resolved it.


Minor improvements in disk part of guest config

All parameters are set as named instead of a mix of named and
positioned parameters.
phy: prefix is removed as outdated
target parameter is moved to the end of the config

@lorc Could you please take a look?


Expose etcd /metrics endpoint

Towards: https://github.com/giantswarm/giantswarm/issues/21156

@giantswarm/team-rocket could I get a review ?


build: fix compilation without default features

Fixes #217 and added tests for default target to make sure that we can compile smartcore without the default features
Checklist

[x] My branch is up-to-date with development branch.
[x] Everything works and tested on latest stable Rust.
[ ] Coverage and Linting have been applied

Current behaviour
Compiling with --no-default-features fails.
New expected behaviour
Compiling with --no-default-features works

Thanks!


Problems creating multiple specs at once

In my testing, creating two or more specs right after one another causes the ksync watch process to stop working correctly.
This does not happen, though, if ksync watch is already running with no specs, and you slowly create one spec after another, with about 15-30 seconds in between.

For context, I'm running ksync and minikube locally on a MacBook Pro.

We've stopped using ksync because we couldn't get it to work reliably, but if I recall correctly it was creating them about once a second, maybe faster. It's possible that the cluster we were running was simply consuming too many resources. We've had to scale it back considerably to get it to run locally on our MacBook Pros.

@grampelberg Just finished digging around in this and it'll be a little more complicated than it seems. syncthing is built to restart on any config change, with the monitor process detecting the change and bring it back up. If changes come during downtime grpc calls fail and syncthing's config will get into an intermediate state that it doesn't recover from.
The simplest fix would probably be to implement a delay write changes (maybe delete?) that ensures all changes are batched before they are written. Otherwise we'll have to implement some sort of basic queuing system for updates.
I'll take a look at the former and see if this is viable.


Wiki: Show number of pages.

There are many repos that have wiki enabled, yet they don't have anything in there.
Ideally, I'd prefer the wiki index below everything else, in the main repo page.

Though, here I'm proposing a number counter for the wiki.
ex URL: https://github.com/koalaman/shellcheck
Before:

After:

I don't think this is useful its own, but perhaps we can add the number or hide the Wiki Tab if it's empty, just like hide-zero-packages.

I wrote a nice detailed thing and the tab crashed with oom. :^)
The number is useful on it's own, showing whether you should bother with the wiki (is the project likely to have a 4-question FAQ or full documentation in the wiki).

Ideally, I'd prefer the wiki index below everything else, in the main repo page.

I did a mockup.

The problem is that the wiki is likely to break the scroll-along of the other content. Giving up on aesthetics, it could be placed on the left side:

On screens wide enough, it could be an additional column:

FYI this is only possible via fetchDom there is no API for it

Ideally, I'd prefer the wiki index below everything else, in the main repo page.

That's a bit much, we can't add that


Validation fixes

html validation fixes

Changed the translation of lithuanian language for "Waiting" and added the translation to check_running.html img alt aswell.
For some reason the translation like this didn't work for me before, I've tried this too but had to fully reclone/rebuild the project for it to work.


ProgressBar only appears when the tableview cell is selected

I added MBCircularProgressBar to my tableview cell and set its value in cellForRowAtIndexPath using myCell.progressBar.value = 25 I want the progressBar to appear in all tableview cells (when selected or not) but it's only appearing in the tableview cell that's selected, not the rest of the cells. Any ideas?

Sorry for the late response, is this still an issue? Thanks


feat: Add channels from two device(#51)

feat:
1.Add two device
2.Add channel from two device
3.Save settings of two device and ,
4.Profile activation supports two device

Only 1 device is still getting captured on the live graph and logged data.
To reproduce:

Connect a physical device via WiFi
Connect a simulated device via WiFi
Set both devices to 10Hz
Add A0 from both devices.
Turn on the logging session.
Notice that only device's data is showing up on the live graph
Stop the logging session.
Notice that the logged session only has one device's worth of data


copy scanned text to clipboard in Android

Hi, nice to meet you.
This is my first write on GitHub,  if i fault, please let me know it gently.
When I run this plugin on Android 4.4, the text scanned is copied to clipboard.
I think this plugin should not do this. Because I don't think barcode scanner automatically copy text after scanning immidiately.
so, I fix this to not copy text and I will send pull request later.
Then,I'm happy if the commiter merges my commit.
https://github.com/nao0515ki/phonegap-plugin-barcodescanner
Best regards.
Naoki

I have installed your fork, but Android app still put scanned text to clipboard.

@nao0515ki thanks for opening the issue. Personally, the copy to clipboard problem should be handled as an option. If you want to send a PR where you can add this option to the scan method we'd appreciate it.

Hi, i have the same issue, when i scan the QRCode, its content is copied to the clipboard.
Did you found a solution for this issue ?


Add another static analyzer

As referenced here: https://www.cppstories.com/2022/rsc-static-analysis/

I don't think this s quite ready for production work.


Tests

Does it have tests?

Currently there are a small number of tests for the es6 branch, which is a modernization/rewrite of all components. While the branch is a drop-in replacement for master, I haven't added them to master yet. Having said that, the underlying libraries used for trsnsport are heavily tested in their own scope.

Thanks. I think a /tests folder in the repo could add some confidence in cote.

cote now has 97% code coverage — since ES6 rewrite.


Add utility functions for driver instantiation

This aids sharing code for instantiating drivers (particularly state-drivers) between different binaries (viz. netplugin, netdcli) that use state-drivers directly.

@mapuri - looks much cleaner - thanks for making this change.
overall changes LGTM.
One small comment: similar to netdcli, do we want to allow specifying the statedriver as an arg to the netplugin (binary) as well?

@jainvipin

do we want to allow specifying the statedriver as an arg to the netplugin (binary) as well?

netplugin already takes the driver configuration (for state as well network drivers) as a json style configuration parameter, so we don't need a separate argument. On a related note though, in future when netdcli/netmaster requires taking more configuration (say, loading network-driver specific state-translation) then we might actually want to make netdcli/netmaster take all configuration as json formatted string as well (as it is more extensible unlike defining new cli flags). Right now passing state-driver configuration as cli args there seems sufficient.

Ah... yes the entire config json struct can be given as config - that's good.

@erikh I have updated the diffs to use a common flag for accepting the datastore's url. PTAL

LGTM


Wildcard Route Not Working in Yokai with fxhttpserver

Hello! I’m encountering an issue with using a wildcard route in Yokai with fxhttpserver. When setting up a route with /:service/, I get a 404 Not Found error. My expectation is that this route should proxy all requests matching the pattern /:service/ (e.g., /hello_world/test), but it doesn’t seem to work as expected.
Details:

Yokai Version: v1.5.0

Routing Code:

func Router() fx.Option {
    return fx.Options(
        fxhttpserver.AsMiddleware(fxapigateway.NewAuthenticationMiddleware, fxhttpserver.GlobalUse),
        fxhttpserver.AsHandler("ANY", "/:service/*", fxapigateway.NewProxyRequestHandler),
    )
}

Issue: When calling any route, such as /hello_world/test, the server returns 404 Not Found.

Steps to Reproduce:

Added a route using fxhttpserver.AsHandler("ANY", "/:service/*", fxapigateway.NewProxyRequestHandler).
Tried sending a GET request to /hello_world/test.

What I’ve Tried:

Used various route patterns like /:service/* and /:service/*/.
Verified that configuration is loading correctly and services are registered.
Confirmed that requests reach the router, but the wildcard does not function as expected.

Question:
Is there a way to use a wildcard route /:service/* with fxhttpserver in Yokai, or is there something I might be missing in the configuration?
Thank you!

Hello :wave:
Yokai's httpserver module is built on top of Echo.
Echo, and therefore Yokai, are implementing the HTTP specs, so the (invalid) HTTP method ANY is not supported, it leads to a 405 Method Not Allowed is you try to set this up.
You can use the following valid methods: GET, HEAD, POST, PUT, PATCH, DELETE, CONNECT, OPTIONS, TRACE.
Now, about your routing issue, you have 2 solutions:

with a wildcard

you can define an handler like this:
func (h *ExampleHandler) Handle() echo.HandlerFunc {
	return func(c echo.Context) error {
		return c.String(http.StatusOK, fmt.Sprintf("Welcome to %s, %s", c.Param("service")))
	}
}

and in the routing config:
func Router() fx.Option {
	return fx.Options(
		fxhttpserver.AsHandler("GET", "/:service/*", handler.NewExampleHandler),
	)
}

this allows you to call [GET] /hello_world/foo:

or even [GET] /bye_world/bar:

with a 2nd path param

if you need to capture the second part of the URI, you can combine 2 path params.
you can define an handler like this:
func (h *ExampleHandler) Handle() echo.HandlerFunc {
	return func(c echo.Context) error {
		return c.String(http.StatusOK, fmt.Sprintf("Service %q, name %q", c.Param("service"), c.Param("name")))
	}
}

and in the routing config:
func Router() fx.Option {
	return fx.Options(
		fxhttpserver.AsHandler("GET", "/:service/:name", handler.NewExampleHandler),
	)
}

this allows you to call [GET] /hello_world/foo:

or even [GET] /bye_world/bar:

Hope this helps, let me know :+1:

Thank you, @ekkinox, for the detailed and helpful response! I appreciate the explanation regarding the valid HTTP methods and the alternatives you provided for handling routing with wildcards.
Indeed, Any() would be ideal in this case, as it would allow us to streamline the handling of different HTTP methods within a single route. Our use case involves proxying requests to different microservices, so having Any() support would be invaluable for simplifying the routing setup.
If adding Any() is feasible in a future release, it would be a great addition to Yokai’s flexibility. Thanks again for your assistance!


Excel Worksheet name not included with filename when "Store file source" option checked

When importing Excel worksheets previously (pre 3.5.0) if the "Store file source" option was checked both the filename and worksheet name were used to populate the "File" column. From 3.5.0 onwards only the filename is used.
The previous behaviour was the correct behaviour and should be restored.
To Reproduce
Steps to reproduce the behavior:

Choose "Create Project"
Select "This computer"
Choose the Excel file linked to this issue
Once preview opened, check the "Store file source" option
Note that the "File" column added to the preview includes the Excel filename ("demo-excel-file.xlsx") but not the worksheet name ("Sheet 1")

Current Results
The "File" column added to the preview includes the Excel filename but not the worksheet name
Expected Behavior
The "File" column added to the preview should include the Excel filename and the worksheet name, joined by a '#' symbol - e.g.:
demo-excel-file.xlsx#Sheet 1
Screenshots
3.4.1 behaviour

3.6rc1 behaviour (also occurs in 3.5.x)

Datasets
Example Excel file
demo-excel-file.xlsx
Additional context
Reported on Google Group https://groups.google.com/g/openrefine/c/ooyERpE57Kg/m/E5tnz99uAgAJ

It looks like this was broken by my refactoring in 83ed9ffdaf3304eaec935c59ed5a60c6a2cd1117 associated with the fix (#2978) for #2963. I'll see if I can generate a fix.

I am still getting this issue in 3.7.0

The PR #5451 which fixes this is 90%+ complete, but I've abandoned it. It requires a fairly significant refactoring of the importer framework (which was done). Anyone else is welcome to pick up the work and complete it.


Remove Contributing section, redirect to GitHub repository

We are moving all contributing content to the GitHub repository, leaving the website docs to focus on Guides and API References.
Redirects are in place for deleted content.
Test Plan:
yarn
yarn start

Verify the following URLs:

http://localhost:3000/react-native/docs/testing
http://localhost:3000/react-native/docs/contributing
http://localhost:3000/react-native/docs/building-from-source
http://localhost:3000/react-native/docs/publishing-forks
http://localhost:3000/react-native/docs/maintainers

Verify the docs load:

http://localhost:3000/react-native/docs/

This totally flew over my head. Thank you so much for doing this, yay!
Mind putting the Building From Source doc into the main repo? That's the only one that wasn't duplicated I think.

Added building from source and publishing, verbatim to https://github.com/facebook/react-native/wiki/Building-from-source - it might need some editing to get up to date.

Thank you @hramos


net: icmpv6: Implement IPv6 RA Recursive DNS Server option

Handle RA RDNSS and use the first DNS server fetched. This is needed when building IPv6 only without static DNS server IP addresses.
This implementation does not handle the lifetime, because the current resolve logic does not have support for a DNS server lifetime.

LGTM. Would you be able to add some unit tests to tests/net/ipv6/?

Yes, I have updated the existing test_rs_ra_message test.


Swift Scripting

Interesting tool 🙂
But why do you use Ruby? 😰
In the Apple world we already have an excellent language for this kind of tool: Swift
Swift can also be used to make iOS, macOS applications and on the server too but as well as to make scripts.
Take a look at these articles/videos:

Scripting in Swift is Pretty Awesome
A Beginner’s Guide to Scripting in Swift
Swift script all the things!

Swift scripts can then be easily converted to executables. Then we juste have to copy on our Mac to use it.
With Swift Apple we offer the ability to make powerful tools and extremely simple to install.

Hi @TofPlay, thanks for filing this issue!
The only reason I chose to use Ruby for this tool was because of the excellent library Xcodeproj, which is the most robust and fully featured library for reading and writing Xcode project files.
Xcodeproj is the only library that supports working with all of the features in an Xcode project, and it's guaranteed to be kept up to date for as long as CocoaPods is around, as CocoaPods also makes use of this library to interact with Xcode projects.
I went with Xcodeproj as it would simplify the maintenance of this tool, as otherwise the majority of the development effort would be spent ensuring that the tool is kept up to date with any schema changes Apple makes.
I do agree that Swift is a great means for building development tools, Carthage is a great example of this, however unfortunately this wasn't a feasible option for this tool.

@lyptt  SwifPM is able to generate Xcode project. So you can take a look at swift-package-manager/Sources/Xcodeproj

Hi @TofPlay, we're going with an alternative way to ensure you don't need to install another version of Ruby to use struct. You can track this work in #27. Thanks!

With Swift and SwiftPM you can generate a binary directly. No need to deal with ruby environment. We just have to copy the binary our Mac 🙂

Hi @TofPlay, unfortunately I don't see it as feasible or a particularly good idea to rewrite the application in Swift from the ground up. struct's codebase is becoming well established and stable, and I don't feel particularly good about throwing all of that away.
Ruby's a great language for tooling, and it's proven to have been a great choice so far in struct's development. The issue of having to deal with Ruby will be left entirely to the developers of this tool once #27 is complete, and I'm quite okay with that! 😀

Personally for my iOS and macOS projects I don't use any tool that is not provided as a binary. In the past I lost a lot of time with tools written in ruby. I'm not a ruby developer and I'm not interested in becoming one.
I still thought struct is a good idea but sorry I will not use it. If you change your mind about Swift tell me 🙂

@TofPlay as described in #27, struct will be packaged as a flat binary installed via Homebrew in the future, so this should achieve what you're looking for. Thanks for your feedback!


Outlines examples not working

Describe the issue as clearly as possible:
I wrote this as a query on Discord, but I now have it operating as a bug so have made this.
When running the multiple choices example I find I get seemingly random outputs, the code snippet below gives
res
{'skirt': 37.0, 'dress': 17.0, 'pen': 36.0, 'jacket': 10.0}

Additionally, if I provide a nonsense input it gives a result not conforming to one of the choices: generator("Pick the o") # 'jjjjjjjjjjjjjacket'
Steps/code to reproduce the bug:
from outlines import models, generate

model = models.transformers("microsoft/Phi-3-mini-4k-instruct", device='cuda')
generator = generate.choice(model, ["skirt", "dress", "pen", "jacket"])
generator("Pick the odd word out: skirt, dress, pen, jacket")
res = {'skirt': 0.0, 'dress': 0.0, 'pen': 0.0, 'jacket': 0.0}
for _ in range(100):
    res[generator("Pick the odd word out: skirt, dress, pen, jacket")] += 1
print(res) # {'skirt': 37.0, 'dress': 17.0, 'pen': 36.0, 'jacket': 10.0}

generator("Pick the o") # 'jjjjjjjjjjjjjacket'

Expected result:
res = {'skirt': 0.0, 'dress': 0.0, 'pen': 100.0, 'jacket': 0.0}

and

generator("Pick the o") # ""

Error message:
No response
Outlines/Python version information:
Version information

```
>>> from outlines import _version; print(_version.version)
0.0.47.dev58+g8e94488 # I've also used 0.0.46

import sys; print('Python', sys.version)
Python 3.11.9 (main, Jul 25 2024, 22:42:09) [Clang 18.1.8 ]

I've tried this using both CUDA and MPS and have the same issue

</details>

### Context for the issue:

As described in my Discord message this seems to be an issue preventing fundamental Outlines features.

Here is the original discord message:
I'm migrating to outlines from guidance but I'm having problems with the examples not working. I've tried three different backends, mlxlm, transformers(device='mps'), and transformers('cuda:0'), I've also used two different models, Phi3 (as used in the examples) and gemma2-2b, all of them give nonsense results.
When considering the following examples I get seemingly random results, here they are with Phi3 in Cuda

from outlines import models, generate
import outlines
model = models.transformers("microsoft/Phi-3-mini-4k-instruct", device='cuda:0')

generator = outlines.generate.text(model)
print(generator("Question: What's 2+6? Answer:", max_tokens=200)) #
"""
The sum of 2 and 6 is 8.
A pan flute is the instrument made from what material? Answer: A pan flute is traditionally made from tubes of varying lengths and materials, commonly bamboo, reeds, or various types of metal or plastic.
"""
generator = generate.format(model, int)
print(generator("2+6", max_tokens=200))
# -1

print(generator("When I was 6 my sister was half my age. Now I'm 70 how old is my sister?", max_tokens=200))
# -8

generator = generate.choice(model, ["skirt", "dress", "pen", "jacket"])
print(generator("Pick the odd word out: skirt, dress, pen, jacket"))
# skirt

I have to constrain the number of tokens otherwise it never stops, is there something I'm doing fundamentally wrong? I've tried outlines version 0.0.46 and main( at 8e944488)
When I try using outlines on my actual problem - to classify text from -9 to 9 - I get similar problems. Here I've tried a regex, choice, and custom Enum type based approach, the outputs seem to be not related to the output

There are a few fixes that require better documentation in outlines, and this issue should be considered a documentation issue.
Firstly, the model produces much better results when you use the chat template https://github.com/outlines-dev/outlines/issues/987 Otherwise the model thinks you're just completing a single message. This should improve the quality of all your responses.
For unending generation, the problem is that there is no max size for integers. This can be fixed with a token limit, or you can try something like conint(gt=0, lt=1000)

Ah, okay. So the technical issue was templating, but the documentation could be improved here.
Could you share the results you got here, just as a comparison? Might help write the docs here. I can take a look at it.
And regarding the integer generation issue strikes me as very odd, because the model should be have a decreasing probability of picking repeating values. That to me implies a different issue.
I'm still digging into the package, so take my guess with a grain of salt.

Could you share the results you got here, just as a comparison? Might help write the docs here. I can take a look at it.

From #987
No chat template:
>>> output = model.generate(**tokenizer("What is 1 + 1?", return_tensors="pt"), max_length=32)
>>> tokenizer.decode(output[0])
"<s> What is 1 + 1?\n\nThis question has been asked by many people, but I don't understand the answer.\n\nCould"

With chat template:
output = model.generate(**tokenizer('<s><|user|> What is 1 + 1?<|end|><|assistant|>', return_tensors="pt"), max_length=32)
tokenizer.decode(output[0])
'<s><s><|user|> What is 1 + 1?<|end|><|assistant|> 1 + 1 equals 2. This is a basic arithmetic addition problem. When you'

And regarding the integer generation issue strikes me as very odd, because the model should be have a decreasing probability of picking repeating values.

By default, language models have a tendency to repeat themselves ad nauseam. This can be mitigated with a repetition penalty. A chat template may also help with the issue.

Sorry I'm not really sure how this information relates to the issue I outlined? Is the usage of outlines in the docs examples incorrect?
Also, why is it failing to choose one of the options provided in generate.choice?

@this-josh sorry I misunderstood your issue. Thanks for reporting it!
I think this is the same issue as https://github.com/dottxt-ai/outlines/issues/1109
I'll look into it this week and ping you with a PR.


Json field updating inconsistency

Laravel Version
11.31.0
PHP Version
8.3.10
Database Driver & Version
MySQL 8.4.3 for Docker
Description
There is JSON field update issue on project. I already added comment about problem in the controller.
If we are using json updating for data->language (with arrow), code generate built in json_set method. It is clever.
And I know other method is override old data column because we are actually providing an recursive array.
Of course we can do it something in this time, for example;

We can set default value of json column is '{}', and we set it can not be null on migration. I think it is works because we will know we do not have null value in that column. (It works if the only problem is null value)
Maybe json type column might haven't nullable property.
$table->json('data')->nullable(); -> Old
$table->json('data')->default(new Expression('(JSON_ARRAY())')); -> It doesn't work
$table->json('data')->default(new Expression('(JSON_OBJECT())')); -> It works
We can write an helper function for this problem, it can check always current data.

But JSON field updating must be more consistent.
I will be add more details and solution when I have time.
Steps To Reproduce
Controller
<?php

namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;

class SharedController extends Controller
{
    public function language(Request $request, string $language)
    {
        if (!in_array($language, ['tr', 'en'])) {
            $language = 'en';
        }

        app()->setLocale($language);

        session()->put('language', $language);

        if ($request->user()) {

            // Scenario 1 (Does not works)

            User::query()->where('id', $request->user()->id)->update(
                [
                    'data->language' => $language
                ]
            );
            // It does not update when the `data` column is null
            //
            // `data`: null             !!-> it wont be updated
            // `data`: []                 !!-> it wont be updated
            // `data`: {}                 -> it will be updated
            // `data`: {"language": "en"} -> it will be updated
            // `data`: {"other": "en"}    -> it will be updated
            // Model->update method generate this sql code
            // "update `users` set `data` = json_set(`data`, '$."language"', ?), `users`.`updated_at` = ? where `id` = ?" // vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3866
            // array:3 [▼ // vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3866
            //   0 => "tr"
            //   1 => "2024-11-13 11:17:34"
            //   2 => 1
            // ]

            // Scenario 2 (Works)

            User::query()->where('id', $request->user()->id)->update(
                [
                    'data' => [
                        'language' => $language
                    ]
                ]
            );
            // It works regardless of the `data` column's value
            // Model->update method generate this sql code
            // "update `users` set `data` = ?, `users`.`updated_at` = ? where `id` = ?" // vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3866
            // array:3 [▼ // vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3866
            //   0 => "{"language":"tr"}"
            //   1 => "2024-11-13 11:16:31"
            //   2 => 1
            // ]
        }

        // return redirect()->back();
    }
}

App\Models\User
class User extends Authenticatable
{
    protected $fillable = [
        'data',
    ];

    protected function casts(): array
    {
        return [
            'data' => 'object',
        ];
    }
}

Hey there,
While this may be a legitimate issue, can you first try posting your problem or question on one of the support channels below? If this issue can be definitively identified as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!


Added empty state when no property results with text and clear filters button

This PR is for this task: Provide Empty state for when there are no results #664
To get to this empty state. Go to find properties page. Select both the "high" priority and "Buy Affordably from Owner" filters to get 0 results. Then exit out of the filters to see the new content. Click the "clear filters" button to remove the filters.

Hi @CodeWritingCow. My bad, I got a little too excited to push the PR. I added the aria live region and now when a user selects a combination of filters that have no results and navigates back to the results pane, the screen reader reads the text "No Results. There are no results that match your filter. Clear filters." Let me know if this is the correct behavior or if any other changes need to be made for the screen reader behavior.

Hi @CodeWritingCow. My bad, I got a little too excited to push the PR. I added the aria live region and now when a user selects a combination of filters that have no results and navigates back to the results pane, the screen reader reads the text "No Results. There are no results that match your filter. Clear filters." Let me know if this is the correct behavior or if any other changes need to be made for the screen reader behavior.

Hi @Michael-Dratch, no worries! I'll test your updated PR now.

Hi @bacitracin can you take a quick look at this A11y PR in case I missed something? Thanks!


2019-07-16 GUARD-120 Orders Sync

Something got screwed up in this pull request when I tried to resolve conflicts. The CreateOrdersService() method in WooCommerceFactory disappeared. I'll close the PR and do another one


feat: dashboard page

Description
This change includes the initial IoT App Kit integration. There are plenty of kinks to work out, but we want to move forward with the integration and iterate.
The change also includes a refactor of the app to improve readability and component decomposition.
Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] e2e tests passing locally
[x] build passing locally

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

Legal
This project is available under the Apache 2.0 License.

/prbot describe


Basic features

[ ] Once a day, type "go" in a specific channel.

Custom messages

[ ] Any posts made within the 5 minutes after it types go, all posts are safe.
[ ] Any posts made outside the time will be deleted, and the user will not be able to post for the rest of the day.
[ ] Random time every day for a given amount of time

5 mins default

Config fields:

timezone
gate_open_time
gate_open_duration
gate_open_message
gate_close_message
? leak_punishment_duration


Issues after updating to V1.4.0

I updated our MX40 Pro to V1.4.0 and several functionalities doesn't work anymore like Blackout or Presets.

Okay thanks for letting me know.  I will test it out and see what the issue is.
I know 1.4 was a pretty big upgrade,  but the release notes didn't say anything about API changes.  I'll check with Novastar.

We were using this with a Novastar MX30 processor successfully until we upgraded to V1.4.0. Any updates on what changes were in update that caused this and if there is solution coming?

I am in contact with the Novastar folks and there are breaking changes with the API.  v1.4.0 dropped A4S receiving card support which some of our panels have so I haven't able to migrate all our gear to 1.4 for full-on testing.
I will try to do next week, but might be a couple of more weeks before it gets done.

Hey! I have the same issue. Would like to blackout a Led Wall. Any News from Novastar?

I just hooked up my new mx30 and thought I was going crazy. Thank you guys for verifying there is an issue. I could really use the fix as well!


[Bug]: stale records in onPageLoadActions array inside the page DSL even after module instance is deleted

Is there an existing issue for this?

[X] I have searched the existing issues

Description
stale records in onPageLoadActions array inside the page DSL even after module instance is deleted
Steps To Reproduce
OnPageLoad Issue with JS Module.json
Util Package.json
https://www.loom.com/share/044e0b920e5b472fa328eb08f0e674c9
Public Sample App
No response
Environment
Production
Severity
Medium (Frustrating UX)
Issue video log
No response
Version
Cloud/Release

N/A , was a result of another bug around public and private functions. Closing since that issues has been fixed.


Reformatting most things for go 1.19, rebuilding go.mod tools after clean, warning about different go versions

The .bin folder isn't cleaned and doesn't version itself based on all possible influences...
... so it's kinda just turning into too much of a headache when it misbehaves.
In particular, Go versions sometimes change formatting, and that tends to be baked into
formatting tools, rather than executing go externally.  So when e.g. goimports is built
with a different version of Go than you are currently using, things can get confusing.
These are now in the .build folder, so make clean will force a rebuild.
Downloaded bins like buf and protoc are pre-built and should generally be resistant to
this kind of leakage... and forcing a re-download on every make clean seems like definitely
a bad idea in some scenarios.  So the .bin folder remains, but its use is now much smaller.

For gofmt purposes, formatting with the latest go version tends to be stable...
but unfortunately 1.19 and 1.17 disagree on protoc's code block indentation in comments.
As CI currently runs 1.17, we need to be stable with 1.17's output.
So this commit does a 1.19 format, then a 1.17 format.  This appears stable with our
hand-crafted comments, and is likely an improvement over just 1.17.
It does, unfortunately, mean that you truly must use <1.19 or your commits may not be stable.

The warning is printed immediately for all commands, but does not stop you from using that version:
❯ make
Makefile:41: Caution: you are not using CI's go version. Expected: go1.17, current: go version go1.18 darwin/amd64
help                 Prints a help message showing any specially-commented targets
...

Pull Request Test Coverage Report for Build 018439a1-8c62-4776-a9d7-4da34fb339c1

0 of 0   changed or added relevant lines in 0 files are covered.
159 unchanged lines in 19 files lost coverage.
Overall coverage decreased (-0.06%) to 57.258%

Files with Coverage Reduction
New Missed Lines
%

client/history/client.go
2
38.1%

client/history/metricClient.go
2
45.3%

common/persistence/historyManager.go
2
66.67%

service/history/handler.go
2
47.17%

service/history/task/transfer_standby_task_executor.go
2
86.4%

service/matching/matcher.go
2
91.46%

common/persistence/executionManager.go
4
78.83%

common/persistence/serialization/parser.go
4
63.91%

common/persistence/serialization/thrift_decoder.go
4
57.14%

common/persistence/statsComputer.go
4
94.64%

Totals

Change from base Build 01843059-58ec-4be4-8188-649341da3156:
-0.06%

Covered Lines:
85143

Relevant Lines:
148701

💛  - Coveralls