cmd/go: go env GOMOD is too slow for use in interactive commands

We're porting a lot of tools to support modules, and most of them need to know whether modules are enabled to turn on the newer, slower, potentially buggier code path. Running go env GOMOD takes about 10ms, which is not negligible for an interactive command like godef or guru. The algorithm for determining if modules are on is just simple enough to tempt people to roll their own. In fact, there's already a second implementation in go/build: https://github.com/golang/go/blob/429bae715876c69853bb63db1733f580e293c916/src/go/build/build.go#L977
This is unfortunate, especially since the algorithm changed in http://golang.org/cl/148517. (Maybe not in a way that matters for go/build? Not sure.)
I think it'd be helpful to have a standalone internal package that implemented this functionality that could be used for go env, go/build, and copied into x/tools for other tools to use.
@bcmills @jayconrod @ianthehat

The algorithm has changed before, and will likely change again (whenever the default behavior switches over). Probably it's better to make go env GOMOD fast than to duplicate it with version skew.
I'm a total novice with the Linux perf tool, but it seems to imply that we're spending a significant fraction of our latency initializing maps and regexps that aren't actually going to be used.
From
$ GOMAXPROCS=1 perf record --freq=max --call-graph fp -- go env GOMOD
$ perf report

I get the following:

-   76.18%     0.00%  go       go                  [.] runtime.main                                                                  ◆
   - runtime.main                                                                                ▒
      - 71.40% main.init                                                                                ▒
         - 61.68% cmd/go/internal/bug.init                                                                                ▒
            - cmd/go/internal/envcmd.init                                                                                ▒
               - 48.18% cmd/go/internal/modload.init                                                                                ▒
                  - 46.52% cmd/go/internal/modfetch.init                                                                             ▒
                     - 41.80% cmd/go/internal/get.init                                                                               ▒
                        - 23.85% cmd/go/internal/work.init                                                                           ▒
                           + 22.31% regexp.MustCompile                                                                               ▒
                           + 0.82% cmd/go/internal/work.init.0                                                                       ▒
                           + 0.72% debug/elf.init                                                                                ▒
                        - 8.70% cmd/go/internal/get.init.1                                                                           ▒
                             regexp.MustCompile                                                                                ▒
                           + regexp.compile                                                                                ▒
                        - 7.08% cmd/go/internal/web.init                                                                             ▒
                           - 4.61% net/http.init                                                                                ▒
                              - 1.91% internal/x/net/http/httpguts.init                                                              ▒
                                   internal/x/net/idna.init                                                                          ▒
                                 - internal/x/text/unicode/norm.init                                                                 ▒
                                      1.25% runtime.mapassign_fast32                                                                 ▒
                                      0.66% runtime.aeshash32                                                                        ▒
                              - 1.37% internal/x/net/http2/hpack.init                                                                ▒
                                   internal/x/net/http2/hpack.newStaticTable                                                         ▒
                                 + runtime.mapassign                                                                                ▒
                                0.70% runtime.mapassign_fast64                                                                       ▒
                              + 0.63% mime/multipart.init                                                                            ▒
                           - 2.47% crypto/tls.init                                                                                ▒
                              + 1.82% crypto/des.init                                                                                ▒
                              + 0.65% crypto/x509.init                                                                               ▒
                        + 0.81% regexp.MustCompile                                                                                ▒
                        + 0.75% cmd/go/internal/get.init.0                                                                           ▒
                          0.61% crypto/tls.init                                                                                ▒
                     + 2.73% cmd/go/internal/modfetch/codehost.init                                                                  ▒
                     + 1.15% archive/zip.init                                                                                ▒
                     + 0.83% regexp.MustCompile                                                                                ▒
                  + 0.84% cmd/go/internal/imports.init                                                                               ▒
                  + 0.83% regexp.MustCompile                                                                                ▒
               - 12.96% cmd/go/internal/load.init                                                                                ▒
                    text/template.(*Template).Parse                                                                                ▒
                    text/template/parse.Parse                                                                                ▒
                    text/template/parse.(*Tree).Parse                                                                                ▒
                  + text/template/parse.(*Tree).parse                                                                                ▒
         - 4.54% cmd/go/internal/base.init                                                                                ▒
            - cmd/go/internal/cfg.init                                                                                ▒
               - 3.83% go/build.init                                                                                ▒
                  - 1.96% go/doc.init                                                                                ▒
                     + 1.38% regexp.MustCompile                                                                                ▒
                  + 0.78% go/build.defaultContext                                                                                ▒
         + 1.64% cmd/go/internal/test.init                                                                                ▒
         + 1.58% flag.init                                                                                ▒
         + 0.83% cmd/go/internal/list.init                                                                                ▒
         + 0.83% cmd/go/internal/clean.init                                                                                ▒
      + 3.87% main.main                                                                                ▒

I agree that'd be better, and I know Brad was looking at lazy-loading this kind of stuff, but in general keeping init functions out of something as big as the main go command seems pretty difficult. Maybe a new command in $GOROOT/bin, goenv or something?

The lazy-loading issue was https://github.com/golang/go/issues/26775.

Let's see how far we can get making go env faster. I'd really rather not introduce a whole binary just to shave off (optimistically) ≤8ms, especially given that the result of go env GOMOD for a given working directory should be pretty amenable to caching.

I actually was thinking the same when I saw go env executions like go env GOARCH show up in the trace reports from a tool I've written that uses go/packages. I agree that shaving off a few milliseconds from go env should be a good start.
I agree with the sentiment that milliseconds matter for some tools, but given that go/packages is built around executing the go tool, I don't think it's a good idea to break that rule just for performance. Perhaps we could instead reduce the amount of times the go tool is executed as part of those interactive tools.

I had a stab at this and shaved a millisecond off on my machine (20%). The bigger offenders given by perf report are now a bit more tricky, like 5.20% net/http.init and 3.76% crypto/tls.init. A few percent still belong to regexp, but I've left them for later.
I wonder if packages like http and tls could reduce their init cost even further. If not, perhaps it does make sense to split go env into a much smaller binary with a tiny init function.
I'm also a bit puzzled by how time go env GOARCH on Bash seems to give numbers around 10ms, while the benchmark gives numbers around 4ms. I'm not sure what could explain the almost tripled run-time.

time go env GOARCH on Bash seems to give numbers around 10ms, while the benchmark gives numbers around 4ms.

echo 'package main; func main(){}' > c.go
go build ./c.go
time ./c

time reports 5-8 milliseconds to run a no-op go program on my machine, so it's probably overhead from loading/starting the process and whatever go runtime initialization is involved. time /usr/bin/true (an actual 17k compiled executable) takes 3-6 milliseconds on my machine so the time for the no-op go program seems reasonable to me.

Interesting - but the Go benchmark is also executing the go binary at each iteration. Perhaps it's faster since it's loading the same binary over and over again.
If anyone knows of a better way to write a benchmark for this, please let me know. Benchmarking a function directly, like the generated init function for the entire cmd/go main package, would be great - as we'd be able to get cpu and memory profiles directly from the benchmark. But I don't think that is possible at the moment.

All previous changes merged; go env should now be about twice as fast.
A perf report now shows these remaining offenders:

errors.New at 21%, most of which is runtime.Callers at 20%. Why do global errors need stack traces?
archive/zip at 3%, which we might be able to improve slightly
runtime.mapassign_faststr at 7%, so there's quite a bit of map filling work happening somewhere
runtime.newobject at 6%, so there probably are quite a lot of global object allocs around

I think the only big low-hanging fruit is errors.New. There should definitely be a way to create global errors without incurring extra init cost beyond allocating the error. I presume the 1.13 error changes, which include stack frames, are partially to blame for this spike in init cost.
What should the solution be? Not to collect stack frames if errors.New is running as part of init? Using static error types, which would be a large refactor? Making runtime.Callers a no-op while init is running? /cc @jba @mpvl

runtime.Caller, at least, can theoretically be evaluated (and inlined) at link time.
I filed #30468 for the general regression. In the meantime perhaps we should substitute an internal package for errors: it might be as simple as sed -i 's/	"errors"/	"cmd/go/internal/errors"/' $(find cmd/go -name '*.go'.

Thanks! I don't think this is terribly urgent; we won ~50% and lost ~20%, so I'd wait another week or two to see if #30468 can have a good solution.

I've had a look around and managed to scrape another 3%. I don't think we're going to get much more without larger refactors, such as making cmd/go's init work be lazier, or having the compiler generate better code for static global maps.
If anyone is better at perf report than I am and manages to spot more low-hanging fruit, please do speak up :)
I'd say we should focus on #30468 before continuing; right now errors.New is just taking the top spot in too many generated package init functions

I'm seeing 20ms for 'go env GOMOD'. Is that really too slow?

It's gotten ~50% faster since the issue was opened :) At least as far as the benchmark tells us.

Now that the CLs to make errors.New faster have gone in, perf report shows errors.New at ~10%, and runtime.Callers at 8%, down from the previous 21% and 20%. https://github.com/golang/go/issues/30820 would presumably let us get rid of that entire chunk.

I'm seeing 11ms at this point. That's well below typical keypress latency for a USB keyboard,¹ and can generally be cached for a given working directory anyway.
That seems good enough for interactive use.
¹https://danluu.com/keyboard-latency/


Create MIGRATION.md

I have been caught between 1.1.0 to 1.2.0 with this breaking change: directoryPrefix: '' had to become target: pkg.name + '/' + pkg.version + '/'. I think we need to provide a migration guide for each breaking change. If this document is well structured we could use that as a warning / error message on the CLI when we detect the migration hasn't been performed.

my bad - i tried to make it backwards compatible - obviously forgetting about the pkg.name and version that are still required
https://github.com/skyglobal/component-helper/blob/master/tasks/release.js#L31


Implement more traits on Difference and Changeset (Clone, Hash, Eq)

To suit more use cases, I've added derives for traits including Clone, Eq and Hash on Difference and Changeset. This allows library users to clone instances of these types, as well as putting them in structs deriving Clone or HashMaps.
In order to do this and still make the tests pass, I've done a bit of maintenance work. The crate denies warnings, but still uses deprecated syntax like try!() and ..., creating compile warnings. I've also fixed some clippy lints applied improperly. (It appears that some of this was also done in other unmerged PRs)

I'll close this under the assumption that this is not planned.


Random with speed?

Hey there, this library is fantastic thanks for sharing it! I'm wondering what it would take to get the speed parameter to affect the random style, is that something that's easy to patch on?

Hi, it's a good idea!
Currently the random noise does not get affected by speed.
I'll see if I can add this!
I'm guessing you are looking for the TV noise effect.
To make this you can use the seed modifier like this:
import SwiftUI
import Noise

struct ContentView: View {

    @State private var startTime: Date = .now

    var body: some View {
        TimelineView(.animation) { context in
            let seconds = startTime.distance(to: context.date)
            let milliseconds = Int(seconds * 1_000)
            Noise(style: .random)
                .monochrome()
                .seed(milliseconds)
        }
    }
}

I've now updated the package to support speed for random noise in version 2.0.2.
Now you can simple call it like this:
Noise(style: .random, speed: 100)

Wow! You are awesome for taking this up so quickly!! I should've been more specific about what I'm seeking, it's not the CRT TV "snow" as much as a very fine grain version of .noisy. Different from what you shipped here in that the pixels would be "moving" not randomly respawning. Is that achievable?


fmt: String format %+d treats zero as a positive number

Formatting zero using the + flag in fmt.Printf("%+d",0) results in +0 output. It seems that it is a bug, since zero is neither positive nor negative. I would expect a simple 0 as an answer.
Sample: http://play.golang.org/p/XhcQmGYXMC

Working as intended. As the documentation says:
+	always print a sign for numeric values

You can argue whether 0 is positive, but you can't argue that it's not numeric.


New version: PerfChecker v0.1.4

Registering package: PerfChecker
Repository: https://github.com/JuliaConstraints/PerfChecker.jl
Created by: @Azzaare
Version: v0.1.4
Commit: 4d6a9d3ae5c6bcea196a9cef62b9d774570d72c7
Git reference: HEAD
Description: A small collection of semi-automatic performance checking tools

I made a mistake in the version (skipped 0.1.3). This PR can be closed.


Fixes #5: CNPJ generator

This PR adds a function to generate a valid CNPJ. The code was written based on information from this site and tested using the module is-valid-cnpj.
Please, let me know if you have any comments.

Hey @lucasvalenteds when you have a time, update your PR. I'm just waiting for that to merge it to master. Thanks!


 Write a short, imperative tense description of the change. ›

Expected behavior
When I run git commit -m "some description", koji should pre-populate the message with some description.
Ideally, I would like to be able to use git commit -m "feature(thing): something nice" or git commit -m "doc: more words"  and koji suggest a fix for my spelling mistake, such as feat or docs.

I think it should read in the file defined by COMMIT_EDITMSG to get the message that was passed via git commit -m.

this is a good idea. it could work so that if your message fits the conventional commit standard, it's used in place of the interactive prompt. if it's not, it's used as the message during the prompt.
fixing spelling mistakes seems easy enough too, i think.


Cannot install with yarn

Hi there! I cannot install it no matter what:
$ yarn global add google-cloud-gui
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'global'

$ yarn --version
0.32+git

... to be honest - I have no idea what I'm even doing. Never heard of yarn :-(

Ah, ok. I installed yarn with "apt-get install yarn" which is - God knows what. What I should do was install it through NPM
npm install -g yarn.
Maybe you want to mention it in README, just to make it more accessible for non-JS people.
Thanks!


[Hub Generated] Review request for Microsoft.Insights to add version preview/2019-10-17-preview

If you are a MSFT employee you can view your work branch via this link.
Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

Automation for azure-sdk-for-go

Can one of the admins verify this patch?

Automation for azure-sdk-for-python

/azurepipelines run

/azurepipelines run


Added date and time math functions.

This adds the following type of syntax to Cent:
4.hours.ago
1.year.fromNow

And so on.
The implementation uses NSCalendar's autoupdatingCurrentCalendar() function to make this automatically localized to the user's location (asking for a day in the future is different for different calendars, leap years, etc). This avoids a more naïve implementation that assumes every minute has 60 seconds, or that every day has 24 hours.
So here's how the implementation works, and why it was done this way:
Extend Int to return an opaque type that stores a unit (year, month, hour, etc) and a value (the underlying Int). These two values are private in the type so that no one relies on our implementation, which could change. We need both the unit and the value in order to calculate time ago, since NSCalendar only has a function for dateByAddingComponents, not dateBySubtractingComponents. The solution is to negate the unit when we call this function, but we need to know which unit to negate, so we keep them both.
Fixes #148.

Thanks for contributing and the explanation. Can you move the Int extension into the Int.swift file in this project.

Sure thing!


Skip build-windows check when there is no related change

Describe the bug

Like kind tests are skipped when there is no related change, it could also skip "build-windows" test if no windows source code change. The test sometimes takes very long time to finish and may timeout.
Expected

Skip build-windows check when no windows source file change.

Hi @tnqn do you mean unit test for windows? I can see a job named test-unit, but I didn't  see a test named "build-windows" but a build target.

I just realized I was wrong about the assumption. In fact any change to source files that doesn't have _windows.go suffix may affect windows test as they are shared by platforms. So it would only make sense to skip tests when the only changes are for files that have go:build !windows tag, which can not really skip many PRs so seems not worth.

@tnqn  @KMAnju-2021  is already working on this issue, Do you mean there is no need to put efforts on this issue if the files with go:build !windows tag are not so many?

Yes, I assume even if we add the check, it can rarely skip PRs, unless my assumption was wrong again.

ok, I checked that there are total 25 files with tag go:build !windows including test files, they are probably not changed so often. I am Ok about not adding this check considering most of our code changes are for linux, a new job in workflow will add extra times for github builds.

Closing it per above discussion


feat: cloudinary storage adapter

What?
This PR adds a new Cloudinary adapter for Payload CMS (Beta 3.0) to enable cloud-based media storage. The adapter utilises Cloudinary's official Node.js SDK to manage file uploads, storage, and retrieval.
Why?
I wanted to store files in Cloudinary for efficient, cloud-based media management, but I couldn't find an existing adapter for this provider within Payload CMS.
Related Discussion
How?

Adapter Setup: Implemented using Cloudinary’s Node.js SDK to enable reliable integration with Cloudinary’s API.
Configuration: The adapter is straightforward to configure, requiring only essential Cloudinary credentials.

One challenge encountered was that the plugin-cloud-storage doesn't expose the file's MIME type by default. However, Cloudinary’s API requires specifying whether a file is an 'image' or 'video' when requesting data. To work around this, file type verification was implemented by checking the file extension. While this approach works, it would be more robust to have MIME type information directly available, and this should ideally be improved in future updates.

Thanks for the PR!
I've triggered CI checks. Looks like you need to re-run pnpm install and check in the pnpm-lock.yaml changes.

Hi, I’ve made some updates to handleDelete - I was able to use the mimetype directly in the function since it was passed by default in the properties.
I’ve also added tests to feature.

@miloszwierucki Thank you for working on this! I currently have custom code handling this functionality, but I’m eager to migrate to your plugin once it’s officially released.
I've downloaded your code, and I am testing it now. In my current setup, I store Cloudinary’s secure_url directly within the media document. Would it be possible to achieve the same with this package?

Thanks for your response @miloszwierucki.
Our Astro frontend relies extensively on Cloudinary's image transformation capabilities via URL parameters ([Transformation URL API](https://cloudinary.com/documentation/transformation_reference Reference)). Given the high volume of images on our site, we prefer to utilize Cloudinary's CDN directly to optimize performance and reduce the load on the CMS.
Therefore, it would be beneficial if the adapter could store Cloudinary's secure_url or public_id directly within the media document. This would allow our frontend to access and manipulate images directly through Cloudinary's CDN.

Hi, is something blocking this from merging?

Bumping as I'd like to see this officially in too! @miloszwierucki thanks for putting this together!

Hey @miloszwierucki . I also wanted to thank you for taking the time to work on this. Im looking forward to being able to use this in my current project.
A quick question: is it, or will it be, possible to specify a cloudinary folder at the collection config level?

A quick question: is it, or will it be, possible to specify a cloudinary folder at the collection config level?

Yes that should be possible with the current implementation.
https://github.com/payloadcms/payload/blob/a40841cfd3560e08bcc94da00bdcf647aaec698f/packages/storage-cloudinary/README.md?plain=1#L52


[setCountryCode:] multiple countries?

Hello,
What if my app is available in a small list of countries only?
Is it possible to insert an array or to seperate country codes in the string by a comma?
Looking at the implementation of Harpy I think this is not possible...
I hope I'm wrong.
Thnx!

You only need to insert one  to get the App Store version check to work. Pick one country your app is available him, and you should be fine. It defaults to the US App Store.

Ok, thank you!


Relationship with other models/vocabularies - especially LRMoo (was FRBRoo)

I think the 'selling' of OpenWEMI would be easier if the position wrt other proposals (like Bibframe) was clarified.
I'm especially thinking of LRMoo (previously FRBRoo), which is "approved as an IFLA standard in 2016"
I suppose that OpenWEMI classes and properties are super-classes or super-properties of the ones in other models/vocabularies, but having some confirmation would be useful in this discussion.

@aisaac Thanks. I could see this as a Cookbook section, and we could show how openwemi could be seen as semantically "super" to FRBR and LRM. The fact is that there is no direct relationship between openwemi and the library models, and having talked to various IFLA/LRM folks I know that they consider openwemi to be no less than heresy. (In fact, someone in one of those groups prevented an article by me about opening up WEMI from being accepted for publication - they are really adamantly against this.) I would like to do a theoretical view of openwemi and BIBFRAME but the huge size of the bibframe model, and the fact that they have eliminated most of the domains, makes this more difficult.  I do think that the BIBFRAME relationship may be of more interest than the LRM relationship, mainly because BIBFRAME is in RDF and LRM does not (AFAIK) have a vocabulary serialization in use.
All of that said, I think it is very important that the main openwemi documentation keep a certain distance from the library applications, with the hope that it will then be more acceptable to non-library users. It is possible that a more extensive list of examples will be needed, though, to make clear to non-library how it can be used.

@kcoyle thanks for the answer. I agree that it is wise to keep the distance with library application, but in fact clarifying the relationship is maybe best done by explaining what is the semantic link (and difference) between the OpenWEMI constructs and the others?
It may not require a lot: the sentence saying "openwemi could be seen as semantically "super" to FRBR and LRM." would already do a lot, even if the alignment is not formally represented in the spec.
Regarding "LRM does not (AFAIK) have a vocabulary serialization in use." my question is whether LRMoo could be considered to be one? Since it is apparently approved by IFLA...". Again I'm not calling for a full mapping from/to LRMoo, but a general positioning may help.

I wonder if we shouldn't have a kind of side note or appendix titled "Relationship to Library Standards" where we could do this. There is also interest in an analysis of BIBFRAME vis-a-vis WEMI. We could refer to it in the body of the Primer with a link. If it gets to be too long, then I suggest a separate document in the openwemi space, again with reference from the main document.

@kcoyle yes I think that such a note would answer the issue here!


No mails after upgrade

log.103.20230630082429.txt
Hi
I did the update, but since then I don't get any emails, it seems to be related to Swift, is that correct?
root@driftzabbix:/usr/share/zabbix# php mailGraph.php test
2023-06-30 08:31:44 : <<< mailGraph v2.10 >>>
2023-06-30 08:31:44 : # Invoked from CLI
2023-06-30 08:31:44 : # Data passed to MailGraph main routine and used for processing
{
"itemId": 0,
"eventId": 103,
"recipient"<EMAIL_ADDRESS>"baseURL": "https://driftzabbix.intern.fremtind.no/",
"duration": 0,
"subject": "[TEST] {{ HOST_NAME|raw }}:  ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }}",
"period": "30m",
"period_header": "Last 30 minutes",
"debug": 1,
"HTTPProxy": ""
}
2023-06-30 08:31:44 : # LOGIN to Zabbix
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"user.login","params":{"username":"","password":""},"id":1,"auth":null}
2023-06-30 08:31:44 : > Received 68 bytes
2023-06-30 08:31:44 : > Token = f2c7ca4b7adf70ec0525d9fef13c4291
2023-06-30 08:31:44 : # Retreiving EVENT information
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"event.get","params":{"eventids":103,"output":"extend","selectRelatedObject":"extend","selectSuppressionData":"extend"},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":2}
2023-06-30 08:31:44 : > Received 744 bytes
2023-06-30 08:31:44 : > Event data
{
"jsonrpc": 2,
"result": [
{
"eventid": 103,
"source": 0,
"object": 0,
"objectid": 23238,
"clock":<PHONE_NUMBER>,
"value": 1,
"acknowledged": 1,
"ns": 794926316,
"name": "Certificate grade is A",
"severity": 0,
"r_eventid": 0,
"c_eventid": 0,
"correlationid": 0,
"userid": 0,
"opdata": "",
"relatedObject": {
"triggerid": 23238,
"expression": "{32946}=1",
"description": "Certificate grade is A",
"url": "",
"status": 1,
"value": 1,
"priority": 0,
"lastchange":<PHONE_NUMBER>,
"comments": "",
"error": "",
"templateid": 23226,
"type": 0,
"state": 0,
"flags": 0,
"recovery_mode": 0,
"recovery_expression": "",
"correlation_mode": 0,
"correlation_tag": "",
"manual_close": 0,
"opdata": "",
"event_name": "",
"uuid": ""
},
"suppression_data": [],
"suppressed": 0,
"urls": []
}
],
"id": 2
}
2023-06-30 08:31:44 : # Retrieve TRIGGER information
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"trigger.get","params":{"triggerids":"23238","output":"extend","selectFunctions":"extend","selectTags":"extend","expandComment":1,"expandDescription":1,"expandExpresion":1},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":3}
2023-06-30 08:31:44 : > Received 557 bytes
2023-06-30 08:31:44 : > Trigger data
{
"jsonrpc": 2,
"result": [
{
"triggerid": 23238,
"expression": "{32946}=1",
"description": "Certificate grade is A",
"url": "",
"status": 1,
"value": 1,
"priority": 0,
"lastchange":<PHONE_NUMBER>,
"comments": "",
"error": "",
"templateid": 23226,
"type": 0,
"state": 0,
"flags": 0,
"recovery_mode": 0,
"recovery_expression": "",
"correlation_mode": 0,
"correlation_tag": "",
"manual_close": 0,
"opdata": "",
"event_name": "",
"uuid": "",
"functions": [
{
"functionid": 32946,
"itemid": 44976,
"triggerid": 23238,
"parameter": "$,,"like","A"",
"function": "find"
}
],
"tags": []
}
],
"id": 3
}
2023-06-30 08:31:44 : - Item ID taken from trigger (first) function = 44976
2023-06-30 08:31:44 : # Retrieve ITEM information
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"item.get","params":{"itemids":"44976","output":"extend"},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":4}
2023-06-30 08:31:44 : > Received 1014 bytes
2023-06-30 08:31:44 : > Item data
{
"jsonrpc": 2,
"result": [
{
"itemid": 44976,
"type": 2,
"snmp_oid": "",
"hostid": 10583,
"name": "SSL Certificate Grade",
"key_": "ssllabs.certificate.grade",
"delay": 0,
"history": "90d",
"trends": 0,
"status": 0,
"value_type": 4,
"trapper_hosts": "",
"units": "",
"formula": "",
"logtimefmt": "",
"templateid": 44974,
"valuemapid": 0,
"params": "",
"ipmi_sensor": "",
"authtype": 0,
"username": "",
"password": "",
"publickey": "",
"privatekey": "",
"flags": 0,
"interfaceid": 0,
"description": "",
"inventory_link": 0,
"lifetime": "30d",
"evaltype": 0,
"jmx_endpoint": "",
"master_itemid": 0,
"timeout": "3s",
"url": "",
"query_fields": [],
"posts": "",
"status_codes": 200,
"follow_redirects": 1,
"post_type": 0,
"http_proxy": "",
"headers": [],
"retrieve_mode": 0,
"request_method": 0,
"output_format": 0,
"ssl_cert_file": "",
"ssl_key_file": "",
"ssl_key_password": "",
"verify_peer": 0,
"verify_host": 0,
"allow_traps": 0,
"uuid": "",
"state": 0,
"error": "",
"parameters": [],
"lastclock":<PHONE_NUMBER>,
"lastns": 849702520,
"lastvalue": "A",
"prevvalue": "A"
}
],
"id": 4
}
2023-06-30 08:31:44 : # Retrieve HOST information
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"host.get","params":{"hostids":"10583","output":"extend","selectTags":"extend"},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":5}
2023-06-30 08:31:44 : > Received 533 bytes
2023-06-30 08:31:44 : > Host data
{
"jsonrpc": 2,
"result": [
{
"hostid": 10583,
"proxy_hostid": 0,
"host": "tffauto.no",
"status": 0,
"lastaccess": 0,
"ipmi_authtype": -1,
"ipmi_privilege": 2,
"ipmi_username": "",
"ipmi_password": "",
"maintenanceid": 0,
"maintenance_status": 0,
"maintenance_type": 0,
"maintenance_from": 0,
"name": "tffauto.no",
"flags": 0,
"templateid": 0,
"description": "",
"tls_connect": 1,
"tls_accept": 1,
"tls_issuer": "",
"tls_subject": "",
"proxy_address": "",
"auto_compress": 1,
"custom_interfaces": 0,
"uuid": "",
"inventory_mode": -1,
"tags": []
}
],
"id": 5
}
2023-06-30 08:31:44 : # Retreive HOST macro information
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"usermacro.get","params":{"hostids":"10583","output":"extend"},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":6}
2023-06-30 08:31:44 : > Received 36 bytes
2023-06-30 08:31:44 : > Host macro data
{
"jsonrpc": 2,
"result": [],
"id": 6
}
2023-06-30 08:31:44 : # Retrieve associated graphs to this HOST and the TRIGGER ITEMS
2023-06-30 08:31:44 : % postJSON: https://driftzabbix.intern.fremtind.no/api_jsonrpc.php
2023-06-30 08:31:44 : > POST data: {"jsonrpc":"2.0","method":"graph.get","params":{"hostids":"10583","itemids":["44976"],"expandName":1,"selectGraphItems":"extend","output":"extend"},"auth":"f2c7ca4b7adf70ec0525d9fef13c4291","id":7}
2023-06-30 08:31:45 : > Received 36 bytes
2023-06-30 08:31:45 : > Graphs data
{
"jsonrpc": 2,
"result": [],
"id": 7
}
2023-06-30 08:31:45 : # Matching retreived graph information with our trigger items
2023-06-30 08:31:45 : > Graphs found (matching/partial) = 0 / 0
2023-06-30 08:31:45 : # Setting up mailer
2023-06-30 08:31:45 : !! (8192) "Callables of the form ["Swift_SmtpTransport", "Swift_Transport_EsmtpTransport::__construct"] are deprecated" at line #36 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php"
2023-06-30 08:31:45 : !! (8192) "Callables of the form ["Swift_Message", "Swift_Mime_SimpleMessage::__construct"] are deprecated" at line #46 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php"
2023-06-30 08:31:45 : # Message ID =<EMAIL_ADDRESS>2023-06-30 08:31:45 : # Processing templates
2023-06-30 08:31:45 : + /usr/share/zabbix/templates/html.template
2023-06-30 08:31:45 : + /usr/share/zabbix/templates/plain.template
2023-06-30 08:31:45 : !! (2) "Undefined variable $p_recipient" at line #1421 of "/usr/share/zabbix/mailGraph.php"
2023-06-30 08:31:45 : !! (8192) "Callables of the form ["Swift_MimePart", "Swift_Mime_MimePart::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php"
2023-06-30 08:31:45 : # Attaching logs to mail message
2023-06-30 08:31:45 : !! (8192) "Callables of the form ["Swift_Attachment", "Swift_Mime_Attachment::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php"
2023-06-30 08:31:45 : !! (8192) "Callables of the form ["Swift_Attachment", "Swift_Mime_Attachment::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php"
<EMAIL_ADDRESS>2023-06-30 08:31:45 : = Log stored to /usr/share/zabbix/log/log.103.20230630083145.dump

Working on it - spotted issue with #1421 of main code. Apologies for that - correcting right now.
Deprecation messages are irrelevant to the issue (and will be resolved shortly).

I think the issue is related to a source copy issue I've suffered from during my initial v2.10 update.
Can you please pull the latest mailGraph.php from the repo and put that into position and retry?

That has enabled the emails again :)
I see the following errors when running php mailGraph.php test:
2023-06-30 08:43:32 : # Matching retreived graph information with our trigger items
2023-06-30 08:43:32 : > Graphs found (matching/partial) = 0 / 0
2023-06-30 08:43:32 : # Setting up mailer
2023-06-30 08:43:32 : !! (8192) "Callables of the form ["Swift_SmtpTransport", "Swift_Transport_EsmtpTransport::__construct"] are deprecated" at line #36 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php"
2023-06-30 08:43:32 : !! (8192) "Callables of the form ["Swift_Message", "Swift_Mime_SimpleMessage::__construct"] are deprecated" at line #46 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php"
2023-06-30 08:43:32 : # Message ID =<EMAIL_ADDRESS>2023-06-30 08:43:32 : # Processing templates
2023-06-30 08:43:32 : + /usr/share/zabbix/templates/html.template
2023-06-30 08:43:32 : + /usr/share/zabbix/templates/plain.template
2023-06-30 08:43:32 : !! (8192) "Callables of the form ["Swift_MimePart", "Swift_Mime_MimePart::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php"
2023-06-30 08:43:32 : # Attaching logs to mail message
2023-06-30 08:43:32 : !! (8192) "Callables of the form ["Swift_Attachment", "Swift_Mime_Attachment::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php"
2023-06-30 08:43:32 : !! (8192) "Callables of the form ["Swift_Attachment", "Swift_Mime_Attachment::__construct"] are deprecated" at line #30 of "/usr/share/zabbix/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php"
<EMAIL_ADDRESS>Not sure if they are an error or just a notification.

Oh wait the timestamp is off so they must be old, sorry about that.

These are notifications :-).
Issue #36 will take care of  the replacement of SwiftMailer as the last component with deprecation issues.

Working on v2.11 to replace SwiftMailer with Mailer. Requires refactoring and testing.


Deploy base adopta installation

From @hackajesse on October 21, 2015 17:2
Based on the backgrounding, we need to figure out which fork is best to start from and where it will go
Copied from original issue: sfbrigade/adopt-a-drain.old#3

@therebelrobot would you say this is finito?

@hackajesse, I think this is complete.  We opted to fork CfA's most recent version, which was significantly more current that a fork I found that Oakland was running.


Extends 'aad o365group teamify' command with support for using mailNickname identifier. Closes #2669

Extends aad o365group teamify command with support for using mailNickname identifier. Closes #2669

Thank you! We'll review it asap


Improve Font

I would love to give the website an appealing font as the current font does not look attractive. I will change the font type and its colors and make it more appealing. Please assign it to me under GSSoC'24 and don't forget to add level to the issue.

@nimitagarwal26
We have already identified this issue, and it is currently being addressed in #148. You can follow the progress and participate in the discussion there.
To keep our issue tracker organized, I will be closing this issue.


Connection refuse when talking to weave.sock

Not sure if this ticket should be in weave side or registrator side or if it's just me missing something.
Since this got merged in weave https://github.com/weaveworks/weave/issues/117#issuecomment-124075671
I was expecting to be able to do something like this for storing the weave ip per service in consul:
docker run -v /var/run/docker.sock:/tmp/docker.sock -v /var/run/weave.sock:/var/run/weave.sock -e DOCKER_HOST=unix:///var/run/weave.sock  gliderlabs/registrator -internal -resync=120 consul://<IP_ADDRESS>:8500

or just
docker run -v /var/run/weave.sock:/tmp/docker.sock gliderlabs/registrator -internal -resync=120 consul://<IP_ADDRESS>:8500

However I got:
2015/10/26 17:08:00 Listening for Docker events ...
2015/10/26 17:08:00 dial unix /var/run/weave.sock: connection refused
The weave proxy is working fine out of the context of registrator so I can run new containers and get the weave ip with docker inspect.
Thanks

Nevermind, I got it working but registrator is now registering the host ip even when running with -internal. I'll close this and open a new ticket if needed later.


Camera Offset Locked to One Axis

Project Type
2D
Feature Description
Allowing the Phantom Camera to only follow the follow_target along one axis, and for the 'axis lock' to be toggled on and off during runtime to accommodate different uses. Currently it only follows both x and y positions.
Use Cases
A popular use case would be 'platform snapping' where the camera only follows the player along the X axis when jumping, and both X and Y when grounded.  This makes the camera 'snap' to platforms. This is used in Donkey Kong Country 2 and the modern ones, and also in Super Mario World and onward.
Here is a preview of it in my game using Phantom Camera:

This preview just switches the follow_target when jumping to a marker2D that only follows the player's X position, which causes an undesirable small delay as the Marker2D slightly lags behind the player. I'm relying on the damping values to ensure a smooth transition back to the player when switching follow_target.
It would be preferable to lock the camera to the x axis while still following the player during a jump, then unlock the axis when the player lands to allow following both X and Y (would require some kind of tween/damping to get back to the target?)
(Optional) Proposed Solution
Possibly a bool that locks x or y axis of the follow_target that you could change true or false at any time like the other inspector values.
Maybe use the camera's damping value or tween resource to reference while snaping back into place after the axis is 'unlocked' to avoid an unwanted instant transition.

Think this is a good idea!
Practically, think the solution would be a case of supporting both a property in the inspector to enable/disable individual axis and programmatically in cases where you want to change it during runtime.
Only other comment is that I think the proposal also applies to 3D scenes, hence the added tag.


Ignore only announce error only

Ignore only announce error only
Untill now any thrown exception within announce creation and its
execution in Announcer#start were ignored.
Exception during announce execution are typically logged in
ExponentialBackOff. While exceptions during announce creation are just
swallowed. This may lead to serious problem as no error is reported and
discovery mechanism is disabled.

I had an underscore in a hostname. Underscores are disallowed for hostname (URI). However java URI class (its default constructor) does not throw any exception, but internally sets hosts to null. When announce request was created it tried to access uri.host which thrown NPE. This NPE was swallowed by try-catch in Announcer.
It took couple of hours to diagnose the issue. It think this PR will be helpful for others which get into the same situation.

Merged, thanks!


Message Collector (non)blocking start functions

This adds two new functions to MessageCollector
start() provides a non-blocking approach, for if you do not care if you get a result.
wait() provides a blocking approach, this will sit and wait until either timeout, or a verified message is returned.
One of them MUST be called after instantiating a MessageCollector or it will not run
All usages of MessageCollector were updated, the only blocking one is within the enable command for mod logs.

Very nice yes mmmmmmmmmm


Change rootless required function and privilege decision

This fixes various checks that we do with regard to root user, in order to make rootless containers work properly.
Primarily, we not only check that the uid of user is 0, but along with that we also check the uid map file to see if available range is max. If the range is not, that means we are in a new user namespace, and thus might not be actual root user, and thus we should not do things that requires root user permissions. This is 2nd out of 3 PRs for making youki work with podman in rootless. Even though even with this PR youki still does not work with podman in rootless mode (as dbus connection is still incorrect), I have merged this branch with my dbus->zbus branch and tested that with correct dbus connection logic, youki works with podman in rootless context. The main validation for this right now is that this PR does not change/break any existing functionality.

A side note that I noticed while making this : not all logs and errors that we are generating are actually getting displayed when using youki. For example, as of now, we verify the binary before running the container, and error if it does not exist. However, the podman log simply errors out, not showing anything, whereas with runc proper log of missing executable is shown :
# Youki
podman run --runtime $PWD/youki busybox /bin/bash
DEBUG youki: started by user 0 with ArgsOs { inner: ["...../youki/youki", "delete", "--force", "9c937d43d590695b71556382fd6d9f4baa51c9780c7969b94e7c7753ad542487"] }
DEBUG youki::commands::delete: start deleting 9c937d43d590695b71556382fd6d9f4baa51c9780c7969b94e7c7753ad542487
Error: container create failed (no logs from conmon): EOF

# runc
podman run --runtime runc busybox /bin/bash
Error: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: OCI runtime attempted to invoke a command that was not found

I'm pretty sure that we are generating similar error and propagating that upwards. This is similarly observed in actual journalctl logs (after always enabling them for debug in this PR) , that not all of tracing logs are shown. cCan this be because with namespace change that we do in intermediate/init process, those logs are not getting forwarded properly?

Codecov Report

Merging #2279 (e8d347a) into main (ac81ef7) will decrease coverage by 0.14%.
Report is 8 commits behind head on main.
The diff coverage is 20.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2279      +/-   ##
==========================================
- Coverage   65.00%   64.86%   -0.14%
==========================================
  Files         129      129
  Lines       15153    15155       +2
==========================================
- Hits         9850     9831      -19
- Misses       5303     5324      +21

Feel free to merge it after reacting to yihuaf 's comment.

Feel free to merge it after reacting to yihuaf 's comment.

Hey sorry, I was busy with some other stuff. I still have to respond to that and add tests as you had suggested, will try to get it done in this weekend

Hey @utam0k , can you help me out regarding to tests that you have suggested? I was trying to write a unit test that would check for various conditions of the if-statement that I have added. However to do that, I'll need to basically setup the whole container dir with the intended spec and the bundle. Setting up the spec is straightforward, but I'm not sure how I should setup the bundle dir in unit tests. I couldn't find any other existing tests which do that either.
I can add individual unit tests for testing is_in_new_userns and rootless_required by doing fork and test ; but that is a little tedious too. Can you suggest me some approach to add tests for this?

Hey, actually I thought a bit more, and I think I have figured out a cleaner way, which also makes writing the tests easier, so I'll do that and push for review.

@utam0k Is it fine if I merge this now? I have also addressed yihuaf's comment in the last commit


fix Overflow in download analysis metadata

Coverage increased (+0.0006%) to 91.071% when pulling 554bd63bef2ee36677f9c98c998649bfb81893ba on antgonza:fix-Overflow-download-analysis-metadata into b64822188f2943ed476ec2834153c0348f600b19 on qiita-spots:dev.

@wasade, finally passing; could you take another look? Thank you.

Thanks @wasade !


Feat/dataverse preliminary spec

This PR introduces the specification for the Dataverse smart contract, designed to manage all resources within the dataverse. As an initial effort, this specification outlines the essential operations necessary for a MVP, catering specifically to the first requirements of the dataverse portal.
Design Philosophy:
The API and message design philosophy is deeply rooted in the structure of the ontology, which is split into two primary parts:

Core part This foundational layer defines the basic constituents of the dataverse and the relationships between them. It provides the structural backbone, ensuring organized and systematic resource modeling.
Metadata part: Serving as a dynamic expansion module, the metadata segment is what gives the dataverse its great scalability and extensibility, allowing the addition of semantic data describing resources.

Future iterations will build upon this foundation, introducing more advanced features and functionalities.

size-limit report 📦

Path
Size

target/wasm32-unknown-unknown/release/okp4_objectarium.wasm
428.74 KB (0%)

target/wasm32-unknown-unknown/release/okp4_law_stone.wasm
636.62 KB (0%)

target/wasm32-unknown-unknown/release/okp4_cognitarium.wasm
759.09 KB (0%)


Load preprocessor directive inconsistent with Addin

What You Are Seeing?
When using load pre-processor directive and nuget scheme, "&prerelease" does not pull a pre-release nuget package, as described in the docs for addin directive with nuget scheme (https://cakebuild.net/docs/fundamentals/preprocessor-directives)
What is Expected?
#load "nuget:?package=utilities.cake&prelease" would pull the latest package, including prelease ones.
What version of Cake are you using?
0.25.0
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on?  Windows? Linux? Mac?
Windows
Additional notes
In researching the code, I did figure out I could use &prerelease=true as a workaround. But this conflicts with the documentation.

@richardgavel That should work afaik.
I noticed that you spelled prerelease wrong in your load directive. Can you try changing it to #load "nuget:?package=utilities.cake&prerelease" and see if it works as expected.

This has been fixed via https://github.com/cake-build/cake/issues/2595 and will be available in Cake v1.0.0 RTM.
You can test it today with the release candidate Cake v1.0.0-rc0002.

Closing as Duplicate of https://github.com/cake-build/cake/issues/2595

This has been fixed via https://github.com/cake-build/cake/issues/2595 and will be available in Cake v1.0.0 RTM.
You can test it today with the release candidate Cake v1.0.0-rc0002.

Closing as Duplicate of https://github.com/cake-build/cake/issues/2595


use collection hashmap

Used collection concurrrent hashmap in managers

Coverage decreased (-0.1%) to 48.922% when pulling f7c6f48d485a8b7fb0c98464353f2108249e30c1 on devghosh:manager_update into 03933c23341968af8fc1ee47e3b5b210a7ac4ceb on jabong:master.

Coverage decreased (-0.1%) to 48.922% when pulling f7c6f48d485a8b7fb0c98464353f2108249e30c1 on devghosh:manager_update into 03933c23341968af8fc1ee47e3b5b210a7ac4ceb on jabong:master.


Events show/hide for default routers

I know when should be called show event for default views... but what about hide event?
Let's wait for the first use case that requires a show/hide events. For a while, let's say that those two events should be present. Someday I'll develop them.

Still isn't defined the case when

nested default routers
hide event

Take this issue in count at #31


Extend RouteBasedCollectionStrategy

I am trying to modify the default fields which appear in a collection response. In particular I'm filtering and paginating my collection and, beside _total_items I would like to have also other fields like _total_items_without_filters and _total_items_with filters_but_without_pagination.
The fact is that inside RouteBasedCollectionStrategy, the creation of the resource happens in the private method extractIterator which is called by the private method extractCollection, which requires also the presence of the method extractPaginator.
All of this said, to add a new field to the resource I must extends the RouteBasedCollectionStrategy class, copy and paste all the above mentioned methods, just to edit the line $data = ['_total_items' => $count];
It would be nice if just the creation of the $data could be exposed, at least in a protected method, so that modifying it could become easier

This repository has been closed and moved to mezzio/mezzio-hal; a new issue has been opened at https://github.com/mezzio/mezzio-hal/issues/5.


tnse gene visualization

The following snippet adapted from the scvi.inference.posterior.show_t_sne plots a tsne representation of subsampled dataset.
latent, batch_indices, labels = trainer.train_set.get_latent(sample=True)
latent, idx_t_sne = trainer.train_set.apply_t_sne(latent, n_samples)
batch_indices = batch_indices[idx_t_sne].ravel()
labels = labels[idx_t_sne].ravel()
plt.scatter(latent[:, 0], latent[:, 1])

Currently show_t_sne only has the option to color by batches and/or labels. Is there a way to color by normalized gene expression or by ?
It would be very useful for visualizing datasets that do not already have cell type labels.
The get_latent function loops through the tensors to get the latent representation. How does one loop through the tensors to get the normalized gene expression values or ? So that we can color the scatter plot by passing it in as an argument like
plt.scatter(latent[:, 0], latent[:, 1], c=gene_value)

Hi Rachel, thank you for raising your concern, the method trainer.get_latent_and_imputed_values()  loops through the tensors to provide the latent representation, the imputed values and the normalized imputed values (which you are interested in) for all cells (whereas using the methods with train_set only treats a subsampled part of the dataset). This is shown in the Obtaining the imputed values for the whole dataset after the training section of the basic_tutorial notebook . In this notebook it is also explained how to obtain the latent representation of all cells rather than just the ones sampled in train_set.
After recovering these you can compute the TSNE transformation of the latent representation of the cells and color the scatter plot with the normalized gene expression level by doing:
dic = trainer.get_latent_and_imputed_values()
latent, normalized_gene_value = dic["latent"], dic["scaled_imputed_values"]
tsne_latent, idx_tsne = trainer.train_set.apply_tsne(latent)
plt.scatter(tsne_latent[:, 0], tsne_latent[:, 1], c=normalized_gene_value[idx_tsne])

PS: apply_tsne won't use trainer.train_set, it is a static method so it will use the latent representation of all cells that we give it as an argument.


displaying javascript errors without any reason in v1.11

i update my brackets to version 1.11 , but it displays javascript errors without any reason like below screenshot. also "assigning a variable without using" is not a error is a WARNING! some of variables i defined in another js files , but brackets says 'it is not defined' !

Hi @salehmosleh,
consider adding a .eslintrc file to your project for adjusting how ESLint behaves. You can find the configuration options here: https://eslint.org/docs/user-guide/configuring.
For example for variables in different files, add them as globals either with
{
    "globals": {
        "var1": true,
        "var2": true
    }
}

or inline (top of the file) with
/* global var1, var2 */

Hi @petetnt , thank you for your comment.
I think , brackets has to make and add .eslintrc file to my project by default configuration options at the first time. Not me! You know , it's not fair , 'mixed spaces and tabs' is not an error even its not a warning. But brackets says 'ERROR'. And many things like this ...

I understand your frustration. As there's as many possible combinations of options as there are projects, it's not quite possible to create a one-size-fit-all configuration. However, there are many popular ones like https://www.npmjs.com/package/eslint-config-airbnb and https://www.npmjs.com/package/eslint-config-standard that aim to unify rules used into a common best practice set. Project that haven't been coded against a linter before might be cumbersome to adapt into, but it also might be worth it. Remember that you can also start from just a few rules and turn on more if you want to in the future. Also did you know that you can fix many simple issues with Right Click -> Auto-fix with ESLint? That would solve small issues like mixed tabs/spaces.
That said, you can also turn linting off altogether by setting linting.enabled to false in preferences (or Edit -> Lint files on save)

Is there any way to get something closer to sublime text's default javascript linting? The linting by default is enough to make me not use Brackets, despite it being preferable for development in so many other ways. Maybe I'm just way too unfamiliar with js standards, but having it flag every single time I use console.log, and having to be sure to copy every single global variable and function into a linter file is annoying and makes the linting effectively useless because it crys wolf so much.

@whryan
Hi,
no idea how Sublime Text lints files by default, but .eslintrc.js file is the de-facto way of configuring ESLint.
For example for disabling no-console, you can use
module.exports = {
    rules: {
        "no-console": 0,
         ... other rules ...
    }
}

Alternatively you can extend the recommended config and disable the rules you don't need (https://eslint.org/docs/rules/).
If you find linting distracting you can also disable it altogether from preferences.
See https://eslint.org/docs/user-guide/configuring for complete documentation.

Ah thank you! I should have looked for a manual more, really appreciate
that you linked this
On Wed, Nov 29, 2017 at 1:38 AM, Pete Nykänen<EMAIL_ADDRESS>wrote:

@whryan https://github.com/whryan
Hi,
no idea how Sublime Text lints files by default, but .eslintrc.js file is
the de-facto way of configuring ESLint.
For example for disabling no-console, you can use
module.exports = {
rules: {
"no-console": 0,
... other rules ...
}
}
Alternatively you can extend the recommended config and disable the rules
you don't need (https://eslint.org/docs/rules/).
If you find linting distracting you can also disable it altogether from
preferences.
See https://eslint.org/docs/user-guide/configuring for complete
documentation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/13734#issuecomment-347804547,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHu0AT0mfoZ4DmV_ZakMHk_EIKLtT6fOks5s7SYlgaJpZM4PklQD
.


Error running npm run dev with Turborepo 2.0.1+ and Node.js installed via asdf

Verify canary release

[X] I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue
n/a
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.1, 2.0.2-canary.1
Describe the Bug
After updating to the latest version (2.0.1), I find that when I run npm run dev, an error appears saying: .asdf/plugins/nodejs/shims/npm: line 14: HOME: unbound variable. My Node.js installation is through asdf. If you do not have Node.js installed by asdf, this problem will not occur for you. Even with canary releases, I have tested every version starting from 2.0.0 up to this point but still nothing changes about it; the only difference is that all previous ones worked well unlike now where they fail altogether.
Expected Behavior
Running the command npm run dev should not result in any errors and should start the development server as expected.
To Reproduce
Have nodejs installed with asdf, a monorepo with turbo 2.0.1, and run npm run dev
Additional context
No response

@NicholasLYang, thanks for your reply! Everything works.


Update cla.yml

Signed-off-by: Johannes Lampel<EMAIL_ADDRESS>

@microsoft-github-policy-service agree company="Microsoft"

What's the difference here as compared to #3? They look identical to me.


why require.resolve is set to cwd ?

https://github.com/glromeo/esbuild-sass-plugin/blob/ccfa67a1ffcbbf0bc117b19a239e457e469c280e/lib/utils.js#L6
when my esbuild cli was installed in global，and also installed node-sass, then get:
Cannot find module 'node-sass', make sure it's installed. e.g. yarn add -D node-sass Error: Cannot find module 'node-sass'

But, i don't want to install  'node-sass' in my   project directory, because it only need in building time and has nothing to do with the project business.

@visamz I would suggest you to use dev dependencies instead of global for development tools in  order to keep your project neatly self contained.
Nevertheless I see I made a mistake assuming resolve would fall back to global modules if it can’t find them locally and I want to look into fixing that without requiring the users to fiddle with environment variables, links or other annoying shaman rituals!

@visamz please update to v1.5.1. From that version includePaths will be used by require.resolve and you can get your build to work like explained in the examples provided in the test/issues/25 folder

Thanks.
er, maybe i said was not clear....
I am making cli tool for my team with  esbuild, it can be installed in global.  The tool contain node-sass,  be installed in dev dependencies at cli tool dir, but not in bussiness dir.
That means, cli tool dir is not bussiness project dir, node-sass was not installed in global. Of course , node-sass  may also be installed globally.
I think,  esbuild-sass-plugin would auto find node-sass or other pakcage in recusive path，which is better than set only one includePath. What do you think ？

I think be better like this:
try {
    return require(module)
} catch (e) { }

try {
    return require(require.resolve(module, includePaths ? { paths: includePaths } : { paths: [process.cwd()] }));
}
catch (e) {
    console.error(`Cannot find module '${module}', make sure it's installed. e.g. yarn add -D ${module}`, e);
    process.exit(1);
}

Admittedly I am a bit confused by your explanation but I understand what you want to do with your code example.
You will find the change in v1.5.2...
https://github.com/glromeo/esbuild-sass-plugin/blob/9759a6ff4b698acd7126b7237a10ff549b43389b/src/utils.ts#L6-L17
NOTE: Finding a co-located tool is an exception not the rule
I hope this helps, please let me know if it does!

@glromeo That's worked,  thinks.


Setting up status checks files

Setting up status checks files

other than that one change looks good to me, although curious if @phildarnowsky-broad has any other suggestions for status checks/basic repo setup

other than that one change looks good to me, although curious if @phildarnowsky-broad has any other suggestions for status checks/basic repo setup

I can get by in Python but my knowledge of it is still fairly basic, so I'm not clear on what the established best practices are for setting up a new project. One suggestion I would make in general, though, which (I may have missed it) it looks like you haven't yet done here, would be to add support for automated tests, and to get in the habit of writing them as you go. Writing tests takes practice, and it will slow your coding down at first, but it turns out that the ROI on time spent writing them is very high, because you spend so much less of your time fixing bugs that got through to production.

We decide not to set up the automated tests as for now, since the code in this repo won't be reused as much as gnomad_method.

@averywpx @klaricch I had a look around, and this looks like a very good introduction to testing in Python, if you might find such a thing useful: https://realpython.com/python-testing/

This looks like a great resource. I've been meaning to look into automated tests and think it would be good for the team to incorporate in the future - thanks @phildarnowsky-broad !

Glad to help! Hope you find that useful. And I really can't overstate how
strongly I recommend automated tests; for certain reasons, they're
especially important if you're working in Python or a similar language.
On Mon, Aug 29, 2022 at 11:23 AM klaricch @.***> wrote:

@averywpx https://github.com/averywpx @klaricch
https://github.com/klaricch I had a look around, and this looks like a
very good introduction to testing in Python, if you might find such a thing
useful: https://realpython.com/python-testing/
This looks like a great resource. I've been meaning to look into automated
tests and think it would be good for the team to incorporate in the future

thanks @phildarnowsky-broad https://github.com/phildarnowsky-broad !

—
Reply to this email directly, view it on GitHub
https://github.com/broadinstitute/gnomad-constraint/pull/2#issuecomment-1230469038,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZQ2NNOKQY2VLQWZFVWFG3DV3TIVPANCNFSM57B4SZJA
.
You are receiving this because you were mentioned.Message ID:
@.***>


__scanCodes is not defined

Help me, please !!!

This is my "babel.config.js"

plugins: [     [       'react-native-reanimated/plugin',       {         globals: ['__scanQRCodes'],       },     ],   ],

i tried:

project.ext.react = [     enableHermes: false ]
project.ext.react = [     enableHermes: true ]
yarn start --reset-cache

All are not working.

react-native: 0.70.1
vision-camera-code-scanner: 0.2.0
Mac M1
Android Device

I resolved with that: https://github.com/rodgomesc/vision-camera-code-scanner/issues/79#issuecomment-1276041982

Try adding one line to the file 'VisionCameraCodeScanner.m' as shown below.
@interface VISION_EXPORT_SWIFT_FRAME_PROCESSOR(scanCodes, VisionCameraCodeScanner)
-(void)stub {}
@end

Try adding one line to the file 'VisionCameraCodeScanner.m' as shown below.
@interface VISION_EXPORT_SWIFT_FRAME_PROCESSOR(scanCodes, VisionCameraCodeScanner) -(void)stub {} @EnD

Where is the
path of this file?

One of the branches says that the fix was made in version 2.15.2, but I still have this error in android.

I still have this error running from the example.

plugins: [[
'react-native-reanimated/plugin',
{
globals: ['__scanCodes'], // https://github.com/rodgomesc/vision-camera-code-scanner
}
]]
I have '__scanCodes' instead of '__scanQRCodes' and it works for me

the issue happens on Android with typescript enabled.

"react-native": "0.69.4"
"react-native-vision-camera": "2.15.2"
"vision-camera-code-scanner": "^0.2.0

This problem has bothered me for a long time, after update react-native-vision-camera to 2.15.2, this error disappear.


How would you disable the input fields while not using editMode ?

any workaround ? @eppili

@eppili can you please be more specific?

Well, after generating the cron job. I just want to make the select boxes disable. Is there a way we could disable select boxes ? Because ngDisabled is not working on it.
()


feat: Add support for 'bun' package manager

fixes: #1078
This commit introduces support for the 'bun' package manager in the
TypiaSetupWizard and updates the documentation accordingly.
If you created a new feature, then create the unit test function, too.
# COMPILE
npm run build

# RE-WRITE TEST PROGRAMS IF REQUIRED
npm run test:template

# BUILD TEST PROGRAM
npm run build:test

# DO TEST
npm run test

Learn more about the CONTRIBUTING

Also I addedd the test with bun!

@samchon
Then, I'll use dax's which command

I don't know about bun a lot.
Does build.yml test both on NodeJS and Bun?

Yes it runs on Bun!
Take a look at The CI Result
You can search it with the term of Bun

Okay, good.
At last, would you fix the confliction of setup.mdx file as you want?

@samchon I resolved conflicts!

Merged, but it would better to introduce on unplugin-typia section as an example.
Wait for your PR.
https://jsr.io/@ryoppippi/unplugin-typia/doc/bun/~/default

@samchon OK!


Add TLS support for Elasticsearch connections

Work completed by @paramite

I'm planning to try and test all of this today.

I have now tested all this functionality, and everything is working including both the InsecureSkipVerify for both true and false values (which is set based on TlsServerName being set or not being set).
I adjusted the cert_generation.sh script as well in the telemetry-framework repo to apply the altNames such as elasticsearch.sa-telemetry.svc which allowed me to connect the SG using the TlsServerName: elasticsearch.sa-telemetry.svc.
Output of started up events consumer smart gateway:
2019/09/16 15:47:26 events.go:129: AlertManager disabled
2019/09/16 15:47:26 events.go:135: API disabled
2019/09/16 15:47:26 events.go:141: AMQP1.0 Publish address disabled
2019/09/16 15:47:26 events.go:100: Debug:Config saconfig.EventConfiguration{Debug:true, AMQP1EventURL:"qdr-white.sa-telemetry.svc.cluster.local:5672/collectd/notify", ElasticHostURL:"https://elasticsearch.sa-telemetry.svc:9200", API:saconfig.EventAPIConfig{APIEndpointURL:"", AMQP1PublishURL:""}, AlertManagerURL:"", AlertManagerEnabled:false, APIEnabled:false, PublishEventEnabled:false, ResetIndex:true, Prefetch:0, UniqueName:"cloud1-notify-smartgateway", ServiceType:"events", IgnoreString:"", UseTls:true, TlsServerName:"elasticsearch.sa-telemetry.svc", TlsClientCert:"/config/certs/admin-cert", TlsClientKey:"/config/certs/admin-key", TlsCaCert:"/config/certs/admin-ca"}
2019/09/16 15:47:26 events.go:153: Connecting to AMQP1 : amqp://qdr-white.sa-telemetry.svc.cluster.local:5672/collectd/notify
2019/09/16 15:47:26 events.go:156: Listening.....
2019/09/16 15:47:26 events.go:158: Connecting to ElasticSearch : https://elasticsearch.sa-telemetry.svc:9200
2019/09/16 15:47:26 client.go:98: InsecureSkipVerify is set to false
2019/09/16 15:47:26 receiver.go:103: Status received...
2019/09/16 15:47:26 client.go:98: Debug:ElasticSearch client created.
2019/09/16 15:47:26 events.go:196: Ready....

At this point I'm ready to merge this down if everyone else is OK with it.


Adding the Cardia Incentive to Bahamut when Dragon's Hoard is enabled.

This is definitely not because I forgot the hoard was enabled two seeds in a row or anything...

You will need to update the zip file as well because that is what is actually used.
Manifest and repository.json versions need to be increased (should be a minor version update)

Just waiting on the updated versions

Zip, manifest and repository have all been updated. I was going to try to link the hoard to the rest of the Cardia islands for Overworld mode, but something's messed up with how visibility is working. I'll play with it in my spare time and submit another PR if I can get that figured out.


[SPARK-12010][SQL] Spark JDBC requires support for column-name-free INSERT syntax

Can one of the admins verify this patch?

(For those keeping score this is a continuation of https://github.com/apache/spark/pull/10003 )
This is not required here or anything, but FYI you may want to manually squash and force-push your branch if you're starting over to collapse the merge commits and so on. The merge script will do it anyway but sometimes it's useful even during review. No action here though.

NAVER - http://www.naver.com/
<EMAIL_ADDRESS>님께 보내신 메일 <Re: [spark] [SPARK-12010][SQL] Spark JDBC requires support for column-name-free INSERT syntax (#10066)> 이 다음과 같은 이유로 전송 실패했습니다.

받는 사람이 회원님의 메일을 수신차단 하였습니다.


Upgrade Flurl.Http to v4 and Json serialization refactor

Upgraded Flurl.Http to v4.0.
Migrated NewtonsoftJson to System.Text.Json and refactored all existing logic for serialization/deserialization.
Including Keycloak export JSON file for assisting in tests execution.
Support for .NET 8 (required for supporting deserialization of certain special values to enums by STJ).
Cleanup, small fixes and optimizations.
Tested against Keycloak v25.0
Closes #47

@CesarD thanks for all your help here, sorry it took so long to go through, it was a little tedious checking all 243 files 😄

Yeah, I knew it was going to take some time to review with so many files 😅

I saw that you have added a Keycloak Realm export, does this mean that you were able to get all of the tests running again? If so would you mind putting together a short README for the setup process?

Indeed, I got them all working like I mentioned in the issue, with only a handful of them still not working so I left them with the Skip attribute as they were.
The setup process was actually really simple as it was defined: Add an appsettings.json with the url, username and password. It took me more time to understand the hidden assumptions beneath it all, and then replicate all the stuff in the additional realm the tests were expecting because it became a whack-a-mole game running tests and fixing/creating stuff one after the other 😅.
I can add this in the README, sure.

I think it's OK to assume that the person running the tests will know how to install Keycloak, so I think so long as it includes the Keycloak version, and a template appsettings.json file then that should be sufficient.

Ok, so you prefer to have a default appsettings.json included? It was excluded explicitly in the original repo, that's why I'm asking. But I can set it up with a default one and leave everything explained in the README.

Ok, so you prefer to have a default appsettings.json included? It was excluded explicitly in the original repo, that's why I'm asking. But I can set it up with a default one and leave everything explained in the README.

@CesarD if you could add an appsettings.json file then I would be OK with that. I think that the reason it was originally excluded was probably because the developer of the original repo (this is one is forked from) was testing against their own database with real credentials, and didn't want to expose those to the world. If it is just admin/admin I don't think it's a bit deal.

Ok, I've just added the tests instructions and the default appsettings.json to the repo with the default credentials.
Please let me know if everything looks good to you.

Perfect, thanks again for all of your help with this!


fix: the rendering order of transform and clip effects

Rendering clip effects before rendering transform effects would lead to a wrong clip area.
Test plan (required)
reftest-diff
Closing issues

Fixes #2825

Can you elaborate? I don't understand the issue clearly.

Can you elaborate? I don't understand the issue clearly.
Please refer the demo(https://codepen.io/zeahan/pen/Vwrpdwm) in https://github.com/niklasvh/html2canvas/issues/2825,. This demo shows the difference between the original HTML and the canvas rendered, whitch is a problem caused by the incorrect order of applying transform effect and clip effect.
This diagram explains the detailed reason:

Can you elaborate? I don't understand the issue clearly.

Please refer the demo(https://codepen.io/zeahan/pen/Vwrpdwm) in https://github.com/niklasvh/html2canvas/issues/2825. This demo shows the difference between the original HTML and the canvas rendered, whitch is a problem caused by the incorrect order of applying transform effect and clip effect.
This diagram shows the detailed reason:

Ok. I merged. Can be tested in @cantoo/html2canvas


Package Compiler version from Running Compiler

I've ran into this issue a few times while using the ApiFirstMediatR.
I think anytime Microsoft.CodeAnalysis.CSharp is bumped a version we run into this issue.
Ref: https://github.com/alexcampana/ApiFirstMediatR/pull/64
'...ApiFirstMediatR.Generator.dll' references version '<IP_ADDRESS>' of the compiler, which is newer than the currently running version '<IP_ADDRESS>'

This stacks answer explains it: https://stackoverflow.com/a/72670807/4585661

That makes sense, I'll roll it back to the earliest .NET 6 version since that's the lowest version we support


Update README.md

Renamed LifeMushroom to Apexton

Thank you!

really now

@LifeMushroom What'a the issue?


[Fix] [Translations] [English]: Syntax fix and format tip section

I didn't notice the target branch is feat/english-transpations. What is the purpose of that branch? When would it be merged into main? Why would we ever want the original docs and the English translation to diverge? (What is even the difference?)


[Documentation Issue] Public properties are not listed in documentation

Page Name: pubsub-subscription
Release: 0.14.0
Though the name, topic, ack_deadline and push_endpoint properties are public properties of the subscription object, this is not shown anywhere in the documentation. It is very _Pythonic_ to expose constructor properties as public properties but notating as such in the documentation would be helpful.
The same can be said for topic objects.

@tseaver What's the cause here? Are these properties just data attributes, or do they have @property? Also, if they are just data attributes, does Sphinx have an Attributes section we could use in the class doc?

Defined via @property:  the docstrings for the resulting descriptors are copied from their getters.

Oops, I spoke in haste/error:  name, topic, ack_deadline, and push_endpoint are not properties.  To fix this, we would need to do one of two things:

Make them properties, backed by private attributes.
Give them class-level default values with their own docstrings.

Sphinx provides a directive for instance attributes as well: http://stackoverflow.com/a/8659919/1068170

There is also auto-attribute syntax, which feels nicer than embedding it in the class' docstring.

Wow I didn't realize we could even provide instance attribute docstrings in __init__!

Friendly ping.
dir(topic)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_client', '_require_client', '_timestamp_message', 'batch', 'check_iam_permissions', 'create', 'delete', 'exists', 'from_api_repr', 'full_name', 'get_iam_policy', 'list_subscriptions', 'name', 'project', 'publish', 'set_iam_policy', 'subscription', 'timestamp_messages']

but still not covered in https://googlecloudplatform.github.io/google-cloud-python/stable/pubsub-topic.html

We are in the process of working on a pretty significant change to this API, so for now I would prefer not shore up docs that we are about to need to change anyway.

@lukesneeringer We should probably re-open a "sub-issue" here, namely the idea that class attributes should be documented (especially if they aren't @property-s or constructor arguments)


Elemental v1.6.x Rancher Marketplace Release

Elemental v1.6.x has been released with an issue in the questions.yaml file of the elemental-operator helm chart.
Issue tracked in #837 .
If the next Rancher Marketplace release will be based on an Elemental v1.6.x ISB release missing the fix for #837 , the fix should be backported directly in the Rancher Marketplace release.

Blocked by the next Elemental v1.6.x release in the Rancher Marketplace.

Fix backported in the Marketplace PRs:
https://github.com/rancher/charts/pull/4444
https://github.com/rancher/charts/pull/4434


Enhancement: Enable and configure general_phpdoc_annotation_remove fixer

This PR

[x] enables and configures the general_phpdoc_annotation_remove fixer
[x] runs make cs

Follows #958.
💁♂ For reference, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.9.0#usage:

general_phpdoc_annotation_remove
Configured annotations should be omitted from phpdocs.
Configuration options:

annotations (array): list of annotations to remove, e.g. ["author"]; defaults to []

Thank you, @chartjes!


feat: backport rule 920620

This is the same as https://github.com/coreruleset/coreruleset/pull/3237, backported for the v3.3 branch.

For what it's worth, I've double-checked this on Nginx and confirmed that the backported rule is working correctly:
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/8.1.2
> Accept: */*
> Content-Type: application/json
> Content-Type: application/xml

2023/07/18 11:02:57 [info] 90#90: *41 ModSecurity: Warning. Matched "Operator `Gt' with parameter `1' against variable `REQUEST_HEADERS:Content-Type' (Value: `2' ) [file "/etc/modsecurity.d/owasp-crs/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "1179"] [id "920620"] [rev ""] [msg "Multiple Content-Type Request Headers"] [data "2"] [severity "2"] [ver "OWASP_CRS/3.3.5-dev"] [maturity "0"] [accuracy "0"] [tag "modsecurity"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [hostname "<IP_ADDRESS>"] [uri "/"] [unique_id "16896781777.479055"] [ref ""], client: <IP_ADDRESS>, server: localhost, request: "GET / HTTP/1.1", host: "example.com"
All good!


lollypop: 1.4.37 -> 1.4.39 and add kid3 as buildinput

Lollypop allows for metadata editing through kid3, which was missing from its derivation.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] 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
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 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.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/extrapackages-for-any-arbitrary-package/44917/6

Could you move the format, version bump and the new option into separate commits?
Otherwise diff LGTM.

Thanks for the feedback, changes are split now

Could you move the format, version bump and the new option into separate commits?
Otherwise diff LGTM.

Thanks for the feedback, split the changes into 3 commits


groupby apply using Grouper

I would like to use an arbitrary function on each group after using groupby with Grouper, but apply isn't working. The following example
import dask.dataframe as dd
import pandas as pd
pdf = pd.DataFrame({'A':[1, 2, 3, 4, 5], 'B':['1985','1985','1990','1990','1990']})
pdf['B']=pd.to_datetime(pdf['B'], format="%Y")
ddf = dd.from_pandas(pdf, npartitions = 3)
ddf.groupby(pd.Grouper(key='B', freq="Y")).apply(lambda x: x['A'].mean()).compute()

gives the error

ValueError: Length of passed values is 0, index implies 2

Versions:
dask: 2.13.0
pandas: 1.0.3

Thanks for the excellent issue report, I'm able to reproduce. I'm not super familiar with the use of Grouper in pandas, perhaps @TomAugspurger has some insights here?

Not especially. I think they are essentially a helper for generating the array of groups from some data (the column B resampled to yearly frequency in this case). But I'm not familiar with the details.

@brandonlockhart are you interested in seeing if Dask can support this? At a glance I'm not sure whether it's doable, since I don't know exactly where in groupby this Grouper gets translated to actual groups (and ndarray / Index).

If it does look impossible then we would want to update .groupby() to raise if any pd.Grouper objects are present.

Marked as "good first issue" for the latter suggestion of raising when encountering a Grouper. To actually solve using these objects is likely more involved.

Could somebody from the maintainers team, please, add a "dataframe" label to this when you get a chance, if you believe it'd be appropriate?

Just a note that as of https://github.com/dask/dask/pull/7857 we are raising a NotImplementedError. I'll leave this open in case someone wants to implement it :)


Coverlet in-proc data collector may crash with access violation because the type is null

We are investigating crashes during CI for an internal repo (VSLanguageServerClient), where the stack looks like this:
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection.InProcDataCollector.CreateObjectFromType Line 107	C#
>	Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection.InProcDataCollectionExtensionManager.CreateDataCollector Line 75	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection.InProcDataCollectionExtensionManager.InitializeInProcDataCollectors Line 124	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection.InProcDataCollectionExtensionManager.InProcDataCollectionExtensionManager Line 61	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.ExecutionManager.InitializeDataCollectors Line 156	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.ExecutionManager.StartTestRun Line 67	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler.OnMessageReceived.AnonymousMethod__3 Line 350	C#
Microsoft.TestPlatform.CrossPlatEngine.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler..ctor.AnonymousMethod__20_2 Line 92	C#
Microsoft.TestPlatform.CoreUtilities.dll!Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue<System.Action>.SafeProcessJob	Unknown
Microsoft.TestPlatform.CoreUtilities.dll!Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue<System.Action>.BackgroundJobProcessor	Unknown
Microsoft.TestPlatform.CoreUtilities.dll!Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue<System.__Canon>..ctor.AnonymousMethod__12_0	Unknown

The dataCollectorType is null here:
https://github.com/microsoft/vstest/blob/92f210040204079c42dea58aa3dd0f8f5999619e/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs#L104
The way dataCollectorType is assigned using Reflection is flaky:
https://github.com/microsoft/vstest/blob/92f210040204079c42dea58aa3dd0f8f5999619e/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs#L74-L83
There is no validation if the type can't be found:
https://github.com/microsoft/vstest/blob/92f210040204079c42dea58aa3dd0f8f5999619e/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs#L89-L90
As a result the test run will crash and disappear with no symptoms other than the "Test host process crashed".
The dumps are available internally, ping KirillO.

@nohwnd @MarcoRossignoli

The data collector settings are:

Document

| Name | Value | Type
-- | -- | -- | --
◢ | [0] | {Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollectorSettings} | Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollectorSettings
  | AssemblyQualifiedName | "Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null" | string
  | CodeBase | "coverlet.collector.dll" | string
  | Configuration | null | System.Xml.XmlElement
  | FriendlyName | "XPlat Code Coverage" | string
  | IsEnabled | true | bool
  | ▶ Uri | null | System.Uri

The runsettings file used was:
<RunSettings>
  <RunConfiguration>
    <BatchSize>1000</BatchSize>
    <ResultsDirectory>C:\a\_temp\TestResults</ResultsDirectory>
    <TargetPlatform>X86</TargetPlatform>
    <TargetFrameworkVersion>.NETFramework,Version=v4.7.2</TargetFrameworkVersion>
    <TestAdaptersPaths>C:\a\1\s</TestAdaptersPaths>
    <InIsolation>true</InIsolation>
    <DesignMode>False</DesignMode>
    <CollectSourceInformation>False</CollectSourceInformation>
  </RunConfiguration>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="blame" enabled="True">
        <Configuration>
          <ResultsDirectory>C:\a\_temp\TestResults</ResultsDirectory>
          <CollectDump CollectAlways="true" />
          <CollectDump />
        </Configuration>
      </DataCollector>
      <DataCollector friendlyName="XPlat Code Coverage" enabled="True" />
    </DataCollectors>
  </DataCollectionRunSettings>
  <LoggerRunSettings>
    <Loggers>
      <Logger friendlyName="blame" enabled="True" />
      <Logger friendlyName="trx" enabled="True" />
      <Logger friendlyName="Console" uri="logger://microsoft/TestPlatform/ConsoleLogger/v1" assemblyQualifiedName="Microsoft.VisualStudio.TestPlatform.CommandLine.Internal.ConsoleLogger, vstest.console, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" codeBase="C:\a\_tool\VsTest\17.0.0-preview-20210709-01\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" enabled="True" />
    </Loggers>
  </LoggerRunSettings>
  <RunSettingsDirectory>C:\a\_temp</RunSettingsDirectory>
  <InProcDataCollectionRunSettings>
    <InProcDataCollectors>
      <InProcDataCollector assemblyQualifiedName="Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null" friendlyName="XPlat Code Coverage" enabled="True" codebase="coverlet.collector.dll" />
    </InProcDataCollectors>
  </InProcDataCollectionRunSettings>
</RunSettings>

I'm guessing that coverlet.collector.dll isn't loaded or found. Note the version of coverlet.collector.dll in RunSettings is <IP_ADDRESS>, but the actual version on my machine is <IP_ADDRESS>.
It needs to do more detailed logging here:

This seems like a relevant doc:
https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md

Is there no way to disable the in-proc coverlet collector? Why is it running? We're not passing --collect:"XPlat Code Coverage" as far as I can see. Why is it enabled in the dump?

This also seems related:
https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#1-vstest-stops-process-execution-earlydotnet-test
the 100 ms timeout issue again

Hi @KirillOsenkov @nohwnd
Can you try to remove from runsettings the section InProcDataCollectionRunSettings and pass as argument --collect:"XPlat Code Coverage"? Can you enable the logs https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Troubleshooting.md#collectors-integration , usually host logs contains collectors loading issues.
Coverlet collectors(out/in process) were introduced as workaround for the 100ms issue.
First version of Coverlet was implemented with msbuild tasks and it's supported yet.
Coverlet persists hits temporary in a memory array of int and when the event process exit/unload app domain fire it writes these to a tmp file on file system(temp dir). This file is used to generate the report.
Now due to the 100ms issue sometime happened that VSTest plat kills the process before Coverlet is able to persist this file ending with an empty report.
For this reason @vagisha-nidhi wrote the code for collectors. Out of process collector does the instrumentation as usual, in-process collector ensure that flush to file be done. Adding the in-process collector is the key to orchestrate the "shutdown" in a correct way being "orchestrated" by VSTest platform.
Current implementation inside VSTest injects the inprocess collector during startup with a custom argument processor. The result is something like https://github.com/microsoft/vstest/blob/main/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs#L263
The problem could be that the inprocess collector section is created manually and the codebase is not the path the adapter and so collector dll is not found. The path is created by processor here https://github.com/microsoft/vstest/blob/main/src/vstest.console/Processors/CollectArgumentProcessor.cs#L131 and should point to local nuget folder.

Related: https://github.com/microsoft/vstest/issues/2599#issuecomment-866634716

I have made a PR that adds a PackageReference to coverlet.collector, Version 3.0.3 to our projects. I think this could be a problem, if you're not referencing coverlet.collector, then the coverlet.collector.dll is simply missing from the output directory, and causing a problem in the static constructor.
I think one thing that can be improved is a better error message if coverlet.collector can't be found.

Also we don't have a RunSettings file at all, the RunSettings XML that I pasted earlier I'm guessing was the default or generated one I think?
Interesting why the in-proc collector was enabled by default.

Interesting why the in-proc collector was enabled by default.

Mmm I think that this could happen if we're passing in some way --collect:"XPlat Code Coverage but the package is not referenced. I need to repro to understand if command is parsed correctly and inproc collector is injected with wrong base path.

@MarcoRossignoli  do you think there is something more to investigate? If not please close this :)

It shouldn't be a problem anymore. @KirillOsenkov let me know.


Sub, mul, div signature syntax doesn't match add

All of these have essentially the same signatures, except mul can be used to replicate arrays and stuff. The signatures should probably match the better version used on r.add

specifically, sub mul and div don't indicate they are variadic like add


Fix from_index calculation for %TypedArray%.prototype.lastIndexOf

This patch fixes #3237.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik<EMAIL_ADDRESS>

As I see #3224 removes this helper function so probably the corrent toInteger conversion would resolve this problem. cc @Yuyupo


Updating problems list

Type: Bug
Your software is great!
Just noticed somthing while developing Angular apps:
After saving and compiling my project, VSC doesn't update problems list. Only after Cmd + C, then recompiling, VSC updates the errors list.
Thank you
VS Code version: Code 1.71.1 (e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb, 2022-09-08T19:41:32.136Z)
OS version: Darwin x64 21.6.0
Modes:
Sandboxed: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz (4 x 1800)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
3, 6, 6

Memory (System)
8.00GB (0.03GB free)

Process Argv
--crash-reporter-id af062ada-fffa-4703-9a9c-ed2e891cdf42

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

ng-template
Ang
14.2.0

vscode-eslint
dba
2.2.6

auto-close-tag
for
0.5.14

auto-rename-tag
for
0.1.10

Angular2
joh
13.0.0

vscode-scss
mrm
0.10.0

color-highlight
nau
2.5.0

material-icon-theme
PKi
4.20.0

LiveServer
rit
5.7.9

vscode-paste-and-indent
Rub
0.0.8

quokka-vscode
Wal
1.0.504

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
pylanb8912:30545647
vsclangdc:30486549
c4g48928:30535728
hb751961:30553087
dsvsc012:30540252
azure-dev_surveyone:30548225
2144e591:30553903
fc301958:30567733

Thanks for creating the issue.
Problems are generated by extensions. So please find the extension that is supposed to create the problems and file issue against it.

Thanks!
Best Regards
Il giorno gio 15 set 2022 alle ore 18:22 Sandeep Somavarapu <
@.***> ha scritto:

Thanks for creating the issue.
Problems are generated by extensions. So please find the extension that is
supposed to create the problems and file issue against it.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/160989#issuecomment-1248326520,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVQ3LJ2UOQKORE64P3TWDITV6NEMRANCNFSM6AAAAAAQNMRFSE
.
You are receiving this because you authored the thread.Message ID:
@.***>