feat(api): calculated metrics for mobile, web, synthetic, service

This commit builds upon the work of @Dynatrace-Adam-Gardner and adds the
following new APIs to monaco:

Calculated metrics for web applications
Calculated metrics for mobile applications
Calculated metrics for synthetic tests

Additionally, it adds the new APIs to the table of token permissions in
the documentation and adds the integration test configs for the new
APIs.
For the calculated metrics of mobile apps, I temporarily defined a
mobile application (manually created) in the environment used for the
integration test. This needs to be revised, when fixing #275.

The integration test seems to have failed on this. @didiladi please don't merge yet till they re-ran

Seems it may be unrelated to your change @didiladi, an error for test SLO configs :/
Can you still take a look and verify please?
https://github.com/dynatrace-oss/dynatrace-monitoring-as-code/runs/4595645265?check_suite_focus=true
2021-12-21 13:57:52 INFO  Executing projects in this order:
2021-12-21 13:57:52 INFO  	1: test-resources/integration-all-configs/project (35 configs)
2021-12-21 13:57:52 INFO  	2: test-resources/integration-all-configs/only-post (1 configs)
2021-12-21 13:57:52 INFO  Processing environment environment1...
2021-12-21 13:57:52 INFO  	Processing project test-resources/integration-all-configs/project...
2021-12-21 13:57:54 INFO  Deployment summary:
2021-12-21 13:57:54 ERROR Deployment to environment1 failed with error!
2021-12-21 13:57:54 ERROR 	Failed to create DT object My SLO_1640095072665416773AllConfigs (HTTP 400)!
    Response was: {"error":{"code":400,"message":"SLO validation failed with 1 error(s):\nEntity selector is invalid."}}, responsible config: test-resources/integration-all-configs/project/slo/slo.json
2021-12-21 13:57:54 ERROR Errors during deployment! Check log!
    all_configs_integration_test.go:44: assertion failed: 1 (statusCode int) != 0 (int)
--- FAIL: TestIntegrationAllConfigs (1.59s)
=== RUN   TestRestoreConfigsSimple
2021-12-21 13:57:54 INFO  BEGIN PREPARATION PROCESS
You are using the new CLI structure which is currently in Beta.

Seems it may be unrelated to your change @didiladi, an error for test SLO configs :/ Can you still take a look and verify please?
https://github.com/dynatrace-oss/dynatrace-monitoring-as-code/runs/4595645265?check_suite_focus=true
2021-12-21 13:57:52 INFO  Executing projects in this order:
2021-12-21 13:57:52 INFO  	1: test-resources/integration-all-configs/project (35 configs)
2021-12-21 13:57:52 INFO  	2: test-resources/integration-all-configs/only-post (1 configs)
2021-12-21 13:57:52 INFO  Processing environment environment1...
2021-12-21 13:57:52 INFO  	Processing project test-resources/integration-all-configs/project...
2021-12-21 13:57:54 INFO  Deployment summary:
2021-12-21 13:57:54 ERROR Deployment to environment1 failed with error!
2021-12-21 13:57:54 ERROR 	Failed to create DT object My SLO_1640095072665416773AllConfigs (HTTP 400)!
    Response was: {"error":{"code":400,"message":"SLO validation failed with 1 error(s):\nEntity selector is invalid."}}, responsible config: test-resources/integration-all-configs/project/slo/slo.json
2021-12-21 13:57:54 ERROR Errors during deployment! Check log!
    all_configs_integration_test.go:44: assertion failed: 1 (statusCode int) != 0 (int)
--- FAIL: TestIntegrationAllConfigs (1.59s)
=== RUN   TestRestoreConfigsSimple
2021-12-21 13:57:54 INFO  BEGIN PREPARATION PROCESS
You are using the new CLI structure which is currently in Beta.

I ran the integration tests locally against out integration test environment - so I feel pretty confident that the changes work :slightly_smiling_face:  This error is a race condition between the management zone and the SLO config: #349 (its next on my list)

@UnseenWizzard @didiladi can this branch be updated and merged?

@didiladi can we merge or are there another checks?

@DavidPHirsch yes it can, so I just did :)
generally review approval and the CI pipeline incl integration tests is the bar to pass.


spookyjs data access

spooky.flag = true;
spooky.start("www.sample.com");
spooky.then(function() {
console.log(spooky.flag); // url changes to about:blank
});
If I try to access spooky.flag inside then function, the url is getting changed to blank. How to access this variable inside then function?

Please re-think your concept, this is not a good idea. As said in #188 you should propose your concept at gitter or stackoverflow


System.getenv() instead of System.getProperty()

The code example does not work that way. As far as I know, System.getProperty() gets a Java property. Since we wanna get an environment variable there, System.getenv() should be used.

Just wanted to point out that this was closed a year ago yet the docs are still wrong on https://docs.microsoft.com/en-us/appcenter/build/android/code-signing  .. had to find this issue to fix my issue :(

@SebastienMelki we made a doc update based on the feedback, what's still wrong with the docs?
@ranterle and @nrajpurkar can one of you please take a look at this?

@SebastienMelki we made a doc update based on the feedback, what's still wrong with the docs?
@ranterle and @nrajpurkar can one of you please take a look at this?

Hey thanks for replying. Well I was getting nowhere with System.getProperty in section C of https://docs.microsoft.com/en-us/appcenter/build/android/code-signing and then I saw this issue to use environment variables instead (System.getenv) and it worked like a charm. But the docs still show System.getProperty, I might be missing something else?


Illustrates #2331 (Scrollview not respecting clip) does not reproduce

Unit test for #2331 - I think there is some issue on how the user is drawing the CustomButton. As you can see in the unit test none of the CustomButton over-spill the ScrollView.
Pull Request checklist:

[ ] I've named my PR in the form of "Fixes #issue. Terse description."
[x] My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
[x] My code follows the Terminal.Gui library design guidelines
[x] I ran dotnet test before commit
[ ] I have made corresponding changes to the API documentation (using /// style comments)
[x] My changes generate no new warnings
[x ] I have checked my code and corrected any poor grammar or misspellings
[x] I conducted basic QA to assure all features are working

There is still a bug on this issue and this PR fixes it. If you run the ScrollViewTests you'll verify it will fail without the fix. So, the cause of the bug was if the sum of the left+width-1 or the top+height-1 are equal to zero, then there is no available space to draw, but it was drawing.


HTTP error 404 downloading node-sass 4.5.3 binding binary for Windows 10 X64

When I do "npm install" in my project's folder the download of the binding binary fails returning me this:

Downloading binary from https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-57_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via
  npm config set proxy http://example.com:8080

NPM version (npm -v): 5.0.3
Node version (node -v): v8.1.3
Node Process (node -p process.versions): { http_parser: '2.7.0', node: '8.1.3', v8: '5.8.283.41', uv: '1.12.0', zlib: '1.2.11', ares: '1.10.1-DEV', modules: '57', openssl: '1.0.2l', icu: '59.1', unicode: '9.0', cldr: '31.0.1', tz: '2017b' }
Node Platform (node -p process.platform): win32
Node architecture (node -p process.arch): x64

https://github.com/sass/node-sass/issues/1991#issuecomment-306437979

What is the solution for the 404 error, pls? I ve got the same problem.

Install the latest node-sass
On Sat., 18 Aug. 2018, 5:29 pm Martin<EMAIL_ADDRESS>wrote:

What is the solution for the 404 error, pls? I ve got the same problem.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2035#issuecomment-414038727,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWGiSpRm31rWK8LXCTxevt16qD2R4ks5uR8J2gaJpZM4OMfS1
.


Annotations for PDFs

Problem
There are no good open-source tools for annotating PDFs. In my project's application, I need to use CV to highlight and put rectangles around various parts of a pdf. This should be a relatively easy fix.

Example of what annotations would look like on a pdf
Solution
Enable users to upload PDFs as an approved data type.
Alternatives
At the moment, I have been doing this manually by uploading my document to Gimp, placing a rectangle over the images of the pdf to determine the coordinates of the rectangles, and then manually creating a CSV for this data.
Potential Solution
An easy way to do this is to convert them into a series of images (one image for each page). Then, treat it like any other image, just maintaining the page number as a part of the outputted data somewhere.
Notes
I do not need OCR; there are many tools for this. All I need is to convert a PDF to a series of images that I can then annotate for my CV. Example output for rectangles across a pdf:
Page Number, Class, Top Left, Bottom Right
0, 0, (300px, 200px), (400px, 300px)
0, 0, (600px, 200px), (750px, 250px)
0, 1, (790px, 600px), (820px, 675px)
1, 4, (810px, 100px), (880px, 145px)
1, 3, (300px, 200px), (400px, 300px)

etc...

Here is an example using V7 Labs.

You can do this work in Label Studio, but you have to convert your PDF pages to images. PDF are not supported directly.
Check this template: https://labelstud.io/templates/image_bbox


[wip] Feat/session based auth system

update lib/request, bypass /login route
add loginStore
optimize server.js, separate routes, add auth middleware
add Notification component

solve #48


unable to redirect stderr, unable to stop service under systemd

I am evaluating Influxdb and am running into a logging problem.
I've installed it from the nightly build on a Fedora-21 machine
and it seems to work ok when started interactive in a console but
want to get it to start under systemd.  I used the included
influxdb.service file.
I haven't been able to redirect the log messages.  As suggested
I created an /etc/defaults/influxdb file containing
STDOUT=/var/log/influxdb/stdout.log
STDERR=/var/log/influxdb/stderr.log
and created those two files, verified owner is "influxdb" user,
permissions ok.  However log messages still go to the journal.
At two lines every 10 seconds they outnumber all other journal
messages by nearly an order of magnitude which is an unacceptable
level of log spam.
I have not had to do much with systemd so my knowledge is pretty
limited, but judging from the fact that the ExecStart command
doesn't use STDERR or STDOUT in the command line, these effect
influxd by being environment variables?  FWIW, running influxd
interactively as "STDERR=/var/log/... influxd ..." doesn't
redirect logging messages either.
I changed the service file ExecStart command to be
sh -c "/opt/influxdb/influxd .... 2>/var/log/..."
which does finally redirect the log messages, but now influxd
doesn't stop when a  "systemctl stop influxdb" command is issued.
[the above was originally posted on the influxdb mailing list, 2015-10-16]
A little more info...
After starting influxd with systemd:
# ps -AF | grep influxd
influxdb 15402     1  0 28385  2888   0 Oct16 ?        00:00:00 /bin/sh -c /opt/influxdb/influxd -config /opt/influxdb/soga.conf $INFLUXD_OPTS >/var/log/influxdb/stdout.log 2>/var/log/influxdb/stderr.log
influxdb 15403 15402  0<PHONE_NUMBER>2  1 Oct16 ?        00:07:27 /opt/influxdb/influxd -config /opt/influxdb/soga.conf
After doing a 'systemctl stop influxdb':
# ps -AF | grep influxd
influxdb 15403     1  0<PHONE_NUMBER>2  1 Oct16 ?        00:07:27 /opt/influxdb/influxd -config /opt/influxdb/soga.conf
Perhaps the influxd process is daemonizing itself?  As I said, I know little
about systemd but I think most processes running under it should be run
in foreground.
Of course, getting the original STDERR=... and STDOUT=... to work (and
better documented!) would be better, but the systemd problem should be
fixed regardless.

Try replacing the existing unit file (/etc/systemd/system/influxd.service) with the following:
[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://influxdb.com/docs/
After=network.target

[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb
ExecStart=/bin/sh -c "/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS}"
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=influxd.service

Namely this changes the formatting of the environment variable and killmode for the service. The reason why you were unable to kill InfluxDB once started is because you created two separate processes to redirect the log output, one for sh and one for influxd. Since the original killmode was set to the process level, all you were originally killing was just the sh process.
And then in the defaults file /etc/default/influxdb, you can use:
INFLUXD_OPTS="&>/var/log/influxdb/influxd.log"

To redirect all logging to the log file. I'm unfamiliar with the STDERR and STDOUT variables, so I'm not sure what the problem could be there.
Regarding the level of logging, if you are finding that the default configuration generates too much data, I would recommend modifying your InfluxDB configuration (/etc/opt/influxdb/influxdb.conf) to disable some of the more chattier log functionality. Mainly the wal-enable-logging under [data] and log-enabled under [http]:
...
[data]
  wal-enable-logging = false
...
[http]
  log-enabled = false
...

I will leave this issue open as a reminder to update the default systemd configuration, and then link to the PR once submitted.

Also this line:
https://github.com/influxdb/influxdb/blob/master/etc/config.sample.toml#L81
but if you disable all this stuff, it may become quite difficult for us to help you debug any issues.

I have similar issue with InfluxDB running on debian 8.2
version 0.9.5-nightly-d9f0413, branch master, commit d9f04132ef567bb9671690e4db226ff3dab9feb5, built '2015-10-17T04:00:42+0000'
all messages are forwarded to /var/log/syslog
even if I start influx like this:
STDOUT=/var/log/influxdb/stdout.log STDERR=/var/log/influxdb/stderr.log /opt/influxdb/influxd -config /etc/opt/influxdb/influxdb.conf

@sergzin Can you try using the following unit file and let me know if you hit the same problem?
/etc/systemd/system/influxd.service:
[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://influxdb.com/docs/
After=network.target

[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
Environment='STDOUT=/dev/null'
Environment='STDERR=/var/log/influxdb/influxd.log'
EnvironmentFile=-/etc/default/influxdb
ExecStart=/bin/sh -c "/opt/influxdb/influxd -config /etc/opt/influxdb/influxdb.conf ${INFLUXD_OPTS} > ${STDOUT} 2> ${STDERR}"
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=influxd.service

Redirecting STDERR works fine.
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/lib/systemd/system/influxdb.service; enabled)
   Active: active (running) since Tue 2015-10-20 20:12:55 CEST; 11s ago
     Docs: https://influxdb.com/docs/
 Main PID: 6308 (sh)
   CGroup: /system.slice/influxdb.service
           ├─6308 /bin/sh -c /opt/influxdb/influxd -config /etc/opt/influxdb/influxdb.conf -hostname at-vie01a-osd03 > /dev/null 2> /var/log/influxdb/influxd.log
           └─6309 /opt/influxdb/influxd -config /etc/opt/influxdb/influxdb.conf -hostname at-vie01a-osd03

In /var/log/influxdb/influxd.log  i see startup messages and queries.


Make Logger required when injected in flutter_tool

Yak shaving null safety migration cleanup.  Logger should be nonnull, UrlTunneller? should not be `required.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

test-exemption: code refactor with no semantic change

https://github.com/flutter/flutter/pull/114118 merged, you can rebase upstream


Add Wayland Support and refactor unix backends

[x] Has this change been discussed on the forum or in an issue before?
[x] Does the code follow the SFML Code Style Guide?
[ ] Have you provided some example/test code for your changes?
[ ] If you have additional steps which need to be performed list them as tasks!

Description
This is a very much WIP PR to add Wayland support
This PR is related to the issue #1082
Tasks

[x] Tested on Linux
[x] Tested on Windows
[ ] Tested on macOS
[ ] Tested on iOS
[ ] Tested on Android

How to test this PR?
Default example should be enough to test window opening.
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example");
    window.setFramerateLimit(60);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.display();
    }
}

Could you add a GitHub Action Linux build which uses Wayland instead of X11, so CI can validate your changes as well?

Yeah sure

We're not adding more features to SFML 2.6, the scancode feature should be the last one and even that will be a major pain to merge back to master 😄
Rebasing onto master should be the way to go, for the draft PR.

I no longer have time to work on this. and yeah if you've got an SDL backend in the works that's the most portable way of doing things.


AE49_180824_215616.966

Add MIT (https://github.com/icsharpcode/SharpZipLib/blob/master/LICENSE.txt)

@capfei On the NuGet page, the license link is showing MIT for version 0.87.20170615.10 (https://www.nuget.org/packages/JetBrains.SharpZipLib.Stripped/0.87.20170615.10), and the project link on the same page directing to GitHub also has MIT. Does this help?

Thank you for the link, but that points to a different NuGet package. The one listed in the pull request is<EMAIL_ADDRESS>The link you provided is for<EMAIL_ADDRESS>Going by the source repo at the time the package was published, it looks like the license should be GPL 2.0.
If this looks correct to you, I can update the pull request.

@capfei - SharpZipLib 0.86.0 is GPLv2 + special exception

@ariel11 @capfei I've updated the YAML per our discussion


org-journal-carryover-items multiple TODOs

Hello!
I can't figure out how to add multiple TODO keywords.
I'm Emacs-illiterate, so that might be the reason! Could you please give an example with two keywords? e.g. this doesn't work:
(setq org-journal-carryover-items "TODO=\"+TODO|+HOLD\""
I've also tried escaping + and |, and also putting everything in its own escaped quotes, but nothing worked..
thanks very much and thanks for your excellent piece of work!

I think it should be "TODO=\"TODO\"|TODO=\"HOLD\"".
Does that work for you?

yes! Thanks a ton !!


No connection options found in NestJS application

Hi!
I'm trying to integrate typeorm-seeding in my NestJS application to use it for test data seeding. My NestJS structure does not use an ormconfig file, it defines the config at runtime, like the following:
import { Module } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'

import databaseConfig from 'src/config/database/config'
...

@Module({
  imports: [
    TypeOrmModule.forRoot(databaseConfig),
    TypeOrmModule.forFeature([DomainCycleRepository]),
    ,,,
  ],
  ,,,
})
class DomainCycleModule {}

export default DomainCycleModule

I've done like that to use environment variables and isolate that usage only to my ConfigService.
Anyway, I've added all required configs, following the how-to in the README docs, and ended up with something like this in a test file:
import { Test, TestingModule } from '@nestjs/testing'
import { TypeOrmModule } from '@nestjs/typeorm'
import { getRepository } from 'typeorm'
import { setConnectionOptions, useSeeding, tearDownDatabase, factory } from 'typeorm-seeding'

import databaseConfig from 'src/config/database/config'
import DomainCycleRepository from 'src/domain/cycle/repository'
import DomainTeamModule from 'src/domain/team'
import { User } from 'src/domain/user/entities'

import DomainCycleService from './service'

const buildTestModule = () =>
  Test.createTestingModule({
    imports: [
      TypeOrmModule.forRoot(databaseConfig),
      TypeOrmModule.forFeature([DomainCycleRepository]),
      DomainTeamModule,
    ],
    providers: [DomainCycleService],
  })

describe('DomainCycleService', () => {
  let module: TestingModule
  let domainCycleService: DomainCycleService

  beforeAll(async () => {
    module = await buildTestModule().compile()
    domainCycleService = module.get<DomainCycleService>(DomainCycleService)

    setConnectionOptions({
      type: 'sqlite',
      database: ':memory:',
      entities: [User],
    })
    await useSeeding()
  })

  afterAll(async () => {
    await module.close()
    await tearDownDatabase()
  })

  describe('get a single cycle', () => {
    it('can get a single company cycle, constrained to company', async () => {
      const createdUser = await factory(User)().create()
      const fakeUsers = await getRepository(User).find({})

      console.log(fakeUsers, createdUser)

      expect(true).toEqual(false)
    })
  })
})

And I get two errors:
  ● DomainCycleService › get a single cycle › can get a single company cycle, constrained to company

    No connection options were found in any orm configuration files.

      at ConnectionOptionsReader.<anonymous> (src/connection/ConnectionOptionsReader.ts:42:19)
      at step (node_modules/typeorm/node_modules/tslib/tslib.js:141:27)
      at Object.next (node_modules/typeorm/node_modules/tslib/tslib.js:122:57)
      at fulfilled (node_modules/typeorm/node_modules/tslib/tslib.js:112:62)

And:
  ● DomainCycleService › get a single cycle › can get a single company cycle, constrained to company

    TypeError: Cannot read property 'factory' of undefined

      44 |   describe('get a single cycle', () => {
      45 |     it('can get a single company cycle, constrained to company', async () => {
    > 46 |       const createdUser = await factory(User)().create()
         |                                              ^
      47 |       const fakeUsers = await getRepository(User).find({})
      48 |
      49 |       console.log(fakeUsers, createdUser)

      at node_modules/typeorm-seeding/src/typeorm-seeding.ts:40:79
      at Object.<anonymous> (src/domain/cycle/cycle.spec.ts:46:46)

Also, here is my testConfig file:
import { Cycle } from 'src/domain/cycle/entities'
import { KeyResultCheckIn } from 'src/domain/key-result/check-in/entities'
import { KeyResultCustomList } from 'src/domain/key-result/custom-list/entities'
import { KeyResult } from 'src/domain/key-result/entities'
import { Objective } from 'src/domain/objective/entities'
import { Team } from 'src/domain/team/entities'
import { User } from 'src/domain/user/entities'

export const testConfig = {
  type: 'sqlite' as any,
  database: ':memory:',
  dropSchema: true,
  synchronize: true,
  logging: false,
  entities: [Cycle, KeyResult, KeyResultCheckIn, KeyResultCustomList, Objective, Team, User],
  factories: ['/home/delucca/Code/delucca/business/src/domain/user/factory.ts'],
  seeds: ['/home/delucca/Code/delucca/business/src/domain/user/seed.ts'],
}

My factory:
import * as Faker from 'faker'
import { define } from 'typeorm-seeding'

import { optionalValue } from 'lib/jest/faker'
import { User } from './entities'
import { USER_GENDER } from './constants'

define(User, (faker: typeof Faker) => {
  const firstName = faker.name.firstName()
  const authzSub = faker.random.uuid()

  const lastName = faker.name.lastName()
  const gender = faker.helpers.randomize(Object.values(USER_GENDER))
  const role = faker.company.catchPhraseNoun()
  const picture = faker.internet.avatar()

  const user = new User()
  user.firstName = firstName
  user.authzSub = authzSub
  user.lastName = optionalValue(lastName)
  user.gender = optionalValue(gender)
  user.role = optionalValue(role)
  user.picture = optionalValue(picture)

  return user
})

And my seed:
import { Factory, Seeder } from 'typeorm-seeding'

import { User } from './entities'

export default class CreateUsers implements Seeder {
  public async run(factory: Factory) {
    await factory(User)().createMany(5)
  }
}

Anyone know what should I do to make it work?

Can you share link to example app or even the actual repo of this app?

Any updates on this issue guys? I'm also trying to seed a in memory DB without having the orm config file, but i have the configuration in the test module.

Hi! Could you check the fork on #201 if this is working? No new versions could be deployed here.
This part have been refactored, maybe is fixed now.


Automated CircleCI config update

Updating CircleCi configuration to use auth when pulling worker images.

Gonna roll this off CircleCI, or just archive it in favor of dumbpw


Risk of overflow in add_mod

Function add_mod does not seem to live up to its documentation regarding "without risk of overflows if ...". Perhaps this case is not relevant, but then this comment should be less unequivocal.
/// Returns `(x + y) % m` without risk of overflows if `x + y` cannot fit in `usize`.
const fn add_mod(x: usize, y: usize, m: usize) -> usize {
    let (z, overflow) = x.overflowing_add(y);
    z % m + (overflow as usize) * (usize::MAX % m + 1)
}

#[test]
fn t() {
    assert_eq!(0, add_mod(usize::MAX, usize::MAX, usize::MAX));
}

thread 't' panicked at 'assertion failed: (left == right)
left: 0,
right:<PHONE_NUMBER>3709551615', src/lib.rs:8:5

Hi, the "overflow" that the rustdoc talks about is an integer overflow. You can see that the code you pasted does not cause overflow because the panic message you get is "assertion failed", not "attempt to add with overflow".
This function, which is not public, implicitly assumes that x is strictly less than m, and that y is less than or equal to m. Therefore the reason why you're getting usize::MAX is that the x that you are passing is breaking the first assumption. None of the code in circular-buffer ever passes an x equal to m, so this is not a bug.
However I can see how this can cause confusion. I'm going to change add_mod() so that x may be equal to m. This change is not necessary, as there is no bug, but I'm doing it anyway to clear possible confusion that may arise in the future. I'll also document the assumptions for this function.

Thanks for your feedback, feel free to report future issues if you find them.

Thanks for the thorough fix.


Gradle task execution hangs when gradle home dir is an input

Repro snippet:
internal abstract class Example : DefaultTask() {
  @get:PathSensitive(PathSensitivity.ABSOLUTE)
  @get:InputDirectory
  abstract val gradleHomeDir: DirectoryProperty

  companion object {
    fun register(project: Project): TaskProvider<Example> {
      return project.tasks.register<Example>("example") {
        val gradleHome = project.gradle.gradleUserHomeDir
        gradleHomeDir.set(gradleHome)
      }
    }
  }
}

// Now run "./gradlew example" and observe that gradle hangs up when trying to run the task

Expected Behavior
It should not hang
Current Behavior
It hangs when executed. The task inputs are computed but it never begins executing the task
Context
This used to work. We use this in a one-off task for bootstrapping our repo for local development
Steps to Reproduce
See above. This used to work around gradle 6.x times but it's been awhile since I last checked. In any case, it seems like a bug for it to just hang up like this.
Your Environment

Build scan URL: N/A because it hangs.
macOS 11.4, multiple java versions.

You can now use an @UntrackedTask for this.


GH-483: Add KafkaAdmin operationTimeout

Fixes https://github.com/spring-projects/spring-kafka/issues/483
cherry-pick to 2.0.x, 1.3.x

Only first commit can be cherry-picked.

Oh, yeah! Travis confirms my concern:
[ant:checkstyle] [ERROR] /home/travis/build/spring-projects/spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaAdmin.java:101:12: Unused @param tag for 'closeTimeout'. [JavadocMethod]

[ant:checkstyle] [ERROR] /home/travis/build/spring-projects/spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaAdmin.java:103:45: Expected @param tag for 'operationTimeout'.

Time to switch to IDEA or open bug request to the Eclipse 😉

Merged as https://github.com/spring-projects/spring-kafka/commit/bf734278a613b9e2ece8048df7685a24095bfdda after rebasing and squashing.
Cherry-picked (first commit) to 2.0.x as https://github.com/spring-projects/spring-kafka/commit/9eea2f8e2b4fedb1990316160d5c01afd8805d29 and to 1.3.x as https://github.com/spring-projects/spring-kafka/commit/e7765192ddb04cb2862b9e0f8d7308cbfcb2606c after resolving conflicts.


:bug: Fix error when open branch that commit message contains vim:

When I run :GinBranch then occurs error because commit message contains vim:.
[gin]: Failed to call 'call' with ["DenopsStdBufferOpen_lc73lanb8ophz0o2ixx","","edit","","ginbranch:///Users/skanehira/dev/github.com/skanehira/dotfiles;#$"]: Error: Failed to call 'nvim_call_function' with ["D
enopsStdBufferOpen_lc73lanb8ophz0o2ixx",["","edit","","ginbranch:///Users/skanehira/dev/github.com/skanehira/dotfiles;#$"]]: [0,"Vim(edit):E518: Unknown option: add "]
    at Session.call (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:207:13)
    at async Session.call (file:///Users/skanehira/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service.ts:170:14)
    at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:99:12)
    at async https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:108:18
    at async Session.handleRequest (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:104:29)

Close due to #70


README: Update heading and also maintainers

New maintainers including Dhruva and Tokita, Hiroshi have been added.
The title has been updated to specify what the project does at the top of README.

+1 adding them! Can we do it or do we need help from the Zephyr maintainers?

Any reason why I'm being removed ? I keep following the project but I haven't seen anything that I was requested to review. There are any meetings happening yet related to the project ?

Ah, I wasn't aware of that change. Can we add Alvaro back to the Maintainers?

At the moment this repository is just a standalone repository, so I don't really care about the maintainer list.
But if we plan to put it under zephyr's governance, it's better to follow zephyr's rules.
zephyr clearly defines maintainers.

Maintainer: lead Collaborators on an area identified by the TSC (e.g. Architecture, code subsystems, etc.). Maintainers shall also serve as the area’s representative on the TSC as needed. Maintainers may become voting members of the TSC under the guidelines stated in the project Charter.
Collaborator: A highly involved Contributor in one or more areas. May become a Maintainer with approval of existing TSC voting members.
Contributor: anyone in the community that contributes code or documentation to the project. Contributors may become Collaborators by approval of the existing Collaborators and Maintainers of the particular code base areas or subsystems.

https://docs.zephyrproject.org/latest/project/project_roles.html#contributor

Makes sense! But we're not suggesting making those changes at this moment. Let's add you and update Dhruva's role in the README and decide if we want to change processes in a future PR :)


Reduce distance to upstream nixpkgs modules

The goal of this pull request is to simplify this Nix project.
Rather than copying base.nix and installation-device.nix from nixpkgs, these modifications use nixpkgs directly.
Overall the only change that the user will see is that the sd-card will autologin on nixos user and a help text will be added. If you are against this, we can disable these.

Thank you for this PR. I have incorporated some of these changes into another where I've updated the u-boot bootloaded to be signed by the open source meson64-tools package instead of the precompiled aml_encrypt_g12a tool

These changes are now available on master.


Update silencer-lib, silencer-lib_2.13.13 to 1.7.18

About this PR
📦 Updates

com.github.ghik:silencer-lib
com.github.ghik:silencer-lib_2.13.13

from 1.7.16 to 1.7.18
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.ghik" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.github.ghik" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #202.


Better styling for the superprompt bar

Something that was bothering me is that the windows were rounded but the prompt bar was not so I changed that. Also

prompt bar changes color when in focus. @swyxio feel free to change the color
The margin between the left hand side and the right hand side of the prompt bar is now equal (box sizing border box lol)

If you want I can implement the design from #24 entirely

classic, border box solves everything

looking great! just noticed there was also movement on #24, thanks for pointing that out!

Let's merge this first and I'll implement the design soon and get that PR up.

Oh man I've been wanting to do something about the input box spacing. Looks great. Thanks, @fardeem.


PNG in Canvas

When you drag & drop a png everything is good but when you want to resize it the bottom of the png is white.

Could you provide more details - version, OS, size/type of png, steps to reproduce....

Thanks for info. I'm not seeing anything unusual apart from some banding across the top of the image when resizing. But once resized it looks OK.

One comment for @Phillipus : I've just tested and had issues to really understand...
@glem78 correct me if I'm wrong
In fact this PNG has transparent background. When you import it (through DND) the background is transparent in Archi (you can check by putting another colored note behind). But as soon as you resize the PNG, the background gets white.

Yes ...

The problem seems to lie in com.archimatetool.editor.ui.ImageFactory method:
public static Image getScaledImage(Image source, int width, int height)
If the image uses alpha image transparency it is being ignored. I searched Google to try and find a solution but no luck so far. If anyone knows how to copy the alpha data from one image to another let me know.
Also, in com.archimatetool.editor.diagram.figures.diagram.DiagramImageFigure I have set a boolean:
// This is way faster than Draw2D re-drawing the original image at scale
private boolean useScaledImage = true;

If this is set to false, it solves the problem but image drawing then becomes very slow.
The ideal solution would be to map the alpha data in the getScaledImage() method.
Any help from the community would be welcome!

Hi,
Would this be of any help ?
http://msmshariq.blogspot.fr/2011/07/scaling-transparent-images-in-java.html
Best regards
Hervé

@herve91 Thanks, but doesn't help. The problem lies in the alphaData bytes of an ImageData. If you have an image of width, height with w*h alphaData bytes then these need to be transposed to the new image size. I've not found an example to do it.

Hi guys,
hope this links can help:
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fgraphics%2FImageData.html
https://eclipse.org/articles/Article-SWT-images/graphics-resources.html
Best regards,
Gilles

Thanks for the link, but there's nothing there that will solve the problem.
The ImageData bytes and the alpha bytes all have to be transposed. I might change the flag mentioned in comment above and allow user to choose between slow fast rendering.

This is fixed in Archi 4.8 as we use the slower method to draw scaled images but retain transparency.


Breadcrumbs: Update "Find Tables" text so that it says "Find a Table" instead

Currently, when viewing the "Find a Table" page, the breadcrumbs say "Find Tables" when it should reflect the title of the page.

#98


No support for R version 4.0.2

Hi All,
When I install vscDebugger package, it shows package ‘vscDebugger’ is not available (for R version 4.0.2).
Would you please figure it out?

The package is currently not on CRAN and therefore cannot be installed with install.packages('vscDebugger').
If you are using the VS Code extension you can try entering the command rdebugger.updateRPackage in the command pallette (ctrl+shift+p).
If this does not work, you can install the extension from the assets found here.
Does this work for you?

Thank you very much. It works well.

Thanks - this worked for me too!

Error in unpackPkgZip(pkgs[i], pkgnames[i], lib, libs_only, lock, quiet) :
package 'vscDebugger' not installed because it is not built for UCRT
Calls: install.packages -> .install.winbinary -> unpackPkgZip

download no zip compressed but tar
https://github.com/ManuelHentschel/VSCode-R-Debugger/releases/download/v0.4.7/vscDebugger_0.4.7.tar.gz
and install it from menu packages - install package from local file


php 8.4 deprecations

Module version(s) affected
2
Description
Running with php 8.4 gives deprecation errors that are easily fixable
Deprecation Notice: SilverStripe\VendorPlugin\Methods\CopyMethod::__construct(): Implicitly marking parameter $filesystem as nullable is deprecated, the explicit nullable type must be used instead
Deprecation Notice: SilverStripe\VendorPlugin\Methods\SymlinkMethod::__construct(): Implicitly marking parameter $filesystem as nullable is deprecated, the explicit nullable type must be used instead
How to reproduce
install php 8.4
run composer
see the deprecation error
Possible Solution
this is going to probably be the case on many modules so maybe a coordinated action using rector automation would be the best path
Additional Context
No response
Validations

[X] Check that there isn't already an issue that reports the same bug
[X] Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

Closing as a duplicate of https://github.com/silverstripe/.github/issues/331
We haven't added PHP 8.4 support yet - and when we do it will be for CMS 6 only as per the major release policy.


new method of applying transparency without flashing

Add a new method of applying transparency.
Create a new setting to let the user decide which method to use.
i18n of the new setting
Accidentally formatted the \t to   (we had mixed use of space and tab)
use rmSync to delete runtime folder (rmdirSync is deprecated)

Tested on macOS

Thanks for the contribution! Glad to see that there is a better way to solve the flashing window issue.
I've made a few changes to fix the extension not working on Windows, and enabled preventFlash by default as it doesn't seem to be causing any issues, and would also solve a complaint I've seen about Vibrancy using too much CPU on lower-end systems. I've also updated the description for preventFlash as I'd like to avoid the "intrusive hack" terminology, especially since it doesn't seem like it's that much of a hack.
Could you please update the other languages to also reflect the new description? I'll merge your PR and make a release afterwards.

Sure! Doing it now

done


Feedback for "What is SAP Business Application Studio?"

https://help.sap.com/products/SAP Business Application Studio/9d1db9835307451daa8c930fbd9ab264/8f46c6e6f86641cc900871c903761fd4.html?locale=en-US&version=Cloud
Cool simplified screenshot! :)

That was just a test! Thank you!


Search or count for multiple extensions

search or count for multiple extensions: count-files --multi-exensions txt py

Originally posted by @NataliaBondarenko in https://github.com/victordomingos/Count-files/issues/84#issuecomment-421606838

How can we configure argparse to read a variable number of parameters (file extensions)?

I think this can be done for the table: add another parameter.
def count_files_by_extension():
    counters = Counter()
    dirpath = os.path.expanduser(dirpath)

    def count_file_extensions(files: Iterable[str], no_feedback: bool = no_feedback):
        for f in files:
            extension = get_file_extension(f, case_sensitive=case_sensitive)
            # if extension-list:
            #    ext = extension if case_sensitive else extension.upper()
            #        if ext not in extension-list:
            #            continue
            ext = extension if case_sensitive else extension.upper()
            if ext not in ['PY', 'MD']:
                continue
            if extension == '.':
                extension = '[no extension]'
            counters[extension] += 1
            if not no_feedback:
                print("\r"+os.path.basename(f)[:TERM_WIDTH-1].ljust(TERM_WIDTH-1), end="")
. . .

or take a counter with all extensions and display only the required extensions

It is also possible to limit the number of extensions in the list.
parser.add_argument('--extension-list', nargs=5)

I am afraid that this kind of changes may turn our CLI user interface more difficult to use. Do you know of some other utility that implements arguments with a variable number of values/parameters like we are envisioning now, in a nice way?

there is one for PowerShell:

In this case, they use the -Path argument to help distinguish a path from a file extension. We would probably need to add it also (something like count-files -path PATH), instead of allowing a simple count-files PATH, right? Or is there any other option?

count-files -path PATH Yes, it is necessary to add - so it will be clearer.

Well, I really liked that way we were able to do a quick count by using count-files FOLDER_PATH. If feels strange being forced to add that -path.
Also, I would rather prefer a single-character shortcut. Since we already have a -p for preview, it could be -i (input), -s (source), -l (location).


Update dmutils and add dmapiclient package dependency

Fixes imports to use the new dmapiclient package instead of
dmutils.apiclient and dmutils.audit.

When the tests pass, :ship:

:+1:


Find the best way to write the filter conditions in the poi layer

For the moment, except the case expression I did, I only have one idea. For example :
[ "any", [ "all", [ "in", [ "get", "natural" ], [ "literal", [ "peak", "volcano" ] ] ], [ ">=", [ "zoom" ], 10 ] ], [ "all", [ "==", [ "get", "tourism" ], "wilderness_hut" ], [ ">=", [ "zoom" ], 12 ] ], ... ]

any to include all
all containing the symbols concerned and the zoom level from which they are displayed

The only two things is that we must repeat the zoom level at each group of symbols and that we must include all the symbols because we don't put a fallback value. But the good thing is that we display only what we need.
A solution to the repetition of the zoom level is to add an any indentation :
[ "any", [ "all", [ "in", [ "get", "natural" ], [ "literal", [ "peak", "volcano" ] ] ], [ ">=", [ "zoom" ], 10 ] ], [ "all", [ "any", [ "==", [ "get", "waterway" ], "waterfall" ], [ "==", [ "get", "tourism" ], "wilderness_hut" ] ], [ ">=", [ "zoom" ], 12 ] ], ... ]

any to choose what appears at a given zoom level

Or maybe a better way is to resolve that by the tileset, by choosing only what we need in terms of nodes.


chore(kgo): add changelog for 1.4.0

Description
Extracted from #8083
Testing instructions
Preview link:
Checklist

[ ] Review label added
[ ] Conditional version tags added, if applicable.

https://github.com/Kong/docs.konghq.com/pull/8083 has been merged so I believe this can be closed.

#8083 has been merged so I believe this can be closed.

#8083 didn't include the changelog as that's unconditionally rendered and without it we were able to merge all the other bits for 1.4.0 . It was removed in https://github.com/Kong/docs.konghq.com/pull/8083/commits/e8bccdbac4a8ab92a7c4b461100358eec4bd8947


SOLVED - Cant send formatted URL

Hey All,
I'm trying to send a reply message which should include a link (a couple actually).
The issue I'm having is that whenever i format the message response with the <url|link text> it looks like it is escaping the text before sending it through.
I've got something along the lines of:
bot.reply(message,'This is my sample message http://google.com|google');
Any suggestions on what I can check?

Think it's because your URL isn't wrapped with angle brackets?
i.e.,
bot.reply(message,'This is my sample message <http://google.com|google>');

Ah looks like github escaped my brackets when I pasted the example. It did have them in there.
Turns out the issue was with the fact I was using the rtm say, rather than the webapi postMessage call. If you want to send formatted messages (with links) you need to use the webapi.

Was this fixed? I am still having this issue when sending messages using RTM.

I don't think they were going to fix it. I changed my implementation to use webapi postMessage instead and it worked the way I needed it to after that.

It's not fixed, tried both using the bot.reply and + attachment method.

@Silverbug @coffee-cup I've just tested another link with Slack Message Builder and it works with the following snippet. check out this demo
{
    "text": "Sample Text Link <http://www.example.com|Example Website>"
}

Reopened, @mkral care to submit an attempt at a fix?


[In-Progress][DO NOT MERGE YET][Doc] Update: Onebot-Kotlin rename

Update: cqhttp-mirai / cqhttp-mirai-embedded has been renamed to Onebot-Mirai / Onebot-Kotlin by its author yyuueexxiinngg. Since the embedded branch was abandoned, both links here point to master branch of onebot-kotlin.

正好把 OICQ-http-api 也改成 node-onebot 吧，这个也改名了

https://github.com/takayama-lily/onebot -> https://github.com/takayama-lily/node-onebot

Done that, renamed to node-onebot, link fixed.


problem with record

I have recorded  mkv file in licode, the client is chrome.
when i play the mkv file in vlc, there is no sound.  The message is
"opus error: cannot read Opus header
opus error: initial Opus header is corrupted"
How to resolve the problem. Thank you.

try to play it with ffplay. if you want to play it with any player you'll probably need to transcode it with ffmpeg. ex. ffmpeg -i filename -vsync 0 -c:a libopus out.mp4

thanks.. ffplay can play the mkv file.

@kekkokk Hi, does ffplay still work for you now? I try to play recorded mvk file with ffplay , it seems no sound. And I try the ffmpeg command you provided, it also does not work for me.Can you help me? :)


High CPU usage on GKE cluster

Builder using high CPU on GKE clusters.
Replication:
Depoly a wokrlfow-dev or workflow-beta1 charts and do a docker stats on the builder container:
CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O
567dcf2a8bbe        96.17%              40.31 MB / 3.892 GB   1.04%               0 B / 0 B           991.2 kB / 3.883 MB

top on the node gives
top - 18:13:25 up 23:35,  1 user,  load average: 1.10, 1.31, 1.24
Tasks: 106 total,   1 running, 105 sleeping,   0 stopped,   0 zombie
%Cpu(s): 99.0 us,  1.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   3801024 total,  3286940 used,   514084 free,   383544 buffers
KiB Swap:        0 total,        0 used,        0 free,  1993720 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
17835 root      20   0 26220  22m    4 S  96.7  0.6   1251:42 boot
 3310 root      20   0  232m  76m  30m S   0.7  2.1  16:02.86 kubelet
 4241 root      20   0  739m 164m 8136 S   0.7  4.4  11:48.61 google-fluentd
 3872 root      20   0 1348m  48m  18m S   0.3  1.3  14:47.96 docker
17912 root      20   0 65384  49m  13m S   0.3  1.3   0:58.64 registry

I've seen the exact same behaviour yesterday but scaling the replicas number to 0 and then back to 1 on the deis-builder's RC corrected that.
Before doing the scaling stuff described above I checked the running processes with a "ps faux" and I noticed that a defunct child process linked to boot was consuming a lot of CPU. Have you got the same ?

I'm seeing 100% CPU on deis-builder with a new install of beta3 that starts spontaneously and continues indefinitely.

Can you try the beta4 because the issue was completely fixed in beta4 and exists in beta3

will do.  thanks.


@libsql/client ESM not being used on Fly.io/Render

I'm trying to deploy a Turso client with a embedded replica in a SvelteKit app.
exporting the client:
import { AUTH_TOKEN, DB_URL, SYNC_URL } from '$env/static/private';
import { createClient, type Client } from '@libsql/client';

let client_instance: Client | null = null;

export const turso_client = (): Client => {
	if (!client_instance) {
		const url = DB_URL?.trim();
		if (url === undefined) {
			throw new Error('DB_URL is not defined');
		}
		const sync_url = SYNC_URL?.trim();
		if (sync_url === undefined) {
			throw new Error('SYNC_URL is not defined');
		}

		const auth_token = AUTH_TOKEN?.trim();
		if (auth_token === undefined) {
			if (!url.includes('file:')) {
				throw new Error('AUTH_TOKEN is not defined');
			}
		}

		client_instance = createClient({
			url: DB_URL as string,
			authToken: AUTH_TOKEN as string,
			syncUrl: SYNC_URL as string,
		});
	}
	return client_instance;
};

The post install script will run on the platform:
postinstall.ts
import { createClient, type Client } from '@libsql/client';
import 'dotenv/config';

// this file needs to do the initial setup of Turso

// first set the remote
const set_remote = async () => {
	const client = createClient({
		url: process.env.SYNC_URL?.toString() || ``,
		authToken: process.env.AUTH_TOKEN
	});
	await run_queries(client);
};

// set the local
const set_local = async () => {
	const client = createClient({
		url: process.env.DB_URL?.toString() || ``,
		authToken: process.env.AUTH_TOKEN,
		syncUrl: process.env.SYNC_URL
	});
	// sync remote to local
	await client.sync();
	await run_queries(client);
};

// run queries
const run_queries = async (client: Client) => {
	const queries = 25;
	const start = performance.now();
	for (let i = 0; i < queries; i++) {
		const rs = await client.execute(
			'SELECT u.username, p.title, c.content FROM Users u JOIN Posts p ON u.user_id = p.user_id JOIN Comments c ON p.post_id = c.post_id;'
		);

		for (const row of rs.rows) {
			console.log(
				`User ${row.username} posted '${row.title}' with a comment: '${row.content}'`
			);
		}
	}
	const delta = performance.now() - start;
	console.log(`took ${delta}, ${delta / queries} per query`);
};

const main = async () => {
	await set_remote();
	await set_local();
};

main().catch(console.error);

This will log out the local and the sync db data fine.
svelte.config.js:
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	preprocess: vitePreprocess(),

	kit: {
		adapter: adapter(),
	},
};

export default config;

vite.config.ts:
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';

export default defineConfig({
	plugins: [sveltekit()],
	// same result with or without this 👇
	optimizeDeps: {
		exclude: ['@libsql/client'],
	},
	test: {
		include: ['src/**/*.{test,spec}.{js,ts}'],
	},
});

Platform errors:
Your service is live 🎉
ReferenceError: __dirname is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/opt/render/project/src/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at requireLibsql (file:///opt/render/project/src/build/server/chunks/2-fPAwOy9D.js:1119:11)
    at file:///opt/render/project/src/build/server/chunks/2-fPAwOy9D.js:1410:21
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async Promise.all (index 1)
    at async render_page (file:///opt/render/project/src/build/server/index.js:3134:19)
    at async resolve2 (file:///opt/render/project/src/build/server/index.js:4229:24)
    at async respond (file:///opt/render/project/src/build/server/index.js:4120:22)
    at async Array.ssr (file:///opt/render/project/src/build/handler.js:1173:3)
ReferenceError: __dirname is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/opt/render/project/src/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at requireLibsql (file:///opt/render/project/src/build/server/chunks/2-fPAwOy9D.js:1119:11)
    at file:///opt/render/project/src/build/server/chunks/2-fPAwOy9D.js:1410:21
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async Promise.all (index 1)
    at async render_page (file:///opt/render/project/src/build/server/index.js:3134:19)
    at async resolve2 (file:///opt/render/project/src/build/server/index.js:4229:24)
    at async respond (file:///opt/render/project/src/build/server/index.js:4120:22)
    at async Array.ssr (file:///opt/render/project/src/build/handler.js:1173:3)

Same sort of errors on fly.io

Ok, so, I have found a way around this via a comment on the Prisma issues: https://github.com/prisma/prisma/issues/5030#issuecomment-1398076317
I need to require the @libsql/client
import { AUTH_TOKEN, DB_URL, SYNC_URL } from '$env/static/private';
import type { Client } from '@libsql/client';
import { createRequire } from 'module';

const require = createRequire(import.meta.url ?? __filename);

const {
	createClient: RequiredCreateClient,
} = require('@libsql/client');

let client_instance: Client | null = null;

export const turso_client = (): Client => {
	if (!client_instance) {

This builds without the __dirname in the pnpm run build output from SvelteKit.

It look me an extremely long time to find where this was coming from because of https://github.com/tursodatabase/libsql-js/pull/72, but I managed to track it down:
https://github.com/tursodatabase/libsql-js/blob/6e705ac5d9595cc969149e208e0a9a1d9fb877b0/index.js#L41

Looks like this issue is a duplicate of https://github.com/tursodatabase/libsql-js/issues/49

For prosperity if anyone come up against this, referenced in https://github.com/tursodatabase/libsql-js/issues/49
Install the @libslq/client as a dependency and not a devDependency then rollup will take care of the rest


Add licensing stuff (#28)

cc @ForNeVeR @Minoru @ttldtor @IngvarJackal @Newlifer
Guys! Could you please help me review this? Thanks!
Should close #28

Looks fine to me. Good job!

Thank you guys! =3


[Minion] Fix the delete task queue restlet resource

Codecov Report

Merging #1744 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1744      +/-   ##
==========================================
+ Coverage   68.02%   68.05%   +0.03%
==========================================
  Files         834      834
  Lines       40539    40539
  Branches     5336     5336
==========================================
+ Hits        27576    27589      +13
+ Misses      11107    11097      -10
+ Partials     1856     1853       -3

Impacted Files
Coverage Δ

...pi/restlet/resources/PinotTaskRestletResource.java
0% <ø> (ø)
:arrow_up:

...in/pinot/core/query/pruner/ValidSegmentPruner.java
57.14% <0%> (-28.58%)
:arrow_down:

...kedin/pinot/core/util/SortedRangeIntersection.java
83.82% <0%> (-7.36%)
:arrow_down:

...impl/dictionary/DoubleOnHeapMutableDictionary.java
68.88% <0%> (-6.67%)
:arrow_down:

...ot/core/query/pruner/ColumnValueSegmentPruner.java
84.48% <0%> (-3.45%)
:arrow_down:

...lix/core/realtime/PinotRealtimeSegmentManager.java
71.18% <0%> (-2.26%)
:arrow_down:

...edin/pinot/common/metadata/ZKMetadataProvider.java
74.8% <0%> (-1.58%)
:arrow_down:

...manager/realtime/LLRealtimeSegmentDataManager.java
70.13% <0%> (+0.19%)
:arrow_up:

.../broker/routing/HelixExternalViewBasedRouting.java
90.59% <0%> (+0.34%)
:arrow_up:

.../core/realtime/PinotLLCRealtimeSegmentManager.java
76.31% <0%> (+0.54%)
:arrow_up:

... and 8 more

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 87a6751...5de27fe. Read the comment docs.


Install from source fails

Everything runs fine until
 > pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode

For this to work you need to be in the top-level covid-if-annotations directory.

OK, somehow I wasn't in the right dir anymore. Sorry for the noise.

No worries ;). Thanks for trying it out.


asyncssh: loosen upper version limit

related: https://github.com/iterative/scmrepo/issues/43

Requires #18 to be merged first. @pmrowla would be good to have your review on it. :)


run UPDATE_BRANCH=release-1.10 ./bin/update_deps.sh; make gen

Update dependencies for 1.10

@jacob-delgado: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio_release-1.10
7c74a4e232cd50d106cd2592514d7f4137660c5f
link
/test release-notes_istio_release-1.10

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test release-notes_istio_release-1.10


Location size doesn't automatically adjust to content size

I'm not sure if this is something syntastic can "fix" but there's a lot of wasted screen estate when the location list opens up for only 2 lines. it would be nice if it would automatically adjust to fit the size of the content.

Syntastic uses variable g:syntastic_loc_list_height (defaulting to 10) to sets the height of the error window.  To make it adjust automatically to the number of issues found, you can use the undocumented callback SyntasticCheckHook().  This function is called with an argument pointing to the final list of errors, so you can add something like this to your vimrc:
function! SyntasticCheckHook(errors)
    if !empty(a:errors)
        let g:syntastic_loc_list_height = min([len(a:errors), 10])
    endif
endfunction

Please note however that Vim options winheight and winminheight also affect the final result.

@lcd047 thanks! that seemed to work

Could this be added to either the Recommended Settings or FAQ? I just installed Syntastic and this was the first thing that bugged me.

@ds-cbo It isn't a recommended setting. shrug Also, you should probably consider using ALE instead of syntastic these days.


Ensure the midstream flag is checked in midstream tests

Coverage for suricata PR: https://github.com/OISF/suricata/pull/5845

Replaced by https://github.com/OISF/suricata-verify/pull/513


Fix PHP 8.4 deprecation notices

Add null type hint for nullable method parameters.
See also https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Thanks


[#1722] Create custom journal page for displaying an automatically generated class summary

Uses advancement data stored in a class to auto-generate a journal entry for that class styled in a manner similar to the SRD and other official books:

This includes a full table with proficiency bonus, feature summary, scale values, and spell slots per level if available. There is a large descriptive area at the top, and several smaller descriptive areas throughout to allow for populating details not available on the class item:

Classes with optional features will have them displayed in a separate table & section:

It also supports adding subclasses beneath the class details with their own tables and feature lists:

I have some high-level questions before I get started with a full review:

Where does this leave our class item descriptions? These journal pages display roughly the same information. Do we anticipate keeping those two in-sync indefinitely? Do we retire the class item descriptions entirely? If we have the information available to automatically generate the class descriptions, would it be better to do that as part of the class item description rather than as a separate journal page?
I notice we're using scale values to encode class spell progression, but we do have plans to have a dedicated advancement type for these later. Should we wait for that first to avoid having to migrate these later?

Where does this leave our class item descriptions? These journal pages display roughly the same information. Do we anticipate keeping those two in-sync indefinitely? Do we retire the class item descriptions entirely? If we have the information available to automatically generate the class descriptions, would it be better to do that as part of the class item description rather than as a separate journal page?

I was thinking we would reduce the description of class items to a short description and a link to the journal entry. This is a bit hard for the SRD classes because they don't really provide a description, they just go straight into the rules. We could also pull out the code for generating the table and add like a table enricher for class descriptions so we can use the auto-generated table.

I notice we're using scale values to encode class spell progression, but we do have plans to have a dedicated advancement type for these later. Should we wait for that first to avoid having to migrate these later?

I was thinking that instead of duplicating a bunch of the scale value code for a future spellcasting advancement, we could just have that spellcasting advancement point to the existing scale values to get their data on spells & cantrips available.

LGTM. Consider whether you want to apply the same options treatment to computeLeveledProgression and computePactProgression. I'll leave it up to you, and you can merge when ready.

I fell like those two methods should be written with the same signature as the hook methods, and I want to pre-split out spellcasting and stuff before calling the hook so I think this is the best method.


Uppercase M for Micro

According to @timneutkens in https://github.com/apollographql/graphql-server/pull/436

Coverage remained the same at 100.0% when pulling 562493951cf0ba71d0ef4970d5c5031233bea1d2 on helfer:patch-1 into 89b5f755cb47cc02866d96392da90f690341e9e4 on zeit:master.

👌 🙆♂


Improved ways to link accounts

#10 demonstrates developers' concerns with correctly linking custom oauth providers with users already signed in with privileged providers. @nicolasgarnier wrote a wonderful comment on how this can be achieved using Auth#setCustomUserClaims(uid, customClaims).
Although there is a limitation in this approach, compared to FirebaseUser#linkWithCredential() method, I assume this could be a fair guide to third-party developers for structuring complete auth system with multiple oauth providers including custom ones.
Could you review this pull request? @nicolasgarnier @samtstern
p.s. Token verification functionality was added to Kakao API so I also included it. :)

@nicolasgarnier
Always thanks for your prompt review :) I added a new commit that contains several fixes you mentioned.

@nicolasgarnier
Any update on this PR? :)

Hey @CoderSpinoza sorry about that :) I'll get to it soon, I'm just done with a quite busy bunch of weeks.

@nicolasgarnier Haha, guess you are busy these days! Just get to it whenever you are free :)

Sorry for the delay ^^ I'll try to be faster next time :P

Any updates? :)

Any updates? This is very important.

Custom auth is not practical without the ability to merge accounts. +1


chore: release 0.117.0

:robot: I have created a release *beep* *boop*
0.117.0
google/cloud-spanner 1.21.0
Features

add instance replica configuration. (#2433) (0c03490)

google/cloud-storage 1.16.0
Features

support for uniform bucket-level access (#2146) (b48d791), closes #2140 #2142 #2144

google/cloud-talent 0.8.0
Features

add QueryLanguageCode to JobQuery (#2431) (c980499)

google/cloud-tasks 1.4.0
Features

add HttpRequest/OAuthToken/OidcToken support (#2445) (5aba667)

This PR was generated with Release Please.

@dwsupplee Is this OK to merge?

@busunkim96 Yes, please go for it :)

Release is at https://github.com/googleapis/google-cloud-php/releases/tag/v0.117.0


ROCm RawModule template kernel with complex

Conditions (you can just paste the output of python -c 'import cupy; cupy.show_config()')

CuPy version 9.1.0
OS/Platform AMD ROCm

Code to reproduce

import cupy

code = r'''
#include <cupy/complex.cuh>
template<typename T>
__global__ void func(T* in_arr) { /* do something */ }
'''

kers = ('func<int>', 'func<complex<double>>')
mod = cupy.RawModule(code=code, options=('--std=c++11',),
                         name_expressions=kers, translate_cucomplex=False)

ker_int = mod.get_function(kers[1])

Error messages, stack traces, or logs

When calling RawModule.get_function() using kernels with complex template names
Traceback (most recent call last):
  File "test.py", line 15, in <module>
    ker_int = mod.get_function(kers[1])
  File "cupy/_core/raw.pyx", line 485, in cupy._core.raw.RawModule.get_function
  File "cupy/_core/raw.pyx", line 96, in cupy._core.raw.RawKernel.kernel.__get__
  File "cupy/_core/raw.pyx", line 117, in cupy._core.raw.RawKernel._kernel
  File "cupy/cuda/function.pyx", line 253, in cupy.cuda.function.Module.get_function
  File "cupy/cuda/function.pyx", line 194, in cupy.cuda.function.Function.__init__
  File "cupy_backends/cuda/api/driver.pyx", line 269, in cupy_backends.cuda.api.driver.moduleGetFunction
  File "cupy_backends/cuda/api/driver.pyx", line 125, in cupy_backends.cuda.api.driver.check_status
cupy_backends.cuda.api.driver.CUDADriverError: hipErrorNotFound: hipErrorNotFound

However if I do not use templates, the kernel runs fine.
Is that feature not supported on ROCm?

On my cell, forgive my brevity: Could you try setting backend='hipcc' in RawModule? I seem to remember encountering similar issues with hipRTC (the default backend). I can look into it later.

Also, could you post the output of  cupy.show_config() please?

@leofang thanks.
The backend='hipcc' crashes with:
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    mod = cupy.RawModule(code=code, options=('--std=c++11',),
  File "cupy/_core/raw.pyx", line 361, in cupy._core.raw.RawModule.__init__
ValueError: only nvrtc supports retrieving the mangled names for the given name expressions

Here the full show config:

OS                        : Linux-5.4.0-74-generic-x86_64-with-glibc2.29
Python Version            : 3.8.5
CuPy Version              : 9.1.0
CuPy Platform             : AMD ROCm
NumPy Version             : 1.19.5
SciPy Version             : 1.7.0rc2
Cython Build Version      : 0.29.22
Cython Runtime Version    : None
CUDA Root                 : /usr
hipcc PATH                : /usr/bin/hipcc
CUDA Build Version        : 400
CUDA Driver Version       : 327500
CUDA Runtime Version      : 3275
cuBLAS Version            : 23200
cuFFT Version             : 100
cuRAND Version            : 201009
cuSOLVER Version          : (3, 10, 0)
cuSPARSE Version          : 32593
NVRTC Version             : (9, 0)
Thrust Version            : 100908
CUB Build Version         : 201005
Jitify Build Version      : None
cuDNN Build Version       : None
cuDNN Version             : None
NCCL Build Version        : 2708
NCCL Runtime Version      : 2804
cuTENSOR Version          : None
cuSPARSELt Build Version  : None
Device 0 Name             : Vega 20 [Radeon VII]
Device 0 Arch             : gfx906:sramecc-:xnack-
Device 0 PCI Bus ID       : 0000:43:00.0

Oh yes...I forgot 🤦🏻♂ Let me check later.

@scarrazza I was right. This is a known hipRTC bug observed since as early as ROCm 3.5. Looks like it is still an issue on ROCm 4.0:
https://github.com/cupy/cupy/blob/ef422ca88182fad0a9544026d6104baf03d2a077/tests/cupy_tests/core_tests/test_raw.py#L812-L818
cc @amathews-amd: Any chance you could file a bug report internally for us please? 😇 I haven't tested it on ROCm 4.2, though, so maybe we need to test on 4.2 first.

@leofang thank you very much for checking.

@leofang ,
I was creating a reproducer with my_sqrt<complex<double>>, when I got this error on CUDA 11.0.
Error: 6
__nv_name_map(2): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)

__nv_name_map(2): error: Name expression cannot form address of a non-__global__ function. Input name expression was: " my_sqrt < complex < double >>"

2 errors detected in the compilation of "default_program".

So, I added a space to my_sqrt<complex<double> >.  With the same change in HIP version of the code, I get the lowered name.
HIP
 Lowered Name for my_sqrt<int> is '_Z7my_sqrtIiEvPT_i'.
 Lowered Name for my_sqrt<float> is '_Z7my_sqrtIfEvPT_i'.
 Lowered Name for my_sqrt<complex<double> > is '_Z7my_sqrtI7complexIdEEvPT_i'.

CUDA
 Lowered Name for my_sqrt<int> is '_Z7my_sqrtIiEvPT_i'.
 Lowered Name for my_sqrt<float> is '_Z7my_sqrtIfEvPT_i'.
 Lowered Name for my_sqrt<complex<double> > is '_Z7my_sqrtI7complexIdEEvPT_i'.

HIP Program
#include <stdio.h>
#include <iostream>
#include "hip/hiprtc.h"
#include <vector>

int main()
{

    hiprtcProgram prog;

    std::string code =
      "#include \"hip/hip_runtime.h\" \n"
        "    template <typename T>"
        "        struct complex {"
        "            public:"
        "                typedef T value_type;"
        "                inline __host__ __device__ complex(const T& re, const T& im);"
        "                __host__ __device__ inline complex<T>& operator*=(const complex<T> z);"
        "                __host__ __device__ inline T real() const volatile { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const volatile { return m_data[1]; }"
        "                __host__ __device__ inline T real() const { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const { return m_data[1]; }"
        "                __host__ __device__ inline void real(T re) volatile { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) volatile { m_data[1] = im; }"
        "                __host__ __device__ inline void real(T re) { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) { m_data[1] = im; }"
        "            private:"
        "                T m_data[2];"
        "        };"
        "    template <typename T>"
        "        inline __host__ __device__ complex<T>::complex(const T& re, const T& im) {"
        "            real(re);"
        "            imag(im);"
        "        }"
        "    template <typename T>"
        "        __host__ __device__ inline complex<T>& complex<T>::operator*=(const complex<T> z) {"
        "            *this = *this * z;"
        "            return *this;"
        "        }"
        "   template <typename T>"
        "       __host__ __device__ inline complex<T> operator*(const complex<T>& lhs,"
        "                                                const complex<T>& rhs) {"
        "           return complex<T>(lhs.real() * rhs.real() - lhs.imag() * rhs.imag(),lhs.real() * rhs.imag() + lhs.imag() * rhs.real());"
        "       }"
        " /* ------ DEVICE GLOBAL FUNCTION ------ */ "
        "template<typename T> "
        "__global__ void my_sqrt(T* input, int N) {"
        "  unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;"
        "  if (x < N) {"
        "    input[x] *= input[x];"
        "  }"
        "}";

    // CREATE PROGRAM
    const char *headers[] = {""};
    const char *header_content[] = {"\n"};

    hiprtcResult result = hiprtcCreateProgram(&prog, code.c_str(), NULL, 0, header_content, headers);

    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

    std::vector<std::string> options;

    /* Tranfer options to a classic C array. */
    std::vector<const char *> opts(options.size());
    for (size_t i = 0; i < options.size(); i++) {
      opts[i] = options[i].c_str();
    }

    // ADD NAME EXPRESSION
    std::vector<std::string> name_expressions;
    name_expressions.push_back("my_sqrt<int>");
    name_expressions.push_back("my_sqrt<float>");
    name_expressions.push_back("my_sqrt<complex<double> >");

    for(size_t i = 0; i < name_expressions.size(); i++){
        result = hiprtcAddNameExpression(prog, name_expressions[i].c_str() );

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << "adding Name Expression " << name_expressions[i] << (int)result << std::endl; return 1; }
    }

    // COMPILE PROGRAM
    result = hiprtcCompileProgram(prog, options.size(), &opts[0]);

    if( result!= HIPRTC_SUCCESS ) {
        std::cout<<"Error: " << (int)result << std::endl;

        size_t log_size;
        hiprtcGetProgramLogSize(prog, &log_size);

        std::vector<char> log(log_size);
        hiprtcGetProgramLog(prog, &log[0]);
        fprintf(stderr, "%s\n", &log[0]);

      return 1;
    }

    // GET LOWERED NAME
    for(size_t i = 0; i < name_expressions.size(); i++){
        const char* mangled_instantiation_cstr;
        result = hiprtcGetLoweredName(prog, name_expressions[i].c_str(), &mangled_instantiation_cstr);

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

        std::cout << " Lowered Name for " << name_expressions[i] << " is '" << mangled_instantiation_cstr << "'." << std::endl;
    }

    // DESTROY PROGRAM
    result = hiprtcDestroyProgram(&prog);
    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

}

CUDA Program
#include <stdio.h>
#include <iostream>
#include "nvrtc.h"
#include <vector>

int main()
{

    nvrtcProgram prog;

    std::string code =
        "    template <typename T>"
        "        struct complex {"
        "            public:"
        "                typedef T value_type;"
        "                inline __host__ __device__ complex(const T& re, const T& im);"
        "                __host__ __device__ inline complex<T>& operator*=(const complex<T> z);"
        "                __host__ __device__ inline T real() const volatile { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const volatile { return m_data[1]; }"
        "                __host__ __device__ inline T real() const { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const { return m_data[1]; }"
        "                __host__ __device__ inline void real(T re) volatile { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) volatile { m_data[1] = im; }"
        "                __host__ __device__ inline void real(T re) { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) { m_data[1] = im; }"
        "            private:"
        "                T m_data[2];"
        "        };"
        "    template <typename T>"
        "        inline __host__ __device__ complex<T>::complex(const T& re, const T& im) {"
        "            real(re);"
        "            imag(im);"
        "        }"
        "    template <typename T>"
        "        __host__ __device__ inline complex<T>& complex<T>::operator*=(const complex<T> z) {"
        "            *this = *this * z;"
        "            return *this;"
        "        }"
        "   template <typename T>"
        "       __host__ __device__ inline complex<T> operator*(const complex<T>& lhs,"
        "                                                const complex<T>& rhs) {"
        "           return complex<T>(lhs.real() * rhs.real() - lhs.imag() * rhs.imag(),lhs.real() * rhs.imag() + lhs.imag() * rhs.real());"
        "       }"
        " /* ------ DEVICE GLOBAL FUNCTION ------ */ "
        "template<typename T> "
        "__global__ void my_sqrt(T* input, int N) {"
        "  unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;"
        "  if (x < N) {"
        "    input[x] *= input[x];"
        "  }"
        "}";

    // CREATE PROGRAM
    const char *headers[] = {""};
    const char *header_content[] = {"\n"};

    nvrtcResult result = nvrtcCreateProgram(&prog, code.c_str(), NULL, 0, header_content, headers);

    if( result!= NVRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

    std::vector<std::string> options;

    /* Tranfer options to a classic C array. */
    std::vector<const char *> opts(options.size());
    for (size_t i = 0; i < options.size(); i++) {
      opts[i] = options[i].c_str();
    }

    // ADD NAME EXPRESSION
    std::vector<std::string> name_expressions;
    name_expressions.push_back("my_sqrt<int>");
    name_expressions.push_back("my_sqrt<float>");
    name_expressions.push_back("my_sqrt<complex<double> >");

    for(size_t i = 0; i < name_expressions.size(); i++){
        result = nvrtcAddNameExpression(prog, name_expressions[i].c_str() );

        if( result!= NVRTC_SUCCESS ) { std::cout<<"Error: " << "adding Name Expression " << name_expressions[i] << (int)result << std::endl; return 1; }
    }

    // COMPILE PROGRAM
    result = nvrtcCompileProgram(prog, options.size(), &opts[0]);

    if( result!= NVRTC_SUCCESS ) {
        std::cout<<"Error: " << (int)result << std::endl;

        size_t log_size;
        nvrtcGetProgramLogSize(prog, &log_size);

        std::vector<char> log(log_size);
        nvrtcGetProgramLog(prog, &log[0]);
        fprintf(stderr, "%s\n", &log[0]);

      return 1;
    }

    // GET LOWERED NAME
    for(size_t i = 0; i < name_expressions.size(); i++){
        const char* mangled_instantiation_cstr;
        result = nvrtcGetLoweredName(prog, name_expressions[i].c_str(), &mangled_instantiation_cstr);

        if( result!= NVRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

        std::cout << " Lowered Name for " << name_expressions[i] << " is '" << mangled_instantiation_cstr << "'." << std::endl;
    }

    // DESTROY PROGRAM
    result = nvrtcDestroyProgram(&prog);
    if( result!= NVRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

}

Hello @amathews-amd! Thanks for taking a look. I am slowly catching up things after a long long break...
The __nv_name_map error you got with NVRTC is because you didn't set -std=c++11 or higher to NVRTC. Once you do that by replacing this line
std::vector<std::string> options;

with
std::vector<std::string> options = {"--std=c++11", };

The lower name of my_sqrt<complex<double>> (no spacing!) can be fetched correctly.
However, this is not the case with hipRTC. With the above change, this is what I get (consistent with the current bug report and my earlier observation):
Lowered Name for my_sqrt<complex<double>> is ''.

However, this is not the case with hipRTC. With the above change, this is what I get (consistent with the current bug report and my earlier observation):
Lowered Name for my_sqrt<complex<double>> is ''.

@amathews-amd btw I just checked that this still happens with ROCm 4.2.0.

@scarrazza FYI the best workaround for the time being is like what @amathews-amd showed above: add a space between the tailing bracket of your template specialization (ex: func<complex<double> >).

@leofang @amathews-amd thanks for this checks, however the workaround does not seem to work for me:
Code
import cupy

code = r'''
#include <cupy/complex.cuh>
template<typename T>
__global__ void func(T* in_arr) { /* do something */ }
'''

kers = ('func<int>', 'func<complex<double> >')
mod = cupy.RawModule(code=code, options=('--std=c++11',),
                         name_expressions=kers)

ker_int = mod.get_function(kers[1])

Crash

Traceback (most recent call last):
  File "test.py", line 14, in <module>
    ker_int = mod.get_function(kers[1])
  File "cupy/_core/raw.pyx", line 485, in cupy._core.raw.RawModule.get_function
  File "cupy/_core/raw.pyx", line 96, in cupy._core.raw.RawKernel.kernel.__get__
  File "cupy/_core/raw.pyx", line 117, in cupy._core.raw.RawKernel._kernel
  File "cupy/cuda/function.pyx", line 253, in cupy.cuda.function.Module.get_function
  File "cupy/cuda/function.pyx", line 194, in cupy.cuda.function.Function.__init__
  File "cupy_backends/cuda/api/driver.pyx", line 269, in cupy_backends.cuda.api.driver.moduleGetFunction
  File "cupy_backends/cuda/api/driver.pyx", line 125, in cupy_backends.cuda.api.driver.check_status
cupy_backends.cuda.api.driver.CUDADriverError: hipErrorNotFound: hipErrorNotFound

Does this code example works for you?

Thanks for testing, @scarrazza. I can reproduce it with both your snippet and a C++-equivalent reproducer (see below).
@amathews-amd My wild guess is that your complex class is concise enough so that the workaround (with a space) works. For example, this works fine:
Code

#include <stdio.h>
#include <iostream>
#include "hip/hiprtc.h"
#include "hip/hip_runtime.h"
#include <vector>
#include <assert.h>

int main()
{

    hiprtcProgram prog;

    std::string code =
      "#include \"hip/hip_runtime.h\" \n"
        "    template <typename T>"
        "        struct complex {"
        "            public:"
        "                typedef T value_type;"
        "                inline __host__ __device__ complex(const T& re, const T& im);"
        "                __host__ __device__ inline complex<T>& operator*=(const complex<T> z);"
        "                __host__ __device__ inline T real() const volatile { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const volatile { return m_data[1]; }"
        "                __host__ __device__ inline T real() const { return m_data[0]; }"
        "                __host__ __device__ inline T imag() const { return m_data[1]; }"
        "                __host__ __device__ inline void real(T re) volatile { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) volatile { m_data[1] = im; }"
        "                __host__ __device__ inline void real(T re) { m_data[0] = re; }"
        "                __host__ __device__ inline void imag(T im) { m_data[1] = im; }"
        "            private:"
        "                T m_data[2];"
        "        };"
        "    template <typename T>"
        "        inline __host__ __device__ complex<T>::complex(const T& re, const T& im) {"
        "            real(re);"
        "            imag(im);"
        "        }"
        "    template <typename T>"
        "        __host__ __device__ inline complex<T>& complex<T>::operator*=(const complex<T> z) {"
        "            *this = *this * z;"
        "            return *this;"
        "        }"
        "   template <typename T>"
        "       __host__ __device__ inline complex<T> operator*(const complex<T>& lhs,"
        "                                                const complex<T>& rhs) {"
        "           return complex<T>(lhs.real() * rhs.real() - lhs.imag() * rhs.imag(),lhs.real() * rhs.imag() + lhs.imag() * rhs.real());"
        "       }"
        " /* ------ DEVICE GLOBAL FUNCTION ------ */ "
        "template<typename T> "
        "__global__ void my_sqrt(T* input, int N) {"
        "  unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;"
        "  if (x < N) {"
        "    input[x] *= input[x];"
        "  }"
        "}";

    // CREATE PROGRAM
    const char *headers[] = {""};
    const char *header_content[] = {"\n"};

    hiprtcResult result = hiprtcCreateProgram(&prog, code.c_str(), NULL, 0, header_content, headers);

    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

    std::vector<std::string> options = {"--std=c++11", };

    /* Tranfer options to a classic C array. */
    std::vector<const char *> opts(options.size());
    for (size_t i = 0; i < options.size(); i++) {
      opts[i] = options[i].c_str();
    }

    // ADD NAME EXPRESSION
    std::vector<std::string> name_expressions;
    name_expressions.push_back("my_sqrt<int>");
    name_expressions.push_back("my_sqrt<float>");
    name_expressions.push_back("my_sqrt<complex<double> >");

    for(size_t i = 0; i < name_expressions.size(); i++){
        result = hiprtcAddNameExpression(prog, name_expressions[i].c_str() );

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << "adding Name Expression " << name_expressions[i] << (int)result << std::endl; return 1; }
    }

    // COMPILE PROGRAM
    result = hiprtcCompileProgram(prog, options.size(), &opts[0]);

    if( result!= HIPRTC_SUCCESS ) {
        std::cout<<"Error: " << (int)result << std::endl;

        size_t log_size;
        hiprtcGetProgramLogSize(prog, &log_size);

        std::vector<char> log(log_size);
        hiprtcGetProgramLog(prog, &log[0]);
        fprintf(stderr, "%s\n", &log[0]);

      return 1;
    }

    // Obtain Code from the program.
    size_t ptxSize;
    result = hiprtcGetCodeSize(prog, &ptxSize);
    if( result != HIPRTC_SUCCESS ) { std::cout << "Error:" << result << std::endl; return 1; }
    char *ptx = new char[ptxSize];
    result = hiprtcGetCode(prog, ptx);
    if( result != HIPRTC_SUCCESS ) { std::cout << "Error:" << result << std::endl; return 1; }

    // Load the generated Code
    hipError_t err;
    int dev;
    err = hipSetDevice(0);
    if (err != hipSuccess) {
        std::cout << "device error:" << hipGetErrorName(err) << std::endl;
        return 1;
    }
    hipModule_t module;
    err = hipModuleLoadData(&module, ptx);
    if (err != hipSuccess) {
        std::cout << "module load error:" << hipGetErrorName(err) << std::endl;
        return 1;
    }

    // GET LOWERED NAME & KERNEL
    for(size_t i = 0; i < name_expressions.size(); i++){
        const char* mangled_instantiation_cstr;
        result = hiprtcGetLoweredName(prog, name_expressions[i].c_str(), &mangled_instantiation_cstr);

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

        std::cout << " Lowered Name for " << name_expressions[i] << " is '" << mangled_instantiation_cstr << "'." << std::endl;

        hipFunction_t func;
        err = hipModuleGetFunction(&func, module, mangled_instantiation_cstr);
        if (err != hipSuccess) {
            std::cout << "function load error:" << hipGetErrorName(err) << std::endl;
            return 1;
        } else {
            std::cout << "got kernel" << std::endl;
        }
    }

    // DESTROY PROGRAM
    result = hiprtcDestroyProgram(&prog);
    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

}

Output:
 Lowered Name for my_sqrt<int> is '_Z7my_sqrtIiEvPT_i'.
got kernel
 Lowered Name for my_sqrt<float> is '_Z7my_sqrtIfEvPT_i'.
got kernel
 Lowered Name for my_sqrt<complex<double> > is '_Z7my_sqrtI7complexIdEEvPT_i'.
got kernel

However, when using a real-world complex class (from CuPy, which is in turn taken from Thrust) it fails:
Code

// assuming this file is placed in CuPy's source root (see the "-I" option below)

#include <stdio.h>
#include <iostream>
#include "hip/hiprtc.h"
#include "hip/hip_runtime.h"
#include <vector>
#include <assert.h>

int main()
{

    hiprtcProgram prog;

    std::string code =
        "#include \"hip/hip_runtime.h\" \n"
        "#include <cupy/complex.cuh>\n"
        "template<typename T> "
        "__global__ void my_sqrt(T* input, int N) {"
        "  unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;"
        "  if (x < N) {"
        "    input[x] *= input[x];"
        "  }"
        "}";

    std::cout << "code is:" << std::endl << code << std::endl;

    // CREATE PROGRAM
    const char *headers[] = {""};
    const char *header_content[] = {"\n"};

    hiprtcResult result = hiprtcCreateProgram(&prog, code.c_str(), NULL, 0, header_content, headers);

    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

    std::vector<std::string> options = {"--std=c++11", "-I./cupy/_core/include"};

    /* Tranfer options to a classic C array. */
    std::vector<const char *> opts(options.size());
    for (size_t i = 0; i < options.size(); i++) {
      opts[i] = options[i].c_str();
    }

    // ADD NAME EXPRESSION
    std::vector<std::string> name_expressions;
    name_expressions.push_back("my_sqrt<int>");
    name_expressions.push_back("my_sqrt<float>");
    name_expressions.push_back("my_sqrt<complex<double> >");

    for(size_t i = 0; i < name_expressions.size(); i++){
        result = hiprtcAddNameExpression(prog, name_expressions[i].c_str() );

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << "adding Name Expression " << name_expressions[i] << (int)result << std::endl; return 1; }
    }

    // COMPILE PROGRAM
    result = hiprtcCompileProgram(prog, options.size(), &opts[0]);

    if( result!= HIPRTC_SUCCESS ) {
        std::cout<<"Error: " << (int)result << std::endl;

        size_t log_size;
        hiprtcGetProgramLogSize(prog, &log_size);

        std::vector<char> log(log_size);
        hiprtcGetProgramLog(prog, &log[0]);
        fprintf(stderr, "%s\n", &log[0]);

      return 1;
    }

    // Obtain Code from the program.
    size_t ptxSize;
    result = hiprtcGetCodeSize(prog, &ptxSize);
    if( result != HIPRTC_SUCCESS ) { std::cout << "Error:" << result << std::endl; return 1; }
    char *ptx = new char[ptxSize];
    result = hiprtcGetCode(prog, ptx);
    if( result != HIPRTC_SUCCESS ) { std::cout << "Error:" << result << std::endl; return 1; }

    // Load the generated Code
    hipError_t err;
    int dev;
    err = hipSetDevice(0);
    if (err != hipSuccess) {
        std::cout << "device error:" << hipGetErrorName(err) << std::endl;
        return 1;
    }
    hipModule_t module;
    err = hipModuleLoadData(&module, ptx);
    if (err != hipSuccess) {
        std::cout << "module load error:" << hipGetErrorName(err) << std::endl;
        return 1;
    }

    // GET LOWERED NAME & KERNEL
    for(size_t i = 0; i < name_expressions.size(); i++){
        const char* mangled_instantiation_cstr;
        result = hiprtcGetLoweredName(prog, name_expressions[i].c_str(), &mangled_instantiation_cstr);

        if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

        std::cout << " Lowered Name for " << name_expressions[i] << " is '" << mangled_instantiation_cstr << "'." << std::endl;

        hipFunction_t func;
        err = hipModuleGetFunction(&func, module, mangled_instantiation_cstr);
        if (err != hipSuccess) {
            std::cout << "function load error:" << hipGetErrorName(err) << std::endl;
            return 1;
        } else {
            std::cout << "got kernel" << std::endl;
        }
    }

    // DESTROY PROGRAM
    result = hiprtcDestroyProgram(&prog);
    if( result!= HIPRTC_SUCCESS ) { std::cout<<"Error: " << (int)result << std::endl; return 1; }

}

Output:
 Lowered Name for my_sqrt<int> is '_Z7my_sqrtIiEvPT_i'.
got kernel
 Lowered Name for my_sqrt<float> is '_Z7my_sqrtIfEvPT_i'.
got kernel
 Lowered Name for my_sqrt<complex<double> > is ''.
function load error:hipErrorNotFound

btw the 2nd C++ reproducer above can only be compiled in ROCm 4.2+, which fixed the bug of -I not being accepted (https://github.com/ROCm-Developer-Tools/HIP/issues/2182). For ROCm < 4.2 CuPy works by recursively unrolling all internal headers.

Hi @leofang , @scarrazza ,
It seems to be a namespace issue.
root@rocm-framework-9:~/cupy/tests# git diff cupy_tests/core_tests/test_raw.py
diff --git a/tests/cupy_tests/core_tests/test_raw.py b/tests/cupy_tests/core_tests/test_raw.py
index d6ae670a5..359ee3f02 100644
--- a/tests/cupy_tests/core_tests/test_raw.py
+++ b/tests/cupy_tests/core_tests/test_raw.py
@@ -801,7 +801,7 @@ class TestRaw(unittest.TestCase):

         # compile code
         name_expressions = ['my_sqrt<int>', 'my_sqrt<float>',
-                            'my_sqrt<complex<double>>', 'my_func']
+                            "my_sqrt<thrust::complex<double> >", 'my_func']
         mod = cupy.RawModule(code=test_cxx_template,
                              options=('--std=c++11',),
                              name_expressions=name_expressions,
@@ -814,8 +814,9 @@ class TestRaw(unittest.TestCase):
                 # TODO(leofang): investigate why getLoweredName has no error
                 # but returns an empty string for my_sqrt<complex<double>>
                 mangled_name = mod.module.mapping.get(ker_T)
-                if mangled_name == '':
-                    continue
+            #    if mangled_name == '':
+            #        continue
+            print(ker_T, dtype, mangled_name)
             ker = mod.get_function(ker_T)

             # prepare inputs & expected outputs

seems to work. If it works for you, you can use it as a workaround.
I will look at filing a bug.
Thanks,
Aswin.

@amathews-amd thanks, this workaround seems to work for me.

It seems to be a namespace issue.

Thanks, @amathews-amd! This is a very interesting (and nontrivial) finding. How did you figure out?
Just wanna make sure: Neither hipRTC nor hipcc would secretly include any actual Thrust (or rocThrust for that matter) headers, so we are sure it's CuPy's headers being used, right?

I will look at filing a bug.

Sounds great, thanks Aswin! Please keep us posted on this 👍

Hi @leofang , I was just trying to see what the differences are between the scaled down implementation of complex, and the full implementation of thrust::complex. Regarding whether hipRTC/hipcc may be using different thrust implementations, I am not entirely sure. We may need to test it out.

Internal ticket: https://ontrack-internal.amd.com/browse/SWDEV-294764

We studied the CUDA documentation and examples about nvrtcAddNameExpression and nvrtcGetLoweredName at  https://docs.nvidia.com/cuda/nvrtc/index.html#accessing-lowered-names.
CUDA does not specify whether non-fully-qualified names can be used with nvrtcGetLoweredName. Based on the examples provided, the intention seems to be that fully qualified names should be used with nvrtcGetLoweredName.
Another drawback of supporting non-fully-qualified names with nvrtcGetLoweredName is that it introduces context dependency and ambiguity for the code using such names since such names are valid only in specific contexts.
Since supporting of getting lowered name of non-fully-qualified names is not clearly documented, CUDA could drop its support in the future. On the other hand, to work around this issue, users can use fully-qualified names instead of non-fully-qualified names with nvrtcGetLoweredName, which should work for both CUDA and HIP, with benefits of context-free names and clarity.
Therefore our suggestion is not to support getting lowered names for non-fully-qualified names in HIP.

Thanks for the update, @yxsamliu. It's confusing, though. In the failing case, we do expose the thrust::complex class to the global context:
https://github.com/cupy/cupy/blob/24d4d683807e5afdf16139c250e4c63b8d1fd5b4/cupy/_core/include/cupy/complex.cuh#L5
So why wouldn't complex<float> be a fully qualified name and we have to still use thrust::complex<float>?

@yxsamliu is the expert here, but this is my understanding (it may be wrong).
In https://docs.nvidia.com/cuda/nvrtc/index.html#accessing-lowered-names, it is mentioned "NVRTC will parse the name expression string as a C++ constant expression at the end of the user program". If the name expression string is parsed in the context of the program scope, it should get the using directive as you mentioned. But if the name expression string is parsed outside the context of the program scope, you will have to use fully qualified names.
This might be the source of the confusion. Since the NV documentation does not make it clear, it might be better to be conservative and support the usage that provides context-free naming and clarity.

Hi @amathews-amd I have two comments:

If the scoping thing is for real (which I doubt), thrust::complex<float> would not be a fully-qualified name either. You'd need to use ::thrust::complex<float>.
Whether or not the NV documentation is clear is subjective IMHO, but the actual behavior has remained intact across multiple CUDA versions for as long as I am aware. In this case not being fully compatible could be a foot gun for ROCm if code portability is a top concern, unless it's really too hard to fix on the compiler side.


npm install -g is omitted on generated Dockerfile

Describe the bug
on Dockerfile.base, I specified RUN npm install -g @nestjs/cli but this is line is being ignored on Dockerfile (generated)
To Reproduce
Steps to reproduce the behavior:

Go to Dockerfile.base and add the line RUN npm install -g @nestjs/cli
Run npm run lerna-dockerize
See  generated Dockerfile line RUN npm install -g @nestjs/cli is omitted

Expected behavior
It should add the line RUN npm install -g @nestjs/cli to the generated Dockerfile
Screenshots

Desktop (please complete the following information):

OS: macOS Monterey Version 12.0.1

Additional context
    "lerna": "4.0.0",
    "lerna-dockerize": "^0.8.2",
    "npm": ">= 7.24.0",

i will look to fix this bug, but i can also suggest an workaround.
Instead of installing the cli global you can use npx to run the commands, or you install the cli as a dev-dependency and add a npm script. This would give you also better control over the installed version.

@rudxde thanks for always helping, when I get some free time I will try to submit a PR also.

The issue should be solved in the next release (version 0.8.3)

I will close the issue, for further problems just open a new issue.