Warehouse image updateStrategy: NewestBuild not pulling the Tags curretly

Checklist

[v] I've searched the issue queue to verify this is not a duplicate bug report.
[v] I've included steps to reproduce the bug.
[v] I've pasted the output of kargo version.
[v] I've pasted logs, if applicable.

Description
When creating a warehouse with an image subscription with the updateStrategy = NewestBuild
the image tags that are arriving from the registry are not updated.
Screenshots
the image list from the registry:

The image that the warehouse received:

Steps to Reproduce
Create a warehouse with a subscription:
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: gotham
spec:
  subscriptions:
      - image:
          repoURL: quay.io/gotham/batman
          updateStrategy: NewestBuild
      - image:
          repoURL: quay.io/gotham/joker
          updateStrategy: NewestBuild
      - image:
          repoURL: quay.io/gotham/robin
          updateStrategy: NewestBuild
      - git:
          repoURL: https://github.com/gotham-demo/gotham-cd.git
          branch: main

Version
V0.2.1

Logs
Controller log:
[kargo-controller-798f754644-f4nn4-controller.log](https://github.com/akuity/kargo/files/13412135/kargo-controller-798f754644-f4nn4-controller.log)

@tal-hason I presume this to be an Image Updater bug, and more specifically, I suspect it has something to do with the way they cache things, which seems to me that it may be incorrect in some cases.
#1058 will move us off of image updater entirely.
If you don't mind helping me out a bit here, there are two things that would be useful data points:

If you restart the controller, does it then find the right image? This would prove it is related to Image Updater's cache.

I did a custom build of main + #1058 and pushed it to krancour/kargo:for-tal. Would you be willing to try that image and tell me if it solves your problem?

These datapoints would be useful for further justifying the transition away from Image Updater.

If you restart the controller, does it then find the right image? This would prove it is related to Image Updater's cache.

Yes, I tried it many times but without any success :-(

I did a custom build of main + https://github.com/akuity/kargo/pull/1058 and pushed it to krancour/kargo:for-tal. Would you be willing to try that image and tell me if it solves your problem?

NP I will try it later on and update you

Yes, I tried it many times but without any success :-(

Still possible it is an image-updater bug we don't know about.

NP I will try it later on and update you

I appreciate this very much!

@krancour ,
I get:

Failed to pull image "ghcr.io/krancour/kargo:for-tal": rpc error: code = Unknown desc = Requesting bearer token: invalid status code from registry 403 (Forbidden)

@tal-hason, krancour/kargo:for-tal is on Docker Hub; not ghcr.io.

@krancour,
now change with the custom image
here is the log file of the controller:
kargo-controller-f5c4b67c4-bw6rz-controller.log

Thanks for trying that @tal-hason. @christianh814 confirms the same issue both with main and the custom build.

@tal-hason @christianh814 I've gotten to the bottom of this:
Kargo and Image Updater disagree on the constants used to represent the different strategies and have all along:
This is from v0.1.0:
https://github.com/akuity/kargo/blob/v0.1.0/internal/images/images.go#L15-L42
Image Updater defaults to semver if it cannot parse the provided strategy.
This continues to be the case, all the way up to and including main.
We never noticed up until now because all of our examples have used semver and we assumed existing Image Updater code just works -- and mostly it does. It was just the failed parsing throwing everything off.
My PR #1058 that completely replaces Image Updater (for reasons entirely unrelated to this) happens to solve the issue just because it eliminates the disagreement over what constants represent each strategy.
(If my custom build didn't appear to solve the issue for you, I am questioning whether I was possibly sitting on the wrong branch when I built it.)
If #1058 isn't merged soon, I will open a separate fix for this.

@krancour , here are soylent-green logs thanks
kargo-controller-74bdd7d5c5-cczs5-controller.log

@tal-hason @christianh814 I just remembered that #1058 (soylent-green) has breaking changes to the CRDs.
updateStrategy has changed to tagSelectionStrategy.
Your old data adhering to the schema for the old CRD is missing tagSelectionStrategy and so we're once again defaulting to semver.
🤦
i.e. Can't test #1058/soylent-green custom image without also taking the new CRDs.

@krancour ,
LOL, np.
So just changing the warehouse as follows
updateStrategy -> tagSelectionStrategy
If not share a sample 😁

So just changing the warehouse as follows

updateStrategy -> tagSelectionStrategy

Yep. That's it. As long as you've upgraded the CRDs.

So just changing the warehouse as follows

updateStrategy -> tagSelectionStrategy

Yep. That's it. As long as you've upgraded the CRDs.
@krancour, here is the update:

Updated the CRD like this:

the warehouse YAML:
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: gotham
  namespace: gotham-kargo
  annotations:
    argocd.argoproj.io/sync-wave: "1"
spec:
  subscriptions:
      - image:
          repoURL: quay.io/gotham/batman
          tagSelectionStrategy: NewestBuild
      - image:
          repoURL: quay.io/gotham/joker
          tagSelectionStrategy: NewestBuild
      - image:
          repoURL: quay.io/gotham/robin
          tagSelectionStrategy: NewestBuild
      - git:
          repoURL: https://github.com/gotham-demo/gotham-cd.git
          branch: main

now it seems to work:

but the auto-promotion is taking a long time to start.
here is the controller LOG:
kargo-controller-74bdd7d5c5-d54v9-controller.log
I will build some new images and test how it repsonds

but the auto-promotion is taking a long time to start.

Known, but probably undocumented, issue and unrelated to #1058.
We are lacking an event handler to make a warehouse's subscribers reconcile immediately after new freight is created.
If you open an issue, we can probably fix that quickly.

For now, i will keep on running with:
image:
  ## @param image.repository Image repository of Kargo
  repository: docker.io/krancour/kargo
  # repository: ghcr.io/akuity/kargo
  ## @param image.tag Overrides the image tag. The default tag is the value of `.Chart.AppVersion`
  tag: soylent-green

@krancour, I did another test, this time I clicked refresh on each of the images, it took a few seconds, and then created a new freight

@tal-hason that's normal behavior. All resources reconcile at a certain minimal interval unless something forces them to reconcile sooner.
Things that make it reconcile sooner:

A change to the resource
Being programmatically scheduled for reconciliation after a change to a related resource
Refresh: Which is actually a change to the resource in disguise. Refresh changes the value of a specific refresh annotation.

You're at the mercy of the refresh interval unless one of those events occurs.
To make things more responsive, we plan to add support for webhooks. (There's an open issue for it.) This would schedule warehouses for reconciliation after external events like an image push. Webhooks can be onerous to set up, however, so they're unlikely to be used in the common case and would only be used if you're trying to squeeze every last bit of responsiveness possible out of your pipeline.
For everyone else, there's the warehouse refresh button.
Note this is the same as Argo CD. Apps reconcile at a certain minimal interval unless a modification or hard refresh forces them to reconcile sooner.

5 minutes, I think. It's not configurable at present. If we add webhooks, there's probably no reason to make it configurable because the webhooks will address the responsiveness.

@krancour, yes webhook will solve the reconcile issue, but please design the webhook so it can be triggered with a simple "curl" command & and not like in argoCD which supports only specific SCM patterns.
i.e.
kargo.fqdn/api/webhook/#name-of-warehouse
or
kargo.fqdn/api/webhook and then filter the body from the SCM payload

If possible, let's try to move further discussion of things that aren't directly about the NewestBuild strategy not working to the appropriate threads.

@krancour, I'm playing with 0.3.0_alpha.1, and this issue still persists & the chart CRDs are not updated

@tal-hason the fix isn't merged yet.


Improve test coverage

The long march to :100: continues...

For some reason it always adds about 90 of Garry's commits as soon as the branch is created. Not sure what's going on there.


Success callback failing.

With jQuery 1.7.1 and validate 1.9.0, the success callback is called every time the field is acted on, instead of only on success.  I observed this on several other versions of jQuery and validate as well.  Completely broken.

I'm sorry for the lack of activity on this issue. Instead of leaving it open any longer, I decided to close old issues without trying to address them, to longer give the false impression that it will get addressed eventually.
To the reporter (or anyone else interested in this issue): If you're affected by the same issue, consider opening a new issue, with a testpage that shows the issue. Even better, try to fix the issue yourself, and improve the project by sending a pull request. This may seem daunting at first, but you'll likely learn some useful skills that you can apply elsewhere as well. And you can help keep this project alive. We've documented how to do these things, too. A patch is worth a thousand issues!


How to override Hapi's server-level validation on plugin registration?

Hello,
I am using the server.options.routes to setup the default route configuration. Since the project will mostly require an authorization header I set it to:
{
  validate: {
    headers: Joi.object({
      authorization: Joi.string().required()
    })
  }
}

The problem I am having is that when I register hapi-swagger, the default validation rules are applied to the /documentation route that is being setup in the plugin register function (and all the other paths exposed by the plugin). I noticed that in the plugin options some keys, for example auth and cors,  are possible to override but validate is not.
Is there a way for keeping the server-wide validation rules for headers without affecting the /documentation route? Currently when trying to access the documentation endpoint (ie. localhost:3000/documentation) I receive the following error because of the default server settings (as expected):
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "\"authorization\" is required",
  "validation": {
    "source": "headers",
    "keys": [
      "authorization"
    ]
  }
}

What I think would work is allowing to pass a validate key in the plugin options, which, if present, would override the default route being setup in the plugin, but I might be mistaken, in which case I would appreciate any obvious solution on how to solve this case.

I agree with your suggestion. Can you submit a PR long with unit test?


Extension not working for git repositories that contain a . character.

Example url: https://www.github.com/exampleowner/example.repository/pulls/1
Github selfie doesn't like the . in example.repository and therefore fails to load into the page.
Potentially the 'allowed paths' regex list? @ https://github.com/thieman/github-selfies/blob/master/chrome/selfie.js#L37
I can't selfie my company repositories because of this. Please fix.

When attempting to sign up for GitHub:

Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen

When attempting to create a repository, GitHub allows alphanumeric, periods, hyphens, and underscores; anything else is converted to a hyphen.
However, these rules are more strict than the allowedPaths need to be; since usernames and repository names, by rule, can't contain forward slashes, the pattern could be changed to accept any character until the next forward slash, for example:
// Any non-slash character
/github.com\/[^\/]+\/[^\/]+\/issues\/new/
// Or a lazy wildcard
/github.com\/.+?\/.+?\/issues\/new/

This was hopefully fixed by #94 which rolled out in version 2.0.5. Going to close this issue, if it's still a problem please reopen.


Fix missing html tag

 was not closed that make the back to top button go to "youtube"

These little things get lost in merges sometimes :P thanks for fixing :)

it can happens when you manage 200PR the same day :)

haha yeah xD


Token autocompletion not working on utils [CodeSandbox]

Describe the bug
Autocomplete does not seem to work for utils right now. Inside of css() the utils are not even defined as a prop, they are only there if you create a media query with css({"bp1": {"pt": ...}}).
Steps to reproduce

Use the css() or styled() function
Don't get any autocompletion for utils

I've created a CodeSandbox here: https://codesandbox.io/s/distracted-rain-s63rmp?file=/src/App.tsx
Expected behaviour
I would expect to get suggestions of the available tokens.

I was able to fix this by manually installing @stitches/react. Is this a known behavior?

Are there any updates on this? I would love to contribute a fix for this, but I've been looking into this issue and I have no idea what causes it. Do you have any clues on what might be the problem here?
The error even states that there is no utility registered. Installing vanilla stitches in the repo works just fine though.

Thanks for your response! Unfortunately, that doesn't fix it, and the codesandbox I provided in the issue doesn't use an affected typescript version.
I've created a new codesandbox showing the issue next to the working "vanilla" stitches config: https://codesandbox.io/s/nextui-type-issue-5x128y?file=/pages/index.js
Looking at the type of px shows that all type information is missing. Also all the breakpoints etc. are missing from the styled() options, but it all works with the "vanilla" stitches config.

Hey @hmbrg the commented solution aims to "VSCode", however, I was checking the CodeSandbox and is not a "Typescript" template, I've created a new Codesanbox base on the Typescript template and it works well,

https://codesandbox.io/s/stitches-token-nextui-tzufq0?file=/src/App.tsx
Also it's important to point out that is not a NextUI bug, we're waiting for the Stitches team to fix it as well

I'm sorry to be such a bother, but even the example you shared doesn't seem to be working correctly. The type of px is still not set correctly, and I'm not getting any autocompletion on the token values that px accepts.

In fact, I'm not getting any token completion on any CSS property, not only utils.

I'm very interested to try out Next UI as well but I've been getting really used to the level of typescript/intellisense integration provided natively by stitches. Not having access to type safety for the utils that NextUI adds to the stitches theme feels like a big loss here.
@jrgarciadev Looking at the sandbox link you've provided, there is no intellisense for any of the utils let alone enforcing the correct values are used with the util (eg px)

Hey @WonderPanda I'm glad you want to use NextUI, the IntelliSense problems on CodeSandbox are caused due to is not possible to set a custom Typescript version at least up to now https://github.com/codesandbox/codesandbox-client/issues/942, and Stitches has a problem with the latest Typescript version (which is used by CodeSandbox) https://github.com/modulz/stitches/issues/947#issuecomment-1061809383, we hope they fix that issue soon in order to have IntelliSense also on CodeSanbox, btw if you use VsCode you will not have this issue at all so you can try out NextUI without problem  👍🏻

Hey @WonderPanda I'm glad you want to use NextUI, the IntelliSense problems on CodeSandbox are caused due to is not possible to set a custom Typescript version at least up to now codesandbox/codesandbox-client#942, and Stitches has a problem with the latest Typescript version (which is used by CodeSandbox) modulz/stitches#947 (comment), we hope they fix that issue soon in order to have IntelliSense also on CodeSanbox, btw if you use VsCode you will not have this issue at all so you can try out NextUI without problem 👍🏻

Thanks for super quick response! I'll try things out in VsCode

Hey @hmbrg which Typescript version are you using? did you see this comment https://github.com/modulz/stitches/issues/947#issuecomment-1061809383 ?

Yes, I did. We are using the recommended version of "4.5.5".

Here is a basic repo just like the CodeSandbox: https://github.com/hmbrg/nextui-autocomplete-issue/blob/main/pages/index.tsx#L7
The type of "p:" is of type px?: {} | undefined.
Changing the typescript version to 4.3.4 doesn't fix it, sadly.

Yes, I made VSCode use the workspace version, not changing that makes the length error appear. After changing this the error goes away, but this issue persists.

Hey @hmbrg could you please check the version you are using is set as follows:
typescript": "4.3.2"
Notice that it has no the ^  symbol, otherwise could be being installed other minor typescript version

Just tried that, sadly it doesn't fix it for me. I updated my example repo here: https://github.com/hmbrg/nextui-autocomplete-issue/blob/main/pages/index.tsx#L7
Have you tried my repo? Does this work for you? If yes, maybe it's something else with my local setup.

Hey @hmbrg I'm still trying to figure out why the Typescript/IntelliSense is not working on CodeSandbox, if you look at this example https://codesandbox.io/s/nextui-xxl-button-kbhbid?file=/App.js (Only JS) the autocomplete works 🤔
Regarding VsCode autocomplete it works for me here's a video (it's laggy because I tested it on Github Codespaces):
https://user-images.githubusercontent.com/30373425/160298712-05e37f88-99c6-41c3-bf7e-aa923436ff7d.mov

Thanks for looking into this! I've noticed, that even in the video you provided, the $black in bgColor: "$black" didn't autocomplete. The type overlay in VSCode even showed the type of bgColor as {} | undefined. I really wonder what's going on, because this defintly works with just using  Stitches on its own, as you can see in this example: https://codesandbox.io/s/nextui-type-issue-5x128y?file=/pages/index.js

Bump. Are there any news on this? I'm still trying to figure this out.


Add a software license?

Hi!
We'd like to use your tweening library in our project. Can you add a software license to this repo, so that people can legally use it? I suggest something simple, like the MIT license. Dropping it in a LICENSE.md file in the root of the project should suffice.

Added one, hope that ticks the box

Awesome, thanks!


📖 Update README notes with latest provider release version

What this PR does / why we need it:
Release v1.1.2 is out

/test-v1b1-ubuntu-integration

/lgtm


Allow using file with any extension or string as version catalog

Expected Behavior
Allow build author to skip check which enforces that version catalogs have a .toml file extension. Alternatively, just allow using a string.
Current Behavior (optional)
The .toml file extension is required. Without it, we get an error
java.lang.RuntimeException: org.gradle.api.InvalidUserDataException: Invalid catalog definition:
  - Problem: In version catalog libs, File string9601927313420254717.txt isn't a supported

    Reason: Only .toml files are allowed when importing catalogs.

    Possible solution: Use a TOML file instead, with the .toml extension.

Context
Rather than using an actual File, my version catalog is a String which I read from a BuildService. It's not a typical project structure, but it has some benefits. For example, I have a constant string of my toml text in memory during the build, so if I want to reference values from it without going through the version catalogs, I know for sure that the values will be constant (as opposed to a file which could change).
Currently, I copy my string to a temporary file and place it in libs.from. However, this requires a .toml suffix.
This is fine if I manage my own temporary file, but is not compatible with TextResource because creating a temp file through that API currently doesn't allow specifying a file extension
    dependencyResolutionManagement { deps ->
        deps.versionCatalogs { catalogs ->
            catalogs.register("libs") { libs ->
                libs.from(/*file here must have .toml suffix*/)
            }
        }
    }

We need more information to understand the request. Could you please provide more context about what you want to achieve?
If we receive a clear use case description, we may be able to suggest a workaround.

Can you please provide more details on why you create a version catalog from a string?
We are considering rephrasing this feature request to allow the version catalog to be configured from a generic provider (File, String, HTTP resource, etc) defaulting to the predefined location, but we need a good scenario when it's feasible.

Thanks!
This feature request is in the backlog of the relevant team and is prioritized by them.


cant clean the zombie progress of cloudfoundry

I cant clean those zombie Tasks. when I cleaned them, another new 8 zombie tasks come out immediately.

Can you give some more details?
Was this deployed with BOSH?  Which stemcell? Which version of cf-release?  What does bosh vms show?

It was deployed by cf_nise_installer. All stemcells are on one VM.
cf-release :
name: cf
version: '221'

Hi @WenXiuchun
Unfortunately I don't know how cf_nise_installer manages process lifecycles.  I'd recommend opening an issue against that repo.

@Amit-PivotalLabs thanks anyway


how to train another model like "Face Portrait v1 "

Could you let us know who to  train another model like "Face Portrait v1 "?
as I know, Animegan2 is not for facial style transfer.. so I really want to know the detail steps to train facial model by using Animegan2.
Thanks very much!

Those weights are trained using a pix2pix method similar to this: https://github.com/justinpinkney/toonify
input(face) → Animegan2 generator → output <==> target(portrait), loss = LPIPS + L2 + GAN

Those weights are trained using a pix2pix method similar to this: https://github.com/justinpinkney/toonify
input(face) → Animegan2 generator → output <==> target(portrait), loss = LPIPS + L2 + GAN

Your model for Face Portrait v1 is stunning. can you give anymore details about it?

Hi, what kind of details are you looking for?

Hi, what kind of details are you looking for?

I want to know that how do you generate your target portrait images? using the network blend method like to https://github.com/justinpinkney/toonify? I have adopted the network blend method to reproduce the disney cartoon model, the facial region can be transferred to disney style well but the background is also changed  drastically. How do you make sure the background similarity like your Face Portrait v1 model ?
Thanks!

I used the same network blending method, but the implementation may differ.
Below is my own implementation for the official stylegan2 model
from training.networks import Generator
from copy import deepcopy
import math

def gather_params(G: Generator) -> dict:
    params = dict(
        [(res, {}) for res in G.synthesis.block_resolutions] + [("mapping", {})]
    )
    # G params: mapping.xxx / synthesys.b128.xxx
    for n, p in sorted(list(G.named_buffers()) + list(G.named_parameters())):
        if n.startswith("mapping"):
            params["mapping"][n] = p
        else:
            res = int(n.split(".")[1][1:])
            params[res][n] = p
    return params

def blend_models(G_low: Generator, G_high: Generator, swap_layer: int, blend_width: float = 3) -> Generator:
    params_low = gather_params(G_low)
    params_high = gather_params(G_high)

    for layer_idx, res in enumerate(G_low.synthesis.block_resolutions):
        x = layer_idx - swap_layer

        if blend_width is not None:
            assert blend_width > 0
            exponent = - x / blend_width
            y = 1 / (1 + math.exp(exponent))
        else:
            y = 1 if x > 0 else 0

        for n, p in params_high[res].items():
            params_high[res][n] = params_high[res][n] * y + params_low[res][n] * (1 - y)

    state_dict = {}
    for _, p in params_high.items():
        state_dict.update(p)

    G_mix = deepcopy(G_high)
    G_mix.load_state_dict(state_dict)
    return G_mix

Inputs and targets for the pix2pix training are generated as follows

G_blend = blend_models(G_low, G_high, swap_layer=swap_layer, blend_width=blend_width)

input  = G_low.synthesis(w, noise_mode="const")
target = G_blend.synthesis(w, noise_mode="const")

The strength of the stylization depends on swap_layer and blend_width, so you can use multiple blended models to generate multiple target images (for example, strongly stylized target for the facial area and weakly stylized target for the background) and fuse them using segmentation masks.

Those weights are trained using a pix2pix method similar to this: https://github.com/justinpinkney/toonify
input(face) → Animegan2 generator → output <==> target(portrait), loss = LPIPS + L2 + GAN

great job and thanks for your sharing !
and I wonder some details:

since your face dataset is produced through fine-tuning stylegan, so the best way to use pretrained model 'Face Portrait v1' may be 'align face in ffhq-mode'?
what's input size for 'Face Portrait v1' when training, 1024 ?

Yes, that's the reason for the ffhq-alignment in demo.ipynb
It's 512

Yes, that's the reason for the ffhq-alignment in demo.ipynb
It's 512

got it!
thanks~

I used the same network blending method, but the implementation may differ. Below is my own implementation for the official stylegan2 model
from training.networks import Generator
from copy import deepcopy
import math

def gather_params(G: Generator) -> dict:
    params = dict(
        [(res, {}) for res in G.synthesis.block_resolutions] + [("mapping", {})]
    )
    # G params: mapping.xxx / synthesys.b128.xxx
    for n, p in sorted(list(G.named_buffers()) + list(G.named_parameters())):
        if n.startswith("mapping"):
            params["mapping"][n] = p
        else:
            res = int(n.split(".")[1][1:])
            params[res][n] = p
    return params

def blend_models(G_low: Generator, G_high: Generator, swap_layer: int, blend_width: float = 3) -> Generator:
    params_low = gather_params(G_low)
    params_high = gather_params(G_high)

    for layer_idx, res in enumerate(G_low.synthesis.block_resolutions):
        x = layer_idx - swap_layer

        if blend_width is not None:
            assert blend_width > 0
            exponent = - x / blend_width
            y = 1 / (1 + math.exp(exponent))
        else:
            y = 1 if x > 0 else 0

        for n, p in params_high[res].items():
            params_high[res][n] = params_high[res][n] * y + params_low[res][n] * (1 - y)

    state_dict = {}
    for _, p in params_high.items():
        state_dict.update(p)

    G_mix = deepcopy(G_high)
    G_mix.load_state_dict(state_dict)
    return G_mix

Inputs and targets for the pix2pix training are generated as follows
G_blend = blend_models(G_low, G_high, swap_layer=swap_layer, blend_width=blend_width)

input  = G_low.synthesis(w, noise_mode="const")
target = G_blend.synthesis(w, noise_mode="const")

The strength of the stylization depends on swap_layer and blend_width, so you can use multiple blended models to generate multiple target images (for example, strongly stylized target for the facial area and weakly stylized target for the background) and fuse them using segmentation masks.
G_blend_face = blend_models(G_low, G_high, swap_layer=swap_layer_face, blend_width=blend_width_face)
G_blend_bg = blend_models(G_low, G_high, swap_layer=swap_layer_bg, blend_width=blend_width_bg)

input  = G_low.synthesis(w, noise_mode="const")

target_face = G_blend_face.synthesis(w, noise_mode="const")
target_bg = G_blend_bg.synthesis(w, noise_mode="const")
target = target_face * mask + target_bg * (1 - mask)

Hope this helps!

a

I used the same network blending method, but the implementation may differ. Below is my own implementation for the official stylegan2 model
from training.networks import Generator
from copy import deepcopy
import math

def gather_params(G: Generator) -> dict:
    params = dict(
        [(res, {}) for res in G.synthesis.block_resolutions] + [("mapping", {})]
    )
    # G params: mapping.xxx / synthesys.b128.xxx
    for n, p in sorted(list(G.named_buffers()) + list(G.named_parameters())):
        if n.startswith("mapping"):
            params["mapping"][n] = p
        else:
            res = int(n.split(".")[1][1:])
            params[res][n] = p
    return params

def blend_models(G_low: Generator, G_high: Generator, swap_layer: int, blend_width: float = 3) -> Generator:
    params_low = gather_params(G_low)
    params_high = gather_params(G_high)

    for layer_idx, res in enumerate(G_low.synthesis.block_resolutions):
        x = layer_idx - swap_layer

        if blend_width is not None:
            assert blend_width > 0
            exponent = - x / blend_width
            y = 1 / (1 + math.exp(exponent))
        else:
            y = 1 if x > 0 else 0

        for n, p in params_high[res].items():
            params_high[res][n] = params_high[res][n] * y + params_low[res][n] * (1 - y)

    state_dict = {}
    for _, p in params_high.items():
        state_dict.update(p)

    G_mix = deepcopy(G_high)
    G_mix.load_state_dict(state_dict)
    return G_mix

Inputs and targets for the pix2pix training are generated as follows
G_blend = blend_models(G_low, G_high, swap_layer=swap_layer, blend_width=blend_width)

input  = G_low.synthesis(w, noise_mode="const")
target = G_blend.synthesis(w, noise_mode="const")

The strength of the stylization depends on swap_layer and blend_width, so you can use multiple blended models to generate multiple target images (for example, strongly stylized target for the facial area and weakly stylized target for the background) and fuse them using segmentation masks.
G_blend_face = blend_models(G_low, G_high, swap_layer=swap_layer_face, blend_width=blend_width_face)
G_blend_bg = blend_models(G_low, G_high, swap_layer=swap_layer_bg, blend_width=blend_width_bg)

input  = G_low.synthesis(w, noise_mode="const")

target_face = G_blend_face.synthesis(w, noise_mode="const")
target_bg = G_blend_bg.synthesis(w, noise_mode="const")
target = target_face * mask + target_bg * (1 - mask)

Hope this helps!

thanks for your helpful suggestions !
Now I met another question..., how do you make sure the expression similarity between the generated input and target ? In my case, facial expression generated by the blended models is often changed compared to generated by the original ffhq model. Do you fix the mapping network parameters or some layers in generator when finetuning? if you did, would you like to share the details to me?
Thanks sincerely

@bryandlee I would be very grateful if I can get your reply ~

@Leocien That's a tricky part, but here are some tips that could help.

Freezing does help. I freeze the mapping layer when finetuning for layer swapping models.
Use attribute encoder to explicitly force the attribute similarity between the original and translated images. This could be done in the stylegan finetuning stage or pix2pix training stage.
Use additional augmentations in pix2pix training stage to guide some low-level attribute preserving. For example, I apply multiple corruptions to the source image for robustness, but use the same color shift to both source and target images in order to keep the colors consistent.

@Leocien That's a tricky part, but here are some tips that could help.

Freezing does help. I freeze the mapping layer when finetuning for layer swapping models.
Use attribute encoder to explicitly force the attribute similarity between the original and translated images. This could be done in the stylegan finetuning stage or pix2pix training stage.
Use additional augmentations in pix2pix training stage to guide some low-level attribute preserving. For example, I apply multiple corruptions to the source image for robustness, but use the same color shift to both source and target images in order to keep the colors consistent.

Hi, when you train your pix2pix model , you use stylegan random datasets, that is fake data, and the trained model can be used in real pictures when test, do I understand right?

Those weights are trained using a pix2pix method similar to this: https://github.com/justinpinkney/toonify
input(face) → Animegan2 generator → output <==> target(portrait), loss = LPIPS + L2 + GAN

Hi, @bryandlee! Thanks for your work!
I am trying to get qualitative results on my own synthesized dataset using your pipeline. I have a few questions about its second stage (training pix2pixHD model):

Did you replace both generator and discriminator in pix2pixHD pipeline with those from AnimeGANv2?
Did you use the discriminator feature matching loss (G_GAN_Feat)?
Did you use the VGG feature matching loss (G_VGG)?
What weights did you use for your losses?
Did you make any modifications to the default pix2pixHD pipeline (except for adding 2 new losses - LPIPS and L2 and replacing G and D)?
How large synthesized dataset did you use?


Home Page - Page crashes after refreshing home page

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.3.91-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Open staging.new.expensify.com and enter log in credentials
On magic code page, select Go Back
Refresh page on home page

Expected Result:
Page is refreshed and user can enter credentials
"Uh-oh, something went wrong!
Actual Result:
The page crashes
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[x] iOS: mWeb Safari
[x] Windows: Chrome
[ ] MacOS: Desktop

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

Windows: Chrome

https://github.com/Expensify/App/assets/78819774/46b99b1b-dc3a-4f41-b369-4202e0439b2f
logs.txt

MacOS: Desktop

View all open jobs on GitHub

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

Identify the pull request that introduced this issue and revert it.
Find someone who can quickly fix the issue.
Fix the issue yourself.

Removing the blocker since this was fixed. I don't think anyone required a payment here, but reopen if that was incorrect.


Korean translation

Added README-ko.md in Korean
Fixed typo and added short link to Korean version

Thanks!


DRILL-8268: Fix Hadoop 2 and Netty lib exclusions, REST mem limiter disabled by default

DRILL-8268: Fix Hadoop 2 and Netty lib exclusions, REST mem limiter disabled by default
Description

New exclusions of reload4j, slf4j-reload4j are required in the Hadoop 2 profile, probably due to the upgrade of Hadoop from 2.10.1 to 2.10.2.
We remove the netty-all metapackage which entered the dependency tree with the change introducing the Netty bom bringing many uneeded libs with it.
The heap memory usage limiting logic in the REST server becomes disabled by default since REST query results are streamed these days. This change aims to let the Java GC now do its job without interference and if that results in OOM under a constant load then there is good evidence for a heap leak which must be tracked and completely resolved anyway, not mitigated or "swept under a rug".

Documentation
N/A
Testing
Lib exclusions: successful build and launch under the Hadoop 2 profile, check for the presence of Netty and log library jars.
Heap memory usage: I probably recommend a new (or existing) performance test in the drill-test-framework over unit test but I'm open to ideas.

@luocooong the main goal of this PR is to solve issues in RC0 of Drill 1.20.2 and produce RC1.
Unrelated to that, I can expand a bit more on my reasoning for the commit disabling the heap memory usage limiter in the REST server by default. Since we stream rather than buffer REST API query results now, we no longer have an excuse for runaway heap usage. Further, while preventing the next REST query from running can save the Drillbit from an OOM death, when the user complains that they cannot run their query an admin is very likely to restart that Drillbit anyway. So we probably only delayed the inevitable even though the landing was made a bit softer and other processing on the Drillbit may have been able to continue.
Since now the only things that can cause runaway heap usage (that I can see) under a constant load are leaks, unecessary object references in Java's case, I think we should bite the bullet and fail hard with OOM when we exhaust the heap. The Drillbit can easily be reincarnated upon its death by systemd or another supervisor, which is preferable to having it limp on declining queries arriving over REST. We also get to stop applying our own heap management rule which may interact badly with the GC in use. E.g. if we start turning REST queries away at 85% heap usage but 90% heap usage would have stirred the user's GC to do a deep clean (in reality I think they all kick in considerably earlier but I'm really making a design argument here) then we are working against our own JVM. Lastly any ensuing bug reports overtly containing "OutOfMemoryError" are more likely, I believe, to send us hunting heap memory leaks.
cc @paul-rogers.

@jnturton, looks like this change causes Travis CI failures:
  (java.lang.RuntimeException) java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
52991    org.apache.drill.common.DeferredException.addThrowable():101
52992    org.apache.drill.exec.work.fragment.FragmentExecutor.fail():502
52993    org.apache.drill.exec.work.fragment.FragmentExecutor.run():347
52994    org.apache.drill.common.SelfCleaningRunnable.run():38
52995    java.util.concurrent.ThreadPoolExecutor.runWorker():1149
52996    java.util.concurrent.ThreadPoolExecutor$Worker.run():624
52997    java.lang.Thread.run():748
52998  Caused By (java.lang.NoSuchMethodError) java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
52999    org.apache.drill.exec.vector.UInt4Vector$BufferedMutator.setSafe():635
53000    org.apache.drill.exec.vector.VarBinaryVector$BufferedMutator.<init>():922
53001    org.apache.drill.exec.vector.VarBinaryVector$BufferedMutator.<init>():898
53002    org.apache.drill.exec.vector.VarBinaryVector$Mutator.setSafe():642
53003    org.apache.drill.exec.vector.VarBinaryVector$Mutator.setSafe():630
53004    org.apache.drill.exec.store.parquet.columnreaders.VarLengthColumnReaders$VarBinaryColumn.setSafe():268
53005    org.apache.drill.exec.store.parquet.columnreaders.VarLengthValuesColumn.readRecordsInBulk():98
53006    org.apache.drill.exec.store.parquet.columnreaders.VarLenBinaryReader.readRecordsInBulk():113
53007    org.apache.drill.exec.store.parquet.columnreaders.VarLenBinaryReader.readFields():91
53008    org.apache.drill.exec.store.parquet.columnreaders.BatchReader$VariableWidthReader.readRecords():156

@luocooong @paul-rogers a bit of data related to the heap memory usage limiting from some experiments run by a helpful user.
I did test the recommendation given by you and it worked well. Below are steps of testing

drill.exec.http.memory.heap.failure.threshold = 2
Before making changes in the drill-override.conf

Opened 4 sessions of drill web UI query
Fired same query in all 4 sessions. This query will scan through 8000 parquet compress files

Results - all 4 sessions gave heap error.
Observations

The heap memory displayed on "metrics" tab varies between 30-80% while query is running
The heap memory is constant at 87.89% after queries are failed

After making the changes in the drill-overide.conf as recommended by you

Opened 4 sessions of drill web UI query
Fired same query in all 4 sessions. This query will scan through 8000 parquet compress files
Results - All 4 sessions returned the results. It took average 6+ minutes to return the results
Observations
Could not observe the heap memory displayed on "metrics" as display was just in running state and then gave error "page cannot be displayed" during query run
The heap memory is varying between  69.71% after queries are successfully completed

I ran the same queries again and again and below is the heap memory after every run
2nd run - Between 61-62%
3rd run - . Between 82-83%
4th Run - Between  69-70%
5th Run - Between 65-66%
6th run - Between 69-70%
7th run - Between 70-71%
8th run - increased one session, so now total are 5 web sessions - 1 session gave "Page cannot be displayed error. 4 returned the results - Memory 79-80%
9th run (5 sessions) - - 1 session gave "Page cannot be displayed error. 4 returned the results - Memory 66-67%

@luocooong See https://stackoverflow.com/a/61267496/497381
 java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; is not available in JDK 1.8. It is available since Java 11.
In 1.8 the return type is Ljava/nio/Buffer;.
I am not sure why Github CI / Main Build (8)` passes. Maybe it does not cover this code path ?!

@luocooong See https://stackoverflow.com/a/61267496/497381  java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; is not available in JDK 1.8. It is available since Java 11. In 1.8 the return type is Ljava/nio/Buffer;. I am not sure why Github CI / Main Build (8) passes. Maybe it does not cover this code path ?!

@martin-g thanks for looking into it, we've progressed to a successful build now. I was dragging in bad dependencies and somehow, specifically for aarch64, that seems to have caused a jar compiled with a >8 JDK, probably Netty, to have been pulled in to the Travis JDK 8 environment. That's my suspicion, anyway.

Good job, James!
On Tue, Jul 26, 2022, 18:37 James Turton @.***> wrote:

@luocooong https://github.com/luocooong See
https://stackoverflow.com/a/61267496/497381
java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; is not available in
JDK 1.8. It is available since Java 11. In 1.8 the return type is
Ljava/nio/Buffer;. I am not sure why Github CI / Main Build (8) passes.
Maybe it does not cover this code path ?!
@martin-g https://github.com/martin-g thanks for looking into it, we've
progressed to a successful build now. I was dragging in bad dependencies
and somehow, specifically for aarch64, that seems to have caused a jar
compiled with a >8 JDK, probably Netty, to have been pulled in to the
Travis JDK 8 environment. That's my suspicion, anyway.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/drill/pull/2610#issuecomment-1195642829, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABYUQQ54KHMPPSGE74NRXTVWAA2XANCNFSM54LVHSKQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@jnturton, looks like this PR causes extra warnings:
2022-07-26T14:35:28.5702064Z [WARNING]
2022-07-26T14:35:28.5703626Z [WARNING] Some problems were encountered while building the effective model for org.apache.drill.tools:tools-parent:pom:2.0.0-SNAPSHOT
2022-07-26T14:35:28.5706084Z [WARNING] 'profiles.profile[default-hadoop].dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.hadoop:hadoop-common:jar -> duplicate declaration of version ${hadoop.version} @ org.apache.drill:drill-root:2.0.0-SNAPSHOT, /home/runner/work/drill/drill/pom.xml, line 2246, column 23
2022-07-26T14:35:28.5707420Z [WARNING]
2022-07-26T14:35:28.5708538Z [WARNING] Some problems were encountered while building the effective model for org.apache.drill:drill-root:pom:2.0.0-SNAPSHOT
2022-07-26T14:35:28.5709650Z [WARNING] 'profiles.profile[default-hadoop].dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.hadoop:hadoop-common:jar -> duplicate declaration of version ${hadoop.version} @ line 2246, column 23
2022-07-26T14:35:28.5710552Z [WARNING]
2022-07-26T14:35:28.5711039Z [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
2022-07-26T14:35:28.5711458Z [WARNING]
2022-07-26T14:35:28.5711917Z [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

@jnturton, looks like this PR causes extra warnings:

Thanks for catching this, I believe it's fixed now.

@luocooong @vvysotskyi, so the Kerberos unit tests that we recently got working and enabled for the default-hadoop profile (#2592) remain flaky in the new hadoop-2 CI profile. I've just added a commit to exclude them from that profile.

@luocooong @vvysotskyi there was a lot of noise in the pom.xml diff. I've now redone the changes to it to remove that.

@vvysotskyi JDBC clients tested after new exclusions:
sqlline 1.12
SquirrelSQL 4.40
DBeaver 22.0.2 installed as an Eclipse plugin
All tests had htpasswd authentication and SSL enabled.


Build cairo language server with Dojo plugin

Currently the cairo language server doesn't support dynamic plugin configuration. In the short term, we should create a crate that wraps it and incorporates the dojo plugin.
Basically, we need to copy this file and include the dojo plugin before the starknet plugin:
https://github.com/starkware-libs/cairo/blob/main/crates/cairo-lang-language-server/src/bin/language_server.rs#L18

I'm down to start with this one tomorrow :)

https://github.com/dojoengine/cairo/pull/1

Completed here


[test] Port LD-logger tests to python

Simply port the BASH tests to python 3.
Also adds a few other test-cases, one of which demonstrates a current limitation.
In the XFAIL test, the logger produces an invalid json.

Maybe we should set pylint for the tests as well.

I didn't find some test cases which were available previously: test_backslashes, test_vectical_tab, test_carriage_return,

test_backslashes was renamed to test_space_backslashes
verticaltab is included in test_control_characters
And basically, the expected test output was wrong.
The right escape sequence for '\v' would have been ['\\', 'v'] instead of ['\\', '\v'].
The '\r' is similarly should have been escaped as ['\\', 'r'] instead of ['\\', '\r'].
This is also included in test_control_characters.

test_valid_json
It would be good not to remove any test case with this patch.

Oh yes, I re-added this test case.


cLOSE IT

Description
A few things why the test didn't work on or might not work as expected:

The dates. Initially in test the start and end dates borders given to yahooDownloader are _yahooDataDownloader.DownloadSplitAndDividendData(_symbol, DateTime.Parse("01/01/1970"), DateTime.MaxValue);
It might be the file we are comparing the fetched results against is outdated. And the data obtained through the downloader may contain additional fresh splits and dividends and the number of entries will be different. So the start and end date borders need to be calculated programatically depending on the file entries.
Factor files in Lean Data folders store split factors as a fraction of the unit. Example: 0.0357143. FactorFileGenerator as it is now in opposite expects it to be stored as original Integer values . previousFactorFileRow.SplitFactor * split.Value has got to be changed to previousFactorFileRow.SplitFactor / split.Value
Substracted dividend in FactorFileGenerator CalculateNextDividendFactor() method has to be adjusted to previousFactorFileRow.PriceFactor. var priceFactor = previousFactorFileRow.PriceFactor - splitFactorMultiplier * dividend.Value *                            previousFactorFileRow.PriceFactor / previousClosingPrice.Close;
It is not adjusted for previous price factor in original file:
https://github.com/QuantConnect/Lean/blob/master/ToolBox/FactorFileGenerator.cs#L229
Minor things but it seems the code that created original factor files uses .net FCL's Math class to round results of price and split factors to desired decimal precision. I am changing roundings as well to Math.Round as see no reason why not use it here.
Note: It is assumed that data folder contains all required required daily data for the tested asset. Otherwise it has to be downloaded previously.

Related Issue
Closes #3435
Motivation and Context
To compose factor files correctly
How Has This Been Tested?
Test in questions works fine now
Types of changes

[ X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[X ] My code follows the code style of this project.
[X ] I have read the CONTRIBUTING document.
[ X] I have added tests to cover my changes.
[ X] All new and existing tests passed.
[ X] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@IlshatGaripov -- do you have a case where the generator was producing incorrect factors? Is the implication here that the generator has always been generating the wrong factor files?
Is the test wrong or is the implementation wrong? Have we tested these changes against some set of historical data and compared it to known splits/dividends and possibly producing an adjusted time series from raw data and matching that to yahoo's adjusted time series data. Yahoo is nice in that it's historical data provides the raw and adjusted closing prices each day as well as the splits and dividends.

@mchandschuh I think that FactorFiles_CanBeGenerated_Accurately() test does exactly that. Here is the full logic:
We have the inner Lean algorithm that transforms factor files records during backtest in splits and dividents, which are fed into the algorithm via OnData. We consider factor file correct if when transformed by Lean algorithm it gives correct splits/dividend output for any requested historical span. There can be many files that, when transformed, give the correct result. But their values should differ only very slightly, I think this could be mathematically formulated correctly and proved, but we take it for granted. In experiment above I tested existing file by the algorithm to prove the results of transformation - splits/dividends - are correct. That is, we can assume the file itself correct and use it as benchmark.
What does the test do?. It does exactly what you have conveyed. It takes  raw data from YahooDownloader (I verified it's correct) then makes factor files out of them using the generator, stores resulting FactorFile in memory. Then successively iterates through time and compares the entries in temporary file against the entries of test file that we consider a benchmark. And makes sure that difference between each and every entry does not exceed the var tolerance = 0.00001m;
In this way, if test does work fine, not fail, means that the generator produces a factor file whose values are only slightly different from values of a file that gives correct split/dividend values during backtest execution. Thus, generator does produce valid files.

@mchandschuh There were few things discovered:
First of all - the formula again - please compare :
https://github.com/QuantConnect/Lean/blob/master/Common/Data/Auxiliary/FactorFileRow.cs#L182
with the one in FactorFileGenerator.cs from this PR we evaluated to be correct..
The same applies to splits:
https://github.com/QuantConnect/Lean/blob/master/Common/Data/Auxiliary/FactorFileRow.cs#L226
And no roundings here !
Also, please give a look at different but related test:
https://github.com/QuantConnect/Lean/blob/master/Tests/Common/Data/Auxiliary/FactorFileTests.cs#L198
Does not fail but gives the following output (last three lines):
expected: 2012-08-08: 0.1271 0.1429 actual: 2012-08-08: 0.1271 0.1429  diff: 0.0000%
expected: 2005-02-25: 0.0635 0.0714 actual: 2005-02-25: 0.0635 0.0714  diff: 0.0000%
expected: 2000-06-20: 0.0318 0.0357 actual: 2000-06-20: 0.0318 0.0357  diff: 0.0000%

where did the earliest enty go?
19980102,0.8893653,0.0357143,16.25

Altogether it seems to me that FactorFile.Apply( ) method along with FactorFileRow's Apply methods for split/divident it uses inside may work not as they should be. And we have two options - to fix them. Or what seems to be more elegant to me to use upgraded FactorFIleGenerator with a constructor overload that takes a list of dailyDataForEquity and called it from FactorFile Apply()
FactorFIleGenerator needs this daily data to make the rows and he loads them from folder, but he only uses the tradeBars's Time and Value properties and only on the days when need to construct the factor rows and we have those values in Apply(). I am publishing a sketch of this concept and would appreciate a review. Though I could not test this entirely as FactorFileGenerator has to be return to QC.Common to enable this to run. Thanks!

@mchandschuh The question is does the proposed solution look fine? And would that be ok to move
FactorFileGenerator and LeanParser (that generator uses inside ) from QuantConnect.Toolbox -> QuantConnect.Common.cproj to finilize the sketch and test the solution ?

@I am closing this issue because @jaredbroad is starter

you woudl ask what does it mean... it does nothing!

he is just smarter!!!

he is just the smartest in this community!

@jaredbroad thank you! terribly drunkg I am sorry. thanks!

@jaredbroad I don't why I not intelligent in comon dicusssion... please excue me... I do aplologize..
is that ehough?

it's a very bad trait to consider yourself unlike others -

Pllease clocse it

FOR REAL!


Revert "ci: add test skip case (#3267)"

This reverts commit 7580109d8d6ffaea07c43a12346ffea429010ed4.
Description
Revert change since it is causing CI not to publish docker image.

First CI build that did not publish Docker image: https://github.com/dapr/dapr/actions/runs/955880822

Last CI build that did publish Docker image: https://github.com/dapr/dapr/actions/runs/955817212

Issue reference

Reverts: #3267
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[ ] Code compiles correctly
[ ] Created/updated tests
[ ] Unit tests passing
[ ] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

Sorry for this, could share failure link then for invest ?


Use of "int" for length is troubling

It is possible for allocations to exceed INT_MAX in size, most notably on most 64-bit C implementations.
I think ptrdiff_t is the best signed type available for using this, but may be wrong.

There is no PTRDIFF_MAX in limits.h, at least not for older compilers.  The Better String Library was initially targeted at string manipulation; int was chosen because it seemed like the practical choice on all the compilers I was targeting at the time.  These days, you can have strings that exceed 2.1 billion characters, but at this point, I am not sure about calling it a string any more.  Keep in mind that the library use negative values to determine if the string is value, or writable.  So what I really wanted to use was the type ssize_t as first defined by the BSD header files, but this is not portable to older compilers.
That being said, I can consider a future version of the Better String Library, where the size and length type are settable by some configuration in bstrlib.h .

size_t would be more appropriate, with flags to handle the negative cases. There's also a trick used in the kernel to generate *_MAX definitions:
    #define SIZE_MAX ((size_t)~0)
    #define SSIZE_MAX ((ssize_t)(~0 >> 1))

See this header for more examples.

ssize_t is not ANSI C, which is the minimal target for bstrlib.

It was just an example - ideally bstring would use size_t
-----Original Message-----
From: "websnarf"<EMAIL_ADDRESS>Sent: 04/12/2015 07:56 AM
To: "websnarf/bstrlib"<EMAIL_ADDRESS>Cc: "Michael Savage"<EMAIL_ADDRESS>Subject: Re: [bstrlib] Use of "int" for length is troubling (#5)
ssize_t is not ANSI C, which is the minimal target for bstrlib.
—
Reply to this email directly or view it on GitHub.

Size_t is the best option, and yes, it's supported in C.


Move many libraries and bindings to relavant sections

The Libraries section at the end was a large collection of all kinds of different libraries and bindings and contained some duplicates. I have moved most of them to their relevant sections so that they are easier to find.
I have added some new projects as well: AXMPP, dcf-ada, weechat-ada, weechat-canberra, and weechat-emoji.
See the description in the commit message for a list of all the changes.

Great initiative.
It hitches me a bit that those binding project's description does not ALL explicitly advertises as , plain and mean. This list should promote Ada first as in 100% Ada codebase and anything else should warn as such.
Maybe we can live with some 'less explicit formulation' like 'API', 'interface library' etc for the time being ... and maybe I could come back to amend those of a visual tag, a 'binding' legend.
Thanks for the work.

We should indeed indicate the type of projects, whether they are 100% Ada or depend on C libraries for example. We could use tables instead of bullet lists for this, for example:

What do you think? The 'License' column contains SPDX license identifiers.

I do not know really. I am hesitating here for the following reasons:
a) The default 'awesome list format' is one-liners, not tables. (Well, last time I checked)
b) Markdown tables are cumbersome to maintain ... the formatting, IMO.
c) The real estate doubles with tables.
d) Can we hide the table lines because as-is they let me cold a bit?
Personally, I was more inclined to use icons/legend to distinguish library, binding, pure Ada, etc. something like:

mathpaqs - Mathpaqs is a collection of mathematical, 100% portable, packages in the Ada programming language. :green_circle:
opengl-ada - Thick Ada binding for OpenGL and GLFW. :orange_circle:

For the licenses ... I do not know, never thought about adding them.
I think we need other opinions. I will open this as an issue so we can discuss the matter.
Thanks for the brainstorm btw.

Tables are indeed a bit cumbersome to edit. I considered adding license badges, but that would spam img.shields.io quite a bit. I like your use of the emojis. For now we can use a :green_circle: for 100% Ada (including non-system dependencies) and :orange_circle: for projects that use or depend on non-Ada code (like bindings).

Inviting people so they can chip in if they have an opinion on the matter. Thx guys.

As far I checked, other awesome lists don't have tables, thus I agree with @ohenley on that matter. And I agree with @onox on opinion about emojis :smile: My guess: the general idea about awesome lists is to have something almost in plain text. If someone wants to make it good-looking, there are a few external websites for that: example
I think about type - in my opinion, it could be better if we (for example) do something like super categories: libraries and bindings and then split them on computing, GUI, etc.
Licenses - maybe just a plain text? Like link - description here. GPL-2?

I think about type - in my opinion, it could be better if we (for example) do something like super categories: libraries and bindings and then split them on computing, GUI, etc.

That would mean that people need to look at 2 places when they look for something that can help them solve a problem. So a :green_circle: and :orange_circle: sounds better to me.

Licenses - maybe just a plain text? Like link - description here. GPL-2?

We can add the SPDX identifier (plain text) of the project.

Inviting people so they can chip in if they have opinions/ideas on the matter. Thx guys.

I like the idea that the bindings are mixed with the other projects and sorted by topics. I personally think that a binding to an existing and maintain library brings more to the ecosystem than a partial rewrite in Ada or SPARK.
I think it would be also useful to tell which project is available in Alire.

The approach with a :green_circle: and :orange_circle: looks fine. SPDX could be long, like GPL-3.0-or-later with GCC-exception-3.1 and not precise, because each file can have another license. I wouldn't bother with license at all.

Every new solution causes new problems :)

I agree that it can look better, but it still needs some work:

If we want to use emojis, they must be in different shapes. I think the list should be accessible for everyone also for visual impaired people too. And if there will be only difference in colors, color blinded people will don't notice the difference. Thus, my proposition: use square emoji for libraries and circle for bindings. Or any other shapes?
If you add only emoji it may be not visible for screen-readers or braille screens (especially the last one). Also, if someone uses some unique font (without full Unicode support) or read it on a terminal without Unicode support, will also not notice symbols. Thus, I propose that full info as (an example, icons should be different): ⚫ library and ◾ binding or something like this. Unless you want to do these symbols as images. Then just image can be, because we can add alt option to it. Just the image will be unfriendly to read that file on the terminal.

About license: I agree with @reznikmm :smile: but also: SPDX was designed only for Open Source licenses. And we have here also proprietary software here, thus it cannot be labeled with SPDX :smile: Maybe left license info as an optional parameter?
@Fabien-Chouteau Alire: while I like the idea of having it, I think that list isn't the best place to put that information. What happens when we have been any other package manager for Ada someday? We will add it to the list also? As far I saw, even Rust list don't have info about availability of a package in their cargo system.

What happens when we have been any other package manager for Ada someday?

Ada waited 37 years for its first package manager, even if this low probability event occurs it won't be difficult to change this document.
I think using the tag would be a great addition :

 ada-ado - Ada Database Objects is an Ada05 library that provides object relational mapping to access a database in Ada05. The library supports Postgresql, MySQL, SQLite as databases. Most of the concepts developped for ADO come from the Java Hibernate ORM.

We will add it to the list also? As far I saw, even Rust list don't have info about availability of a package in their cargo system.

In don't think this comparison is fair, in the Rust ecosystem everything is on Cargo, so there is no need to mention it

Also, some Rust awesome lists do use Cargo badges : https://github.com/rust-embedded/awesome-embedded-rust

I'm sorry @Fabien-Chouteau, but I'm still stubborn and don't agree with you about the badge. Especially a badge as a graphical element. In my opinion the main problem is how we both see the list. I wish to keep it with the main awesome list style: like a table of contents, with minimal, crucial information only. Links only to projects and nothing more (I even don't like these miniatures of books here :smile: ). Like the main awesome list. You want to do from it full documentation in one file :wink: I'm not sure if it is even allowed in awesome lists format.
Anyway I think I would be nice to get to know an opinion of the others on this issue cough cough @ohenley please enable discussions in the repository cough cough :smile:

I'd keep libraries/bindings together, for the reason that the ultimate purpose is to able to use something from Ada.
I'm an information nerd so I tend to favor detail. I love dashboards. That said, in this case I'd go with the plain text (no tables) awesome style. Perhaps use different icons at the end to signal properties, e.g.: ⚙📦💧🅐⚖ (runnable/library/binding/Alire/link to license). But it may look cramped/overwhelming and the icons should have a similar style to be pleasing to the eye.
As interested party wrt Alire I'm not sure how much I should comment on that. A single icon would be enough for the important bit of whether it is indexed. Bonus if linked to its Alire page to quickly check the version. The badge is nice though, if it could be made smaller/less intrusive.

So something like this?
:green_circle: = library
:orange_square: = binding
:package: = link to Alire crate


getting error in cmake

During cmake , I am getting the below error. Please help to rectify
mkdir build
cd build
INSTALL_PATH=$PWD/install
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOOST_ROOT=/home/b166/install -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DWITH_ACCELERATED_CPU=ON -DWITH_CUDA_BACKEND=OFF -DWITH_CUDA_NVCXX_ONLY=OFF -DWITH_OPENCL_BACKEND=OFF -DWITH_ROCM_BACKEND=OFF -DWITH_LEVEL_ZERO_BACKEND=OFF -DCMAKE_HAVE_LIBC_PTHREAD=lpthread ..
make install -j64

CMake Error at cmake/FindFilesystem.cmake:286 (message):
  Cannot run simple program using std::filesystem
Call Stack (most recent call first):
  src/common/CMakeLists.txt:18 (find_package)

Determining if the CL_VERSION_2_2 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_3cf0e/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_3cf0e.dir/build.make CMakeFiles/cmTC_3cf0e.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3cf0e.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_3cf0e.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_3cf0e.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_3cf0e.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_3cf0e.dir/build.make:79: CMakeFiles/cmTC_3cf0e.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_3cf0e/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_2_2
  return ((int*)(&CL_VERSION_2_2))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the CL_VERSION_2_1 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_65a49/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_65a49.dir/build.make CMakeFiles/cmTC_65a49.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_65a49.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_65a49.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_65a49.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_65a49.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_65a49.dir/build.make:79: CMakeFiles/cmTC_65a49.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_65a49/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_2_1
  return ((int*)(&CL_VERSION_2_1))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the CL_VERSION_2_0 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a8fe9/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_a8fe9.dir/build.make CMakeFiles/cmTC_a8fe9.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a8fe9.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_a8fe9.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_a8fe9.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_a8fe9.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_a8fe9.dir/build.make:79: CMakeFiles/cmTC_a8fe9.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_a8fe9/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_2_0
  return ((int*)(&CL_VERSION_2_0))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the CL_VERSION_1_2 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_17556/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_17556.dir/build.make CMakeFiles/cmTC_17556.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_17556.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_17556.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_17556.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_17556.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_17556.dir/build.make:79: CMakeFiles/cmTC_17556.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_17556/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_2
  return ((int*)(&CL_VERSION_1_2))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the CL_VERSION_1_1 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a27b6/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_a27b6.dir/build.make CMakeFiles/cmTC_a27b6.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a27b6.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_a27b6.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_a27b6.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_a27b6.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_a27b6.dir/build.make:79: CMakeFiles/cmTC_a27b6.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_a27b6/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_1
  return ((int*)(&CL_VERSION_1_1))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the CL_VERSION_1_0 exist failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_10bd6/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_10bd6.dir/build.make CMakeFiles/cmTC_10bd6.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_10bd6.dir/CheckSymbolExists.c.o
/home/1/workdev/llvm/install/bin/clang    -MD -MT CMakeFiles/cmTC_10bd6.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_10bd6.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_10bd6.dir/CheckSymbolExists.c.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h' file not found
    2 | #include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_10bd6.dir/build.make:79: CMakeFiles/cmTC_10bd6.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_10bd6/fast] Error 2

File /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_0
  return ((int*)(&CL_VERSION_1_0))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the include file filesystem exists failed with the following output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_b2bb5/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_b2bb5.dir/build.make CMakeFiles/cmTC_b2bb5.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_b2bb5.dir/CheckIncludeFile.cxx.o
/home/1/workdev/llvm/install/bin/clang++   -std=c++17 -MD -MT CMakeFiles/cmTC_b2bb5.dir/CheckIncludeFile.cxx.o -MF CMakeFiles/cmTC_b2bb5.dir/CheckIncludeFile.cxx.o.d -o CMakeFiles/cmTC_b2bb5.dir/CheckIncludeFile.cxx.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx:1:10: fatal error: 'filesystem' file not found
    1 | #include <filesystem>
      |          ^~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_b2bb5.dir/build.make:79: CMakeFiles/cmTC_b2bb5.dir/CheckIncludeFile.cxx.o] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_b2bb5/fast] Error 2

Performing C++ SOURCE FILE Test CXX_FILESYSTEM_NO_LINK_NEEDED failed with the following compile output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_6dab9/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_6dab9.dir/build.make CMakeFiles/cmTC_6dab9.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_6dab9.dir/src.cxx.o
/home/1/workdev/llvm/install/bin/clang++ -DCXX_FILESYSTEM_NO_LINK_NEEDED  -std=c++17 -MD -MT CMakeFiles/cmTC_6dab9.dir/src.cxx.o -MF CMakeFiles/cmTC_6dab9.dir/src.cxx.o.d -o CMakeFiles/cmTC_6dab9.dir/src.cxx.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_6dab9
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6dab9.dir/link.txt --verbose=1
/home/1/workdev/llvm/install/bin/clang++ CMakeFiles/cmTC_6dab9.dir/src.cxx.o -o cmTC_6dab9
/usr/bin/ld: CMakeFiles/cmTC_6dab9.dir/src.cxx.o: in function `main':
src.cxx:(.text+0x18): undefined reference to `std::experimental::filesystem::v1::current_path[abi:cxx11]()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_6dab9.dir/build.make:100: cmTC_6dab9] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_6dab9/fast] Error 2

...and run output:

Return value: 1
Source file was:
        #include <cstdlib>
        #include <experimental/filesystem>

        int main() {
            auto cwd = std::experimental::filesystem::current_path();
            printf("%s", cwd.c_str());
            return EXIT_SUCCESS;
        }

Performing C++ SOURCE FILE Test CXX_FILESYSTEM_STDCPPFS_NEEDED failed with the following compile output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_71adb/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_71adb.dir/build.make CMakeFiles/cmTC_71adb.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_71adb.dir/src.cxx.o
/home/1/workdev/llvm/install/bin/clang++ -DCXX_FILESYSTEM_STDCPPFS_NEEDED  -std=c++17 -MD -MT CMakeFiles/cmTC_71adb.dir/src.cxx.o -MF CMakeFiles/cmTC_71adb.dir/src.cxx.o.d -o CMakeFiles/cmTC_71adb.dir/src.cxx.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_71adb
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_71adb.dir/link.txt --verbose=1
/home/1/workdev/llvm/install/bin/clang++ CMakeFiles/cmTC_71adb.dir/src.cxx.o -o cmTC_71adb  -lstdc++fs
/usr/bin/ld: cannot find -lstdc++fs
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_71adb.dir/build.make:100: cmTC_71adb] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_71adb/fast] Error 2

...and run output:

Return value: 1
Source file was:
        #include <cstdlib>
        #include <experimental/filesystem>

        int main() {
            auto cwd = std::experimental::filesystem::current_path();
            printf("%s", cwd.c_str());
            return EXIT_SUCCESS;
        }

Performing C++ SOURCE FILE Test CXX_FILESYSTEM_CPPFS_NEEDED failed with the following compile output:
Change Dir: /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_5aa85/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_5aa85.dir/build.make CMakeFiles/cmTC_5aa85.dir/build
gmake[1]: Entering directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_5aa85.dir/src.cxx.o
/home/1/workdev/llvm/install/bin/clang++ -DCXX_FILESYSTEM_CPPFS_NEEDED  -std=c++17 -MD -MT CMakeFiles/cmTC_5aa85.dir/src.cxx.o -MF CMakeFiles/cmTC_5aa85.dir/src.cxx.o.d -o CMakeFiles/cmTC_5aa85.dir/src.cxx.o -c /home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_5aa85
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5aa85.dir/link.txt --verbose=1
/home/1/workdev/llvm/install/bin/clang++ CMakeFiles/cmTC_5aa85.dir/src.cxx.o -o cmTC_5aa85  -lc++fs
/usr/bin/ld: cannot find -lc++fs
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_5aa85.dir/build.make:100: cmTC_5aa85] Error 1
gmake[1]: Leaving directory '/home/1/acpp/AdaptiveCpp-develop/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_5aa85/fast] Error 2

...and run output:

Return value: 1
Source file was:
        #include <cstdlib>
        #include <experimental/filesystem>

        int main() {
            auto cwd = std::experimental::filesystem::current_path();
            printf("%s", cwd.c_str());
            return EXIT_SUCCESS;
        }

llvm:17.0.6
gcc: gcc 7.3

Hi, libstdc++ 7 is pretty old and does not ship the C++17 std::filesystem library. We have some fallback code that it tries to enable using std::experimental::filesystem, but it seems that it cannot find the associated c++fs library either. Can you check if you have this library somewhere on your system?

Hi, libstdc++ 7 is pretty old and does not ship the C++17 std::filesystem library. We have some fallback code that it tries to enable using std::experimental::filesystem, but it seems that it cannot find the associated c++fs library either. Can you check if you have this library somewhere on your system?

Thank you. With your guidance, the issue has been resolved.

Hi, libstdc++ 7 is pretty old and does not ship the C++17 std::filesystem library. We have some fallback code that it tries to enable using std::experimental::filesystem, but it seems that it cannot find the associated c++fs library either. Can you check if you have this library somewhere on your system?

After installation, I encountered a new issue. Could you help take a look?
acpp  -stdlib=libc++ -O3 -c backprop.cpp -o backprop.o
error: unable to load plugin '/home/1/acpp/AdaptiveCpp-develop/build/install/bin/../lib/libacpp-clang.so': '/home/1/acpp/AdaptiveCpp-develop/build/install/bin/../lib/libacpp-clang.so: undefined symbol: _ZNK4llvm10ModulePass17createPrinterPassERNS_11raw_ostreamERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE'

I noticed that someone had a similar issue, so I added -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' in CMake, but it didn't seem to work. Additionally, due to permission issues, I cannot delete anything from /usr/lib. Do you have any other ideas on how to resolve this problem?
https://github.com/AdaptiveCpp/AdaptiveCpp/issues/985

error: unable to load plugin '/home/1/acpp/AdaptiveCpp-develop/build/install/bin/../lib/libacpp-clang.so': '/home/1/acpp/AdaptiveCpp-develop/build/install/bin/../lib/libacpp-clang.so: undefined symbol: _ZNK4llvm10ModulePass17createPrinterPassERNS_11raw_ostreamERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE'

This indicates that the AdaptiveCpp plugin that you have built is not ABI-compatible with the LLVM installation that you want to load it into. It needs to be the exact same one. Can you look in your CMakeCache.txt for LLVM_DIR and CLANG_EXECUTABLE_PATH? Those need to point to the same LLVM installation.

acpp  -stdlib=libc++ -O3 -c backprop.cpp -o backprop.o

Note: If you want to use libc++, you also need to build AdaptiveCpp with libc++, otherwise your binary is going to be ABI-incompatible with the AdaptiveCpp runtime. From the documentation (https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/installing.md):

Note: Building against libc++ instead of libstdc++ is only expected to work for the generic target. Additionally, AdaptiveCpp must have been built using the same standard library that the user code is linked against. libc++ is currently not supported for the C++ standard parallelism offloading model.

Are you by chance also attempting to build AdaptiveCpp with libc++? If so, that might also explain the ABI incompatibility if LLVM is not also built with libc++.

I'll close this in favor of #1568


Dependabot alerts

Hi,
I would like to make a request about vulnerabilities detect in the security scan.
I have clone this repository and I have passed a security scan. The Dependabot alerts show vulnerabilities related to dependencies version included in the package-lock.json:
ansi-regex version 5.0.0 --> fixed vulnerability in version 5.0.1 or later
postcss version 7.0.36-->fixed vulnerability in version 8.2.13 or later
node-fetch version 2.6.1--> fixed vulnerability in version 2.6.7 or later
nanoid version 3.1.20--> fixed vulnerability in version 3.1.31 or later
glob-parent version 3.1.0 --> fixed vulnerability in version 5.1.2 or later
Please, I would like to know if there is any plan to upgrade these dependencies version in orden to fix the vulnerabilities.
Thanks in advanced

They are in the roadmap, we plan to address these issues soon

High severity dependencies were updated on main branch. For moderate ones here is pull request: https://github.com/microsoft/powerplatform-actions/pull/179

@crivasestrada the dependabot security alerts you mentioned are all caused by the gulp tooling used to build these actions. None of those dependencies are used in the TS/JS code running our actions.
Unfortunately, the gulp modules we use in this repo (see the devDependencies section in the package.json) do not have yet any updates that address these.
CC: @kkanakas @petrochuk


linkto breaks template if '&' is in the url

Hello,
I am using linkto to create hyperlinks for the references.
working example : https://support.microsoft.com/help/5023049
not working example : https://support.microsoft.com/help/5023049&123
Can someone check this ?

Maybe you can url-encode &  --> %26 as partial fix until we manage to fix the code.

Found the solution.
adding these in in the beginning of the linkTo function fixes the issue :
url = url.replace(/&/g, "&");
input = input.replace(/&/g, "&");

I will check that but I think it's better to url encode all char because if there are an other char which need to be be encode to not break the word document

Thank you. Applied url encoding. It's working.

Can you make a PR or submit your fix so we can patch the repo / close the issue ? Thanks @cristianb84

Hi,
Sorry for the late response. Here is my working linkto function :
expressions.filters.linkTo = function(input, url) {
url = encodeURIComponent(url);
input = encodeURIComponent(input);
return '<w:r><w:fldChar w:fldCharType="begin"/></w:r>'
    + '<w:r><w:instrText xml:space="preserve"> HYPERLINK "' + url + '" </w:instrText></w:r>'
    + '<w:r><w:fldChar w:fldCharType="separate"/></w:r>'
    + '<w:r><w:rPr><w:rStyle w:val="Hyperlink"/></w:rPr>'
    + '<w:t>' + input + '</w:t>'
    + '</w:r><w:r><w:fldChar w:fldCharType="end"/></w:r>';

}

I reopen the issue until we implement your patch :) thanks

Hi, Sorry for the late response. Here is my working linkto function : expressions.filters.linkTo = function(input, url) { url = encodeURIComponent(url); input = encodeURIComponent(input);
return '<w:r><w:fldChar w:fldCharType="begin"/></w:r>'
    + '<w:r><w:instrText xml:space="preserve"> HYPERLINK "' + url + '" </w:instrText></w:r>'
    + '<w:r><w:fldChar w:fldCharType="separate"/></w:r>'
    + '<w:r><w:rPr><w:rStyle w:val="Hyperlink"/></w:rPr>'
    + '<w:t>' + input + '</w:t>'
    + '</w:r><w:r><w:fldChar w:fldCharType="end"/></w:r>';

}

This solution does not work. It no longer breaks the Word document, but it also does not deliver the use case of linkto ... The simplest approach for me would be to use "replace" and map special characters ... Will keep trying with "encodeURIComponent". But using the function as I posted above, the link is not displayed properly in the Word document, and also it includes in the hyperlink the file system path where the document is stored.


Add f as a dependency

I installed traad from the package system, and it failed because the symbol f-full was undefined. I believe this will fix the issue.

Looks good, thanks!


MNT: Update pinned versions.

Hi! This is the friendly conda-forge-admin automated user.
I've bumped some of the conda-forge pinned versions, and noticed that it impacts this feedstock.
If the changes look good, then please go ahead and merge this PR.
If you have any questions about the changes though, please feel free to ping the 'conda-forge/core' team (using the @ notation in a comment).
Thanks!

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

There must be something wrong with the maintenance bot.

This is a known issue, but hasn't been seen for some time. Noted this example in that issue.
xref: https://github.com/conda-forge/conda-forge-maintenance/issues/6

- gmp             # [unix] should have been updated with a pinning, but it didn't get updated. Maybe it's because of the selector ?

Yep, I think so.


return updated stocks

when we update the stock, why not just return them here as do just do have them available?
this might save another roundtrip of getting the updated stocks for display...

Update post Slack meeting
With the new approach I'm calling kaskadi-update-stocks-lambda asynchronously to not get billed twice for the runtime.
@Holger-Will for now I'm returning a simple confirmation message. Do we want to send information about stock change back to the client so that it does its partial update on its side with the info received from the lambda?

The lambda now returns the new stocks data (or an empty array if there was no change since last DB update).
This way we don't need to first hit this endpoint to update stocks and then hit our DB for new stock info.


.deb package puts Sparrow in the "Other" category of the application menu

The .deb package puts Sparrow in the "Other" category of the application menu. Consider placing Sparrow in the "Internet" or "Office" category.

What download are you using? The control file for the 1.7.1 .deb lists Sparrow under 'utils':
 Package: sparrow
 Version: 1.7.1-1
 Section: utils
 Maintainer: Unknown<EMAIL_ADDRESS> Priority: optional
 Architecture: amd64
 Provides: sparrow
 Description: Sparrow
 Depends: libc6, xdg-utils, zlib1g
 Installed-Size: 132003

1.7.1
I'm using XFCE. I tried it on multiple versions of XFCE.

Perhaps XFCE does not respect the Section directive. It is certainly the correct way to do it AFAIK.

Doing a little research, I think that you need to specify a Category in the Sparrow.desktop file (https://github.com/sparrowwallet/sparrow/blob/master/src/main/deploy/package/linux/Sparrow.desktop). See https://specifications.freedesktop.org/menu-spec/latest/apa.html .

Bitcoin Core uses Categories=Office;Finance;P2P;Network;Qt;

Thanks. I've used Categories=Finance;Network; in 24e75603 which matches Electrum.

Looks like that option put it in the "Internet" category.


"Add Site" should check if Rest API & Worona Plugin are activated

The "Add Site" page has to check if the WordPress site has:

The REST API activated
The Worona Plugin activated (The Worona plugin has to register and endpoint in the REST API).
A Worona Site ID generated in the WordPress site.

Checklist

Why?
There will be users following the next onboarding:

User lands in worona.org
User clicks a CTA
User registers in dashboard.worona.org/register
User adds site
????

Once user has reached step 4, it doesn't make sense to make him install the Worona WP Plugin, because everything is already working. In addition, it can be confusing to "Create an App ID" from the Worona WordPress Plugin if he has previously added the site to the dashboard.
Worona Dashboard can work if the WP Site has the REST API installed, but it is important to us to increase Worona Plugin installs in the Plugin Directory.

The workflow has to be redesigned, the proposal doesn't work.
In any case, the Worona WordPress Plugin and SiteID can be discovered using the rest API (worona-wp-plugin #2 &  worona-wp-plugin #1). This will make easier the "add site" from the dashboard.

Splitted in #39, #40, #41, #42 and #43


Add nginx status page listen address to parameters

In PR #1212 (https://github.com/kubernetes/ingress/commit/d2546d029178f7dcb7633468c3214e68ba339b8b#diff-b7803798d356c6c17a90d93cc58bdbaaL353) port binding was replaced with <IP_ADDRESS>:{{ $all.ListenPorts.Status }} in nginx.tmpl. We've used it to monitor Ingress Controller from outside of the container using http://node_hostname:18080/nginx_status.
Maybe add this address to parameters in ConfigMap or something?

@arjanschaaf @lkirill I will change the IP address binding.

Am I missing something obvious and can I easily expose 18080 in my service somehow or is having the status port only listening on <IP_ADDRESS> in a pod just a bad idea all together?

If you are running with hostNetwork: true then you are exposing the stats without any restriction.


Added a Twig example for the service

even better: add the symfony Twig bridge in your vendor and register the SymfonyBridgesServiceProvider. You will then have the Twig integration to use it like this:
{{ path('homepage') }}

{{ url('homepage') }} {# generates the absolute url http://example.org/ #}

Btw, registering the bridge provider will also activate the Twig integration for other providers (when they are registered): Form (for the rendering) and Translation (the trans and transchoice filters and tags)

Fixed


IDP faq

IDP faq
Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.
Description

Please describe your changes: Added IDP faq

PR lifecycle
We aim to merge PRs within one week or less, but delays happen sometimes.
If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.
PRs must meet these requirements to be merged:

[ ] Successful preview build.
[ ] Code owner review.
[ ] No merge conflicts.
[ ] Release notes/new features docs: Feature/version released to at least one prod environment.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6718cd2f7ed1a0461bf521b6--harness-developer.netlify.app

This pull request has been automatically closed due to 30 days of inactivity. If you believe this was done in error, please feel free to reopen the PR or reach out to the BT team for further assistance. Thank you for your contributions!