333 basic component documentation

I added documentation to every component I felt I knew enough about.
Please add or fix the documentation for the components which are created by you.
There is still an issue with the story of CreatableSelectMenu I don't know how to fix.

[ ] References to issues, e.g. close #X, are in the commit messages.
[ ] The buildserver is happy.
[x] The PR is rebased with current master.

Checklist

[x] I fully described what my PR does in the documentation
(not in the PR description)
[x] I fixed all affected documentation
[x] I fixed all affected decisions
[ ] I added unit tests for my code
[x] I added code comments, logging, and assertions as appropriate
[x] I translated all strings visible to the user
[x] I mentioned every code or binary not directly written or done by me in reuse syntax
[ ] I created left-over issues for things that are still to be done
[x] Code is conforming to our Architecture
[x] Code is conforming to our Guidelines
(exceptions are documented)
[x] Code is consistent to our Design Decisions

Review

[ ] I've tested the code
[ ] I've read through the whole code
[ ] Examples are well chosen and understandable

So good to see more components in storybook!
Unfortunately CI fails and I also get plenty of errors locally:
npm run doc

><EMAIL_ADDRESS>doc
> typedoc src

[info] Loaded plugin typedoc-plugin-markdown
src/components/Modals/SimpleModal.test.tsx:10:10 - error TS2741: Property 'onCancel' is missing in type '{ title: string; body: string; setShow: Mock<any, any, any>; show: true; submitBtnTitle: string; cancelBtnTitle: string; onSubmit: Mock<any, any, any>; }' but required in type 'SimpleModalProps'.

10         <SimpleModal
            ~~~~~~~~~~~

  src/components/Modals/SimpleModal.tsx:15:3
    15   onCancel: () => void;
         ~~~~~~~~
    'onCancel' is declared here.

src/features/auth/api/getAuthInfo.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'ConfigDto'.

1 import { ConfigDto } from '@/bindings/definitions';
           ~~~~~~~~~

src/features/map_planning/api/createPlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewPlantingDto'.

1 import { NewPlantingDto, PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~~~~

src/features/map_planning/api/createPlanting.ts:1:26 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { NewPlantingDto, PlantingDto } from '@/bindings/definitions';
                           ~~~~~~~~~~~

src/features/map_planning/api/getPlantings.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/movePlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/movePlanting.ts:1:23 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'UpdatePlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
                        ~~~~~~~~~~~~~~~~~

src/features/map_planning/api/transformPlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/transformPlanting.ts:1:23 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'UpdatePlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
                        ~~~~~~~~~~~~~~~~~

src/features/map_planning/layers/plant/actions.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

9 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/routes/Map.tsx:10:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'ConnectToMapQueryParams'.

10 import { ConnectToMapQueryParams } from '@/bindings/definitions';
            ~~~~~~~~~~~~~~~~~~~~~~~

src/features/map_planning/store/MapStore.test.ts:6:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

6 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/store/MapStoreTypes.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/store/RemoteActions.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'Action'.

9 import { Action as RemoteAction } from '@/bindings/definitions';
           ~~~~~~

src/features/map_planning/store/TrackedMapStore.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

9 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/maps/api/createMap.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

1 import { MapDto, NewMapDto } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/api/createMap.ts:1:18 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

1 import { MapDto, NewMapDto } from '@/bindings/definitions';
                   ~~~~~~~~~

src/features/maps/api/findAllMaps.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

1 import { MapDto, Page } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/components/MapCard.tsx:2:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

2 import { MapDto } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/components/MapCreateModal.tsx:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

1 import { NewMapDto } from '@/bindings/definitions';
           ~~~~~~~~~

src/features/maps/routes/MapOverview.tsx:5:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

5 import { NewMapDto } from '@/bindings/definitions';
           ~~~~~~~~~

src/features/seeds/components/CreateSeedForm.tsx:89:15 - error TS2322: Type '(search: string, options: SelectOption, additional: PageAdditionalInfo | undefined) => Promise<Page>' is not assignable to type 'LoadOptions<SelectOption, GroupBase<SelectOption>, PageAdditionalInfo>'.
  Types of parameters 'options' and 'options' are incompatible.
    Type 'readonly (SelectOption | GroupBase<SelectOption>)[]' is missing the following properties from type 'SelectOption': value, label

89               loadOptions={loadPlants}
                 ~~~~~~~~~~~

  src/components/Form/PaginatedSelectMenu.tsx:45:3
    45   loadOptions: LoadOptions<Option, GroupBase<Option>, PageAdditionalInfo>;
         ~~~~~~~~~~~
    The expected type comes from property 'loadOptions' which is declared here on type 'IntrinsicAttributes & PaginatedSelectMenuProps<NewSeedDto, SelectOption, false>'

src/features/seeds/routes/CreateSeed.tsx:75:10 - error TS2741: Property 'onCancel' is missing in type '{ title: string; body: string; show: boolean; setShow: (showErrorModal: boolean) => void; submitBtnTitle: string; onSubmit: () => void; }' but required in type 'SimpleModalProps'.

75         <SimpleModal
            ~~~~~~~~~~~

  src/components/Modals/SimpleModal.tsx:15:3
    15   onCancel: () => void;
         ~~~~~~~~
    'onCancel' is declared here.

src/features/seeds/routes/SeedDetails.tsx:91:10 - error TS2741: Property 'onCancel' is missing in type '{ title: string; body: string; show: boolean; setShow: Dispatch<SetStateAction<boolean>>; submitBtnTitle: string; onSubmit: () => void; }' but required in type 'SimpleModalProps'.

91         <SimpleModal
            ~~~~~~~~~~~

  src/components/Modals/SimpleModal.tsx:15:3
    15   onCancel: () => void;
         ~~~~~~~~
    'onCancel' is declared here.

src/features/seeds/routes/ViewSeeds.tsx:68:10 - error TS2741: Property 'onCancel' is missing in type '{ title: string; body: string; show: boolean; setShow: Dispatch<SetStateAction<boolean>>; submitBtnTitle: string; onSubmit: () => void; }' but required in type 'SimpleModalProps'.

68         <SimpleModal
            ~~~~~~~~~~~

  src/components/Modals/SimpleModal.tsx:15:3
    15   onCancel: () => void;
         ~~~~~~~~
    'onCancel' is declared here.

src/utils/enum.ts:1:10 - error TS2614: Module '"@/components/Form/SelectMenu"' has no exported member 'SelectOption'. Did you mean to use 'import SelectOption from "@/components/Form/SelectMenu"' instead?

1 import { SelectOption } from '@/components/Form/SelectMenu';
           ~~~~~~~~~~~~

A lot of these issues stem from the current master and appeared after I rebased.
I don't know how these made it into the master branch but I will try to fix them.

jenkins build please

Still get plenty of errors (different ones):
><EMAIL_ADDRESS>doc
> typedoc src

[info] Loaded plugin typedoc-plugin-markdown
src/features/auth/api/getAuthInfo.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'ConfigDto'.

1 import { ConfigDto } from '@/bindings/definitions';
           ~~~~~~~~~

src/features/map_planning/api/createPlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewPlantingDto'.

1 import { NewPlantingDto, PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~~~~

src/features/map_planning/api/createPlanting.ts:1:26 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { NewPlantingDto, PlantingDto } from '@/bindings/definitions';
                           ~~~~~~~~~~~

src/features/map_planning/api/getPlantings.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/movePlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/movePlanting.ts:1:23 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'UpdatePlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
                        ~~~~~~~~~~~~~~~~~

src/features/map_planning/api/transformPlanting.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/api/transformPlanting.ts:1:23 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'UpdatePlantingDto'.

1 import { PlantingDto, UpdatePlantingDto } from '@/bindings/definitions';
                        ~~~~~~~~~~~~~~~~~

src/features/map_planning/layers/plant/actions.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

9 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/routes/Map.tsx:10:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'ConnectToMapQueryParams'.

10 import { ConnectToMapQueryParams } from '@/bindings/definitions';
            ~~~~~~~~~~~~~~~~~~~~~~~

src/features/map_planning/store/MapStore.test.ts:6:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

6 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/store/MapStoreTypes.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

1 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/map_planning/store/RemoteActions.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'Action'.

9 import { Action as RemoteAction } from '@/bindings/definitions';
           ~~~~~~

src/features/map_planning/store/TrackedMapStore.ts:9:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'PlantingDto'.

9 import { PlantingDto } from '@/bindings/definitions';
           ~~~~~~~~~~~

src/features/maps/api/createMap.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

1 import { MapDto, NewMapDto } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/api/createMap.ts:1:18 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

1 import { MapDto, NewMapDto } from '@/bindings/definitions';
                   ~~~~~~~~~

src/features/maps/api/findAllMaps.ts:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

1 import { MapDto, Page } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/components/MapCard.tsx:2:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'MapDto'.

2 import { MapDto } from '@/bindings/definitions';
           ~~~~~~

src/features/maps/components/MapCreateModal.tsx:1:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

1 import { NewMapDto } from '@/bindings/definitions';
           ~~~~~~~~~

src/features/maps/routes/MapOverview.tsx:5:10 - error TS2305: Module '"@/bindings/definitions"' has no exported member 'NewMapDto'.

5 import { NewMapDto } from '@/bindings/definitions';
           ~~~~~~~~~

I think we definitely should run npm run doc within the CI, can you add this to this PR?

@markus2330
Those error seem like they only occur locally. Did you run npm run generate-api-types?

and for npm run storybook:
...
Error: Unexpected character ` (U+0060) before name, expected a character that can start a name

Ah, this is something that my plugin missed providing support for. I will add a fix for this.

@Bushuo is this something introduced in this PR? (Please merge if the PR does not introduce the problem.)
Is there some way to see if npm run storybook would work for CI (without browser)? If you have an idea, please add to #438.

@Bushuo is this something introduced in this PR? (Please merge if the PR does not introduce the problem.)
Is there some way to see if npm run storybook would work for CI (without browser)? If you have an idea, please add to #438.

No, this is not an issue of this PR.
I will take a look for storybook.


J host img on server

puts the images in static folder, cover the user story: As a server admin, images can be hosted on my server

@Johnson-8, try:

[ ] merging staging to this branch, and then
[ ] changing the base of this branch into staging so we can review it.


Auto restart

Please tick all applicable boxes.

[x] I am using Python 3.5 or higher (run python --version on the command line)
[x] I have followed the official guides to install the bot for my system
[x] I have updated my dependencies to the latest version using the appropriate update script

Which version are you using?

[x] The latest master version (1.9.8)
[ ] The latest review version

What type of issue are you creating?

[ ] Bug
[x] Feature request
[x] Question

Description of issue
Hello, please add a auto restart feature, because my bot, that must be running 24/7 keeps breaking every now and then if not regularly used. Also please make it so that the volume can get a bit louder.

You cannot delete an issue. You may however edit it with the correct information or close it.

ok, will do

bump

Instead of bumping your post, there are alternatives you could look into.
One alternative would be a script that restarts your bot at regular intervals, or another would be to have a set restart time for your host machine, and have the bot run on startup.
As for making the volume get louder, discord has a built in volume control when you right click users, in addition to the bots volume control, you're welcome to use both of these to make the bot plenty loud.

ok. im just not that good with scripting on raspberry pi.

Closing for inactivity and invalid.


Request to add support for Rachio sprinkler

Rachio sprinkler system gets connected to Wink hub and provides status and control watering of configured zones.
Here is the JSON to see what information it provides. I didn't find much useful information though may be few more calls we may have to make to get more information?
{
  "object_type": "sprinkler",
  "object_id": "xxxx",
  "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "icon_id": null,
  "icon_code": null,
  "desired_state": {
    "powered": true
  },
  "last_reading": {
    "connection": true,
    "connection_updated_at":<PHONE_NUMBER>.6407745,
    "powered": true,
    "powered_updated_at":<PHONE_NUMBER>.6761053,
    "desired_powered": null,
    "desired_powered_updated_at": null
  },
  "subscription": {
    "pubnub": {
      "subscribe_key": "sub-x-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "channel": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|sprinkler-xxxx|user-xxxxxx"
    }
  },
  "sprinkler_id": "xxxx",
  "name": "xxxx",
  "locale": "en_us",
  "units": {},
  "created_at":<PHONE_NUMBER>,
  "hidden_at": null,
  "capabilities": {
    "fields": [
      {
        "type": "boolean",
        "field": "connection",
        "mutability": "read-only"
      },
      {
        "type": "boolean",
        "field": "powered",
        "mutability": "read-write"
      }
    ]
  },
  "manufacturer_device_model": "rachio_iro_v2",
  "manufacturer_device_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "device_manufacturer": "rachio",
  "model_name": "Iro",
  "upc_id": "xxx",
  "upc_code": "wifi_rachio_v2",
  "linked_service_id": "xxxxxx",
  "lat_lng": [
    null,
    null
  ],
  "location": "",
  "zones": []
}

Added in #68. Closing.

@scadaguru I think I closed this too early. I was taking a look at the API and it looks like there are zones defined that have way more information including the state of each zone and how the nozzle should spray.
I don't see any zones in the JSON you provided. Do you have your system completely configured? I am going to open this back up to track adding full support for these.

I will have to pull one more time JSON to verify it. But when I open Wink application (written by Wink) on my phone it has listed zones and shows zone with last ran (like 2 days ago). There is a button called "Select Schedule" which brings my schedules from Rachio device and provides option to run it by clicking "Start" button withing the app.
May be button click makes another request to Wink server and eventually to Rachio server and brings another JSON which has more details which was not part of the first one.
I will update here once I get more details today or tomorrow.

@scadaguru thats possible I guess, but their API spec states it should be present in the main devices JSON. However their spec has tons of errors and isn't ever updated.

I just checked one more time JSON using wink@home and see zones shows just empty collection like:
"zones": []
Wink app has zones listed with last activity but read only mode, Select Schedule button gives control.

:( sounds like another example of Wink doing something unique in their app that they don't document. I am not sure how technical you are, but any time I have run into this problem the only way I have been able to figure out what they are doing, is to proxy the Android apps traffic and watch what it is doing.
If you would like to give this a try, I can probable walk you through how to do it.
If you are interested, and since github doesn't have a PM function you PM me over on https://community.home-assistant.io same username as here.

I would be interested in seeing this added, however I do want to point out that Rachio has a publicly documented API so it would probably be easiest for a separate component to be built specifically for the IRO rather than going through Wink's API to then just call the IRO API

@AppleTechy Good to know, I don't have one so I wasn't aware of that. Do you have one? If so would you like to help me figure out how to access the zone information? I was proxying the Wink app today and noticed there is an endpoint api.wink.com/zones mine doesn't return anything. I am thinking it might be the sprinkler zones?


Otto/more robust promise detection

Issue #, if available: N/A
Description of changes: More robust detection of promises in verifySync error flow.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LGTM Otto


Commit count is incorrect

After running jack it starts to count the commits in the upper right corner.  Once the count stops it is incorrect:

While git rev-list --count master yields: 224325 commits

This one is tricky because what I'm really counting is the number of lines that match the Git SHA regex.  Some commit messages have SHAs in them (like revert commits), so it inflates the count.
The purpose of the count is to give you an idea of your relative position in a potentially gigantic list, so I'm hesitant to spend any significant time to get it exactly accurate.  I originally had it say "Line" instead of "Commit", so I may revert back to that.

Ahh I see.  Thanks for the clarification :)


Support HTTP2 servers

For a streaming service, I need to be able to send HTTP trailers to the client, but apparently browsers don't really support them on HTTP 1.1, despite the spec. With HTTP/2, proper support for trailers exists.
During the process of experimenting, I discovered that Now doesn't seem to support running an HTTP/2 server. I believe this will make it impossible for me to send trailers, even though Now fronts my server with an HTTP2-compliant proxy.

Any updates on http/2 for Zeit servers?

We already support HTTP/2 out of the box!

Now itself adds an HTTP/2 layer on top. But I was unable to make my origin server be HTTP/2. This is pretty problematic, because it means I can't use some HTTP/2 features.


Migrate the Cicognara website to a static site

I've asked Rachael and Ming to review and when I have their feedback, we can move forward with this in production.


Change google font to load over SSL

When using HTML-KickStart on an SSL site, the google font is loaded over HTTP giving an ssl warning.

Thanks :)


chore(localize): updated translation from Crowdin

:tada: This PR is included in version 2.95.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Introduce plugin system to deal with provider config and lifecycle

Description

Introduce a plugin system to better deal with provider configuration and lifecycle.
We already have a handful of features with multiple "implementations". Users can choose their preferred implementation, depending on their specific needs and requirements:

Vulnerability policy bundles can be fetched from S3, or generic file servers.
Uploaded BOMs can be stored on local disk, in the database, or S3.

As we continue to build out Dependency-Track as a platform, cases like the above will increase. For example, the following use-cases may benefit from a plugin mechanism:

Support for multiple BOM formats (SPDX, Syft, ...).
...

We need a unified mechanism to deal with such extensibility demands.

[!NOTE]
This implementation does not yet support loading of plugins from JARs on the filesystem. It also does not yet enable users to build custom plugins. To do that, we need to decouple plugin interfaces into a separate Maven module, and publish that to Maven Central. This in turn requires the API server to switch to a multi-module Maven project model.

Addressed Issue

N/A
Additional Details

The implementation is based on, or heavily inspired by other plugin systems that I found in-the-wild. Particularly the following:

Kafka Connect plugins
Keycloak providers
Nzyme plugins

Checklist

[x] I have read and understand the contributing guidelines
~This PR fixes a defect, and I have provided tests to verify that the fix is effective~
[x] This PR implements an enhancement, and I have provided tests to verify that it works as intended
~This PR introduces changes to the database model, and I have updated the migration changelog accordingly~
~This PR introduces new or alters existing behavior, and I have updated the documentation accordingly~

Look's good to go to me.


x/pkgsite: support GitLab nested groups

What did you do?
Visit https://pkg.go.dev/gitlab.com/gitlab-org/security-products/analyzers/common/v2
What did you expect to see?
A Go module showing godocs, show README, version. something similar to https://pkg.go.dev/gitlab.com/akita/akita?tab=doc
What did you see instead?
It's treated like a subdirectory o godocs, empty README.
Information
GitLab supported nested groups https://docs.gitlab.com/ee/user/group/subgroups/index.html#subgroups where you can have projects inside of those groups such as https://gitlab.com/gitlab-org/security-products/analyzers/common. This package should be considered as the root of the module.

Thanks for the feedback! We're currently discussing this request with our UX team. We'll post on this issue with any updates.
/cc @fflewddur

@steveazz Thanks for filing this 🙇

https://pkg.go.dev/gitlab.com/gitlab-org/security-products/analyzers/common/v2 seems very similar to https://gitlab.com/gitlab-org/security-products/analyzers/common to me. Would you mind elaborating on what you're looking for?

There have been a number of GitLab bugs surrounding the go-import metadata they serve for subgroups; see:

https://gitlab.com/gitlab-org/gitlab/-/issues/36354
https://gitlab.com/gitlab-org/gitlab-foss/-/issues/32149
and other duplicates of those issues.

It appears that some or all of them have been resolved within the past year or so.
It isn't clear to me whether those fixes have addressed the issues reported here.

As bugs on gitlab.com were fixed in 2020-10, this problem looks fixed now. Thanks for confirming.


Go modules

This PR will migrate from dep to go modules, along with doing a update of the deps (non breaking).
closes #35

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

Thanks for your contribution! Would you mind adding a short summary of how to add/remove/update dependencies in the readme?

Surething, let me know if I should add more. Thanks!


Fix table column resize bug when table was created in an closed widget tab

Fixed useLayoutResizeObserver by requiring an HTMLElement and not a React reference
Update test to set up Element.getBoundingClientRect to provide container sizes used by resize hooks.
Update uses of ResizableContainerObserver to pass element instead of Ref.

@mergifyio backport release/2.18.x


view cannot copy static defaultProps getter

const defaultProps = { number: 0 };
let id = 0;

class SubComponent extends Component {
  static get defaultProps() {
    return { ...defaultProps, id: id++ };
  }

  // Other methods
}

export default view(SubComponent);

This throws an error for me: Uncaught TypeError: Cannot set property defaultProps of ...
It looks like view(BaseComponent) can't copy a static getter property.
Here is a Codesandbox link to an example of the error: https://codesandbox.io/s/x209v97ypq
MDN error link.
Is there a way to solve this?

Edit 1
Was just looking at view.js again. Could ReactiveHOC extend the passed in argument Comp instead of BaseComp? If so, would it still be necessary to copy the static properties to ReactiveHOC if it extended the Comp argument?
return class ReactiveHOC extends BaseComp {
    static displayName = Comp.displayName || Comp.name;
    static contextTypes = Comp.contextTypes;
    static childContextTypes = Comp.childContextTypes;
    static propTypes = Comp.propTypes;
    static defaultProps = Comp.defaultProps;
    ...
}

Could that just be
return class ReactiveHOC extends Comp {
    ...
}

?

Edit 2
Nvm my question in Edit 1. I realized that making a HOC extending a functional component does not necessarily make it extend React.Component.
Would it be possible to check the value isStatelessComponent before copying the static properties?
So if isStatelessComponent is true, copy the static properties, otherwise make ReactiveHOC extend from Comp without copying static properties..?

Hi!
Thanks for the issue and the solution 🙂v5.0.1 is out with the fix, I did exactly what you suggested in Edit 2.
I am closing this, feel free to reopen if the new behavior still has issues.


fix: select((name: string) => boolean)

fixes #223

Codecov Report

Merging #227 (7860610) into master (e8a524a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #227   +/-   ##
=======================================
  Coverage   97.25%   97.25%
=======================================
  Files          42       42
  Lines        3101     3101
=======================================
  Hits         3016     3016
  Misses         85       85

Continue to review full report at Codecov.

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


Circle: Tag you're it!

Intro
We've been rolling on latest image publishes across our keep-dev and keep-test environments for awhile.  While this is fine for our dev environment, it's time we work against properly versioned images for our test/Ropsten environment.
What we did
Circle builds that run against a git tag generate a Circle env var CIRCLE_TAG.  This is perfect for our Docker image tagging needs.  However, the CIRCLE_TAG environment variable isn't generated for builds that don't run on a tag.  e.g. all keep-dev / master builds.  We already use environment based Circle contexts to factor out environment specific configs from the Circle config space, so it's a natural fit to handle this in the same way.  The Circle Context environment variable is DOCKER_IMAGE_TAG.  For keep-dev it's set to latest, and for keep-test it's set to $CIRCLE_TAG.

Related https://github.com/keep-network/keep-core/pull/1604

it would be great if we could get this in before the next tag.


Cleanup input checks for modifications

This an alternative to #11629 and a potential fix for BTS-56 in a structured way; we should be checking whether inputs to transaction methods (insert, update, replace, remove, upsert) are valid;
In this PR, I intend to check that a passed _key is valid. For this I use the collection's KeyGenerator that validates that a given key string is valid according to https://www.arangodb.com/docs/3.6/appendix-glossary.html#document-key in the Local variant of the operation. Arguably this is a bit late (as we should really be checking this earlier in the input path).
I removed code that seemed to collapse a string something/somethingelse input to somethingelse, but there didn't seem to be a way to get this input through to this input path at all.
This is still incomplete, I have only changed update and remove before I ran out of time for this week.
I'd like to see what Jenkins says about this change.

http://jenkins.arangodb.biz:8080/job/arangodb-matrix-pr/10056/

http://jenkins.arangodb.biz:8080/job/arangodb-matrix-pr/10090/

http://jenkins.arangodb.biz:8080/job/arangodb-matrix-pr/10122/

http://jenkins.arangodb.biz:8080/job/arangodb-matrix-pr/10127/

http://jenkins.arangodb.biz:8080/job/arangodb-matrix-pr/10129/


how to use "Esc key" to close alert?

I use it in Meteor, but have problem with Esc Key to close alert
    swal({
        title: "Error",
        text: msg,
        type: "error",
        confirmButtonClass: "btn-danger",
    });

when I tried add showCancelButton: true, it work fine.
but I don't want to show Cancel Button.

OK, now it work fine (last version)


i have a question about shared-js between ver 0.10 and 0.15

when i test in mfc, in repository of mfc develop, i saw news that js's version change 0.10 to 0.15.
so i change js's version too, to 0.15.
i have a test epub, readium provide and make by calibre(in calibre case, use scanned comicbook. html have a only image source).
and open epub.
in 0.10, comicbook image is good. but accessible_epub is not good. occur http error( with these )

almost ERROR_CONNECTION_INVALID.
and in 0.15, accessible_epub is good! very. but comicbook image is not good.
next images is captured image.
[this is using 0.10]

[this is using 0.15]

this html is good in chrome browser and ie.
is there big difference between 0.10 and 0.15 with image viewing?
and css is not available in epub?
thank you!

moved to the windows launcher app repo:
https://github.com/readium/SDKLauncher-Windows/issues/23


A whole new world

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Compiling a cmake project with zig c++ doesn't resolve to and absolute path

Xmake Version
2.9.4+20240729
Operating System Version and Architecture
Ubuntu 22.04.3 LTS x86_64
Describe Bug
Setting zig as a default toolchain for entire script and including a cmake based project for this instance snitch 1.2.5 results in cmake not recognizing the path as an absolute path
add_requires("snitch 1.2.5", {system=false})

set_toolchains("zig")
-- ...

target("test")
  -- ...

This results in this error
/snap/bin/cmake -DSNITCH_DO_TEST=OFF -DSNITCH_CREATE_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DSNITCH_DEFINE_MAIN=ON -DCMAKE_INSTALL_PREFIX=/home/sid/.xmake/packages/s/snitch/1.2.5/14ad55b1337f4c69825194568c3595cb -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH "-DCMAKE_C_COMPILER=/usr/local/bin/zig cc" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_AR=/usr/local/bin/zig -DCMAKE_FIND_USE_INSTALL_PREFIX=0 -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH "-DCMAKE_CXX_COMPILER=/usr/local/bin/zig c++" -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=0 -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 -DCMAKE_STATIC_LINKER_FLAGS= /home/sid/.xmake/cache/packages/2409/s/snitch/1.2.5/source
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    /usr/local/bin/zig c++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
error: execv(/snap/bin/cmake -DSNITCH_DO_TEST=OFF -DSNITCH_CREATE_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DSNITCH_DEFINE_MAIN=ON -DCMAKE_INSTALL_PREFIX=/home/sid/.xmake/packages/s/snitch/1.2.5/14ad55b1337f4c69825194568c3595cb -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH "-DCMAKE_C_COMPILER=/usr/local/bin/zig cc" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_AR=/usr/local/bin/zig -DCMAKE_FIND_USE_INSTALL_PREFIX=0 -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH "-DCMAKE_CXX_COMPILER=/usr/local/bin/zig c++" -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=0 -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 -DCMAKE_STATIC_LINKER_FLAGS= /home/sid/.xmake/cache/packages/2409/s/snitch/1.2.5/source) failed(1)
  => install snitch 1.2.5 .. failed
error: install failed!

This was discussed in https://github.com/ziglang/zig/issues/8716, but the conclusion was that its basically glue code which depends per platform.
Expected Behavior
zig should be able to be used by default as compilation for dependent projects. This will allow cross compilation more easily.
It would be amazing this could be setup. The workaround for linux where you basically make a warpper script doesn't work with xmake as it results in cannot find known tool script for zig-cxx etc.
Project Configuration
add_rules("mode.debug", "mode.release")
add_rules("plugin.compile_commands.autoupdate", {outputdir = "./build"})
includes("@builtin/check")
includes("toolchains/*.lua")

set_languages("c++2c")

add_requires("flux ~0.4")
add_requires("snitch 1.2.5", {system=false})
add_requires("fmt", {system=false, configs = {header_only = true}})

-- version 015de6adee287917a9ee10afcbfcb8e560f4d9aa
-- https://github.com/Sid911/xrepo Add my xrepo because this isn't usually available in official xrepo
add_requires("argparse")
add_requires("simdutf", "utfcpp")
add_requires("cmake::LLVM 19", {alias = "llvm", system=true, configs = {search_mode = "config"}})

-- set_toolchains("clang", "gcc", "icx")
set_toolchains("zig")

option("static_bin")
    set_default(true)
    set_showmenu(true)
    add_ldflags("-static", {force = true})
option_end()

target("scions_dsl")
    set_version("0.0.1", {build = "%Y%m%d%H%M"})
    set_kind("binary")
    set_policy("build.optimization.lto", true)
    set_policy("build.warning", true)

    set_warnings("all", "extra")
    add_options("static_bin")

    -- Used for __declspec extensions
    -- add_cxxflags("-fms-extensions", {force = true})

    -- on_config(function(target)
    --     -- basically don't support gcc
    --     if target:has_cxxflags("-fdeclspec") then
    --         target:add("defines", "HAS_DECLSPEC_PROPERTY")
    --     end
    -- end)

    if(is_mode("debug"))then
        add_defines("SC_DEBUG")
        set_symbols("debug")
        set_optimize("none")
    end

    if(is_mode("release", "profile")) then
        if is_mode("release") then
            set_symbols("hidden")
            set_strip("all")
            add_cxxflags("-fomit-frame-pointer")
            set_optimize("fastest")
        else
            set_symbols("debug")
            set_optimize("fast")
        end
        add_vectorexts("avx", "avx2")
    end

    add_includedirs("$(projectdir)/include")
    add_files("src/**.cpp")

    add_packages("flux", "argparse")
    add_packages("llvm")
    add_packages("fmt", "simdutf")

    -- Adding hard link shouldn't be there but for the sake for my sanity I will do it for now
    -- Todo: Remove hardlink
    add_linkdirs("/lib/llvm-19/lib")
    -- add_links("LLVMCore","LLVMRemarks", "LLVMBitstreamReader", "LLVMBinaryFormat", "LLVMTargetParser") -- LLVM core
    -- add_links("LLVMIRReader", "LLVMBitReader", "LLVMAsmParser") -- LLVM irreader
    -- add_links("LLVMSupport", "LLVMDemangle") -- LLVM SUpport

    add_defines("SCIONS_TRUE")
    -- before_build(function (target)
        -- os.cp("$(projectdir)/hello.txt", target:targetdir() .. "/inc.txt")
        -- cprint('${bright}CPU : ')
        -- print(target:orderpkgs())
    -- end)
target_end()

-- This is primarily for having all the stuff actually
target("scions_lib")
    set_kind("static")
    set_default(false)
    set_targetdir("$(buildir)/$(host)/$(arch)/$(mode)/lib/")

    -- set_policy("build.merge_archive", true)
    set_policy("build.warning", true)
    set_warnings("all", "extra")

    if(is_mode("debug"))then
        add_defines("SC_DEBUG")
        set_symbols("debug")
        set_optimize("none")
    end

    if(is_mode("release", "profile")) then
        if is_mode("release") then
            set_symbols("hidden")
            set_strip("all")
            add_cxxflags("-fomit-frame-pointer")
            set_optimize("fastest")
        else
            set_symbols("debug")
            set_optimize("fast")
        end
        add_vectorexts("avx", "avx2")
    end

    add_packages("flux")
    add_packages("fmt", "simdutf")

    add_includedirs("$(projectdir)/include", {public = true})
    add_files("src/**.cpp")
    remove_files("src/main.cpp")
target_end()

for _, file in ipairs(os.files("tests/**.cpp")) do
    -- print("relative_path: " .. relative_path .. "\n")
    -- local src_path = relative_path:gsub("^tests", "src", 1)
    local name = path.basename(file)
    target(name)
        set_kind("binary")
        set_default(false)

        add_includedirs("$(projectdir)/include")

        add_packages("snitch", "flux")
        add_deps("scions_lib")
        set_targetdir("$(buildir)/$(host)/$(arch)/$(mode)/tests/")

        on_config(function (target)
            -- utility functions : I am not good enough for lua yet
            -- there is porbably is a better way to do this
            local function read_first_line(file_path)
                local file = io.open(file_path, "r")
                if not file then return nil end
                local first_line = file:read("*line")
                file:close()
                return first_line
            end

            local function extract_test_name(line)
                -- Remove leading and trailing whitespace, then remove "//" if present
                return line:match("^%s*//?(.*)")
                       :gsub("^%s*(.-)%s*$", "%1")  -- Trim whitespace
            end

            local relative_path = path.relative(file, ".")
            local first_line = read_first_line(file)
            local test_name = first_line and extract_test_name(first_line) or "Unknown Test"

            target:add("files",relative_path)
            target:add("tests",test_name)
        end)
    target_end()
end

Additional Information and Error Logs
sid@sid-ubuntu /m/s/P/C/S/scions_dsl (master)> xmake -j 8 -vD
checking for gcc ... /usr/bin/gcc
checking for zig ... /usr/local/bin/zig
checkinfo: cannot runv(nim --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(nim --version), No such file or directory
checking for nim ... no
checking for unzip ... /usr/bin/unzip
checking for git ... /usr/bin/git
checking for gzip ... /usr/bin/gzip
checking for tar ... /usr/bin/tar
/usr/bin/git rev-parse HEAD
/usr/bin/git rev-parse HEAD
finding flux from xmake ..
checking for xmake::flux ... flux 0.4.0
checking for cmake ... no
checking for cmake ... /snap/bin/cmake
finding snitch from xmake ..
checking for xmake::snitch ... no
finding fmt from xmake ..
checking for xmake::fmt ... no
finding argparse from xmake ..
checking for xmake::argparse ... argparse @default
finding simdutf from xmake ..
checking for xmake::simdutf ... no
checkinfo: cannot runv(pacman --version), No such file or directory
checking for pacman ... no
checkinfo: cannot runv(emerge --version), No such file or directory
checking for emerge ... no
finding simdutf from brew ..
checking for brew ... no
finding simdutf from vcpkg ..
finding simdutf from conan ..
finding simdutf from pkgconfig ..
checking for pkg-config ... /usr/bin/pkg-config
finding simdutf from system ..
checking for simdutf ... no
finding utfcpp from xmake ..
checking for xmake::utfcpp ... utfcpp v4.0.5
finding LLVM from cmake ..
checking for cmake ... /snap/bin/cmake
finding it from the generated CMakeLists.txt:
cmake_minimum_required(VERSION 3.30.3)
project(find_package)
find_package(LLVM 19 CONFIG REQUIRED )
if(LLVM_FOUND)
   add_executable(test_LLVM test.cpp)
   target_include_directories(test_LLVM PRIVATE LLVM_INCLUDE_DIR LLVM_INCLUDE_DIRS LLVM_INCLUDE_DIR LLVM_INCLUDE_DIRS)
   target_include_directories(test_LLVM PRIVATE LLVM_CXX_INCLUDE_DIRS)
   target_link_libraries(test_LLVM PRIVATE LLVM_LIBRARY LLVM_LIBRARIES LLVM_LIBS LLVM_LIBRARY LLVM_LIBRARIES LLVM_LIBS)
endif(LLVM_FOUND)

/snap/bin/cmake /tmp/.xmake1000/240912/_1EC6F4C960BC4A108176066389346630.dir
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib/x86_64-linux-gnu/libffi.so
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /usr/include (found version "2.11")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found zstd: /usr/lib/x86_64-linux-gnu/libzstd.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13")
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.81.0")
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/.xmake1000/240912/_1EC6F4C960BC4A108176066389346630.dir
finding includes from /tmp/.xmake1000/240912/_1EC6F4C960BC4A108176066389346630.dir/CMakeFiles/test_LLVM.dir/flags.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.30

# compile CXX with /usr/bin/c++
CXX_DEFINES =

CXX_INCLUDES = -I/usr/lib/llvm-19/include

CXX_FLAGS = -O3 -DNDEBUG

finding links from /tmp/.xmake1000/240912/_1EC6F4C960BC4A108176066389346630.dir/CMakeFiles/test_LLVM.dir/link.txt
/usr/bin/c++ -O3 -DNDEBUG CMakeFiles/test_LLVM.dir/test.cpp.o -o test_LLVM

checking for cmake::LLVM ... LLVM
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> snitch 1.2.5 [toolchains:"zig"]
  -> fmt 11.0.2 [toolchains:"zig", header_only:y]
  -> simdutf v5.5.0 [toolchains:"zig"]
please input: y (y/n/m)
y
checking for ping ... /usr/bin/ping
pinging the host(github.com) ... 44 ms
/usr/bin/tar -xf v1.2.5.tar.gz -C source.tmp
checking for /usr/local/bin/zig cc ... ok
checking for the c compiler (cc) ... zig cc
checking for /usr/local/bin/zig c++ ... ok
checking for the c++ compiler (cxx) ... zig c++
checking for /usr/local/bin/zig ... ok
checking for the static library archiver (ar) ... zig
checking for /usr/local/bin/zig c++ ... ok
checking for the linker (ld) ... zig c++
checking for /usr/local/bin/zig cc ... ok
checking for flags (-fPIC) ... ok
> zig cc "-fPIC" "-target" "x86_64-linux-gnu"
checking for /usr/local/bin/zig c++ ... ok
checking for flags (-fPIC) ... ok
> zig c++ "-fPIC" "-target" "x86_64-linux-gnu"
checking for gcc ... /usr/bin/gcc
checking for the assember (as) ... gcc
checking for /usr/bin/gcc ... ok
checking for flags (-fPIC) ... ok
> gcc "-fPIC"
checking for flags (-fPIC) ... ok
> zig c++ "-fPIC" "-target" "x86_64-linux-gnu" "-target" "x86_64-linux-gnu"
checking for /usr/local/bin/zig c++ ... ok
checking for the shared library linker (sh) ... zig c++
checking for flags (-fPIC) ... ok
> zig c++ "-fPIC" "-shared" "-target" "x86_64-linux-gnu" "-target" "x86_64-linux-gnu"
/snap/bin/cmake -DSNITCH_DO_TEST=OFF -DSNITCH_CREATE_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DSNITCH_DEFINE_MAIN=ON -DCMAKE_INSTALL_PREFIX=/home/sid/.xmake/packages/s/snitch/1.2.5/14ad55b1337f4c69825194568c3595cb -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_AR=/usr/local/bin/zig -DCMAKE_FIND_USE_INSTALL_PREFIX=0 "-DCMAKE_C_COMPILER=/usr/local/bin/zig cc" -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=0 -DCMAKE_STATIC_LINKER_FLAGS= -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DCMAKE_OSX_SYSROOT= "-DCMAKE_CXX_COMPILER=/usr/local/bin/zig c++" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH /home/sid/.xmake/cache/packages/2409/s/snitch/1.2.5/source
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    /usr/local/bin/zig c++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
error: @programdir/core/sandbox/modules/os.lua:378: execv(/snap/bin/cmake -DSNITCH_DO_TEST=OFF -DSNITCH_CREATE_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DSNITCH_DEFINE_MAIN=ON -DCMAKE_INSTALL_PREFIX=/home/sid/.xmake/packages/s/snitch/1.2.5/14ad55b1337f4c69825194568c3595cb -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_AR=/usr/local/bin/zig -DCMAKE_FIND_USE_INSTALL_PREFIX=0 "-DCMAKE_C_COMPILER=/usr/local/bin/zig cc" -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=0 -DCMAKE_STATIC_LINKER_FLAGS= -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DCMAKE_OSX_SYSROOT= "-DCMAKE_CXX_COMPILER=/usr/local/bin/zig c++" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH /home/sid/.xmake/cache/packages/2409/s/snitch/1.2.5/source) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [@programdir/core/sandbox/modules/os.lua:378]:
    [@programdir/core/sandbox/modules/os.lua:291]: in function 'vrunv'
    [@programdir/modules/package/tools/cmake.lua:1176]: in function 'install'
    [...make/repositories/xmake-repo/packages/s/snitch/xmake.lua:22]: in function 'script'
    [...dir/modules/private/action/require/impl/utils/filter.lua:114]: in function 'call'
    [.../modules/private/action/require/impl/actions/install.lua:404]:

  => install snitch 1.2.5 .. failed
error: @programdir/core/main.lua:329: @programdir/core/sandbox/modules/import/core/base/task.lua:65: @programdir/modules/async/runjobs.lua:325: .../modules/private/action/require/impl/actions/install.lua:506: install failed!
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:973]:
    [.../modules/private/action/require/impl/actions/install.lua:506]: in function 'catch'
    [@programdir/core/sandbox/modules/try.lua:123]: in function 'try'
    [.../modules/private/action/require/impl/actions/install.lua:370]:
    [...modules/private/action/require/impl/install_packages.lua:491]: in function 'jobfunc'
    [@programdir/modules/async/runjobs.lua:241]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:973: in function 'base/os.raiselevel'
        (...tail calls...)
        @programdir/core/main.lua:329: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>

Although I can support it with a wrapper script, I don't currently have the time to support the zig cc toolchain for all of my packages, which requires a lot of work. Not just support for cmake packages, but also for autoconf/meson packages. And there is no CI test for zig cc on xmake-repo at the moment, and there is no guarantee that all packages will support it.
Also, I think this should be a cmake issue, and it might be better to have cmake support zig c++ compiler detection with spaces.

Hi, @waruqi thanks for looking at it, it makes sense that it should technically be CMake issue.
On the note of being able to run wrapper scripts for compilers, I think it would be a useful feature in my opinion although very niche use case (and probably non standard way of doing things). I was looking at xmake code and maybe I could make it happen.
Does the project want to support any similar feature in that direction?

you can add it in your custom toolchain first.
like this https://github.com/xmake-io/xmake/blob/4786482d75731a2819136cac270a04630549cfbe/xmake/toolchains/xcode/xmake.lua#L62


Expect condition inside the .then won't execute

I'm using PageObjects in Protractor tests. Structure looks like this,

e2e

specs

base.po.ts // Base PageObject class
Login

login.e2e-spec.ts // contains describe, it blocks etc. and Expect conditions.
login.po.ts // Interacts with page elements

I'm returning Promises from methods inside PageObject file. And then inside spec file in it blocks i've Expect conditions.
A sample code is like,
// login.e2e-spec.ts

    it('should logout', () => {
          console.log('---- step 1 ----');
          page.logout().then(function () {
              console.log('---- step 4 ----');
              expect(page.inDom(page.getLoginButton())).toBe(true);
          });
          console.log('---- step 5 ----');
    });

// login.po.ts

public logout() {
        const that = this;
        return new Promise(function (fulfill = null, reject = null) {
            that.clickIfElementIsAvailable(that.welcomeModelCancelButtonElement);
            that.waitForVisibility(that.sideBarOpenerElement).then(function () {
                console.log('---- step 2 ----');
                that.sideBarOpenerElement.click();

                that.waitForVisibility(that.logoutButtonElement).then(function () {
                    console.log('---- step 3 ----');
                    that.logoutButtonElement.click();
                    fulfill();

                }, reject);

            }, reject);
        });
    }

After execution, all the tests pass and i get following output in log.
---- step 1 ----
---- step 5 ----
(node:2639) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'waitForElement' of undefined
(node:2639) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

3 specs, 0 failures

In practical i've multiple tests so control just moves to next tests and at the end tells that all tests passed successfully.
Now i understand that control is putting the commands in queue and moving forward. How can i handle this situation? What i'm doing wrong? Thanks.

Why not use async/await since you are using TypeScript, your code will be more clearly.
BTW, you better post your question to stackoverflow.

@awarecan ! Thanks. I tried it with async/await but nothing changed. I'm doubtful about using await condition when i've promises inside promises. For example, If i just use await with that.waitForVisibility(that.sideBarOpenerElement) then will it be enough for all the code (including promises) inside .then block? await that.waitForVisibility(that.sideBarOpenerElement).then(function () { ....... });

Hi, @iamhaseebiqbal ! As @awarecan mentioned, with async/await your code will be clearly. But if you want to use promises try this code snippet:
public logout() {
	const that = this;
	return that.clickIfElementIsAvailable(that.welcomeModelCancelButtonElement)
		.then(() => that.waitForVisibility(that.sideBarOpenerElement))
		.then(() => {
			console.log('---- step 2 ----');
			return that.sideBarOpenerElement.click();
		})
		.then(() => that.waitForVisibility(that.logoutButtonElement))
		.then(() => {
			console.log('---- step 3 ----');
			return that.logoutButtonElement.click();
		});
}

it('should logout', () => {
	  console.log('---- step 1 ----');
	  return page.logout().then(() => {
		  console.log('---- step 4 ----');
		  expect(page.inDom(page.getLoginButton())).toBe(true);
		  console.log('---- step 5 ----');
	  });
});

@IgorSasovets Thanks mate. Got your point. I implemented it in different specs and its working fine. 👍


Routing to streams are not working

Hi,
graylog receives a lot of messages over the two inputs.
But the routing into the different streams (eg. "nginx request") dosent work. Alle messages are routed into the "All messages" stream.
If I test against a stream everything is fine.
Any ideas?

We are using GitHub issues for tracking bugs in Graylog itself, but this doesn't look like one. Please post this issue to our discussion forum or join the #graylog channel on freenode IRC.
Thank you!


[TASK] Rework completion expecting matching

Goal
If #169 gets merged, rework the completions code to match on whether the expecting contains a flag, rather than value matching with the flags themselves.

hi Kurt, this task is finished in pr #180

Hi kurt, this task is done in pr #181


Prisma as submodule/dependency

In order to avoid redundant code, I currently have the prisma folder with the schema and the migration files in a separate repo and then add it to projects that use the database as a submodule. Because continuous deployment providers like Zeit or Netlify don't support (private) submodules, I had to make use of subtree, which is also not the cleanest solution to manage dependencies. What is the recommended way of dealing with Prisma as a dependency in multiple projects?

Can you elaborate please what you mean by "redundant code" in this case? What would be the complications of keeping the prisma folder in the same repo when used with platforms like Zeit or Netlify?

Assuming that the same database is used in two different applications, I would need to include the prisma folder in both applications.
If I then wanted to change the schema, I would need to synchronise the changes in both repos.

Closing in favor of: https://github.com/prisma/prisma/issues/2558


Sanity check

Devvy can now read intents
Configured Wit middleware
Need to connect to Nigel server

looks good!


Implement zio-jdbc backend

Adapted from the doobie backend
@oyvindberg Are there some tests on the doobie or anorm backends? Can I reuse them?

@oyvindberg For some reason, the code generated in the .bleep directory uses PlayJson instead of zio-json. Do you have an idea why? 🤔

If you're bothered by the files in .bleep/generated-sources they are created as part of the compilation process by the sourcegen script (scripts.GenHardcodedFiles) in the bleep build. You can comment them out there if needed during development.
I track all generated files in git as a kind of snapshot tests. I also continuously commit them to git as I work and use git diff to preview the effect my changes have. It's a very, very powerful technique for working on code generation code.
GenHardcodedFiles is the fast one, so it runs automatically, and GeneratedAdventureWorks is the slow one which needs a database connection.

I track all generated files in git as a kind of snapshot tests. I also continuously commit them to git as I work and use git diff to preview the effect my changes have. It's a very, very powerful technique for working on code generation code.

Yup, we completely agree on this. I do the same thing 🙂

One more thing to be aware of in order to not waste time. bleep supports mounting a subset of projects in your IDE, so you would typically just mount for just one scala version and maybe not the test code for anorm/doobie. this way your compile round-trip will be much shorter

We may have to implement our own typeclass like anorm's ParameterMetaData to correctly implement SqlExpr.Const

Here's a list of errors I'm blocked on:

[ ] Auto-application to ()is deprecated. Supply the empty argument list() explicitly to invoke method apply, or remove the empty argument list from its definition (Java-defined methods are exempt).

📕 BSP: typo-tester-zio-jdbc@jvm213 Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method apply,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function. [value => typo/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala:39:27 until 39:49]

It's most probably due to https://github.com/zio/zio-jdbc/pull/162

[ ] Failed to derive schema for testdb.hardcoded.myschema.Sector. Can only derive Schema for case class or sealed trait

📕 BSP: typo-tester-zio-jdbc@jvm213 Failed to derive schema for testdb.hardcoded.myschema.Sector. Can only derive Schema for case class or sealed trait [value => typo/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRow.scala:45:48 until 45:75]

TODO: The Schema instance is missing from its companion object

[ ] could not find implicit value for parameter setter: zio.jdbc.SqlFragment.Setter[adventureworks.customtypes.TypoLocalDateTime]

📕 BSP: typo-tester-zio-jdbc@jvm213 could not find implicit value for parameter setter: zio.jdbc.SqlFragment.Setter[adventureworks.customtypes.TypoLocalDateTime] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala:36:267 until 36:292]

This is related to my question here: https://github.com/oyvindberg/typo/pull/57#discussion_r1370075646

[ ] Failed to derive schema for Array[String]. Can only derive Schema for case class or sealed trait

📕 BSP: typo-tester-zio-jdbc@jvm213 Failed to derive schema for Array[String]. Can only derive Schema for case class or sealed trait [value => file:///Users/jules/jules_ivanic/workspace/typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/information_schema/_pg_foreign_data_wrappers/PgForeignDataWrappersViewRow.scala:37:67 until 37:113]

TODO: Find if zio-schema supports Array

I suggest you implement JdbcDecoder for row types by yourself by generating implicit lazy val jdbcDecoder: JdbcDecoder[RowType] = JdbcDecoder.apply(...) instead of using Schema, it'll be very similar to what is done for doobie.Read`, see https://github.com/oyvindberg/typo/blob/main/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala#L564

Failed to derive schema for testdb.hardcoded.myschema.Sector. Can only derive Schema for case class or sealed trait

same as last comment, I suggest you try to skip Schema and generate what you need directly. If you do need Schema for something you can add it in stringEnumInstances

could not find implicit value for parameter setter: zio.jdbc.SqlFragment.Setter[adventureworks.customtypes.TypoLocalDateTime]

This is a custom type (called typo types in the documentation, I'll settle on one soon), implemented in customTypeInstances. The essence is that it's a mapping where one type is passed through JDBC, and another type is exposed through the generated code. For instance TypoInstant is passed as strings to make arrays work.

Thanks a lot for your help @oyvindberg 🙏

Failed to derive schema for Array[String]. Can only derive Schema for case class or sealed trait

It looks like zio-jdbc does not support arrays. Kind of makes sense, all the other database libraries expose custom postgres integration modules to handle postgres-specific things like arrays. That's likely also why they haven't added sqlType as a string inside the typeclasses yet (remember I hinted at adding a ParameterMetaData typeclass above). With postgres you need this sqlType string to construct empty arrays, for instance.
I suggest you do arrays last, I'll help out with the details there unless you have an idea of the problem space.
In order to make things compile you can add a bogus implementation of JdbcDecoder[Array[T]] and the encoder in missingInstances which throws an exception on usage. It'll look a lot like this generic instance.
missingInstances are really for things which could be upstreamed to the database libraries, but I didn't want that roundtrip until things settled down in typo.

Thanks a lot for your help @oyvindberg 🙏

Thanks for taking this on, bet you got a bigger challenge than you signed up for, ha? :D

Thanks for taking this on, bet you got a bigger challenge than you signed up for, ha? :D

How do you know? 😂

Things I'm blocked on:

[ ] could not find implicit value for parameter setter: zio.jdbc.SqlFragment.Setter[adventureworks.userdefined.CustomCreditcardId]

📕 BSP: typo-tester-zio-jdbc@jvm213 could not find implicit value for parameter setter: zio.jdbc.SqlFragment.Setter[adventureworks.userdefined.CustomCreditcardId] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala:189:82 until 189:108]

CustomCreditcardId is an AnyVal yet the Setter is not generated. I'm not sure to understand why.
Same issue with FirstName

[ ]  could not find implicit value for parameter decoder: zio.jdbc.JdbcDecoder[Map[String,String]]

📕 BSP: typo-tester-zio-jdbc@jvm213 could not find implicit value for parameter decoder: zio.jdbc.JdbcDecoder[Map[String,String]] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/customtypes/TypoHStore.scala:20:59 until 20:91]

I'm not sure how to implement a decoder for a Map 🤔
I'll need to have a look at how Doobie does that

[ ]  could not find implicit value for parameter encoder: zio.jdbc.JdbcEncoder[Map[String,String]]

📕 BSP: typo-tester-zio-jdbc@jvm213 could not find implicit value for parameter encoder: zio.jdbc.JdbcEncoder[Map[String,String]] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/customtypes/TypoHStore.scala:21:59 until 21:91]

I'm not sure how to implement a encoder/setter for a Map 🤔
I'll need to have a look at how Doobie does that

CustomCreditcardId and FirstName are manually written! :D
Sorry for mixing so many things in one test folder instead of small narrow unit tests, but it has been important for me to test as much as possible with little effort. Also all this code needs to be compiled in order to be tested, so here we are

CustomCreditcardId and FirstName are manually written! :D

Ahah! Thanks

I suggest you do arrays last, I'll help out with the details there unless you have an idea of the problem space.

I have no idea 😕

As for the Map[String, String], you can map it to a Java Map and put it into a PreparedStatement with setObject. IOW the postgres driver supports it directly

My implementation of customTypeInstances is very ad-hoc. It can be improved later

Left for tomorrow:

[ ] JdbcDecoder[List[adventureworks.customtypes.TypoPoint]]

could not find implicit value for parameter decoder: zio.jdbc.JdbcDecoder[List[adventureworks.customtypes.TypoPoint]] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/customtypes/TypoPath.scala:29:19 until 29:47]

IOW the postgres driver supports it directly

@oyvindberg How can we know the data structures supported by the driver?

Left for tomorrow:

[ ] JdbcDecoder[List[adventureworks.customtypes.TypoPoint]]

could not find implicit value for parameter decoder: zio.jdbc.JdbcDecoder[List[adventureworks.customtypes.TypoPoint]] [value => typo/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/customtypes/TypoPath.scala:29:19 until 29:47]

This is very likely wrong because custom type instances are implemented incorrectly. It should not be a product type, but refer to fromTypo - check Doobie implementation. Crucially they always refer to one column in postgres, even though there may be a list encoded inside the values in that column

IOW the postgres driver supports it directly

@oyvindberg How can we know the data structures supported by the driver?

Only by inspecting the source code I'm afraid. I help dig it up later if needed

I pushed a commit with custom types now, see commit text for some details.
there is still arrays missing, and it's untested but it may work

It compiles! 🎉

Woho!

It still needs this PR https://github.com/zio/zio-jdbc/pull/171 to compile in CI

I'll look at this more tonight hopefully, but will share some observations as I come across them until then 👍
pushed a commit now to build with a published snapshot

  def insert(unsaved: PersonRow): ZIO[ZConnection, Throwable, UpdateResult[PersonRow]]
  def insert(unsaved: PersonRowUnsaved): ZIO[ZConnection, Throwable, UpdateResult[PersonRow]]

can we drop UpdateResult here and just return the row? We know there will 1 changed row

does withConnection work for you? it appears to be hanging when trying to run the tests

does withConnection work for you? it appears to be hanging when trying to run the tests

Yes, it's hanging. I probably have made a mistake there

there is something seriously wrong with this fragment data type/interpolator.
sql"${unsaved.name}" ++ sql"::varchar" is not the same as sql"${unsaved.name}::varchar"

there is something seriously wrong with this fragment data type/interpolator.

Where does it come from?

All PRs in zio-jdbc are merged and I updated the snapshot version in the project. The PR should compile on your computer too now 🙂

It already did actually, but great job on that anyway! :)
When you fix withConnection you'll discover that the tests are broken with invalid sql. The first thing I looked into brought me to what I assume is a bug in the zio-jdbc sql interpolator

When you fix withConnection you'll discover that the tests are broken with invalid sql. The first thing I looked into brought me to what I assume is a bug in the zio-jdbc sql interpolator

Yeah, I wasn't expecting them to pass at first try 😄
I'll have a look tomorrow. It's late here

does withConnection work for you? it appears to be hanging when trying to run the tests

Fixed. The connection info were wrong and the default config of the ZConnectioPool were retrying forever. See https://github.com/zio/zio-jdbc/pull/174

@oyvindberg I need your help about this error in the ArrayTest.work test:
I have this error and I have no idea what it means, maybe you know:
📗 BSP: ArrayTest:
📗 BSP: - works *** FAILED ***
📗 BSP:   org.postgresql.util.PSQLException: Unable to find server array type for provided name adventureworks.customtypes.TypoBox.
📗 BSP:   at org.postgresql.jdbc.PgConnection.createArrayOf(PgConnection.java:1463)
📗 BSP:   at org.postgresql.jdbc.PgConnection.createArrayOf(PgConnection.java:1483)
📗 BSP:   at adventureworks.customtypes.TypoBox$.$anonfun$jdbcArraySetter$1(TypoBox.scala:45)
📗 BSP:   at adventureworks.customtypes.TypoBox$.$anonfun$jdbcArraySetter$1$adapted(TypoBox.scala:40)
📗 BSP:   at zio.jdbc.SqlFragment$Setter$$anon$3.setValue(SqlFragment.scala:328)
📗 BSP:   at zio.jdbc.ZConnection$.$anonfun$executeSqlWith$9(ZConnection.scala:74)
📗 BSP:   at zio.jdbc.ZConnection$.$anonfun$executeSqlWith$9$adapted(ZConnection.scala:73)
📗 BSP:   at zio.jdbc.SqlFragment.$anonfun$foreachSegment$1(SqlFragment.scala:277)
📗 BSP:   at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
📗 BSP:   at zio.Chunk$Arr.foreach(Chunk.scala:1672)
📗 BSP:   ...
📗 BSP: - nulls *** FAILED ***
📗 BSP:   org.postgresql.util.PSQLException: ERROR: cannot cast type box to box[]
  Position: 642
📗 BSP:   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
📗 BSP:   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
📗 BSP:   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
📗 BSP:   at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
📗 BSP:   at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
📗 BSP:   at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
📗 BSP:   at org.postgresql.jdbc.PgPreparedStatement.executeLargeUpdate(PgPreparedStatement.java:161)
📗 BSP:   at zio.jdbc.SqlFragment.$anonfun$executeUpdate$4(SqlFragment.scala:264)
📗 BSP:   at zio.ZIOCompanionVersionSpecific.$anonfun$attempt$1(ZIOCompanionVersionSpecific.scala:100)
📗 BSP:   at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:904)
📗 BSP:   ...

🤔

all the tests are written with the assumption that transactions are rolled back. if you have 34 rows it means they are not.
can you recreate the database and rerun tests and see which errors persist?

pushed a commit which changes when we disable auto-commit for tests

In EmployeeRepoImpl, the selectByIds operating on an Array[BusinessentityId] doesn't generate the correct SQL query

pushed a fix for this, was missing some interpolation

ArrayTest.work test fails with org.postgresql.util.PSQLException: The column index is out of range: 42, number of columns: 41.

this will require a bit more digging. Parts of jdbc is 1-indexed IIRC, maaybe zio-jdbc uses zero indexing for that. Gonna have to dig a bit more into this

SqlInterpolator does not have stripMargin, that breaks some DSL usage. I'll make the generated sql a bit uglier for now

SqlFragment.where seems broken. we're getting queries like this:
typo-db-1  | 2023-10-27 18:25:17.174 UTC [4107] STATEMENT:  select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.usersWHEREuser_id = $1

something is wrong with the column index computation, at least when used through the DSL.
Look at this monster query:
Sql(select product1.productid, product1.name, product1.productnumber, product1.makeflag, product1.finishedgoodsflag, product1.color, product1.safetystocklevel, product1.reorderpoint, product1.standardcost, product1.listprice, product1.size, product1.sizeunitmeasurecode, product1.weightunitmeasurecode, product1.weight, product1.daystomanufacture, product1.productline, product1.class, product1.style, product1.productsubcategoryid, product1.productmodelid, product1.sellstartdate, product1.sellenddate, product1.discontinueddate, product1.rowguid, product1.modifieddate, unitmeasure2.unitmeasurecode, unitmeasure2.name, unitmeasure2.modifieddate, productmodel3.productmodelid, productmodel3.name, productmodel3.catalogdescription, productmodel3.instructions, productmodel3.rowguid, productmodel3.modifieddate
                  from (
                    select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product WHERE class = ? AND daystomanufacture > ? OR daystomanufacture <= ? AND productline = ?
                  ) product1
                  left join (
                  select "unitmeasurecode", "name", "modifieddate"::text from production.unitmeasure WHERE name LIKE ?
                  ) unitmeasure2 on product1.sizeunitmeasurecode = unitmeasure2.unitmeasurecode
                  left join (
                  select "productmodelid", "name", "catalogdescription", "instructions", "rowguid", "modifieddate"::text from production.productmodel
                  ) productmodel3 on product1.productmodelid = productmodel3.productmodelid
                   WHERE product1.productmodelid = productmodel3.productmodelid  ORDER BY product1.productmodelid ASC ,productmodel3.name DESC NULLS FIRST , H , 25, 0, foo, name%)

One of the ProductTest cases fails when trying to decode a UnitmeasureRow from columnIndex 2. I suppose we need to return the number of consumed columns somewhere

zio.jdbc.SqlFragment.Setter.arraySetter does absolutely the wrong thing for us. it creates one sql parameter for each value in the array. Other libraries like doobie provide this functionality for List and other scala sequence types. It'd be nice if zio-jdbc could reserve the usage of Array for passing actual arrays as parameters.

something is wrong with the column index computation, at least when used through the DSL.

Code generating at the origin of this invalid SQL code (just to document it):
        query = productRepo.select
          .where(_.`class` === "H ")
          .where(x => x.daystomanufacture > 25 or x.daystomanufacture <= 0)
          .where(x => x.productline === "foo")
          .join(unitmeasureRepo.select.where(_.name.like("name%")))
          .on { case (p, um) => p.sizeunitmeasurecode === um.unitmeasurecode }
          .join(projectModelRepo.select)
          .leftOn { case ((product, _), productModel) => product.productmodelid === productModel.productmodelid }
          .where { case ((product, _), productModel) => product.productmodelid === productModel(_.productmodelid) }
          .orderBy { case ((product, _), _) => product.productmodelid.asc }
          .orderBy { case ((_, _), productModel) => productModel(_.name).desc.withNullsFirst }

Here's the request failing the ProductTest:
Sql(UPDATE production.product name = substring(upper(reverse(name)) || ?, ?, ?)::varcharlistprice = ?::numericreorderpoint = reorderpoint + ?::int2  WHERE coalesce(productid = ?, ?)  returning "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text, flaff, 2, 4, 2, TypoShort(22), 6, false)

The code origin of this query being:
        update = productRepo.update
          .setComputedValue(_.name)(p => (p.reverse.upper || Name("flaff")).substring(2, 4))
          .setValue(_.listprice)(BigDecimal(2))
          .setComputedValue(_.reorderpoint)(_ plus TypoShort(22))
//          .setComputedValue(_.sizeunitmeasurecode)(_ => Some(unitmeasure.unitmeasurecode))
          .where(_.productid === saved1.productid)

        _ <- ZIO.succeed(update.sql(returning = true).foreach(println(_)))

I created https://github.com/zio/zio-jdbc/pull/180 and https://github.com/zio/zio-jdbc/pull/181 . First is a blocker, second will allow us to generate nicer code, as well as improving zio-jdbc surface

current todo:

[ ] Get two PRs merged in zio-jdbc.
To test newest code you can merge them both to main and run publishLocal

[ ] Try to use JdbcDecoder.apply instead of new JdbcDecoder for unary types (less byte code, faster)

[ ] Remove JdbcEncoder for row types, I'm quite sure we don't need it (like we don't need Write for doobie)

[ ] zio-json: Implement DeriveJsonDecoder.gen and DeriveJsoEncoder.gen in typo so we don't need to run all the macros at compile-time. See support for other json libraries

[ ] Port ParameterMetadata from anorm.
I think it's alright if we just generate it from typo actually, we can upstream it to a zio-jdbc-postgres module later if wanted. This is what we need to get SqlExpr.Const working and fix the last failing test

Iterate more on arrays:

[ ] implement for string enums
[ ] implement for custom types
[ ] Ensure we have all instances we need.
Extend ArrayTest to cover all columns types we support. I'll work on this
[ ] confirm that primitiveArrayDecoder works

zio-json: Implement DeriveJsonDecoder.gen and DeriveJsoEncoder.gen in typo so we don't need to run all the macros at compile-time. See support for other json libraries

I'm not sure about this one as zio-json is not like the other JSON libs. It doesn't use a JSON AST.
To write the decoders manually you have to manually write the parser.
To write the encoders manually you have to manually write the JSON string.
Some DeriveJsonDecoder.gen and DeriveJsoEncoder.gen can probably be replaced by manually written instances in simple cases but in more complex ones I'm not sure it's worth it. WDYT?

ok, maybe we should call zio-json a bad match and skip it? you can use zio-jdbc with play-json or circe without any problems

ZIO users tend to prefer to stay in the ZIO ecosystem. zio-json has, for example, the particularity to be way faster than Circe or Play (because it's not using an AST amongst other things)
I think it'd be better for ZIO users to offer them the "ZIO experience". That's what they will ask for/look for.
What's the issue with using the derived schema?

Try to use JdbcDecoder.apply instead of new JdbcDecoder for unary types (less byte code, faster)

I take this one

Port ParameterMetadata from anorm.

I'm giving a try to this one

we can upstream it to a zio-jdbc-postgres module later if wanted

How do you see this?

What's the issue with using the derived schema?

Schema. The produced json structure is different from that of the other json libraries, I'd very much want them to be in sync. For the circe and play-json codecs column/field names are those from the database, not the scala names.
Maintenance. The zio test project currently compiles some 30 seconds slower than the others, I guess most of the reason is these heavy-duty macro calls, and I'll compile them many, many times.

If we can solve the schema issue I can fix the maintenance issue by just not compiling them as part of the huge chunk of tests.

Edit: Done. All the tests are passing now 🎉

Fantastic! We're getting somewhere now!
Thanks again for pushing through with this, I wasn't all that optimistic that somebody would be able to take those 700 odd of lines of macro-like code and port them to a new library even if it was possible in theory

I wasn't all that optimistic that somebody would be able to take those 700 odd of lines of macro-like code and port them to a new library even if it was possible in theory

Without your help, it wouldn't have been possible 🙇♂

Let me check what we can do with the zio-json issue.
May I ask what you're doing with the JSON? json and jsonb support?

Get two PRs merged in zio-jdbc.

Merged 🎉

Did some research and it seems possible to write JsonDecoder and JsonEncoder instances the way you want them.
Here's an example for TypoLine:
  implicit lazy val jsonDecoder: JsonDecoder[TypoLine] = {
    val aCursor = JsonCursor.field("a").isNumber
    val bCursor = JsonCursor.field("b").isNumber
    val cCursor = JsonCursor.field("c").isNumber

    JsonDecoder[Json].mapOrFail { json =>
      for {
        a <- json.get(aCursor).map(_.value.doubleValue())
        b <- json.get(bCursor).map(_.value.doubleValue())
        c <- json.get(cCursor).map(_.value.doubleValue())
      } yield TypoLine(a, b, c)
    }
  }
  implicit lazy val jsonEncoder: JsonEncoder[TypoLine] =
    new JsonEncoder[TypoLine] {
      override def unsafeEncode(a: TypoLine, indent: Option[Int], out: Write): Unit = {
        out.write("{")
        out.write("\"a\":")
        JsonEncoder[Double].unsafeEncode(a.a, indent, out)
        out.write(",")
        out.write("\"b\":")
        JsonEncoder[Double].unsafeEncode(a.b, indent, out)
        out.write(",")
        out.write("\"c\":")
        JsonEncoder[Double].unsafeEncode(a.c, indent, out)
        out.write("}")
      }
    }

The JsonEncoder seems easy to generate.
The JsonDecoder is more tricky I think.
I'll have a look if we can write the JsonDecoder differently, avoiding the JsonCursor API which probably makes the generation of the instances more complex 🤔

@oyvindberg Done! We're not using macros for zio-json instances anymore 🎉

can we drop UpdateResult here and just return the row? We know there will 1 changed row

Done

Remove JdbcEncoder for row types, I'm quite sure we don't need it (like we don't need Write for doobie)

Done. The tests pass without these instances

There's a bug in zio-jdbc breaking a test, see: https://github.com/zio/zio-jdbc/pull/184

Test are now passing on all Scala version 🎉

Test are now passing on all Scala versions 🎉

We're quite close then! 🚀
I hope to be able to dig up some time tonight after Halloween celebrations :)

now it compiles almost as fast as the other combinations

discovered https://github.com/zio/zio-jdbc/issues/188 while verifying. will push tests to this branch shortly

we can move forward with that one test commented out by the way, it's strictly not our problem and it may be hard to solve well in zio-jdbc.

todo:

[ ] update docs
[ ] move ParameterMetadata from DSL to generated code. The DSL is meant to be optional, so it can't stay there. will need a slight refactor so DbLib can produce extra sc.Files in this case.

I'm ready to merge this now, just need a new release of zio-jdbc.
🚀

I'm ready to merge this now, just need a new release of zio-jdbc.

I asked for a release

new version has been released https://github.com/zio/zio-jdbc/releases/tag/v0.1.1 :tada:


"Cocoșești" is listed in the drop-down menu

Description:
When user writes "Cocoșești" the location appears in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Cocoșești"

Expected results
The location appears in the drop-down menu as "Cocoșești, Alba (Avram Iancu)"


Missing Modeling Element for Cardinality

The cardinality between model elements is an inherent information. But there is no model element in the meta model defined to model the cardinality.
The only more or less "hard" reference to use qualifier types is here: https://industrialdigitaltwin.org/wp-content/uploads/2022/12/I40-IDTA-WS-Process-How-to-write-a-SMT-FINAL-.pdf
Is there a reason why cardinality is not adressed directly to be modelled in an AAS, e.g., as attribute of a Submodel Element?

submodel instances do not have cardinalities, submodel templates guide the creation of submodel instances using the semantics as specified in semanticId as well as template and concept qualifier.


Please support custom SYSTEM role messages

Please support custom SYSTEM role messages, thank you~!

You could probably change that yourself inside the Route Handler! :)
https://github.com/steven-tey/novel/blob/main/app/api/generate/route.ts#L50-L58


Confused by behavior

Perhaps I'm merely misunderstanding how this is supposed to work, but after installing from homebrew (on El Capitan) and using the default kwmrc, the windows are constantly moving around on their own (seemingly based on how I move the mouse). Also some of the windows (particularly iTerm2) appear to "pulse". Is this normal?

It's not. Try installing, or upgrading to, the newest version of Xcode. The issue is most likely caused by a missing Swift 2.2 library contained in the latest version of Xcode.

I just get by with XCode command line tools (so I don't have the full thing installed) and this is the homebrew binary of kwm. I guess it's possible that the kwm binary is behind the curve and needs a new build.

You can find the example kwmrc of the 1.1.5 release on homebrew-binary here: https://github.com/koekeishiya/kwm/blob/v1.1.5/examples/kwmrc
Keep in mind that master is quite a few changes ahead.

Any update on this? If not i'll close it

I'm having the exact same issue on El Capitan. Updating XCode did not seem to fix anything.

This issue doesn't really tell me anything. I need more information to even start thinking about what could be causing this.

Yeah, I realize it's not really much to go on, just thought I'd corroborate the existence of the bug. I'll try to do some more self-experimenting and get back to you. My inclination is that my nightly build of iTerm2 is the primary culprit, I have yet to try using kwm without an iTerm window in the mix, and the "pulsing" neverfox described has yet to happen with a window of another program.

A screen capture of the issue would be a start?

Just to confirm, the full XCode is a dependency before even starting to consider that there's a real problem?

Full XCode shouldn't be a dependency, but the XCode command line tools are.

In the latest release, the XCode command line tools should no longer be required.

@koekeishiya This issue is most probably caused by #286. The binary on homebrew is 1.1.5 which crashes repeatedly. On re-starting, kwm will re-layout windows, causing the "pulsing" and switching symptoms. Affected users can easily confirm by looking at their syslog which should contain lines such as:
08/04/16 13:31:22,114 com.apple.xpc.launchd[1]: (homebrew.mxcl.kwm[5134]) Service exited due to signal: Broken pipe: 13
08/04/16 13:31:22,114 com.apple.xpc.launchd[1]: (homebrew.mxcl.kwm) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

If so, they can use the fixed kwm-overlay binary that is linked in #286.

Version 2.0.3 has been submitted to homebrew now.


Reduce terminationGracePeriodSeconds to 300 for faster resource …

Closes #47039

Issue:
The current command waits for the termination grace period of 1800 seconds (30 minutes), causing unnecessary delays for users.
Solution:
Reduced the terminationGracePeriodSeconds value to a shorter duration (e.g., 300 or 500 seconds) to avoid prolonged wait times.
Changes:
Updated the termination grace period from 1800 seconds to 300 seconds in the relevant command.
Impact:
This change will significantly reduce wait times during the execution of the command, improving user experience.

/assign

@abhilasha2418, for change in multiple languages docs please  seperate PR as many languages has their own guidelines
and their respective reviewers will review your PR.

@utkarsh-singh1 thank you, for the info, I'll open up different PR, just be sure I should add this in front of the PR title [language] ?

/remove-language bn
/remove-language ja
/remove-language ko
/remove-language ru
/remove-language zh
/remove-area localization

/approve


City panel closes but production panel remains open

The city panel and city overview panel both close while the production panel remains open. This occurs when starting a new building production in a district (one that hasn't been started before). The panels close and an animation plays on the district where the building is being built.

Same issue can be triggered by purchasing buildings with gold

Fixed in #12 for now. Will revisit implementation in the future

Finally slain this issue once and for all with the cityview rewrite


machine learning courses

Suggested list of courses would be:

An introduction to deep learning **

How to train a neural network
Regularisation in neural networks
Deep Bayesian neural networks
Convolutional neural networks
Graph neural networks
Recurrent neural networks
Transformer-based architectures and Large Language Models**
Convolutional neural networks
An introduction to PyTorch
An introduction to Tensorflow
How to use pretrained neural networks
An introduction to generative deep learning:**

Reinforcement Learning
GANNs
Variational autoencoders
Diffusion models

Other supervised learning methods

Linear Models
Random Forests and other Tree-based Methods
Support Vector Machines

Clustering:

K-means
Gaussian mixture modelling and Dirichlet process models

Dimensionality Reduction:

Projection methods: PCA and sparse-PCA-type methods
Manifold-type methods: t-SNE and UMAP

Semi-supervised and Active Learning
Model Selection and Model Optimization (e.g. optuna)
Feature Extraction and Feature Selection
Model Evaluation

Metrics

Classification
Regression
Clustering

Model Uncertainty (see: Gaussian Processes)
Generalizability & Domain of Applicability
Cross-fold Validation
Common Pitfalls and Reproducibility

Automated Machine Learning

Classical Automated ML

AutoGluon
FLAML

LLM-based Multi-Agent Frameworks

autogen
CrewAI
TaskWeaver

LLM Orchestration

LangChain
LangGraph

Ben has some intro to unsupervised and supervised ml here: intro to unsupervised and supervised ml

https://github.com/Cambridge-ICCS/practical-ml-with-pytorch/tree/main


chore: .gitignore vscode and jetbrains config

Motivation
I don't want to see the configuration of my editor listed as potential changes to be added to this repository.
Changes

Add commonly ignored .vscode and .idea to the list of .gitignore

@peterpeterparker note that you can ignore those globally on your system instead of adding them to each project

Thanks @nmattia. It's not meant solely for me, but also for those who clone, fork or contribute to the repo.


No io_uring_prep_sync_file_range function

Hi,
I noticed there is no helper function for the sync_file_range call.
I can submit a PR for this if you'd like.
Thanks.

Yep that's an oversight, please do!


Add TypeScript type definitions

Will enable autocompletion in supported text editors/IDEs.
Previous discussion in https://github.com/lukechilds/keyv/issues/22
To prevent definitions going out of sync we should either include some sort of test to validate the definitions or alternatively they be generated from our source (annotated comments?).

To prevent definitions going out of sync we should either include some sort of test to validate the definitions or alternatively they be generated from our source (annotated comments?).

I saw the previous discussion, but by far the easiest way to do this is rewriting the source in TypeScript. tsd can be used to validate, but doesn't really solve the problem of them going out of sync as the -test-d.ts also has to be updated.
If you've had any change of heart, I've got no problem doing the rewrite and configuring tsc.

Thanks for the offer @caseyWebb ♥
I kinda figured that was the only maintainable solution.
Tbh I've had a little play with TypeScript and wasn't really sold on it.
I'm interested in the idea, but I have some worries:

You port this codebase to TypeScript, I don't like it, don't accept your PR, you feel like you've wasted your time.

You port this codebase to TypeScript, I like it and merge, you disappear, future maintenance becomes much harder (I'm already struggling to find the time) because I'm not as familiar with TypeScript.

There is also the issue that if we re-write this in TypeScript we should probably re-write all storage adapters in TypeScript too.
What are your thoughts?

On the concern of not merging, no harm no foul. This codebase will take 15 minutes, tops.
On the concern of maintainability, it's actually a pretty easy out in worst case scenario. Set the tsconfig.json target to "esnext", transpile, replace the source with the output JS. It will be identical with only the types missing.
I'm more than willing to work on the adapters as well, as while not crucial I do agree that they should all be done. Have you considered/would you be open to a monorepo?

You are definitely selling it to me.

Have you considered/would you be open to a monorepo?

I've not been a fan of them historically but this current setup with dependencies spread across repos is definitely not ideal. If you can demonstrate a better solution using a monorepo then I'd definitely be interested.
The maintenance issue is the only thing really worrying me, as I mentioned before I'm already struggling with time as is. Extra build steps and stuff I'm not familiar with, while probably simple to learn, is just extra time eating away at time I already don't have a lot of.
How interested are you in this project? Is this a one time contribution you want to make or are you interested in sticking around and becoming a maintainer?
No pressure to commit to anything you don't want to, I just wanna know if I'm gonna be accepting extra maintenance burden by accepting these changes.

If you can demonstrate a better solution using a monorepo then I'd be interested.

Challenge accepted :wink:
I totally get the maintainability concerns. Tbh I've almost used keyv in a few projects but the lack of solid TS support led to me rolling my own solutions, so I'm more than willing to maintain it long term. As far as having to learn new stuff, my goal is always to have everything you need exposed via npm run scripts, optionally with docker support if it makes sense; so you, as well as any new contributors, should be able to clone, npm run build, npm test, and expect all green.
I'll do the refactors in a fresh monorepo (with git history maintained) as it makes it a lot easier during active development (esp with regards to docker... it doesn't like npm link), and then it can be decided whether or not to keep them together or cherrypick the changes into the respective packages.
When I've got at least two packages I'll push them so you can get an overview of the proposed architecture and see how you like working in it.

Thanks @caseyWebb, this sounds really great.

my goal is always to have everything you need exposed via npm run script

Ah, a man after my own heart!
Look forward to seeing what you produce!

It would be better to just define the types:  http://blog.wolksoftware.com/contributing-to-definitelytyped

Going to close this out as the fix should be to move to typescript or add in the definition.


Cannot parse field from line: '======='

What happened:
[0012] ERROR failed to catalog: 1 error occurred:

unable to catalog python package=/usr/lib/python3/dist-packages/filelock-3.0.10.egg-info/PKG-INFO: cannot parse field from line: '======='

What you expected to happen:
this should not be an error..
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Dockerfile:
FROM python:3.9-slim AS base
ARG PIP_NO_CACHE_DIR=1
RUN apt-get update && apt-get install -y
git
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y
build-essential
python3-dev
libldap2-dev
libsasl2-dev
ldap-utils
tox
lcov
valgrind
&& rm -rf /var/lib/apt/lists/*
RUN pip install -U pip pipenv
ADD Pipfile* /tmp/
WORKDIR /tmp
RUN pipenv install --system --ignore-pipfile
ADD src/ /app/
WORKDIR /app
RUN useradd -m -u 777 mrdocker
&& chown mrdocker:mrdocker /app
##----------------------------------------------------------------------
FROM base AS runtime
USER mrdocker
LABEL maintainer="Security"
ENTRYPOINT ["python3", "main.py"]
Environment:

Output of grype version:0.5.0
OS (e.g: cat /etc/os-release or similar): Linux

Separately, the PKG-INFO file in 3.0.12 has another characteristic that Syft might not be handling correctly — specifically, the contents of a markdown file (the packages README.md) is appended to the end of the file without a specifying field. We're looking into the spec to determine if this is correct or also a malformation.

It turns out Syft does handle this case correctly. (Syft parsing should end for a given file when it encounters a new blank line, and it does).

Hey @luhring,
Thanks a lot for the info:)
From the docker log i can see the initial installed version is 3.0.10 which caused the issue here, and it updates to 3.0.12 during "pip install -U pip pipenv" stage, but grype still catch up with the 3.0.10 PKG-INFO (I couldn't find 3.0.12 PKG-INFO in the filesystem either).
Do you have any suggestions on how we could possibly fix it?
Cheers,