Initial changes for adding SqlProjectsService

These are the initial changes for adding a new service for sql projects to send requests to STS. The two apis added here are openProject and getCrossPlatformCompatibility to make sure the whole flow is hooked up and works.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 4 (25.0%)  changed or added relevant lines in 1 file are covered.
130 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.2%) to 41.713%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

extensions/sql-database-projects/src/common/utils.ts
1
4
25.0%

Files with Coverage Reduction
New Missed Lines
%

extensions/sql-database-projects/src/models/project.ts
1
94.16%

extensions/sql-database-projects/src/common/httpClient.ts
5
55.88%

extensions/sql-database-projects/src/dialogs/utils.ts
23
40.83%

extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts
101
25.83%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
28522

Relevant Lines:
63501

💛  - Coveralls


fix poorly typed info for connection options

Sorry I missed this PR (there actually was another one too - not sure why I missed both -_-). Just fixed it on master. Thanks!

Cheers.


Remove use of "use-fast-value-tensor-implementation" flag.

Has been default on since 7.319.17 (25-Nov-2020).
This partially re-applies https://github.com/vespa-engine/vespa/pull/15760.
@hmusum please review
@arnej27959 FYI

@hmusum PTAL


Setup

Hey, thanks for sharing your asset!
But how do i implement it on my game? do i need to attach DynamicResolution.cs on the camera? a GameObject? or a Canvas?
Thanks a lot!
Regards, Sam.

You're welcome. You need to add it to a Text object in a Canvas. It will also display stats if you set the corresponding variable.


Mutation fails on take

In the code below, the test_fails functions throws errors, while test_works is fine.
struct Test {
    k: Option<u8>,
    y: u8,
}

impl Test {
    fn test_works(&mut self) {
        match self.k.take() {
            Some(k) => {
                self.y = 5;
            },
            None => (),
        }
    }

    fn test_fails(&mut self) {
        self.k.take().map(|k| {
            self.y = 5;
        });
    }
}

Open this code snippet in the playground

I think it is reasonable to fail on test_fails and not on test_works because the mutation of self happens inside a closure in test_fails. Those two implementations look similar in the Rust world but if you try to "functionalize" this mutation this means the closure must return the new value of self, but then that would not go well with the closure type expected by map.

Does that mean that we do not currently support mutation within map? If so, that would be good to document.

Does that mean that we do not currently support mutation within map? If so, that would be good to document.

Yes, except maybe if the mutation is on the argument of the closure.

Ah yes, thanks @maximebuyse, somehow I missed that closure!
Clearly, we do not support mutable closures (aka FnMut).
Some quick notes on supporting FnMuts:

normal closures to FP is great, the capture is a primitive feature of our target languages
some of our backend cannot support lambdas
in presence of FnMut, the environment becomes something we don't want only to consume but also to mut.
calling an FnMut requires the fn to be &mut


difftastic will panic after build on windows

This looks like you've removed the symlink, and the build is broken as a result. I'm happy to reopen this if you are getting the failure on unmodified difftastic.


SVG attrs namespaces

Can someone explain to me what this is about? I know nothing about XML and namespaces...

xlink:href attribute needs a namespace to work with external SVG files. Following example doesn't work without this PR.
ul(
  li(
    a(href := "#")(
      i(svg(xmlns := "http://www.w3.org/2000/svg",
            xmlnsXlink := "http://www.w3.org/1999/xlink",
            viewBox := "0 0 20 20")(
        use(xLinkHref := "external_sprite.svg#id")
      )),
      span("text")
    ))).render

Ok, looks good, thanks!


⚠ Bofrost.be has degraded performance

In bf46da3, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2280 ms

Resolved: Bofrost.be performance has improved in 71b8733.


Tab bar overlaps the last count, making it difficult to see.

Current behavior
The tab bar overlaps the last count, making it difficult to see or interact with it.
Expected behavior
The last count should be fully visible and accessible, without any overlap or obstruction by the tab bar.
Steps to reproduce the issue
Open the application store view screens and navigate to the section where the counts are displayed.
Scroll down to the bottom of the list where the last count is located.
Observe the position of the tab bar in relation to the last count.
Environment details
App version : INVENTORY-COUNT-2.0-580A565
App environment : DEV
Additional information

Closing, will recreate when reported by the user.


Fix azure-sdk, consider stderr when processing errors

This fixed the azure-sdk test by updating it and making it only test the top 20 downloaded packages (as of today).
Also, consider stderr when processing build.sh errors; since we're running someone else's build systems, there's no way to know where they might print things (whereas for other tests we're running tsc directly and we know that the errors will always be on stdout).

Works: https://github.com/microsoft/TypeScript/pull/57785#issuecomment-2005171390


fix: fix nil panic when update tideNodePool fail in Tide.Reconcile

What type of PR is this?
Bug fixes
What this PR does / why we need it:
https://github.com/kubewharf/katalyst-core/blob/5c0c031d5c172cbe6e176b5ab6499c63a7063f14/pkg/controller/tide/tide.go#L334-L346
When TideNodePool update failed, tideNodePool is set to be nil,  and logging tideNodePool.Name will panic.
Which issue(s) this PR fixes:
Special notes for your reviewer:

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Suggested Pipeline Help

Greetings. I was hoping someone could help me understand the canu + nanopolishing pipeline for MinION data and address some errors I get.
Here is a rough idea of what I am doing:

Start with passed Metrichor reads
Using  extract fasta reads-->results in single file with PATH in header
correction, trimming, unitig construction in canu to build contigs-->results in single *.contigs.fasta file. This fasta file does not have any of the original header data--looks like canu generated details
use nanopolish on canu contig output.

I guess this is where I am a bit confused. First I run the following:
make -f scripts/consensus.make READS=data.fasta ASSEMBLY=data.contigs.fasta
where <lambda_HC.fasta> is the output from poretools and
<lambda.contigs.fasta> is the output from canu.
I get the following message:
[bwa_index] Pack FASTA... 0.00 sec
[bwa_index] Construct BWT for the packed sequence...
[bwa_index] 0.02 seconds elapse.
[bwa_index] Update BWT... 0.00 sec
[bwa_index] Pack forward-only FASTA... 0.00 sec
[bwa_index] Construct SA from BWT and Occ... 0.01 sec
[main] Version: 0.7.5a-r405
[main] CMD: bwa index lambda.contigs.fasta
[main] Real time: 0.362 sec; CPU: 0.027 sec
bwa mem -x ont2d -t 8 lambda.contigs.fasta lambda_HC.pp.fa | samtools view -Sb - > lambda_HC.pp.bam
mem: invalid option -- 'x'
[samopen] no @SQ lines in the header.
[sam_read1] missing header? Abort!
make: *** [lambda_HC.pp.bam] Error 1
I would really appreciate any insight. Best,
Jarrod

Hi Jarrod,
Your version of bwa is too old and doesn't support ONT reads (mem: invalid option -- 'x'). If you update bwa it should work.
Jared

Hi Jared,
Haha! Always something simple. Looks like the program ran without errors.

Great, I'm going to close this issue but let me know if you have other problems.


Add ReplacementProductList to Resource Monitoring Cluster

This adds the implementation to fetch the replacement product list from the aliased resource-monitoring-cluster. It adds support for Hepa and Activated Carbon filter examples.
Closes out issues #27802, #27801, #27577
Testing
I tested this using the all-clusters-app and the resource-monitoring-example-app
>>>> hepafiltermonitoring read replacement-product-list 0x1 0x1

DataVersion = 0xd31d0b60,
AttributePathIB =
{
        Endpoint = 0x1,
        Cluster = 0x71,
        Attribute = 0x0000_0005,
}

Data = [

        {
                0x0 = 0,
                0x1 = "upc12xhepaxx" (13 chars),
        },
        {
                0x0 = 1,
                0x1 = "gtin8xhe" (9 chars),
        },
        {
                0x0 = 2,
                0x1 = "ean13xhepaxxx" (14 chars),
        },
],

>>>> activatedcarbonfiltermonitoring read replacement-product-list 0x1 0x1

DataVersion = 0xfd145260,
AttributePathIB =
{
        Endpoint = 0x1,
        Cluster = 0x72,
        Attribute = 0x0000_0005,
}

Data = [

        {
                0x0 = 0,
                0x1 = "upc12xcarbon" (13 chars),
        },
        {
                0x0 = 1,
                0x1 = "gtin8xca" (9 chars),
        },
        {
                0x0 = 2,
                0x1 = "ean13xacarbon" (14 chars),
        },
],

closes #27577

And https://github.com/project-chip/connectedhomeip/issues/28148 in addition to those issues.


Dpl 1075 library edit volume check

This PR includes:

Displaying a "used volume" label when the user edits a library.
Preventing the user from entering a value for the library volume less than the used volume.

Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

Tested and looks really good.
The forced minimum value is quite aggressive and it makes it quite tricky to change the volume as it doesn't let you delete values and retype easily. Can we debounce it or something or is that a tradeoff of using min?

Yes, you are right. I felt it us very forceful (this is what I mentioned in https://github.com/sanger/traction-service/pull/1288 comment). I will look into it. Probably we can have a chat about it next week.


@ArinaDanilina please open an issue for this and assign yourself

          @ArinaDanilina please open an issue for this and assign yourself

Originally posted by @MUCDK in https://github.com/theislab/moscot/pull/515#discussion_r1238213294

duplicate for #558


Add hubble addon

Add support for hubble (https://github.com/cilium/hubble), a cluster
observability tool that runs on top of Cilium.
From the readme:

Hubble is a fully distributed networking and security observability
platform for cloud native workloads. It is built on top of Cilium and
eBPF to enable deep visibility into the communication and behavior of
services as well as the networking infrastructure in a completely
transparent manner.

This addon includes a graphical web UI that visualizes pods and their traffic
flows. At the end of the microk8s.enable command, microk8s.enable will present
the URL on which the UI can be accessed.
The hubble CLI can be accessed via a wrapper script, for example:
  $ microk8s.hubble observe
  TIMESTAMP             SOURCE
  DESTINATION                                            TYPE
  VERDICT     SUMMARY
  Dec 20 15:29:18.531   <IP_ADDRESS>:443(https)
  kube-system/coredns-9b8997588-nnghf:44202              to-endpoint
  FORWARDED   TCP Flags: ACK, PSH
  Dec 20 15:29:18.531   kube-system/coredns-9b8997588-nnghf:44202
  <IP_ADDRESS>:16443                                     to-host
  FORWARDED   TCP Flags: ACK

Example installation:
  Enabling Hubble
  Fetching hubble version master.
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   121    0   121    0     0    159      0 --:--:-- --:--:-- --:--:--   159
  100 9212k  100 9212k    0     0  1504k      0  0:00:06  0:00:06 --:--:-- 2059k
  Deploying /var/snap/microk8s/1109/actions/hubble.yaml. This may take several minutes.
  serviceaccount/hubble created
  serviceaccount/hubble-ui created
  clusterrole.rbac.authorization.k8s.io/hubble created
  clusterrole.rbac.authorization.k8s.io/hubble-ui created
  clusterrolebinding.rbac.authorization.k8s.io/hubble created
  clusterrolebinding.rbac.authorization.k8s.io/hubble-ui created
  service/hubble-grpc created
  service/hubble-ui created
  daemonset.apps/hubble created
  deployment.apps/hubble-ui created
  Waiting for daemon set "hubble" rollout to finish: 0 of 1 updated pods are available...
  daemon set "hubble" successfully rolled out
  Hubble is enabled with UI on http://<IP_ADDRESS>:12000

This currently pins hubble to the master branch / latest versions of
hubble as it is under active development. As the hubble project matures,
we expect to update this to follow semver. The HUBBLE_VERSION
environment variable supports overriding the version that is installed.

I believe hubble only works on amd64 arch.
Usually we remove addons which are not supported in a particular arch in snapcraft.yaml
https://github.com/ubuntu/microk8s/blob/dbc90b6332ee0d96d94ebeaab044b2815adfe01f/snapcraft.yaml#L287


Adds experimental AnthropicFunctions wrapper

I'm also working on this feature~😂

I'm also working on this feature~😂

Ah shoot! I can still have a look at your other PR - I think Minimax supports a similar API natively though no?


Derive source/sink arg-class name from function-class for file-url

Motivation
When user submits function with file-url, server loads jar and performs validation. In that case, server should also configures source/sink arg type-class if it's not configured in the function details.
Modification
when user submits function with url using cli, it doesn't pass type-arg classname into the request, so, server will update it by loading jar and function-class name.
Result
User can successfully submit function jar with file-url.

rerun integration tests

rerun cpp tests

sure, I will try to add.

rerun integration tests

rerun cpp tests

cherry-pick 752f1b4 in branch-2.1


Error when connecting to the server

Hi, i get this error when i'm trying to connect to my server with OpenBullet, i don't know if it come from the API :
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
Thanks

That's not an error it's a warning. It's caused by the fact that the solution is set up to work with HTTPS but you're using it through HTTP. Did you set up HTTPS on your domain? Are you using nginx as a reverse proxy?

Oh and by the way, the web api works perfectly even if you disregard that warning, it's just less secure as in the sense that someone sniffing the communication can see cleartext data being sent.


[Bug]: On clicking URL in Table widget user gets redirected to wrong page

Is there an existing issue for this?

[X] I have searched the existing issues

Description
In the URL type column of a table widget if the computed value entered does not contain https:// in the URL, user gets redirected to the wrong page.
https://www.loom.com/share/72837a116161473887c0533173b0feee
Steps To Reproduce

D&D a table widget.
Change the type of any column to URL.
In the Computed Value property enter any URL without https:// e.g. www.google.com

Public Sample App
No response
Version
Cloud
 Front conversations

We might need some validation here for URL type column to resolve this issue

Another user encountered this error here.
Also confirmed that the https:// workaround works.

@sbalaji1192 can you pick this up in sprint, if you are done with current items?

@shadabbuchh This is the default browser behavior. omitting the protocol will redirect to a page with the URL appending to the current window URL.
CC: @dilippitchika .

Thanks for the confirmation, we will not be fixing it now then as it's standard browser behavior.


[Not Found] .gr domains

Problem
There's not whois server registered to the IANA Route Database Zone for all .gr domains.
Conclusion
That's make all .gr domains fails.

According to their Registry all .gr don't have a whois server assigned.
So have to find a workaround.

Please refer to https://grweb.ics.forth.gr/public/whois.jsp?lang=en for whois lookup


Remove deprecated unix_socket dependency

The crate became deprecated, since there is std::os::unix::net library

Removed it, and changed to std::os::unix::net

CI seems ok, ready to merge

great, thanks


[Question] Hide the alarm window?

Is it possible to hide the Alarm window while still having the notification/sound popup in the chat?
I cant seem to find it in the settings to just hide it, only disable it. Cheers

There is no Alarm window... That's the Gather Window, which has nothing to do with alarms inherently.

you can disable either of those.


Adjusted layout of sample app to not conceal large button underneath …

…navigation bar.

This was probably caused because of the translucent menu bar style starting with iOS 7.
In lower versions, there will probably be a 44pt space in-between menubar and first element now.
I agree that we should support as many versions as possible for the library itself. However I don't think that we need to do the same for the Demo Application.
Just for consistency purposes, it wouldn't hurt to set the Demo applications deployment target up to 7.0.
Other than that, looks good to me.

@timbodeit I totally agree. Changes made.

LGTM. Will merge once travis integration succeeded.


wrong but verified passwrd

erro
`Traceback (most recent call last):
  File "main.py", line 70, in <module>
    main()
  File "main.py", line 66, in main
    atpt.login(USERNAME, PASSWORD)
  File "/home/ant1/.local/lib/python3.8/site-packages/atprototools/__init__.py", line 19, in login
    raise ValueError("No access token, is your password wrong?")
ValueError: No access token, is your password wrong?

`

same issue

same issue!

Same issue. username is correct. I checked my password.   I'm setting the password in BASH using export PASSWORD="soi$oiu#lkjlas!"
(that's not my  real password), understanding that those special characters do not need to be escaped in this context.


Conditionally use High-Level API to detect face landmarks only when 1 face detected?

With my use-case, I am attempting to only detect the facial landmarks if and only if one face was detected. I am well aware detectSingleFace returns the face with the highest score, but in my situation, I am attempting to scrape and build a database, so I am not sure if the highest score will be of the right subject. In fact, I have already came across an example where that is not the case.
I could execute faceapi.detectAllFaces(input).withFaceLandmarks(), but to me this doesn't seem efficient. I would be detecting facial landmarks of the input even when there are multiple faces, which is what I am trying to avoid for the sake of efficiency.
Is it possible for me to conditionally use the high-level api, perhaps using promises or such? Below is a non-working snippet I was messing about, hopefully this helps portray my idea better.
await new Promise((resolve, error) => {
	faceapi.detectAllFaces(img).then(detectedFaces => {
		console.log(`Detected ${detectedFaces.length} faces.`);
		if (detectedFaces.length === 1) {
			resolve(detectedFaces)
		} else {
			error('Found more than one face');
		}
	}).withFaceLandmarks(landmarks => {
		console.log(landmarks);
	});
});

You can use faceapi.detectAllFaces to get the bounding boxes, and then use the low level API to detect landmarks if detections === 1:
    const results = await faceapi.detectAllFaces(img)
    if (results.length === 1) {
      const faces = await faceapi.extractFaces(img, results.map(res => res.detection))
      const landmarks = await faceapi.nets.faceLandmark68Net.detectLandmarks(faces[0])
   }

You can also have a look at the implementation of the high level API, to get a better idea of how the low level API works: DetectFaceLandmarksTasks.ts

Thank you for the snippet and the additional link to an implementation.
I do have a few follow up questions if you don't mind clearing up:

why is it that you're directly referencing faceLandmark68Net, couldn't we simply do faceapi.detectLandmarks?
Since we know there is only one face, can't we skip mapping the results to the detection, seems like an unnecessary execution? Though I tried this and received Cannot read property 'map' of undefined resulting from node_modules\face-api.js\build\commonjs\dom\extractFaces.js:45:40), so I suppose I have to

What exactly does extractFaces achieve? README says "to extract face regions from bounding boxes", but I thought detectAllFaces essentially does the same thing?

So if I remember correctly, when we call withFaceLandmarks using the high-level API, which I believe aligns the face(?). My use case is creating the facial descriptor for the image, so am I correct in saying that by calling detectLandmarks(faces[0]) with the low-level API, it will still align faces[0]?

Here is my current implementation with your help:
try {
	const image = await canvas.loadImage(await googleUtils.getImageAsBuffer(file.id));
	//console.log(`[${i++}] Detecting faces in ${file.id}`);
	const detections = await faceapi.detectAllFaces(image, faceapiOptions);
	if (detections.length == 1) {
		//console.log(`[${i}] Detecting single face in ${file.id} | Total found: ${facecount++}`);
		const faces = await faceapi.extractFaces(image, detections[0].detection); // doesnt work unless second argument is detections#map
		const landmarks = await faceapi.detectLandmarks(faces[0]);
		const descriptors = await faceapi.computeFaceDescriptor(faces[0]);
		return descriptors;
	}
} catch (err) {
	console.warn(`Hit an error trying to detect faces in file '${file.name}' (${file.id})`);
	console.error(err);
}

Scratch that, I forgot to remove my previous code I had where I was using the high-level api, and the code was executing with no problem: await faceapi.detectAllFaces(image, faceapiOptions).withFaceLandmarks().withFaceDescriptors();
But when I got rid of the other methods after detectAllFaces, to  await faceapi.detectAllFaces(image, faceapiOptions)
, I am getting the following error

TypeError: Cannot read property 'clipAtImageBorders' of undefined
at \node_modules\face-api.js\build\commonjs\dom\extractFaces.js:48:58

Please ignore the previous two comments. So I attempted the solution you've provided, passing in my img, const img = await canvas.loadImage(await googleUtils.getImageAsBuffer(<fileId>));, and I received the following error:

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'clipAtImageBorders' of undefined
at ...\node_modules\face-api.js\build\commonjs\dom\extractFaces.js:48:58

However, I noticed that if I change your snippet to detectAllFaces followed by withLandmarks, it works fine, for example:
const img = await canvas.loadImage(await googleUtils.getImageAsBuffer(<fileId>));
const results = await faceapi.detectAllFaces(img).withFaceLandmarks();
if (results.length === 1) {
	const faces = await faceapi.extractFaces(img, results.map(res => res.detection));
	const landmarks = await faceapi.detectLandmarks(faces[0]);
}

Once again, if I remove withFaceLandmarks, it results in an error. However, I forgot to mention in the main post that I want the facial descriptors. So, when I attempt to compute the descriptors:
const img = await canvas.loadImage(await googleUtils.getImageAsBuffer(<fileId>));
const img2 = await canvas.loadImage(await googleUtils.getImageAsBuffer(<fileId>));
const results = await faceapi.detectAllFaces(img).withFaceLandmarks();
if (results.length === 1) {
	const faces = await faceapi.extractFaces(img, results.map(res => res.detection));
	const landmarks = await faceapi.detectLandmarks(faces[0]);
	console.log(JSON.stringify(await faceapi.computeFaceDescriptor(faces[0]))); // Returns descriptor A
	console.log(JSON.stringify(await faceapi.computeFaceDescriptor(img))); // Returns descriptor B
}
console.log(JSON.stringify((await faceapi.detectAllFaces(img2).withFaceLandmarks().withFaceDescriptors())[0].descriptor)); // Returns descriptor C
}

All three of those values return different results. I feel like I am not understanding something properly here. Because firstly, I thought that detectLandmarks manipulated the input and aligned it as described in the README for the high-level API.


🏗  (gatsby-config)-add path prefix on build

Codecov Report

Merging #264 into development will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           development     #264   +/-   ##
============================================
  Coverage        93.09%   93.09%
============================================
  Files               26       26
  Lines              855      855
============================================
  Hits               796      796
  Misses              59       59

Continue to review full report at Codecov.

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


fix/6884 removing call button and it's corresponding logic

Description
Since we have two hotline numbers, we have to remove call button and it's corresponding logic to make it consistent with android.
Link to Jira
https://jira-ibs.wbs.net.sap/browse/EXPOSUREAPP-6884
Screenshots

Tried to check it locally and it doesn't compile :/
Two other remarks;

please create the branches according to our branchnaming convention.
Create a comment on the Jira ticket which links to this PR


Support Custom transition

Hi guy
I want to make custom transition "flipHorizontal" like UIKit:
guard let vc = storyboard?.instantiateViewController(identifier: "SecondViewController") else { return }
vc.modalTransitionStyle = .flipHorizontal
vc.modalPresentationStyle = .currentContext
show(vc, sender: self)
How can I make that transition with your library?

Hi @toanbv-fabbi, thanks for raising this issue. I'm afraid this library does not offer a solution for that, because SwiftUI does not currently provide a way to customise the modal transition when presenting a sheet or a full-screen cover. To achieve a custom transition you might want to explore showing the view manually instead (e.g. see https://blog.devgenius.io/swiftui-different-ways-to-present-modal-views-26472947a800), but that's outside this library's scope.

@johnpatrickmorgan We can use UIKit to customise the modal transition.
You can check this library
`class MyViewCoordinator: UIViewControllerCoordinator {
override func transition(for route: MyRoute) -> ViewTransition {
switch route {
case .foo:
return .present(Text("Foo"))
case .bar:
return .custom {
guard let rootViewController = self.rootViewController else {
return assertionFailure()
}
                // Use `rootViewController` to perform a custom transition.
                rootViewController.present(
                    UIViewController(),
                    animated: true,
                    completion: { }
                )
            }
    }
}

}`
https://github.com/SwiftUIX/Coordinator


[Bug]: possible data loss

Describe the bug
i tried opening an html file i had stored on here only for teldrive to crash with error code:
22/10/2024 05:09 PM     INFO    /api/files      {"status": 200, "method": "GET", "path": "/api/files", "query": "limit=500&op=list&page=1&path=%2Fkiwi+bookmarks&sort=id", "ip": "::1", "user-agent": "rclone/v1.68.0", "latency": 0.1124755, "time": "2024-10-22T14:09:35Z"}
panic: interface conversion: tg.MessageClass is *tg.MessageEmpty, not *tg.Message

goroutine 165 [running]:
github.com/tgdrive/teldrive/pkg/services.getParts({0x2615390, 0xc000253300}, 0xc000256008, {0x2612a50, 0xc00017e270}, 0xc000ebfb08)
        github.com/tgdrive/teldrive/pkg/services/common.go:43 +0x552
github.com/tgdrive/teldrive/pkg/services.(*FileService).GetFileStream.func1()
        github.com/tgdrive/teldrive/pkg/services/file.go:852 +0xa9
github.com/tgdrive/teldrive/pkg/services.(*FileService).GetFileStream.func2({0x2615120?, 0xc000231b80?})
        github.com/tgdrive/teldrive/pkg/services/file.go:874 +0x13
github.com/tgdrive/teldrive/pkg/services.(*FileService).GetFileStream.RunWithAuth.func3({0x2615120, 0xc000231b80})
        github.com/tgdrive/teldrive/internal/tgc/run.go:40 +0x503
github.com/gotd/td/telegram.(*Client).Run.func3({0x2615120, 0xc000231b80})
        github.com/gotd/td@v0.111.0/telegram/connect.go:150 +0xb7
github.com/gotd/td/telegram.(*Client).Run.(*CancellableGroup).Go.func6()
        github.com/gotd/td@v0.111.0/tdsync/cancel_group.go:48 +0x23
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/sync@v0.8.0/errgroup/errgroup.go:78 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 112
        golang.org/x/sync@v0.8.0/errgroup/errgroup.go:75 +0x96

tried downloading and copying with rclone but those failed too and crashed teldrive
it is an older file i had stored when teldrive still worked with NeonDB (Neon was the recommended db back in the day), but if this project is meant for cloud storage then data randomly disappearing is concerning
Repoduction
try to open an html file
teldrive crashes
Expected behavior
file opens
Version
teldrive 1.5.3

os/type: windows
os/arch: amd64
go/version: go1.23.2

Which Platform are you using?
Windows
Additional context
No response

https://gist.github.com/danieleg1/1427c2a535b4dd4a6775e0fa82431400
Run this script to fix this

since the time ive wrritten this issue ive moved to ubuntu and theres no hydrogram in the repos. pip3 runs amock on ubuntu. any suggestions ?

https://gist.github.com/danieleg1/1427c2a535b4dd4a6775e0fa82431400
Run this script to fix this

@divyam234 well all that did was delete the files from teldrive and running cleandb -t -e does't work. bruh i lost data i hadnt backed up elsewhere. go ahead and a warning to your README at least that this might happen


pages -> nav

In mkdocs.yml, the pages: directive is being deprecated in favor of the nav: directive. This means that eventually mkdocs-pandoc will not work with functional mkdocs.yml files.
Here's the error you will see if you use nav: (as per mkdocs spec) instead of pages::
$ mkdocs2pandoc > mydocs.pd
Traceback (most recent call last):
  File "/Users/charles/davis/dahak/dahak-comparison/vp/bin/mkdocs2pandoc", line 11, in <module>
    sys.exit(main())
  File "/Users/charles/davis/dahak/dahak-comparison/vp/lib/python3.6/site-packages/mkdocs_pandoc/cli/mkdocs2pandoc.py", line 80, in main
    for line in pconv.convert():
  File "/Users/charles/davis/dahak/dahak-comparison/vp/lib/python3.6/site-packages/mkdocs_pandoc/pandoc_converter.py", line 103, in convert
    pages = self.flatten_pages(self.config['pages'])
KeyError: 'pages'

fixed for mkdocs >1.0.4 in this pull-request:
https://github.com/jgrassler/mkdocs-pandoc/pull/30


[Gally]: master <- dev

Automatically created by Git-Ally

:tada: This PR is included in version 1.13.125 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


MariaDB connection issue

Describe the bug
Fail on the connection to MariaDB when testing the model create ctl.
Copied the default model.json into a folder named /models/testModel and run the following command.
drogon_ctl create model testModel

Create model
mysql
Connect to server...
Source files in the eshop folder will be overwritten, continue(y/n)?
20200202 17:04:55.725077 UTC 3864 ERROR Failed to mysql_real_connect() - MysqlConnection.cc:229
20200202 17:04:56.725637 UTC 3864 ERROR Failed to mysql_real_connect() - MysqlConnection.cc:229
20200202 17:04:57.725777 UTC 3864 ERROR Failed to mysql_real_connect() - MysqlConnection.cc:229
...

The database is running which I can use PhpMyAdmin to access it. Created a database name "cppwebserver" and some other credentials for testing. I tried different ports (failed) and thought there was a bug in the model.json ( "passwd" to "password" ) still failed.

BTW, THANKS for the good works to the C++ community. I would like to take deeper understanding on this web-framework and compare with the Cutelyst and Wt. Are there some examples for the ORM part? Say, using the default model in the model.json.
To Reproduce
Steps to reproduce the behavior:

Go to '/models' directory
mkdir testModel && cp model.json testModel/
edit the parameters "rdbms": mysql, "port":3306, "host":"<IP_ADDRESS>", "dbname":"cppwebserver".......
drogon_ctl create model testModel and see error

Expected behavior
ERROR Failed to mysql_real_connect() - MysqlConnection.cc:229
Desktop (please complete the following information):

OS: Linux

@ihmc3jn09hk Try to use mysql -h<IP_ADDRESS> -uuser_name -p cppwebserver to confirm the right privileges.
https://github.com/an-tao/drogon/blob/ce675c1b871c9961a5b47d2e4c6cc1064a9296e8/orm_lib/tests/db_test.cc#L512-L533
There are some examples of ORM in the test project.

@an-tao With mysql -hlocalhost -umariadb_user -p cppwebserver, I can login (Yup, changed to localhost). Modified the corresponding parameters "<IP_ADDRESS>" -> "localhost" in model.json failed with the following information:

Create model
mysql
Connect to server...
Source files in the eshop folder will be overwritten, continue(y/n)?
y
No connection to database server

@an-tao Further tested with this library(see /test/connect.cpp) which results in a successful connection.
$ test/connect
DB uri: tcp://localhost:3317
DB user: mariadb_user
DB passwd: mariadb_user_password
Connection status: SUCESS
MySQL Stat: Uptime: 402  Threads: 7  Questions: 16  Slow queries: 0  Opens: 16  Flush tables: 1  Open tables: 10  Queries per second avg: 0.039

@an-tao Update: The error "ERROR Failed to mysql_real_connect() - MysqlConnection.cc:229" doesnt show up if direct key in the parameters in MysqlConnect.cc (e.g. Host, username, ...).
However, there is nothing generated.

@ihmc3jn09hk , After some inverstigations of this. I think this may be a issue of the asynchorous API of mariadb earlier version. This issue ocurrs when call the mysql_real_connect_start() function with a hostname(or domain name). there are two resolutions.
1. use IP address(<IP_ADDRESS>) instead of hostname('localhost')
You shoud grant right privileges to the user as follows:
MariaDB [(none)]> create user 'admin'@'%' identified by '123';
MariaDB [(none)]> grant all privileges on *.* to 'admin'@'%' with grant option;

2. Or update the libmariadb to 10.4 version or newer.
For example, install mariadb10.4 on ubuntu1804
sudo apt remove ....
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu $(lsb_release -cs) main"
sudo apt update
sudo apt -y install mariadb-server mariadb-client
apt install libmariadb-dev

For more OSs, see here

Both solutions above have been tested and work properly.

@an-tao Further tested with this library(see /test/connect.cpp) which results in a successful connection.
$ test/connect
DB uri: tcp://localhost:3317
DB user: mariadb_user
DB passwd: mariadb_user_password
Connection status: SUCESS
MySQL Stat: Uptime: 402  Threads: 7  Questions: 16  Slow queries: 0  Opens: 16  Flush tables: 1  Open tables: 10  Queries per second avg: 0.039

The synchronous API used by this library is different from the asynchronous API used by drogon.

There are some database examples in the TFB benchmark suits

@an-tao May I know the command 'create model' creates table(s) automatically ? Or user have to create the tables on prior???

@an-tao May I know the command 'create model' creates table(s) automatically ? Or user have to create the tables on prior???

This command reads the tables in the database and creates a model source file for each table.  So, yes, users have to create the tables on prior.

Problem resolved. I misunderstood the functionality of "create model". I thought it would create tables from C++ classes and maintain the OO/member variables of other classes/references relationship into DB tables. But now "create model" works the other way round. So the connection issue actually is because of the empty database.

Problem resolved. I misunderstood the functionality of "create model". I thought it would create tables from C++ classes and maintain the OO/member variables of other classes/references relationship into DB tables. But now "create model" works the other way round. So the connection issue actually is because of the empty database.

Yes, this is a no migrations approach, as it means you can deal with your databases in their own language and do the migration workflow separate from the rest of the project, being able to take full advantage of the existing workflows and tools for creating databases.

@an-tao BTW, would there be any support for NoSQL type DB? I think it is much better suit for Drogon.

I will add support for Redis, MongoDB, but this will take time. Thank you for your suggestion.

@an-tao May I have some more details on how the "relationships" object in model.json works for ORM?
Is that means if I defined the relationship between 2 keys of 2 tables, I am able to obtain the information from 1 model to the other? E.g. tables A, B and C are in database "DB" and
A [ id, name, age, weight, height ]        /Personal Info/
B [ id, dress_id, user_id ]                   /*Pivot ?? */
C [ id, season, color, size, cost ]            /Dress style/
             {
                "type": "many to many",
                "original_table_name": "A",
                "original_table_alias": "",
                "original_key": "id",
                "pivot_table": {
                    "table_name": "B",
                    "original_key": "user_id",
                    "target_key": "dress_id"
                },
                "target_table_name": "C",
                "target_table_alias": "",
                "target_key": "id",
                "enable_reverse": true
            }

Under this configuration, is that mean I can access C through a member function, say "A::C()", generated by drogon_ctl create model ?
I don't see difference in the generated .h and .cc between enabled or disabled the relationships for tables in the model.json.
Could you please provide me a bit more information on it? Much thanks

@ihmc3jn09hk Sorry for late reply, I'll do some testing for this and then give you an answer.

About the relationship idea, please refer to #241

@an-tao Take your time. Thanks for the reference

@ihmc3jn09hk I fixed the 'many to many' issue in PR #369 , please check.

@an-tao Will check it out when merged

Another quick question, every time on the Db connection. Everytime drogon connects to the DB when startup, the connection can hardly be established for certain duration (see below). This happens to ‵‵drogon_ctl create model`` as well.
Any idea? Using phpMyAdmin does not have such issue.

The connection interface of Db in drogon is in non-blocking mode, this means that the connections are not established when the method returns. Maybe I should add some synchronization mechanism to this interface.
For model creation, when drogon_ctl pauses at Source files in the models folder will be overwritten, continue(y/n)?, it is connecting to Database server at back-ground, so you could wait for some seconds more to ensure the establishing of connections.

For model creation, when drogon_ctl pauses at Source files in the models folder will be overwritten, continue(y/n)?, it is connecting to Database server in the background, so you could wait for some seconds more to ensure the establishing of connections.

This is what I am doing for kind of hack. Since if using the flag -f will break the logic immediately.
Btw, I am have compilation error with the #369 . For the generated "many-to-many" interface functions, I am checking.
 error: template argument 1 is invalid | ... const ExceptionCallback &ecb) const

@an-tao Found the problem, missing closing ">" for each generated function in the .cc files for "many-to-many" interfaces.

@ihmc3jn09hk Yes, I'll fix this, sorry!

@an-tao No worries. Just raised a pull request #370

@an-tao Trying to perform a load test using drogon::app().getFastDbClient() with Mapper to do a lookup and update a record with MariaDB which easily crash the program. And I just got an interesting stdout message posted below. My case is similar to the
one given. Instead of a for loop, I have 1000 concurrent api-calls to a controller in a local network. Shockingly the console shows something broken in the program as following. The  ▒{▒▒U0▒x▒▒ is legit copied from the stdout.
Any suggestion to solve the problem? All of the crashes is Assertion failed: rcb.
20200308 09:25:58.117065 UTC 20215 TRACE [execSqlInLoop] ▒{▒▒U0▒x▒▒U name = ?,fruit = ?  where id = ? - MysqlConnection.cc:322
Assertion failed: rcb (/home/drogon/orm_lib/src/mysql_impl/MysqlConnection.cc: execSqlInLoop: 326)
Aborted

Just tried some other thing with the for loop approach which tries to increment a valid in a record. Assuming the record to be updated is initialized as {name="foo", amount=0}. Sure the program will crash as the point "Assert rcb" as above comment. Luckily, there is still successful run but I check the record, the field is amount=1 which I thought would be 1000 as the number of loops. So the ORM callback is copying the record in DB? Concurrent/Loop calls to a repeating record will fail?
...
std::string id("foo");
Mapper<Foo> mapper(dbClientPtr);
for (auto i=0; i<1000; ++i ){
mapper.findOne(
    Criteria(Foo::Cols::_name,CompareOperator::EQ,id)),
    [req, callbackPtr, this, &client = *m_dbClient](Foo f){
        f.setAmount( r.getValueOfAmount() + 1 );   //Add 1 to the amount
        Mapper<Foo> mapper(client);
        mapper.update(f,
             [req, callbackPtr](const size_t count){
                  if ( 1 == count ){
                        LOG_INFO << "Updated";
                  }
             },
             [req, callbackPtr](const DrogonDbException &e){
                  LOG_ERROR << e.base().what();
             }
        )
    },
    [req, callbackPtr](const DrogonDbException &e){
        LOG_ERROR << e.base().what();
    }
);
}
...

@ihmc3jn09hk
I can't reproduce the crashing on my MacOS, I'll test this on linux tomorrow. Below is my test code：
FooCtrl.h
#pragma once
#include <drogon/HttpSimpleController.h>
#include <drogon/IOThreadStorage.h>
using namespace drogon;
class FooCtrl:public drogon::HttpSimpleController<FooCtrl>
{
  public:
    virtual void asyncHandleHttpRequest(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback) override;
    PATH_LIST_BEGIN
    //list path definitions here;
    PATH_ADD("/foo",Get);
    PATH_LIST_END
  private:
    IOThreadStorage<orm::DbClientPtr> _dbClient;
};

and FooCtrl.cc
#include "FooCtrl.h"
#include "Foo.h"
#include <drogon/drogon.h>
using namespace drogon;
using namespace drogon::orm;
using namespace drogon_model::test;
void FooCtrl::asyncHandleHttpRequest(
    const HttpRequestPtr &req,
    std::function<void(const HttpResponsePtr &)> &&callback)
{
    // write your application logic here
    std::string id("foo");
    auto callbackPtr =
        std::make_shared<std::function<void(const HttpResponsePtr &)>>(
            std::move(callback));
    if (!*_dbClient)
    {
        *_dbClient = drogon::app().getFastDbClient();
    }
    Mapper<Foo> mapper(*_dbClient);
    for (auto i = 0; i < 1000; ++i)
    {
        mapper.findOne(
            Criteria(Foo::Cols::_name, CompareOperator::EQ, id),
            [req, callbackPtr, this, &client = *_dbClient](Foo f) {
                LOG_INFO << "Find one";
                f.setAmount(f.getValueOfAmount() + 1);  // Add 1 to the amount
                Mapper<Foo> mapper(client);
                mapper.update(
                    f,
                    [req, callbackPtr](const size_t count) {
                        LOG_INFO << "update " << count << " line";
                        if (1 == count)
                        {
                            LOG_INFO << "Updated";
                        }
                    },
                    [req, callbackPtr](const DrogonDbException &e) {
                        LOG_ERROR << e.base().what();
                    });
            },
            [req, callbackPtr](const DrogonDbException &e) {
                LOG_ERROR << e.base().what();
            });
    }
}

And about the value of the amount field, I think it's right. consider that the finding requests are send first asynchrounously, they will be executed before any updating statement, so this means all updating statements are the same.

I stilldon't know why the rcb became null during the query.
Agree, if from my original concurrent requests case, the amount should probably be something between 1 and 1000.

@ihmc3jn09hk I've reproduce this crashing on linux, I'll fix it. Sorry for confusing you.

@ihmc3jn09hk I think this issue was fixed by the PR #379 , please check it out. thanks.

@an-tao May I have some information on what causes the crash? Would like to learn something XD. From the update in #379 , you fixed the SQL DB connection with making the connection parameters into member variables and capture the connection in this rather than copying?
All these causing the query crash? Or it is fixing the original posted problem?

@ihmc3jn09hk actrually I fixed two problems In #379:

I found that mysql_real_connect_start holds raw pointers, and the data they point to is used by successive calls to mysql_real_connect_cont, so these strings must be persistent.
the following modification fixed the crashing issue:
https://github.com/an-tao/drogon/blob/eda7de050e9e14d77631556a071b9a2d86c4a0f6/orm_lib/src/mysql_impl/MysqlConnection.cc#L431-L432
We can see in this case, in the old code the result is fetched immedietely and the idleCb_ is called before the execSql returns, consider the following code:
https://github.com/an-tao/drogon/blob/eda7de050e9e14d77631556a071b9a2d86c4a0f6/orm_lib/src/DbClientLockFree.cc#L341-L349
in that case, the first cmd in the queue is reused when the idleCb_ is called, but its data has been moved, so the assert(rcb) failure occurs.
I will modify this as follows to further increase security:

        std::shared_ptr<SqlCmd> cmd = std::move(sqlCmdBuffer_.front());
        sqlCmdBuffer_.pop_front();
        conn->execSql(std::move(cmd->sql_),
                      cmd->parametersNumber_,
                      std::move(cmd->parameters_),
                      std::move(cmd->lengths_),
                      std::move(cmd->formats_),
                      std::move(cmd->callback_),
                      std::move(cmd->exceptionCallback_));

@an-tao Great thx for clarifications. I was trying to fix the bug as well and recognized there were 2 threads performing the queries namely: Mysqlconnection and Sqlbinder. The Mysqlconnection one worked in the "idle event" while the Sqlbinder did the jobs stored in the "cmd vector". I was stucked there.
Much thx. I think this issue shall be closed completely.

@an-tao Great thx for clarifications. I was trying to fix the bug as well and recognized there were 2 threads in 2 different classes performing the queries namely: Mysqlconnection and Sqlbinder. The Mysqlconnection one worked in the "idle event" while the Sqlbinder did the jobs stored in the "cmd vector". I was stucked there.
Much thx. I think this issue shall be closed completely.

Thank you for helping me find such a serious problem ^_^

Have to thank you for the work too.
Just run the test again. It worked stably. Some figures for reference
1000 concurrent HTTP requests that find and update a single record in the MariaDB table.
Loop the process 10 times. Compiled as debug mode with TRACE on.
4 cores 3.5Ghz, 4GB DDR4.

Have to thank you for the work too.
Just run the test again. It worked stably. Some figures for reference
1000 concurrent HTTP requests that find and update a single record in the MariaDB table.
Loop the process 10 times. Compiled as debug mode with TRACE on.

It is best to output the log to a file. Printing the log on the standard output will seriously delay the performance.

4 cores 3.5Ghz, 4GB DDR4.

Ohh, dont left out the value of amount is 426, lolz.


Bazelify the GMP Precision Arithmetic Library

Hi all,
A critical component of this library is the GNU Multiple Precision Arithmetic Library written in C used for most underlying cryptographic calculations that are part of BLS. A major problem with this is that most architectures do not ship with GMP installed globally, and therefore any user wishing to use go-bls in their project will need to pollute their global namespace with libgmp.
We have opted for using the Bazel build system created by Google for dependency management and packaging of this repository for use in other projects. In particular, go-bls will be a critical component of the Prysm client created by Prysmatic Labs for Ethereum 2.0. Prysm uses the Bazel build tool extensively and ideally we'd want to import go-bls via Bazel as well. The problem with this is that GMP is not included as a Bazel dependency of go-bls, and therefore the build will fail due not finding the library.
A solution to this would be to convert lib GMP into a Bazel project following the guidelines for C/C++ projects in the Bazel documentation here. This is fairly extensive effort as GMP is a very big library containing multiple pieces. Tackling this issue would allow Prysm and any other Bazel-enabled project to import go-bls without requiring users to have GMP installed on their machine.
We are requesting to bounty this project out for motivated individuals to make this happen. This is a high priority for us at Prysmatic Labs.
Starting Point
This issue created by @prestonvanloon is a great starting point for someone tackling this: unable to gen_rule as part of http_archive.
Preston began by using http_archive to pull the libgmp official repo and begin creating a bazel BUILD file for the system directly.

Hey @jakerockland you're approved but please let us know ASAP if you don't think you'll be able to do it :)

@jakerockland If you want we can possibly work on together on this & maybe share the bounty?

@jakerockland Yes. This should be built entirely using Bazel as the build tool.
It should build on:

x86_64
Mac OS X
Windows
arm64
And any other relevant cpu architecture.

@prestonvanloon Thank you for the clarification. Given the high priority of this and what else I have in the pipeline, after taking some time to scope this out last night and realize how much of a behemoth/custom configuration scripts there are with GMP and confirming now that I understood properly, I think that it may be better to let someone else take on this bounty @ceresstation.
I've spend a good amount of time today trying to get things to work with this approach, to no avail https://github.com/bazelbuild/rules_go/issues/1233. Have you seen this issue @prestonvanloon?
Out of curiosity @prestonvanloon given that GMP library is changed very infrequently and thus will likely be a pretty static dependency, what is wrong with an implementation like this: #

Fair @jakerockland, @samparsky are you still up for taking it on? Do you feel confident you're able to do it?

@ceresstation Started work on it, will let you know my progress by tomorrow

@jakerockland @ceresstation I have been able to get it to build successfully using Bazel on MacOSX. Currently testing for ubuntu using a docker image.
For windows its recommended in the gmplib docs (https://cs.nyu.edu/~exact/core/gmp/index.html) to use a Linux environment Cygwin or MinGW which are linux environments

That's awesome, thanks for the update @samparsky!

@prestonvanloon I have been able to get it to build on using Bazel on Ubuntu & MacOSX.
But I am facing an issue I am able to get the build to work properly on MacOSX without Bazel sandbox mode on only & on Linux it works with sandbox mode on only.
I think it has something to do with the way the underlying filesystem works in this different OSes.
You can check out the details here
https://github.com/samparsky/bazel-gmp
The only difference between the two folders is local=0 or 1 in the gmplib.BUILD file.
In the mac folder its local=1 which means sandbox mode is off & in linux folder its local=0 which means sandbox mode is on.

@samparsky I took a look at your repository. It looks like your implementation is a genrule calling configure and make.
The goal of this task is to use bazel to build the library, not make. Additionally, you shouldn’t require users to install any system dependencies. They should be able to have a working bazel installation and run bazel build //... without additional steps.

@prestonvanloon I tried building it manually couldn't get it to work. Also tried to message the GMPlib mailing list to get any pointers couldn't get any positive response

@prestonvanloon If it's not an issue, I would like to work on it. As I understand, you need to download the GMP library, and use bazel to build it.

@robin-thomas sounds good to me. As long as bazel is the tool to actually build it. (Not using bazel as a wrapper for make or similar)

@ceresstation can you help transfer this issue to @robin-thomas please?

@prestonvanloon I had already applied for the issue in gitcoin.
https://github.com/prysmaticlabs/go-bls/issues/2#issuecomment-439647266
Are you unable to approve me with that link?

@prestonvanloon @rauljordan Could you take a look at: https://github.com/robin-thomas/bazelify-gmp ?

Looking great @robin-thomas!

@prestonvanloon Thanks! I'll continue working on it. Still loads more to be done.
@ceresstation Can you kindly transfer this issue to me? Thanks.

@prestonvanloon No. That select is a bit different. It's like a dictionary lookup based on a key, where the key can be architecture or some other parameters, but the value stored in the dictionary should be pre-defined. That's not the case here since we don't know the contents of the dictionary beforehand.
Anyway, I think I might have found another way to tackle it. So trying that.

Seems like I found a small bug in Bazel's code: https://github.com/bazelbuild/bazel/issues/6963
Maybe I'll wait for someone from their dev team to reply there.

Sounds good, that certainly looks like a bug to me.

@prestonvanloon Yeah. It's a bit of a blocker for me. But I'll try another way to continue working.
Congrats on getting the funds from Vitalik! Seems like it's making the news 👍

@prestonvanloon Have hit the issue of https://github.com/bazelbuild/bazel/issues/1920
Basically, the issue is that Bazel does not do linking for cc_library. So if I create a cc_library for gmp, it would not include any of its transitive dependencies. But I can create a shared library using cc_binary (Bazel does linking here), but for some reasons, it fails the go_library in go-bls with error expected cc_library, objc_library, cc_proto_library or cc_import.

@rauljordan @prestonvanloon
I have made 2 PRs:
https://github.com/prysmaticlabs/go-bls/pull/8
This one creates a new cc_library called go-lib inside the BUILD file. This is to help the issue that I had mentioned in https://github.com/prysmaticlabs/go-bls/issues/7. Which means, go-bls can be kept clean without any mcl. But need to let Bazel create all the libraries. If you create another bounty for that, I would be happy to move mcl to Bazel. But for now, I'm not building it, and had just added my gmp as a dependency to go-bls.
Its not easy to integrate OpenSSL with Bazel. So I had included BoringSSL into the cc_library, if you want to go with the above route.
This has a directory called external with a BUILD file. Bazel currently doesnt support transitive WORKSPACE. That means, everything in my WORKSPACE, should be written in go-bls WORKSPACE, and that goes for any projects that depends on go-bls.
https://github.com/prysmaticlabs/mcl/pull/1
This one exports a few header files to help move out mcl from go-bls.
My repo is: https://github.com/robin-thomas/bazelify-gmp
Here is the output after running go-bls unit tests (with bazel gmp):
$ bazel test ...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: df65dd4b-99e0-4542-975c-8dd574e59b74
INFO: SHA256 (https://codeload.github.com/golang/tools/zip/3e7aa9e59977626dc60433e9aeadf1bb63d28295) = 2384fa91351a7414b643c5230422ce45f5aa2be8a82727609afd4e64e6973a30
INFO: Repository rule 'bazelify_gmp' returned: {"remote": "https://github.com/robin-thomas/bazelify-gmp", "commit": "3819642a7f67cb6cd001edb862079238eb6d0a18", "shallow_since": "2018-12-23", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "bazelify_gmp"}
INFO: Repository rule 'boringssl' returned: {"remote": "https://github.com/google/boringssl", "commit": "fafc4482e85c09e7af5f71b2eb287b73ccd1020a", "shallow_since": "2018-12-21", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "boringssl"}
INFO: Analysed 3 targets (34 packages loaded, 9252 targets configured).
INFO: Found 2 targets and 1 test target...
INFO: Elapsed time: 63.900s, Critical Path: 35.70s
INFO: 623 processes: 623 linux-sandbox.
INFO: Build completed successfully, 657 total actions
//:go_default_test                                                       PASSED in 0.2s

Executed 1 out of 1 test: 1 test passes.
INFO: Build completed successfully, 657 total actions

@prestonvanloon Fixed by PR: https://github.com/prysmaticlabs/go-bls/pull/10
If everything is okay, can you kindly release the bounty?

@robin-thomas Thanks for all of your effort.
I'd like to confirm this builds on Mac OS X and Windows, then we can release the bounty!

@prestonvanloon Definitely. Let me know if you face any issues with building on Mac OS X and Windows. I'll wait for confirmation. Thanks!

bazel test //... on my mac failed on the following:
https://gist.github.com/terenc3t/bdbdadf215f7df4dc1b2067e0bd7120b
Lmk if I'm missing anything

@terenc3t Let me try reproducing it on my Mac.

I can reproduce the issue in Mac. Let me try fixing it.

@terenc3t Can you try out https://github.com/prysmaticlabs/go-bls/pull/12 in your Mac and see? It's working on my Mac.

@robin-thomas confirmed #12 works on my Mac

Hey @robin-thomas, tried out bazel test and received this: any ideas?
$ bazel test //...
INFO: Analysed 3 targets (0 packages loaded).
INFO: Found 2 targets and 1 test target...
ERROR: /home/zypherx/.cache/bazel/_bazel_zypherx/6dc90437243ef5aea30a94d0f60323cd/external/gmp_6_1_2/BUILD.bazel:310:1: Executing genrule @gmp_6_1_2//:gen_mpn_objs failed (Exit 1)
cp: cannot create regular file 'external/gmp_6_1_2/mpn/fac_table.h': Permission denied
INFO: Elapsed time: 0.355s, Critical Path: 0.04s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

FAILED: Build did NOT complete successfully

@rauljordan Whats the chmod permission of the directory /home/zypherx/.cache/bazel/_bazel_zypherx/6dc90437243ef5aea30a94d0f60323cd/external/gmp_6_1_2/mpn?

ls -ld /home/zypherx/.cache/bazel/_bazel_zypherx/6dc90437243ef5aea30a94d0f60323cd/external/gmp_6_1_2/mpn
drwxrwxr-x 28 zypherx zypherx 20480 Dec 28 09:07 /home/zypherx/.cache/bazel/_bazel_zypherx/6dc90437243ef5aea30a94d0f60323cd/external/gmp_6_1_2/mpn

Tried an expunge before building and testing - build succeeds, tests fail as above

Build succeeds, but the test fails? That's weird. The cp command is in the build stage. So both should trigger it. Will it be possible for you to run the bazel test as root user?
Which machine are you on, by the way? I'm unable to reproduce this error in both Ubuntu and Mac.

Windows fails to build
$ bazel test
ERROR: Failed to query DisplayName of HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\cef613b089ee1c28a22489bde1c8f7f5
INFO: Invocation ID: 2ecdbd45-1b0e-44f4-813f-0fee5da89e5d
Loading:
Loading: 0 packages loaded
ERROR: error loading package '': Encountered error while reading extension file 'm4.bzl': no such package '@io_bazel_rules_m4//': Traceback (most recent call last):
        File "C:/users/$USER/_bazel_$USER/wrsgbola/external/bazel_tools/tools/build_defs/repo/git.bzl", line 170
                _clone_or_update(ctx)
        File "C:/users/$USER/_bazel_$USER/wrsgbola/external/bazel_tools/tools/build_defs/repo/git.bzl", line 73, in _clone_or_update
                fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_m4:
+ cd C:/users/$USER/_bazel_$USER/wrsgbola/external
+ rm -rf C:/users/$USER/_bazel_$USER/wrsgbola/external/io_bazel_rules_m4 C:/users/$USER/_bazel_$USER/wrsgbola/external/io_bazel_rules_m4
      1 [main] rm (5048) C:\Program Files\Git\usr\bin\rm.exe: *** fatal error - cygheap base mismatch detected - 0x1802FE408/0x180301408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version should
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

Note: username replaced by $USER for copy/paste.
The steps followed were simply to install bazel, git clone the repo, and bazel test //..., but this looks like it might be an issue with their environment...

@prestonvanloon Shouldn't it be $ bazel test ...?

@robin-thomas I am actually getting the same issue as @rauljordan.
I built and tested everything yesterday. Then when I tried to build the test again (I expected the build to be cached so nothing happen), it tries to build gmp again and fails.
INFO: Elapsed time: 125.146s, Critical Path: 41.33s
INFO: 691 processes: 689 linux-sandbox, 2 local.
INFO: Build completed successfully, 849 total actions
//:go_default_test                                                       PASSED in 0.2s

Executed 1 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warninINFO: Build completed successfully, 849 total actions
➜  go-bls git:(master) bazel build :go_default_test
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 4276e43b-c7b5-4c39-bba4-cd4b74878cbd
INFO: Analysed target //:go_default_test (38 packages loaded, 9962 targets configured).
INFO: Found 1 target...
ERROR: /home/preston/.cache/bazel/_bazel_preston/0b01e4150831f4fda0c858be1b4e17f3/external/gmp_6_1_2/BUILD.bazel:310:1: Executing genrule @gmp_6_1_2//:gen_mpn_objs failed (Exit 1)
cp: cannot create regular file 'external/gmp_6_1_2/mpn/fac_table.h': Permission denied
Target //:go_default_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 19.724s, Critical Path: 14.56s
INFO: 1 process: 1 local.
FAILED: Build did NOT complete successfully

@robin-thomas bazel test //... is the canonical version of "Build and run all tests from the workspace root so yes this is the correct command.

@prestonvanloon No I mean, the output shows $ bazel test. It should be $ bazel test //... or $ bazel test ...

oh, copy and paste error. Let me edit the comment

How to reproduce the issue from @rauljordan
bazel clean --expunge
bazel build :go_default_test # Builds fine
bazel build :go_default_test # Second build fails (it shouldn't be building again anyway)

@prestonvanloon The Windows issue, I'm not sure. Maybe it's a Cygwin issue. Can you try using some other shell? (Shouldn't you be able to run bazel from cmd or maybe try git bash?)
For the other issue, It shouldn't be building the second time anyway. Unless the genrule isn't caching. In which case, the whole build needs to be done again.
Seems like I can reproduce the error when I build the second time. Let me check it out.

@robin-thomas I'll follow up a bit more on the windows issue. I don't think bazel was installed correctly.

@prestonvanloon @rauljordan Regarding the issue of build failing the second time, I had made the fix here: https://github.com/prysmaticlabs/go-bls/pull/13. It's working on my system. Can you try it out?

@prestonvanloon I assume everything is working as expected on Mac and Linux?

Hey @robin-thomas tried it out on a fresh windows configuration and received this:
ERROR: C:/users/maiji/downloads/go-bls/BUILD.bazel:3:1: in _cgo_collect_info rule //:go_default_library%linux_386%cgo_info:
Traceback (most recent call last):
        File "C:/users/maiji/downloads/go-bls/BUILD.bazel", line 3
                _cgo_collect_info(name = 'go_default_library%linux_386%cgo_info')
        File "C:/users/maiji/_bazel_maiji/tufpbscd/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 414, in _cgo_collect_info_impl
                _CgoInfo(orig_srcs = ctx.files.srcs, transf..., <6 more arguments>)
        File "C:/users/maiji/_bazel_maiji/tufpbscd/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 421, in _CgoInfo
                _select_archives(ctx.attr.libs)
        File "C:/users/maiji/_bazel_maiji/tufpbscd/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 134, in _select_archives
                fail("cc_library(s) did not produce a...")
cc_library(s) did not produce any files
ERROR: Analysis of target '//:go_default_test' failed; build aborted: Analysis of target '//:go_default_library%linux_386%cgo_info' failed; build aborted
INFO: Elapsed time: 436.371s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (38 packages loaded, 7434 targets configured)
FAILED: Build did NOT complete successfully (38 packages loaded, 7434 targets configured)

However I'm not convinced this is an issue with the project but perhaps with how I set everything up - perhaps there was some other system dep I was missing

@rauljordan Were you able to build go-bls in Windows before I made my first PR?
Maybe checkout to commit ed485f9efa247225c65b29c1ee00b5b4590fdf38 and run a clean Bazel build?

@prestonvanloon Can I assume its working in Linux and Mac?

Hi @robin-thomas, confirmed it works on Linux and Mac. Waiting on a windows confirmation as I no longer have access to a windows machine to attempt. Perhaps @IvanTheGreatDev can help with this?

@rauljordan That's great!
@IvanTheGreatDev Waiting to hear from you.

Hey @robin-thomas tried on another windows machine and received the same error. Checked out to that commit and then received this Java error
INFO: Invocation ID: e825c8f2-4267-4166-b7c9-1e5db3fae0f5
Loading:
Loading: 0 packages loaded
Analyzing: 3 targets (1 packages loaded, 0 targets configured)
Internal error thrown during build. Printing stack trace: java.lang.RuntimeException: Unrecoverable error while evaluating node '//:go_default_library%linux_386%_cgo_.o BuildConfigurationValue.Key[1ad0148498d0d593acb92abfdb3367c7] false' (requested by nodes '//:go_default_library%linux_386%cgo_import BuildConfigurationValue.Key[1ad0148498d0d593acb92abfdb3367c7] false')
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:499)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:368)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source

Sorry this is taking so long to debug - I know also @JerryFireman has windows and can try this out.

@rauljordan That's weird. That commit was before I even started working on gmp! So you had never tested go-bls on Windows before?

@JerryFireman @vanTheGreatDev Have either of you built go-bls on Windows before?

@rauljordan Regarding the first error, I had a look into cgo code.
https://github.com/bazelbuild/rules_go/blob/master/go/private/rules/cgo.bzl#L134
    """Selects a single archive from a list of files produced by a
    static cc_library.
    In some configurations, cc_library can produce multiple files, and the
    order isn't guaranteed, so we can't simply pick the first one.
    """

    # list of file extensions in descending order or preference.
    exts = [".pic.lo", ".lo", ".a"]
    for ext in exts:
        for f in as_iterable(files):
            if f.basename.endswith(ext):
                return f

Windows static libraries have an extension *.lib (maybe Bazel produces *.a libraries on Windows, but I don't know). If that's the case, then cc_library won't be able to find the library. Hence the error.

@rauljordan Also, can you share the details about the Windows setup? What's the compiler used? If its MSVC, then cgo doesn't have support for it.

Hey Robin, it is indeed MSVC. That must be the issue in that case. @houjieth agreed to try it oit on windows this evening as well.
On Thu, Jan 3 2019 at 5:43 PM, <<EMAIL_ADDRESS>> wrote:

@rauljordan ( https://github.com/rauljordan ) Also, can you share the
details about the Windows setup? What's the compiler used? If its MSVC,
then cgo doesn't have support for it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (
https://github.com/prysmaticlabs/go-bls/issues/2#issuecomment-451313930 ) ,
or mute the thread (
https://github.com/notifications/unsubscribe-auth/AFUIPUUTUZFf9O6-V7KjbpxYO6FVcWO2ks5u_pWtgaJpZM4Ym4L_
).

@rauljordan Yup. That should be the issue then.
cgo does support MSYS + gcc, but I don't know to what extent. cgo support for Windows seems a bit poor.
So you never tested on Windows before?
@houjieth Try MSYS + gcc.

@houjieth Any updates?

I'm using native bazel on windows (no cygwin, no other simulated unix environment such as WSL).
Here's my output
C:\Users\houji\go\src\github.com\prysmaticlabs\go-bls>bazel build //...
Starting local Bazel server and connecting to it...
INFO: Repository rule 'io_bazel_rules_m4' returned: {"remote": "https://github.com/jmillikin/rules_m4", "commit": "2bf69df77dfb6b3ba6b7fc95c304b0dc279375bc", "shallow_since": "2018-12-22", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "io_bazel_rules_m4"}DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: 'BAZEL_VC' is not set, start looking for the latest Visual C++ installed.
DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: Looking for VS%VERSION%COMNTOOLS environment variables, eg. VS140COMNTOOLS
DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: Looking for Visual C++ through registry
DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: Looking for default Visual C++ installation directory
DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: 'PROGRAMFILES(X86)' environment variable is not set, using 'C:\Program Files (x86)' as default
DEBUG: C:/users/houji/_bazel_houji/6dp3edvb/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: Visual C++ build tools found at C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
INFO: SHA256 (https://codeload.github.com/golang/tools/zip/3e7aa9e59977626dc60433e9aeadf1bb63d28295) = 2384fa91351a7414b643c5230422ce45f5aa2be8a82727609afd4e64e6973a30
INFO: Repository rule 'bazelify_gmp' returned: {"remote": "https://github.com/robin-thomas/bazelify-gmp", "commit": "98ccf38c714ccd5527abdb46c16095fa1f622070", "shallow_since": "2018-12-24", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "bazelify_gmp"}
INFO: Repository rule 'herumi_mcl' returned: {"remote": "https://github.com/prysmaticlabs/mcl", "commit": "b90f1fbfea78c47012fcbc9243a616e654794421", "shallow_since": "2018-12-27", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "herumi_mcl"}
INFO: Repository rule 'boringssl' returned: {"remote": "https://github.com/google/boringssl", "commit": "fafc4482e85c09e7af5f71b2eb287b73ccd1020a", "shallow_since": "2018-12-21", "init_submodules": False, "verbose": False, "strip_prefix": "", "patches": [], "patch_tool": "patch", "patch_args": ["-p0"], "patch_cmds": [], "name": "boringssl"}
ERROR: C:/users/houji/go/src/github.com/prysmaticlabs/go-bls/BUILD.bazel:3:1: in _cgo_collect_info rule //:go_default_library%android_amd64%cgo_info:
Traceback (most recent call last):
        File "C:/users/houji/go/src/github.com/prysmaticlabs/go-bls/BUILD.bazel", line 3
                _cgo_collect_info(name = 'go_default_library%android_amd64%cgo_info')
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 414, in _cgo_collect_info_impl
                _CgoInfo(orig_srcs = ctx.files.srcs, transf..., <6 more arguments>)
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 421, in _CgoInfo
                _select_archives(ctx.attr.libs)
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 134, in _select_archives
                fail("cc_library(s) did not produce a...")
cc_library(s) did not produce any files
ERROR: Analysis of target '//:go_default_test' failed; build aborted: Analysis of target '//:go_default_library%android_amd64%cgo_info' failed; build aborted
INFO: Elapsed time: 433.229s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (35 packages loaded, 7453 targets configured)

I got the same error. How can I enforce it to use gcc instead of MSVC? I'm really not familiar with MinGW and MSYS2...

Are you able to run the below command?
$ bazel build //... --compiler=mingw-gcc

Now I'm using MSYS2 now without MSVC.
houji@DESKTOP-O5H7M9A MSYS /c/Users/houji/go/src/github.com/prysmaticlabs/go-bls
$ bazel build //...
INFO: Invocation ID: 4ce4bc40-5265-454a-b469-00a9509a87e9
Loading:
Loading: 0 packages loaded
Analyzing: 3 targets (0 packages loaded, 0 targets configured)
ERROR: C:/users/houji/go/src/github.com/prysmaticlabs/go-bls/BUILD.bazel:3:1: in _cgo_collect_info rule //:go_default_library%linux_mipsle%cgo_info:
Traceback (most recent call last):
        File "C:/users/houji/go/src/github.com/prysmaticlabs/go-bls/BUILD.bazel", line 3
                _cgo_collect_info(name = 'go_default_library%linux_mipsle%cgo_info')
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 414, in _cgo_collect_info_impl
                _CgoInfo(orig_srcs = ctx.files.srcs, transf..., <6 more arguments>)
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 421, in _CgoInfo
                _select_archives(ctx.attr.libs)
        File "C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 134, in _select_archives
                fail("cc_library(s) did not produce a...")
cc_library(s) did not produce any files
ERROR: Analysis of target '//:go_default_test' failed; build aborted: Analysis of target '//:go_default_library%linux_mipsle%cgo_info' failed; build aborted
INFO: Elapsed time: 0.592s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

houji@DESKTOP-O5H7M9A MSYS /c/Users/houji/go/src/github.com/prysmaticlabs/go-bls
$ bazel build @bazelify_gmp//:gmp
INFO: Invocation ID: 18ac6ddd-788d-4f38-b1f5-edd31178d40d
Loading:
Loading: 0 packages loaded
Analyzing: target @bazelify_gmp//:gmp (0 packages loaded, 0 targets configured)
INFO: Analysed target @bazelify_gmp//:gmp (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 21] no action
ERROR: C:/users/houji/_bazel_houji/6dp3edvb/external/m4_v1.4.18/BUILD.bazel:15:1: C++ compilation of rule '@m4_v1.4.18//:m4_lib' failed (Exit 2)
c:\users\houji\_bazel_houji\6dp3edvb\execroot\__main__\external\m4_v1.4.18\lib\freadahead.h(41): error C2061: syntax error: identifier '__attribute__'
c:\users\houji\_bazel_houji\6dp3edvb\execroot\__main__\external\m4_v1.4.18\lib\freadahead.h(41): error C2059: syntax error: ';'
Target @bazelify_gmp//:gmp failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.788s, Critical Path: 0.70s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

If add --compiler=mingw-gcc
houji@DESKTOP-O5H7M9A MSYS /c/Users/houji/go/src/github.com/prysmaticlabs/go-bls
$ bazel build //... --compiler=mingw-gcc
INFO: Invocation ID: dc0ee7fe-a156-442e-b322-d57dca3822ed
Loading:
Loading: 0 packages loaded
INFO: Build option --compiler has changed, discarding analysis cache.
Analyzing: 3 targets (0 packages loaded, 0 targets configured)
INFO: Analysed 3 targets (0 packages loaded, 7846 targets configured).
INFO: Found 3 targets...
[4 / 16] [-----] BazelWorkspaceStatusAction stable-status.txt
ERROR: C:/users/houji/_bazel_houji/6dp3edvb/external/io_bazel_rules_m4/m4/internal/BUILD:1:1: C++ compilation of rule '@io_bazel_rules_m4//m4/internal:capture_stdout' failed (Exit 1)
external/io_bazel_rules_m4/m4/internal/capture_stdout.c: In function 'main':
external/io_bazel_rules_m4/m4/internal/capture_stdout.c:31:48: error: 'S_IRUSR' undeclared (first use in this function)
     out_fd = open(argv[1], O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
                                                ^~~~~~~
external/io_bazel_rules_m4/m4/internal/capture_stdout.c:31:48: note: each undeclared identifier is reported only once for each function it appears in
external/io_bazel_rules_m4/m4/internal/capture_stdout.c:31:58: error: 'S_IWUSR' undeclared (first use in this function)
     out_fd = open(argv[1], O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
                                                          ^~~~~~~
INFO: Elapsed time: 2.543s, Critical Path: 0.37s
INFO: 0 processes.

INFO: Found 1 target...
[0 / 17] no action
ERROR: C:/users/houji/_bazel_houji/6dp3edvb/external/m4_v1.4.18/BUILD.bazel:15:1: C++ compilation of rule '@m4_v1.4.18//:m4_lib' failed (Exit 1)
In file included from external/m4_v1.4.18/lib/regex.c:68:
external/m4_v1.4.18/lib/regex_internal.h:29:10: fatal error: langinfo.h: No such file or directory
 #include <langinfo.h>
          ^~~~~~~~~~~~
compilation terminated.
Target @bazelify_gmp//:gmp failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.267s, Critical Path: 0.21s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Thanks for the logs @houjieth!
Can you check whether the Windows platform has the m4 binary?
@prestonvanloon It seems like rules_m4 doesn't work on Windows. So what to do now?

Hey @robin-thomas, m4 is here on sourceforge http://gnuwin32.sourceforge.net/packages/m4.htm, and perhaps we can use bazel platform selection to download the right distribution? It seems to be downloading the linux version with the current configuation. @prestonvanloon suggested this.


[BUG]: Documentation for PowerFlex nasName states it is not a required field

Bug Description
Documentation for PowerFlex nasName states it is not a required field: https://dell.github.io/csm-docs/docs/deployment/helm/drivers/installation/powerflex/
Deploying the driver without setting this field causes the node side of the driver to fail to start. Documentation needs to reflect that this field is "Required: true"
Logs
n/a
Screenshots
No response
Additional Environment Information
No response
Steps to Reproduce
Don't set nasName in the PowerFlex secret.
Expected Behavior
Documentation is updated and correct regarding the nasName field.
CSM Driver(s)
PowerFlex
Installation Type
No response
Container Storage Modules Enabled
No response
Container Orchestrator
K8s
Operating System
n/a

Note: I encountered this using my own build of the Powerflex driver and my own helm chart. I don't think that would change the results but I did not test it with the stock software. It worked when I added nasName: "" to the secret. I think just the documentation needs to be updated.

/sync

/sync

PR raised: https://github.com/dell/csm-docs/pull/1365


Integrate with traffic conditions [M]

Include data on current traffic conditions of route and calculate best speeds and times per step to avoid congestion.

Use an traffic api, such as Microsoft's Bing traffic (https://msdn.microsoft.com/en-us/library/hh441725.aspx). This could be factored into speed decisions so slowing down if there is traffic ahead, to give the traffic time to clear, rather than rushing to it. Also would be useful to display traffic information for the user to see, so they can make strategy decisions.


in-app FAQ links to bundesregierug.de, which is broken

The in-app FAQ button "Häufige Fragen" links to a website hosted by bundesregierung.de
If and only if the language is German, this website is blocked by a survey pop-up (see picture below), which can neither be closed nor be started or rejected on iOS 13.5.1 and iPhone SE 2020.
The German FAQ is thus not accessible.
I know, this is not really app-related (it's website related), but it affects the app and the bundesregierung website is not hosted on github.
Why is the FAQ button not linking to the website https://www.coronawarn.app/de/faq/ which has a github repo and is probably in better hands?

Edit: Corrected iOS version (13.5.1 instead of 13.5) and added phone model

Dear @Libavius, thanks for bringing up that issue. However, please understand that the representation in the app stores is the exclusive responsibility of the Federal Press Office. Please reach out to them at their website.

@inf2381 Thanks, I'll fill out that form.
Yet, this is not app store related. The survey appears if I tap the in-app button "Häufige Fragen". Thus any German iOS user searching for the FAQ in the app atm can't view it. I understand, that you can't change anything about it. However I thought, that you might be in contact with the responsible people at bundesregierung.de.
I think, that this issue is quite urgent, since not being able to open and read the FAQ undermines the users trust. =/

@Libavius I totally agree with you and we will of course try to escalate that. But the more people complain the better 😊 .

@inf2381 I agree =).
A last remark: For issues that you can't to anything about, I think its still best to leave them open until they are resolved. (There was a similar issue regarding the age restriction for the iOS app store: #632).
This way:

people are aware, that you are aware of the issue and don't bring it up again (nobody looks into closed issues for an issue, which is not fixed)
if - as you say - 'the more people complain the better' this is the way to do it, since people read open issues and complain

In order for you to stop worrying about the issue, you could attach a lable like "not our responsibility"  but not close the issue until it is solved.
So I'd say, its best to reopen this issue and #632.

Update: This issue is resolved, the survey is taken from the website.

For me, the survey pop-up is gone for good. Can this be confirmed by anyone else?

Fixed👍🏽

Alors, I close this issue for now =)


Reference Information (CodeLens)

Type: Feature Request
Could we please have a keyboard shortcut to select the reference information, as there does not appear to be one.
In Visual Studio pressing Alt+F2 works, but does not work in Visual Studio Code.
VS Code version: Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:08:20.941Z)
OS version: Windows_NT x64 10.0.22621
Modes:

#200465 looks related.

Given that this is an accessibility issue, should it be treated as a bug?

Do you know about "F1 > Show Code Lens for Current Line"?

No I was not aware of that.
I will set up a voice command for this. Thank You.


Completed Queue using Linked List

Please read how to contribute first!
Description
Submission description here
Checklist

[x] I've checked the issue list BEFORE deciding what to submit
[x] I've read the contribution guidelines
[x] I've edited the README.md link to my code

Don't forget to visit our website!
Feel free to add this badge after your submission is accepted!

@bagladivyang03 Please solve the conflicts.

Yeah but i have read that it was already implemented so i think it will not be accepted  then should i solve conflict or it will not be accepted

@bagladivyang03 Yeah, LinkedList is already implemented using struct. But this can also be added since the approach is different from the previous.

Ok I will solve basically I have updated the readme also and also provided link but what is the issue i m not understanding

@bagladivyang03 You do not have to update anything. I have already formatted the code and updated the readme in my last 2 commits. The problem is that there is conflict between the branch patch-1 and TesseractCoding:master because there is an update in TesseractCoding:master branch and your branch is not updated according to TesseractCoding:master.

Okay so i have to update my branch ? So how to do ?

@bagladivyang03 Just copy the content of readme file from TesseractCoding:master and click on Resolve conflicts and paste it there. Also, add your Queue using Linked List  in ds section of C++

@bagladivyang03 Just copy the content of readme file from NeoAlgo/C++/README.md
 and click on Resolve conflicts and paste it there. Also, add your Queue using Linked List  in ds section of C++

@bagladivyang03 Just copy the content of readme file from NeoAlgo/C++/README.md
 and click on Resolve conflicts and paste it there. Also, add Queue using Linked List  to the readme.

@bagladivyang03 Just copy the content of readme file from NeoAlgo/C++/README.md
 and click on Resolve conflicts and paste it there. Also, add Queue using Linked List  to the readme.

Now can u pls check is it done ?

@bagladivyang03 LGTM! Thanks for the PR.

Great job, guys!

@all-contributors please add @bagladivyang03 for code


I Can help Contribute more algorithms, pls assign me

Hello, Can you please assign this issue to me?
I know a few algorithms very well. I will love to contribute my knowledge here
Thanks in advance :)


fix zfin links to no longer use ZFIN_jump

https://agr-jira.atlassian.net/browse/AGR-1350
http://zfin.org/cgi-bin/ZFIN_jump?record=ZDB-PUB-020724-1 should use:
http://identifiers.org:ZFIN:ZDB-PUB-020724-1    if the organization is known (for the ZFIN curie prefix) or
http://zfin.org/ZDB-PUB-020724-1  if not (but I think we always know):
should handle all other cases, as well:
http://identifiers.org/ZFIN:ZDB-GENE-001103-2

This will need to be fixed here: https://github.com/geneontology/go-site/blob/master/metadata/db-xrefs.yaml#L3380

@doughowe Is this a modification that you'd want to make?


fix: Remove the DROP EXTENSION command that's failing

The application DB user didn't have permission to run this command, and deploys have been failing silently since this was introduced.
We'll have to figure out another way to achieve removing the extension.

cc @ianwestcott: Unfortunately this wasn't the fix I initially thought it was.

@paulswartz That's an interesting question. A super quick search didn't turn anything up, but I'll poke around harder.
It also occurred to me that removing the extension probably isn't very important in the end anyway. The original reason for moving away from it was that we had trouble installing it in a new DB instance. But even if nothing is using it, having the extension hanging out vestigially on some DB instances probably isn't actually hurting anything.

But even if nothing is using it, having the extension hanging out vestigially on some DB instances probably isn't actually hurting anything.
@arkadyan That was my thought as well, as long as it's not creating any functions that we could use accidentally.

I'd also be okay with a post-merge task for an infra engineer to remove the extension manually (first for dev where we can test it, then for prod). @arkadyan if you want to go that route, can you create an infrastructure request for it?

This ticket got a little lost in the shuffle for me. But I like that idea, @ianwestcott, thanks.
@paulswartz I think that makes this ticket definitely good to good if it looks ok to you.


Merge Existing Projects to Central Repository

Merge Current Orion Extensions & Packages to this Repository

[x] Orionjs Maps
[x] Orion Cordova
[x] Orion Foundation
[x] Orion Bootstrap Modals
[x] Orion Emails

After Merging The following tasks need to be complete

[ ] Create API for each package
[ ] Write Tests for each package
[ ] Create new gitter.im community and add badge to readme.md file.
[ ] Create waffle.io account and link with project.
[ ] Create waffle.io badges and add to readme.md file.
[ ] Update package descriptions , version, and git link to point to the corresponding folder.

Merged Existing projects to new repo.
Removed old repositories.


Add support to filter by image

When running multiple images, say WordPress, ctop scatters them in alphabetical order by container name. This filter would be a great addition.

Do you mean sorting by image name? Or filtering by removing matching containers (f key)?

Yes, sort containers by image names.


Add a prefix_url to the host

Is there any way we can add a prefix to the URL :
self.url = 'http://' + host + ':' + str(port)
So that we can serve over an adress like : localhost:8080/someprefix ?
This would be very useful in my case, as I'm running the server behind Nginx. The reverse proxy can't find the static file with this configuration.
Here is the Nginx config :
location /myprefix {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Without the the trailing slash in localhost:8080/, nginx fails to redirect anything to the server.
Thank you.

What is the actual issue? Supporting a) a prefix option or b) how the URLs are handled via reverse proxy? Goal is to avoid to much complexity around a) unless there is prior art. For b) feel free to submit a PR.

The issue is a) supporting a prefix/suffix option.

Are there any other tools supporting this approach? Ideally Netron's Python server should remain basic and other tools should be used for more complex routing. Another approach to try might be to serve only the model file and use https://lutzroeder.github.io/netron?url=... which is very similar to what the Python server is doing (make sure CORS is enabled).


Soft Logout does not play well on servers with multiple login flows

Describe the bug
If your Matrix Homeserver has SSO and Username + Password support then Soft Logout will give both options to the user, when in fact there is only one that will work and the other will butcher their local data.
This is because as far as the spec is concerned, Soft Logout docs don't tell clients to send any identifying marks along with the GET /login so the flows that the server returns cannot be at all personalised/scoped.
Expected behavior
Clients should tell Servers their soft-logged-out user-id or something of that nature to allow the server to personalise the flows to only the ones that make sense for that user. Using user-id is probably a bad idea as it'd open a door for anyone to find out what flow a user used to log in and make their account that 1% more vulnerable.

As an aside, if Element Web/Desktop encounters such a server and is soft-logged out it will only show the Password prompt, prioritizing m.login.password and leaving SSO login-ers stranded


Add disjoint addressing mode draft proposal

This is a compromise between the proposals that Christoph Hellwig and I have previously advanced.
The design permitting hardware to always use disjoint addressing mode is the key part from my earlier proposal, while the use of SSU/SLU fields in the sstatus CSR instead of adding a new sats CSR is a significant contribution from Christoph Hellwig's proposal.
This compromise proposal also better balances the burdens between hardware and software for supervisors that support disjoint addressing mode as an optional feature than either of the original proposals.  Christoph Hellwig's earlier proposal put the entire complexity into hardware, defining disjoint addressing as a distinct hardware mode, while my earlier proposal radically changed all access to user memory when disjoint addressing is used.
This compromise allows supervisor user memory access routines to act as if the Sdas extension is always present, since the SSU/SLU fields must be hardwired to zero on systems that do not support disjoint addressing and writing them is harmless in that case.  The hardware can always use satp for supervisor translations and suatp for user translations, avoiding the introduction of a new mode switch in hardware, at the small cost of requiring dual-mode supervisors to choose which CSR to update during user task switch.  This is a small run-time patch (changing the CSR number in the supervisor text) to adapt to differing hardware support and should not be a significant concern.
I suggested this compromise in an off-list email to Christoph Hellwig over a week ago and have decided to proceed, since I have received no reply.

This definition:
If the MODE field in {\tt suatp} contains an illegal value, all user translations will fault.
doesn't work, because MODE is a WARL field, and it is not possible to write an illegal value into it (because they are converted to some legal value)

This definition:
If the MODE field in {\tt suatp} contains an illegal value, all user translations will fault.
doesn't work, because MODE is a WARL field, and it is not possible to write an illegal value into it (because they are converted to some legal value)

Also, this says that the extension adds 2 bits to sstatus.
Isn't it technically the case that it adds to bits to mstatus, but are visible (and writable) in sstatus aa a restricted view CSR? ( I believe it later says they are visible in mstatus, but I would say that is backwards from every other bit defined to visible in sstatus)

Also, this says that the extension adds 2 bits to sstatus.
Isn't it technically the case that it adds to bits to mstatus, but are visible (and writable) in sstatus aa a restricted view CSR? ( I believe it later says they are visible in mstatus, but I would say that is backwards from every other bit defined to visible in sstatus)

This PR started in 2018! If this info is still required, it will need to be converted to asciidoc before it can be merged. If that is the case, please work with @wmat and I to move it forward. If not, please close.

@kersten1 I think that converting the PR to AsciiDoc would be putting the cart before the horse, since the proposal didn't get traction within RVIA.  To simplify the bookkeeping, I'm going to close the PR.  The discussion on the tech-privileged mailing list.  If that happens and it gains momentum, then we can convert it to AsciiDoc.

I think we can declare this to be a failed proposal.
-- Jacob