[Bug]: [[Wikilinks]] to MDlinks not working with headers links

Issue validation

[X] I checked the issue to prevent duplicate
[X] I checked my configurations files and the documentation
[X] My issue concern doesn't concern the Mkdocs template

Command used
Upload single current active note
Plugin version
7.0.5
Describe the bug
When using the option [[Wikilinks]] to [MDlinks](links) Convert Wikilinks to MDlinks, without changing the contents., the links are not correctly translated if they link to a file header.
How to reproduce ?

Create a file to publish.
Use a wikilink with a link to a header in the current file, and use the | argument to define a custom text link. Example : [[How to Enforce Commit Conventions and Automate the Release and Changelog Process#Configuration|previous section]]
The link is badly converted : [previous section](How%20to%20Enforce%20Commit%20Conventions%20and%20Automate%20the%20Release%20and%20Changelog%20Process.mdconfiguration) and it leads to a 404 error page not found.

Minimal Reproducible Example
The link is present just before the ### Launch Locally to Test it Out section, in the callout. It links to ### Configuration
---
title: How to Enforce Commit Conventions and Automate the Release and Changelog Process
aliases:
description: In this post, I'll explain how to enforce conventional commits rules and automate the release and changelog process of a git repository.
authors:
  - Mathis Gauthey
categories:
  - guides
tags:
  - git
  - github-workflows
  - commit
  - convention
  - release
  - semantic-versioning
date_created: 2024-01-18T08:25:00+01:00
date_modified: 2024-04-24T18:17:09+02:00
share: true
comments: true
---

# How to Enforce Commit Conventions and Automate the Release and Changelog Process

In this post, I'll explain how to enforce conventional commits rules and automate the release and changelog process of a git repository.

<!-- more -->

## Introduction

### A Little Bit of Definitions First

- [Semantic Versioning](https://semver.org/) is a simple set of rules and requirements that dictate how version numbers are assigned and incremented.
- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is a specification for adding human and machine readable meaning to commit messages. That's the one we'll use in every configuration here, it is close to the Angular specifications but has a few more types I reckon.

Common types according to [commitlint-config-conventional (based on the Angular convention)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional#type-enum) can be:

- `build`
- `chore`
- `ci`
- `docs`
- `feat`
- `fix`
- `perf`
- `refactor`
- `revert`
- `style`
- `test`

> [!info] Why use Conventional Commits instead of the Angular convention ?
> This is an extension of the Angular convention that contains a little bit more types for a more flexible management. It also aims to become a standard for all developers across every languages.

### Why Should We Use Such Conventions and Automated Tools ?

- Conventional commits and semantic release standards allow for a standard way to communicate changes made on a codebase, which helps developers communicate better. And god knows we're bad at this.
- Automated release process allows for easier changelog managements with easy rollbacks if required.
- In continuous integration and deployment, we aim to automate most of the things (testing, releasing, building and deploying) in order to be able to focus 100% on our programming and not on manual and repetitive tasks.

### Tools We'll Use

- [semantic-release](https://github.com/semantic-release/semantic-release) to automate the release process and changelog based on the Semantic Versioning rules.
- [VS Code extension](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) for conventional commits modal on committing changes.
- [commitlint](https://github.com/conventional-changelog/commitlint) to check and enforce that commit messages meet the conventional commit format and prevent other types of commits to go through.
- [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog/tree/master) is also used for defining the Conventional Commits convention in semantic-release.
- [commitizen](https://github.com/commitizen/cz-cli) to add a CLI prompt when committing changes that will use conventional commits specifications. It is an alternative to an editor extension.

### Requirements

- [[Install Nvm, Npm, Yarn - Setting up Node on Ubuntu]]
- A git repository

## Semantic Release

### Goals

1. Trigger `semantic-release` on new commits made on `main` branch.
2. Analyze commits based on [conventional commits style](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/).
3. Generate releases notes automatically.
4. Put these release notes inside `docs/CHANGELOG.md`.
5. Create a release commit on main with the CHANGELOG.
6. Automatically tag based on conventional commit and semantic release conventions.

Install the packages locally using the following command :

bash
npm install semantic-release -D
npm install @semantic-release/commit-analyzer -D
npm install @semantic-release/release-notes-generator -D
npm install @semantic-release/changelog -D
npm install @semantic-release/git -D
npm install @semantic-release/exec -D
npm install conventional-changelog-conventionalcommits -D
# npm install @semantic-release/github -D
```

> [!NOTE] Notes
> - It can also be installed globally, but it's not our goal as we just want to automate the release process of our current repository here.
> - The `-D` means the package will appear in your `devDependencies`.

It should create a `package.json` and `package.lock` file in your repository. Don't forget to add `node_modules/` to your `.gitignore` file **but keep the other two committed as they manage the packages and packages dependencies versions respectively.**

### Configuration

Then, create a configuration file named `.releaserc` at the root of your repository. More on that [here](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration), but just copy and paste that for now :

```yml
{
    "branches": [
        "main"
    ],
    "tagFormat": "${version}",
    "debug": true,
    "ci": true,
    "dryRun": false,
    "plugins": [
        [
            "@semantic-release/commit-analyzer",
            {
                "preset": "conventionalcommits"
            }
        ],
        [
            "@semantic-release/release-notes-generator",
            {
                "preset": "conventionalcommits",
                "presetConfig": {
                    "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/branchCompare?baseVersion=GT{{previousTag}}&targetVersion=GT{{currentTag}}&_a=files"
                }
            }
        ],
        [
            "@semantic-release/changelog",
            {
                "changelogFile": "docs/CHANGELOG.md"
            }
        ],
        [
            "@semantic-release/exec",
            {
                "prepareCmd": "bash prepare.sh '${nextRelease.version}' 'module/__manifest__.py'"
            }
        ],
        [
            "@semantic-release/git",
            {
                "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
                "assets": [
                    "docs/CHANGELOG.md",
                    "module/__manifest__.py"
                ]
            }
        ]
    ]
}
```

> [!warning] Prevent infinite loops !
> Note that the `[skip ci]` is only important when working on Azuredevops. Indeed, if your continuous integration system involves a trigger on main that will make semantic-release generate a commit on main… You can definitely see where this is going. Make sure not to do that.

Note that there are two ways to modify the `release-notes-generator` to your liking, and they both involves adding another key below `preset` in your config file.

According to the plugin's [README](https://github.com/semantic-release/release-notes-generator) :

> [!summary]
> Note: config will be overwritten by the values of preset. You should use either preset or config, but not both.
> Note: Individual properties of parserOpts and writerOpts will override ones loaded with an explicitly set preset or config. If preset or config are not set, only the properties set in parserOpts and writerOpts will be used.
> Note: For presets that expects a configuration object, such as conventionalcommits, the presetConfig optionmust be set.

So you can modify the settings :

- Either add the `writerOpts` key and change the different [templates parts](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/src/writer.js) like `headerPartial` or `commitPartial`. Example can be found [here](https://github.com/semantic-release/semantic-release/issues/1339#issuecomment-548179389).
- An easier and simpler modification, useful in case you just want to change the `compareUrlFormat` for example, is to use the `presetConfig` option. Example can be found [here](https://github.com/semantic-release/release-notes-generator/issues/131#issuecomment-627830409).

> [!tip] But how to find the variable names and presets ?
> The [semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator#options) is using [conventional-changelog presets](https://github.com/conventional-changelog/conventional-changelog/tree/c2c4b3a4cb60f784a4e7ee83d189b85c0acac960/packages) and you can check their [package repository](https://github.com/conventional-changelog/conventional-changelog/tree/c2c4b3a4cb60f784a4e7ee83d189b85c0acac960/packages/conventional-changelog-conventionalcommits) or [specs and documentation if provided](https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md).

### Auto-increment the Version

You might want to auto-increment your app version when you release it. It is possible to do it by using `semantic-release/exec` and execute a bash script like this one that replaces the version in the `__manifest__.py` file of a Odoo module :

```bash
#!/bin/bash

# Get the next version from the first argument
next_version=$1

# Get the filename from the second argument
filename=$2

# Perform version bumping using sed
sed -i -E "s/('version':\s*'[0-9]+\.[0-9]+\.)[0-9]+\.[0-9]+\.[0-9]+(',)/\1$next_version\2/" "$filename"
```

> [!warning] Don't forget to commit these changes !
> The files you modify using `exec` part of `semantic-release` needs to be added to the `assets` of the `git` plugin configuration. An example can be found in the [[How to Enforce Commit Conventions and Automate the Release and Changelog Process#Configuration|previous section]]

### Launch Locally to Test it Out

If you want to run the `semantic-release` locally, use `./node_modules/.bin/semantic-release --no-ci --dry-run`. If you're satisfied with the results, just get rid of the `--dry-run`, and it will create a release commit and tag **locally that you can then push if you like.**

### Add Semantic-release to Your Continuous Integration & Deployment Solution

If you want to automatically trigger a release when a new commit is detected on your main branch (that's only an example, you can fine tune it obviously), you can add it to your CI configurations. You can find [examples on the semantic-release repository](https://github.com/semantic-release/semantic-release/tree/master/docs/recipes/ci-configurations) for Github, Gitlab, Jenkins or Travis.

If you happen to use AzureDevOps, first of all best of luck to you too, and feel free to use my simple template here :

```yml
name: Release

trigger:
- main

pool:
  name: default
  demands: Agent.OS -equals Linux

stages:
- stage: Release
  jobs:
  - job : Install_semantic_release
    steps:
      - checkout: self
        persistCredentials: true
      - task: NodeTool@0
        displayName: Use node v20
        inputs:
          versionSpec: '20.x'
      - script: |
          npm install
          ./node_modules/.bin/semantic-release
        env:
          GIT_CREDENTIALS: $(System.AccessToken)
```

You can use a different agent, try using a Ubuntu LTS if possible. Don't forget to use the `GIT_CREDENTIALS` as they are required for semantic-release to be able to commit and push the release commit.

## Enforce Commit Conventions in Your Team

### Introduction

Creating new rules and standards can be pretty hard, especially in a team that has been working differently for a very long time.

But a developer should know how to [write a good commit message](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/), it is an essential part of his job as he won't always be the one to work on complex pieces of software, and needs to communicate for the present colleagues and the futures ones.

> [!success] In short, what is a good commit message ? Ask yourself these questions :
> - What are the changes I made
> - Why have I made these changes? Why was the change needed?
> - What effect have my changes made?
> - What are the changes in reference to? (Issue, bug report, etc.)

A good example that follows directly the flow from above might be :

```text
fix: fix foo to enable bar

This fixes the broken behavior of the component by doing xyz.

BREAKING CHANGE
Before this fix foo wasn't enabled at all, behavior changes from <old> to <new>

Closes D2IQ-12345
```

### Use an Editor Extension

There's probably an extension that might allow for a streamlined conventional commit process in your editor, for example :

[Here's an extension that allows to use a commit modal when commiting changes on VS Code](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits). Simply install and use it when committing changes.

### Use a CLI Tool

Alternative to an editor extension, here on the CLI directly, you can install it globally using :

```bash
npm install -g commitizen
```

Simply use `git cz` or just `cz` instead of `git commit` when committing. You can also use `git-cz`, which is an alias for `cz`. If you use npm 5.2+, you can also use `npx cz`.

### Force Conventional Commits Using Commitlint

If you want to enforce it and don't allow for random commit messages, you can enforce it with pre-commit hooks using commitlint :

At the root of your project, execute the following commands :

```bash
# Install commitlint cli and conventional config
npm install --save-dev @commitlint/{cli,config-conventional}

# Configure commitlint to use conventional config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

# Install Husky v6
npm install husky --save-dev

# Activate hooks
npx husky install

# Add hook
npx husky add .husky/commit-msg  'npx --no -- commitlint --edit ${1}'
```
```
```

### Configuration

```JSON
{
  "github": {
    "branch": "main",
    "automaticallyMergePR": true,
    "dryRun": {
      "enable": false,
      "folderName": "github-publisher"
    },
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "fixed",
    "defaultName": "docs/posts",
    "rootFolder": "docs",
    "yamlFolderKey": "categories",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [
      {
        "regex": "docs/blog",
        "replacement": "docs/blog/posts",
        "type": "path"
      }
    ],
    "autoclean": {
      "enable": true,
      "excluded": [
        "/^((?!docs\\/posts|docs\\/images).)*$/"
      ]
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "title"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [
      {
        "entry": "/title:\\s\"([^\"]+)\"/i",
        "replace": "title: $1",
        "flags": "",
        "after": false
      },
      {
        "entry": "/(date_)(created: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})\\n(date_)(modified: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})/i",
        "replace": "date:\\n  $2$3\\n  updated: $6",
        "flags": "",
        "after": true
      }
    ],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": "strict"
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [],
    "notes": false,
    "folder": "docs/images",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "useObsidianFolder": false
  },
  "plugin": {
    "shareKey": "share",
    "excludedFolder": [],
    "copyLink": {
      "enable": false,
      "links": "",
      "removePart": [],
      "transform": {
        "toUri": true,
        "slugify": "lower",
        "applyRegex": []
      }
    },
    "setFrontmatterKey": "Set"
  }
}

Relevant log output
None

OS
Windows
Anything else?
No response
Plugin settings
As for my mkdocs settings, you can find them here.
{
  "github": {
    "branch": "main",
    "automaticallyMergePR": true,
    "dryRun": {
      "enable": false,
      "folderName": "github-publisher"
    },
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "fixed",
    "defaultName": "docs/posts",
    "rootFolder": "docs",
    "yamlFolderKey": "categories",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [
      {
        "regex": "docs/blog",
        "replacement": "docs/blog/posts",
        "type": "path"
      }
    ],
    "autoclean": {
      "enable": true,
      "excluded": [
        "/^((?!docs\\/posts|docs\\/images).)*$/"
      ]
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "title"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [
      {
        "entry": "/title:\\s\"([^\"]+)\"/i",
        "replace": "title: $1",
        "flags": "",
        "after": false
      },
      {
        "entry": "/(date_)(created: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})\\n(date_)(modified: )(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+\\d{2}:\\d{2})/i",
        "replace": "date:\\n  $2$3\\n  updated: $6",
        "flags": "",
        "after": true
      }
    ],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": "strict"
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [],
    "notes": false,
    "folder": "docs/images",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "useObsidianFolder": false
  },
  "plugin": {
    "shareKey": "share",
    "excludedFolder": [],
    "copyLink": {
      "enable": false,
      "links": "",
      "removePart": [],
      "transform": {
        "toUri": true,
        "slugify": "lower",
        "applyRegex": []
      }
    },
    "setFrontmatterKey": "Set"
  }
}

Obsidian information
SYSTEM INFO:
	Obsidian version: v1.5.12
	Installer version: v1.4.16
	Operating system: Windows 10 Pro 10.0.22631
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: AnuPpuccin v1.4.5
	Snippets enabled: 4
	Restricted mode: off
	Plugins installed: 33
	Plugins enabled: 33
		1: Excalidraw v2.0.22
		2: Auto Link Title v1.5.3
		3: Better footnote v1.0.1
		4: Better Word Count v0.10.1
		5: Callout Manager v1.0.1
		6: Clear Unused Images v1.1.0
		7: Code Editor Shortcuts v1.14.0
		8: Commander v0.5.1
		9: Completr v3.2.0
		10: Editing Toolbar v2.4.0
		11: File Explorer Note Count v1.2.1
		12: Filename Heading Sync v1.9.0
		13: Find orphaned files and broken links v1.9.1
		14: Footnote Shortcut v0.1.3
		15: Iconize v2.10.0
		16: Image Toolkit v1.4.1
		17: LanguageTool Integration v0.3.7
		18: Linter v1.22.0
		19: Templater v2.2.1
		20: Tag Wrangler v0.6.1
		21: Symbols Prettifier v1.1.1
		22: Style Settings v1.0.7
		23: Show Whitespace v0.3.1
		24: Shortcuts extender v2.2.0
		25: Scroll to Top v2.1.4
		26: Paste URL into selection v1.7.0
		27: Paste image rename v1.6.1
		28: Omnivore v1.9.4
		29: Note Refactor v1.8.2
		30: Natural Language Dates v0.6.2
		31: Custom Frames v2.4.7
		32: Raindrop Highlights v0.0.20
		33: Github Publisher v7.0.5

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

I need you settings.

I need you settings.

Oh, pretty sure I copied them inside the template :o I edited the post o/

Fixed in 7.0.6
Caused by the slugify encoding of the anchor, that removed the #.

Fixed in v7.0.6
Caused by the slugify encoding of the anchor, that removed the #.

Thanks again for your reactivity ✌ Still enjoying your plugin after more than a year 💪


Can't assign result of function of type T to ReturnType

TypeScript Version<EMAIL_ADDRESS>
Search Terms:
generic ReturnType, ReturnType assign
Explanation
TypeScript seems to treat the return type of a generic not as the ReturnType<T> but the type it extends from. Basically in this example we get a type error (even though instance is correctly inferred as Foo) because IFoo is not assignable to ReturnType<T>:
interface IFoo {
    someMethod(): string;
}

class Foo implements IFoo {
    static create(p: number) {
        return new Foo(p)
    }

    constructor(readonly p: number) { }
    someMethod = () => 'a';
}

function createSomeInterfaceInstance<T extends (p: number) => IFoo>(factoryFunction: T): ReturnType<T> {
    // This is a TypeError that IFoo is not assignable to ReturnType<T>
    return factoryFunction(12)
}

const instance = createSomeInterfaceInstance(Foo.create);

Now this is hackable-around in two different ways, one by explicitly adding a generic for the return type of T e.g.:
function createSomeInterfaceInstance<K extends IFoo, T extends (p: number) => K>(factoryFunction: T): K
Or just by using a type intersection on the return type e.g.:
function createSomeInterfaceInstance<T extends (p: number) => IFoo & ReturnType<T>>(factoryFunction: T): ReturnType<T>
But both of these solutions feel pretty hacky, it would instead be better if TypeScript inferred the type of factoryFunction(10) to be IFoo & ReturnType<T> instead of just IFoo.
Playground Link: playground-link
Related Issues:
Probably related: #29133

The error actually makes sense to me, at least.

T extends (p: number) => IFoo

factoryFunction returns an IFoo.  Return types are covariant, so T could in fact end up to be (p: number) => ISpecialFoo and then assigning IFoo to that wouldn't be sound.

Hmm, the plot thickens.  The IntelliSense hover text for factoryFunction says:
(p: number) => IFoo

Normally for variables of generic types it will say the type is T extends ..., here it seems to have just decided the function is the concrete type of its constraint.  So it's nothing to do with ReturnType but rather how TS has inferred the type of the function call itself.

but rather how TS has inferred the type of the function call itself.

It seems to infer the type of instance just fine and T is (p: number) => Foo rather than IFoo:

Well, within the body of the generic function it doesn't actually know what T is (hence why it's generic :wink:), so that much makes sense at least.  What doesn't make sense to me is why it thinks factoryFunction is concretely (p: number) => IFoo instead of T extends (p: number) => IFoo, like it would usually be.
Let's see if someone else smarter comes along to solve this mystery because I'm out of ideas. 😛

The type-checking looks reasonable - it knows that factory function is generic, it's just the quick info that is slightly off.
function createSomeInterfaceInstance<T extends (p: number) => IFoo>(factoryFunction: T): ReturnType<T> {
    const fun: T = factoryFunction; // hover factoryFunction: (parameter) factoryFunction: T extends (p: number) => IFoo
    return fun(12); // hover fun: const fun: T (p: number) => IFoo
    //                                       ^ the generic is here, but in a weird place.
}

TypeScript doesn't know how to apply a generic parameter, so it attempts to find a function-like constraint and apply that - this is why the return type is IFoo. I guess you want the application of a parameter T to return ReturnType<T>? Not sure how tractable this is once things get more complicated; it is hard to do anything with a type ReturnType<T>.
The solution:

function createSomeInterfaceInstance<K extends IFoo, T extends (p: number) => K>(factoryFunction: T): K

Doesn't feel hacky to me and is inline with TypeScript guidelines that suggests pushing type-parameters down as far as possible. Though I would write it as follows, unless you really need T:
function createSomeInterfaceInstance<R>(factoryFunction: (p: number) => R): R {
    return factoryFunction(12);
}

const instance: Foo = createSomeInterfaceInstance(Foo.create);

it is hard to do anything with a type ReturnType<T>.

You're right about that - I overlooked that ReturnType is conditional; you can't actually assign stuff to a conditional type (without a cast) until it's been resolved to a real type, but since there's a generic type variable T involved, that hasn't happened yet.
ReturnType<T> in this context is essentially an existential type (also this) and TypeScript doesn't actually support those. 😅

In order for the original example to work the type checker would have to consider the type of the call expression factoryFunction(12) to be a higher order ReturnType<T> instead of falling back to the return type of the constraint of T (i.e. IFoo). This is not something that is currently on our radar.
I'll echo what @jack-williams said above. The best way to write it is:
function createSomeInterfaceInstance<R>(factoryFunction: (p: number) => R): R {
    return factoryFunction(12);
}

const instance: Foo = createSomeInterfaceInstance(Foo.create);


Can't build on Ubuntu 17.04

gcc 4.9
build$ make
-- ctest path: /usr/bin/ctest

CryptoPP header: /usr/include
CryptoPP lib   : /usr/lib/x86_64-linux-gnu/libcryptopp.so
LevelDB header: /usr/include
LevelDB lib: /usr/lib/x86_64-linux-gnu/libleveldb.so
Jsoncpp header: /usr/include/jsoncpp
Jsoncpp lib   : /usr/lib/x86_64-linux-gnu/libjsoncpp.so
json-rpc-cpp header: /usr/include
json-rpc-cpp lib   : /usr/lib/x86_64-linux-gnu/libjsonrpccpp-common.so;/usr/lib/x86_64-linux-gnu/libjsonrpccpp-server.so;/usr/lib/x86_64-linux-gnu/libjsonrpccpp-client.so
microhttpd header: /usr/include
microhttpd lib   : /usr/lib/x86_64-linux-gnu/libmicrohttpd.so
microhttpd dll   :
readline header: /usr/include
readline lib   : /usr/lib/x86_64-linux-gnu/libreadline.so
-- Could NOT find miniupnpc (missing:  MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY)
gmp header: /usr/include/x86_64-linux-gnu
gmp lib   : /usr/lib/x86_64-linux-gnu/libgmp.so
curl header: /usr/include/x86_64-linux-gnu
curl lib   : /usr/lib/x86_64-linux-gnu/libcurl.so
-- Could NOT find cpuid (missing:  CPUID_INCLUDE_DIR CPUID_LIBRARY)
opencl header: /usr/include
opencl lib   : /usr/lib/x86_64-linux-gnu/libOpenCL.so
CUDA header: /usr/include
CUDA lib   : /usr/lib/x86_64-linux-gnu/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so
jsonrpcstub location    : ETH_JSON_RPC_STUB-NOTFOUND
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
--   regex
--   chrono
--   filesystem
--   unit_test_framework
--   program_options
--   random
--   atomic
boost header: /usr/include
boost lib   : /usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so;/usr/lib/x86_64-linux-gnu/libboost_program_options.so;/usr/lib/x86_64-linux-gnu/libboost_random.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so

--                  CMake Version                            3.7.2
-- CMAKE_BUILD_TYPE Build type                               Release
-- TARGET_PLATFORM  Target platform                          Linux
-- BUNDLE           Build bundle                             cudaminer
--------------------------------------------------------------- features
--                  Chromium support                         1
--                  Hardware identification support          FALSE
--                  HTTP Request support                     TRUE
-- VMTRACE          VM execution tracing                     OFF
-- PROFILING        Profiling support                        OFF
-- FATDB            Full database exploring
-- JSONRPC          JSON-RPC support                         ON
-- OLYMPIC          Default to the Olympic network           OFF
------------------------------------------------------------- components
-- MINER            Build miner                              ON
-- GUI              Build GUI components                     OFF
-- ETHASHCL         Build OpenCL components                  ON
-- ETHASHCUDA       Build CUDA components                    ON
-- ETHSTRATUM       Build Stratum components                 ON
-- CXXFLAGS: -std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Wno-error=parentheses -pedantic -DSHAREDLIB -fPIC  -fuse-ld=gold
creating build info...
createBuildInfo()
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dev/master/build
[  0%] Built target BuildInfo.h
[ 42%] Built target devcore
[ 53%] Built target ethash
[ 59%] Built target ethash-cl
[ 61%] Linking CXX static library libethash-cuda.a
[ 65%] Built target ethash-cuda
[ 71%] Built target ethstratum
[ 73%] Linking CXX shared library libethcore.so
[ 95%] Built target ethcore
[ 97%] Linking CXX executable ethminer
../libstratum/libethstratum.so: error: undefined reference to 'Json::Value::get(std::string const&, Json::Value const&) const'
../libstratum/libethstratum.so: error: undefined reference to 'Json::Reader::getFormattedErrorMessages() const'
../libstratum/libethstratum.so: error: undefined reference to 'Json::Reader::parse(std::string const&, Json::Value&, bool)'
....

also can't build
gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)
after:
mkdir build
cd build
cmake -DBUNDLE=miner ..
make -j8
[ 17%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Common.cpp.o
[ 17%] Built target BuildInfo.h
/home/user/Projects/ethereum/cpp-ethereum/libethash/sha3_cryptopp.cpp:25:29: fatal error: cryptopp/keccak.h: No such file or directory
#include <cryptopp/keccak.h>
^
compilation terminated.
libethash/CMakeFiles/ethash.dir/build.make:134: recipe for target 'libethash/CMakeFiles/ethash.dir/sha3_cryptopp.cpp.o' failed
make[2]: *** [libethash/CMakeFiles/ethash.dir/sha3_cryptopp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 19%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 21%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonIO.cpp.o
[ 23%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonJS.cpp.o
CMakeFiles/Makefile2:177: recipe for target 'libethash/CMakeFiles/ethash.dir/all' failed
make[1]: *** [libethash/CMakeFiles/ethash.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 26%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FileSystem.cpp.o
[ 28%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 30%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Guards.cpp.o
/home/ivan/Projects/ethereum/cpp-ethereum/libstratum/EthStratumClient.cpp: In member function ‘void EthStratumClient::processReponse(Json::Value&)’:
/home/ivan/Projects/ethereum/cpp-ethereum/libstratum/EthStratumClient.cpp:398:12: warning: variable ‘headerHash’ set but not used [-Wunused-but-set-variable]
h256 headerHash = h256(sHeaderHash);
^~~~~~~~~~
/home/ivan/Projects/ethereum/cpp-ethereum/libstratum/EthStratumClientV2.cpp: In member function ‘void EthStratumClientV2::processReponse(Json::Value&)’:
/home/ivan/Projects/ethereum/cpp-ethereum/libstratum/EthStratumClientV2.cpp:350:12: warning: variable ‘headerHash’ set but not used [-Wunused-but-set-variable]
h256 headerHash = h256(sHeaderHash);
^~~~~~~~~~
[ 32%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Hash.cpp.o
[ 34%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 36%] Building CXX object libdevcore/CMakeFiles/devcore.dir/MemoryDB.cpp.o
[ 39%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 41%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RangeMask.cpp.o
[ 43%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SHA3.cpp.o
[ 45%] Building CXX object libdevcore/CMakeFiles/devcore.dir/StructuredLogger.cpp.o
[ 47%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TransientDirectory.cpp.o
[ 50%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieCommon.cpp.o
[ 52%] Linking CXX shared library libethstratum.so
[ 52%] Built target ethstratum
[ 54%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieDB.cpp.o
[ 56%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieHash.cpp.o
[ 58%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 60%] Linking CXX shared library libdevcore.so
[ 60%] Built target devcore
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@Feedz I also had issue with sha3_cryptopp.cpp but solved it with dirty hack:
#include <cryptopp/sha3.h>
+
+#undef CRYPTOPP_VERSION
+#define CRYPTOPP_VERSION 563
+
#if (CRYPTOPP_VERSION >= 564)

Thanks, it works now

Also got ../libstratum/libethstratum.so: error: undefined reference to 'Json::Value::get(std::string const&, Json::Value const&) const' on Debian testing.

@ernestp
I'm looking forward to trying your trick later tonight.  Hopefully it fixes my issue. Thank you

The "dirty hack" @ernestp suggested makes ethminer compile and it seems to be working, but it will never find or submit solutions. No warning is given whatsoever. I.e. don't use the hack!
The reason/problem for this is described in #111. Due to a change in Cryptopp in 5.6.4 ethminer must use the function defined in keccak.h. Since the debian package "forgot" to include this header one has to either copy it from the cryptopp source or update the deb as described in #111.

I never tried the dirty trick.
After messing with NVidia's setting and running ethminer -G --opencl-platform 1 I was able to mine.  However........
this is the current problem I am dealling with  ℹ  12:22:45|openclminer0  set work; seed: #3868abc5, target:  #000000000000


Should failed Elements lookups return some default value?

Right now, nothing gets returned to the XML file if the Elements.isEmpty(); lookups are empty. Maybe we want to throw in some default elements, and log the failed element of each post so you can go back and manually update those. I think this is better than not being able to import the posts with missing required elements.

Closing via https://github.com/williamspiro/hubXml/pull/17


feat!: getcontractinstance instruction returns only a specified member

#9300  👈
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @dbanks12 and the rest of your teammates on  Graphite


"Class '\Concrete\Block\Sideblock\Controller' not found" when upgrading custom package

Hey there,
i'm currently working on a custom package with a theme and some blocks. and have some issues when i try to upgrade the package (e.g. for adding a new block).
first of all, here is my package controller.php
<?php

namespace Concrete\Package\xxx;
use Package;
use BlockType;
use SinglePage;
use PageTheme;
use BlockTypeSet;
use CollectionAttributeKey;
use Concrete\Core\Attribute\Type as AttributeType;

defined('C5_EXECUTE') or die(_("Access Denied."));

class Controller extends Package
{

	protected $pkgHandle = 'xxx';
	protected $appVersionRequired = '5.7.1';
	protected $pkgVersion = '<IP_ADDRESS>.0.5';

	public function getPackageDescription()
	{
		return t("xxxTheme & Components");
	}

	public function getPackageName()
	{
		return t("xxx");
	}

	public function install()
	{
		$pkg = parent::install();
		$blockSet = BlockTypeSet::add("xxx","xxx", $pkg);

		BlockType::installBlockTypeFromPackage('sideblock', $pkg);
		$blockSet->addBlockType(BlockType::getByHandle('sideblock'));

		BlockType::installBlockTypeFromPackage('contentblock', $pkg);
		$blockSet->addBlockType(BlockType::getByHandle('contentblock'));

		BlockType::installBlockTypeFromPackage('carsearch', $pkg);
		$blockSet->addBlockType(BlockType::getByHandle('carsearch'));

		PageTheme::add('xxx', $pkg);
	}

	public function upgrade() {
		parent::upgrade();
		$pkg = Package::getByHandle($pkgHandle);

		$blockSet = BlockTypeSet::getByHandle('xxx');
		if (!is_object($blockSet)) {
			$blockSet = BlockTypeSet::add("xxx","xxx", $pkg);
		}

		$sideblock = BlockType::getByHandle('sideblock');
		if (!is_object($bt)) {
			$sideblock = BlockType::installBlockTypeFromPackage('sideblock', $pkg);
			$blockSet->addBlockType(BlockType::getByHandle('sideblock'));
		}

		$contentblock = BlockType::getByHandle('contentblock');
		if (!is_object($bt)) {
			BlockType::installBlockTypeFromPackage('contentblock', $pkg);
			$blockSet->addBlockType(BlockType::getByHandle('contentblock'));
		}

		$contentblock = BlockType::getByHandle('carsearch');
		if (!is_object($bt)) {
			BlockType::installBlockTypeFromPackage('carsearch', $pkg);
			$blockSet->addBlockType(BlockType::getByHandle('carsearch'));
		}
	}
}
?>

the installation seems to work without issues but when i try to upgrade, i get the following error message: Class '\Concrete\Block\Sideblock\Controller' not found. am i doing something wrong in my upgrade? somewhere i found the snippet for the installation check, but i can't remember where. is there another way to check if a custom block is installed?
thanks
btw: i'm using <IP_ADDRESS>

checking the docs again i found where i got the snippet for the test from: http://www.concrete5.org/documentation/developers/5.7/packages/handling-package-upgrades/

damn... it seems my active php time is to long ago... i found my issue. $pkg = Package::getByHandle($pkgHandle); should be $pkg = Package::getByHandle($this->pkgHandle);


All my services have started normally, but I cannot log in to Microsoft.

I can access the login page normally, but I get an error below after clicking on login.
unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908.

me too

I am unable to click and I would like to ask how you configured to launch the web application front-end application

I am unable to click and I would like to ask how you configured to launch the web application front-end application

create a file named .env , with content below:
REACT_APP_BACKEND_URI=https://localhost:40443/
REACT_APP_AAD_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(your Azure client ID)
REACT_APP_AAD_AUTHORITY=https://login.microsoftonline.com/common

I change the "https://localhost:3000" into "http://localhost:300" in Microsoft Azure Application Registration. Solved


Save to one zarr

Fixes #338.
Tested on all combinations of [Retardance + Orientation, Phase, Retardance + Orientation + Phase] and [2D, 3D]. All of the resulting zarrs can be drag-and-drop opened in napari with the recorder reader.

Whoops I messed up the git history. Let me close this and try again.


Issues with TLS for GRPC Probe

Describe the bug
Hello Manu! I'm trying to use the GRPC probe type and had been running into problems and ultimately came up with a workaround, but I was hoping to revisit it and see if you had any ideas. I have a the following two gRPC health probes, one uses an external CLI I have loaded onto the container, and another uses the GRPC probe type within cloudprober. In the example below, "grpc probe v1" works, and "grpc probe v2" does not. It has been like this for quite some time now, and I've verified that they are hitting the same address by the log message.
Cloudprober Version
1.25.0
To Reproduce
Steps to reproduce the behavior:
    type: EXTERNAL
    name: "grpc probe v1"
    targets {
        k8s {
            endpoints: "server"
            namespace: "sample"
            portFilter: "service-discovery-ssl"
        }
    }

    interval: "30s"
    timeout: "5s"

    latency_unit: "s"
    latency_metric_name: "latency_dist"

    latency_distribution {
      explicit_buckets: "0.01,0.1,0.15,0.2,0.25,0.35,0.5,0.75,1.0,1.5,2.0,3.0,4.0,5.0,10.0,15.0,20.0"
    }

    external_probe {
      command: "grpc_health_probe -addr=@address@:@port@ -tls -tls-ca-cert=/shared/pki/root_ca.pem -tls-client-cert=/shared/pki/leaf_intermediate_chain.pem -tls-client-key=/shared/pki/private_key.pem -tls-server-name=global.identity"
    }
}

probe {
    type: GRPC
    name: "grpc probe v2"
    targets {
        k8s {
            endpoints: "server"
            namespace: "sample-app"
            portFilter: "service-discovery-ssl"
        }
    }
    interval: "10s"
    timeout: "5s"

    grpc_probe {
        method: HEALTH_CHECK
        tls_config {
          ca_cert_file: "/shared/pki/root_ca.pem",
          tls_cert_file: "/shared/pki/leaf_intermediate_chain.pem",
          tls_key_file: "/shared/pki/private_key.pem",
          server_name: "global.identity"
        }
        health_check_ignore_status: false
    }

    latency_unit: "s"
    latency_metric_name: "latency_dist"

    latency_distribution {
      explicit_buckets: "0.01,0.1,0.15,0.2,0.25,0.35,0.5,0.75,1.0,1.5,2.0,3.0,4.0,5.0,10.0,15.0,20.0"
    }
}
sysvars_interval_msec: 60000

surfacer {
    type: PROMETHEUS

    prometheus_surfacer {
      metrics_prefix: "cloudprober_"
    }
}```

**Additional context**
I've tried variations of `disable_cert_validation` and `health_check_ignore_status` with different values, and every time I still get  the following error back from "grpc probe v2" every time:
`request failed: rpc error: code = DeadlineExceeded desc = context deadline exceeded. ConnState: IDLE. Peer: unknown`

I'm unclear as to what I'm doing wrong. I'm still learning Golang, but I believe I've read it correctly. If nothing else more examples would be valuable.

Additionally, separate question, if we wanted to use the GRPC probe in a fashion to a grpcurl command requiring a protobuff file, where would that be passed in?
For example:
grpcurl -d '{"transfer_id": "####-####-####"}' -protoset ./descriptor_set.pb -cacert /shared/pki/root_ca.pem -cert /shared/pki/leaf_intermediate_chain.pem -key /shared/pki/private_key.pem -servername global.identity ip.address:port service.v1.Service/GetTransferStatus

Regarding the first question, I think I know what's going on here. We use target name and port to connect to the host and in the case of k8s targets that's no good as most of the k8s targets have derived names (service_endpoint_Port for example):
https://github.com/cloudprober/cloudprober/blob/f1b578ead0f50ca2a3cab3196a5edaefa52a5db6/probes/grpc/grpc.go#L202
We had changed this behavior for HTTP probes some time back (Oct, 2022):
https://github.com/cloudprober/cloudprober/commit/03cda470703acec464edfa9171b7bc449298fb93
We should have changed it for gRPC probes as well. I'll submit a fix for this shortly.

Regarding 2nd question, generic gRPC request is not implemented yet. I started implementing it at one point but didn't finish it. I've filed a separate request for that for now: #308.

Created https://github.com/cloudprober/cloudprober/pull/309 for the 1st issue.

@manugarg Ah yes I tried it manually and that appears to be the case. Thanks for taking a look!

@zmailloux Zach, if you still care :smile:, generic gRPC request (grpcurl like) support has been added to Cloudprober in #470. Example probe config:
 probe {
   name: "grpc_generic"
   type: GRPC
   targets {
     # Hit another cloudprober instance running with grpc_port enabled.
     host_names: "localhost:9314"
   }

   grpc_probe {
     method: GENERIC
     request {
       call_service_method: "cloudprober.Cloudprober.ListProbes"
       body: "{}"
     }
   }

   validator {
      name: "match_probe"
      regex: "ping_google"
   }
 }

Full request config:
https://github.com/cloudprober/cloudprober/blob/715cbe907e3b2d31797ed623bcbce776d8985280/probes/grpc/proto/config.proto#L10
This will go out in the next release: v0.12.9 (targeting Aug 28).


Azure VM stuck in 'Creating'

Rancher versions:
rancher/rancher:master 5/14
Steps to Reproduce:
Through UI, create Azure cluster (with or without cloud provider)
Results:
In rancher UI, stuck on Creating virtual machine
In Azure portal, VM is stuck on 'Creating'

I am unable to reproduce. VMs are successfully running.


fix(curriculum): resolve missing word in caption text

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #52886

Hi @krao301. Congrats on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 📝


Planning: Functions

A function is a special kind of namespace encapsulating related named callable objects. If the arguments and usage of a function call are not ambiguous, the name of the callable object does not need to be specified. Function overloading is equivalent to having multiple named callable objects in the function's scope. There are no restrictions on function overloading as long as the callable objects have distinct names.
Functions can also be considered a map from an ordered list of types to one or more named callable objects. A C++ pseudo-representation might be map<vector<Type>, map<string, Callable>>
Functions can also be manually implemented so that the mapping of types to named callable objects is handled by interactive code, thus (for example) allowing for functionality similar to C++'s template type deduction from provided parameters.

Type deduction: a solution has been staring me in the face for months.
(function-name, deduced-typename-1, deduced-typename-2; deduced-typename-1 argument-1, deduced-typename-2 argument-2)

With optional ability to manually specify a deduced parameter when calling the function.


Fix compiling on windows

This makes it so windows compiles and runs.
I have the same issue here as I did on my branch, the second windows don't draw anything. The difference is that on my branch the second window showed up as black, while on this branch, the second window showed up white.

We may need to use API trace to work out what is going on.
There are 2 key things that need to happen:

Needs to draw the canvas stuff to each render target, these are basically frame buffers that are bound with glBindFramebuffer. Each window (or viewport) should be creating a rendertarget I think. A shedload get created when starting up the editor.
The blit has to work correctly. The blit happens in the rasterizer. It binds the system FBO (0) which should be the screen, and blits each render target from its texture to the system FBO. However this is part of the rasterizer, and it should be the same as on linux (well I'm hoping, but there could be a difference needed in this...).

During draw_viewports it should be calling gl_window_make_current, which was a function I put into the display_server especially for gl. We may eventually be able to use one of the existing dispay_server functions used by vulkan, but I didn't want to break vulkan...
This was necessary on linux to make the context current on the correct window. It may end up not being necessary on windows if the different windows can share an HDC, but with multi monitor support it may end up still being needed (if different monitors require a different hdc, no idea how this works).


L3GD20

gyroscope
depends on #7

Done. There is now a minimal high level API that you can use to read the sensor.


Update entropy of master_password fingerprint.

Updated to log_2(len(dict_file)^5) ≈ 84.

wow self merging

how bad

Wow merging into master.

Much bad


Skip log streams tests (temporarily)

🔧 Changes
Our dedicated testing tenants are currently experiencing an issue with creating log streams. It is causing our builds to fail at the integration testing phase. This issue is apparently being addressed now but until fixed, we'll need to skip the log streams tests.
Also, proposed in this PR are simple checks to the log streams creation scripts that will exit code 1 if the creation was unsuccessful.
🔬 Testing
Log streams commander tests pass.
📝 Checklist

[x] All new/changed/fixed functionality is covered by tests (or N/A)
[x] I have added documentation for all new/changed functionality (or N/A)

Codecov Report
Patch coverage: 52.63% and project coverage change: -1.80 :warning:

Comparison is base (d96b235) 66.36% compared to head (1a90a34) 64.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #721      +/-   ##
==========================================
- Coverage   66.36%   64.56%   -1.80%
==========================================
  Files          87       87
  Lines       11228    11239      +11
==========================================
- Hits         7451     7257     -194
- Misses       3265     3522     +257
+ Partials      512      460      -52

Impacted Files
Coverage Δ

internal/cli/users.go
69.01% <43.75%> (-0.13%)
:arrow_down:

internal/cli/apis.go
77.19% <100.00%> (+4.27%)
:arrow_up:

internal/cli/log_streams.go
61.88% <100.00%> (-6.28%)
:arrow_down:

internal/cli/roles.go
80.32% <100.00%> (+6.42%)
:arrow_up:

... and 9 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Fixed build LaunchdManager

Fixed dependency for LaunchdManager.
Resolved issue https://github.com/avito-tech/Calcifer/issues/1

Thx for PR!


Fix order for converting mach absolute time

The numer and denum [1] on regular mac are both 1 and numer and denum on
arm64 are 125 and 3. monotonic.py seem to have the order backwards
for converting mach absolute time to nanoseconds according to [2].
[1] https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/mach_time.h.auto.html
[2] https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code

Many thanks!

Many thanks!


Seems to be broken on py3.5

> py.test tests/
============================================================================ test session starts ============================================================================
platform linux -- Python 3.5.0, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: /home/magniff/workspace/jinja, inifile: setup.cfg
collected 323 items

tests/test_api.py ................Aborted (core dumped)

Python --version == Python 3.5.0, ubuntu 15 (python from repo)

Python 3.5.1 is the latest version; does it also coredump with that?
Anyway, if python crashes it's more likely a broken installation or a bug in Python than a Flask issue.

Hmm, in Python 3.6.0a0 from semiofficial mirror on github it seems to be working.


Text editing shift + tap + drag interaction

After https://github.com/flutter/flutter/pull/93835 added support for shift + tap to expand text selection in an input, this PR will add support for shift + tap and then dragging to move the extent.
Fixes https://github.com/flutter/flutter/issues/91979
Mac has some non-trivial behavior that made this PR more complex than I thought it would be.  When the selection is inverted, it restores the original selection from the time of tapdown.  See this video, which shows this PR duplicating Mac's behavior.
https://user-images.githubusercontent.com/389558/146077181-0150ada3-16f6-47a0-964b-d0a9ae668a47.mov

Another behavior we might be interested in testing is shift-tapping a text field when it is not focused. On macOS this is equivalent to having the base offset as 0 (i.e. selecting the range from 0 to the mouse position).

Another behavior is shift-tapping multiple times, instead of dragging.

On Windows it is simple: the base offset is never changed.
On macOS it has a complicated behavior: if the tapped position is closer to the start of the range, then the start is changed; otherwise the end is changed. Tapping at the exact mid-point changes the start.

@dkwingsmt Thanks for thinking about all of these other behaviors.  There are so many edge cases when it comes to stuff like this.

Shift + tap unfocused: The current behavior of Flutter seems to be the same as Windows.  I've opened a separate issue for getting this right on Mac and will open a new PR soon: https://github.com/flutter/flutter/issues/97534
Shift tapping multiple times: I think we've got this working correctly, but tell me if you can break it.  The complicated Mac logic is here.

I'll go ahead and merge this PR when/if it goes green.

Here's the PR for shift-tapping on an unfocused field: https://github.com/flutter/flutter/pull/97543


Move perceptron metaexample to binary (not NN)

Uf.. I've staged the data folder by mistake

Please don't open multiple PRs. You don't need to close them but can easily update them. As said in the developer readme

sorry, You're right! I'll do it next time :/


feat: add metrics instrumentation for status updater

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #2131, close #2130

/retest


Fix state between transactions is not being maintained for the trace

Signed-off-by: Karim TAAM<EMAIL_ADDRESS>

PR description
Fix state between transactions is not being maintained for the trace.  If the first transaction touches storage the second transaction should be impacted by those changes.
Test performed

Checked this particular test case on Goerli

{
  "method":"debug_standardTraceBlockToFile",
  "params":[
    "0xe72248c356f189254a8bd34ff65c9f0bf12d2ae1ab95d0f41869651b436d845e",
    {
      "disableMemory": true
    }
  ],
  "id":1,
  "jsonrpc":"2.0"
}

Checked that other tracing endpoint are not impacted like trace_replayBlockTransactions (1175 blocks)

Todo check debug_traceBlockByHash and debug_storageRangeAt

Changelog

[x] I thought about the changelog and included a changelog update if required.

Looks good, but there are some tests that will need to be fixed for compile.
How will band blocks be handled?  I see you took out some code that would look in the bad blocks cache.  Is it redundant?

Looks good, but there are some tests that will need to be fixed for compile.
How will band blocks be handled? I see you took out some code that would look in the bad blocks cache. Is it redundant?

Good catch. While I deleted the modifications related to the updater I also deleted the part related to the badbLock 🤦♂
To be sure there is no regression. I tested all the APIs with a local Clique Network to make sure everything works (debug_standardTraceBadBlockToFile , debug_standardTraceBlockToFile and debug_getBadBlocks) and I also tried your usecase on Goerli and the tracing API


Quantity display randomly

Hello,
PrestaShop version: <IP_ADDRESS> multishop
Apache | PHP version: 7.2.11
Cache: No
After install, I set the module to display 4 products.
Products are display, but randomely, only one product is display, sometimes 2, rarely 4.
Even if I refresh the page, the quantity of display products will be different.
I know the module display randomely, but  the fact is the module doesn't display the quantity which it's set on the module.

Hi @BenTen,
The ps_categoryproducts adds a block on the product page that displays products from the same category. If you only two products that are selected to the category C1, one product is displayed.
In the other case, I did not manage to reproduce your issue.
I attached a video record.
https://drive.google.com/file/d/1oguKQLf-pHEzgKfGQWLJI4bvUYTvUMPn/view
Thanks to check & feedback.

It's strange, I've a lot of product (in stock) in the category, but only 0, 1, 2 or 3 products are displayed.
Maybe an other module brake this one...

Hi @BenTen,
Thanks for your feedback.
Feel free to open a new one when needed.
Thanks!


Add job to build and push image for openshift-powervs/cluster-api-pro…

…vider-powervs

/cc @Rajalakshmi-Girish

/retest

@Rajalakshmi-Girish addressed the comment, ptal latest code


Add command to send a "command message"

Currently we use the following command to publish a command message for a device:
http POST $COMMAND_ENDPOINT_URL/command?application=app_id\&device=device_id\&command=set-temp temp:=25" \"Authorization:Bearer \$TOKEN\"

However, this includes the access token, and it would be easier if the drg tool would have out of the box support for this. Something like:
drg send-command <appid> <deviceid> <command> <payload>

With the option to consume payload from stdin:
echo "foo bar" | drg send-command <appid> <deviceid> <command>

Note: syntax of the command is just an example

I would like to work on this one.
Please confirm that we have to add comman_url to the endpoints list so that we fetch them at the time of login and save them in the config of drg.

I like this idea. It would obviate drogue-cloud's ./scripts/publish.sh, which I use a lot.
I would only suggest a different, more concise subcommand name, e.g. emit, send, publish, etc.


Dashboard without localized Fields

Hi Tolis,
after Updating form 20.2.602 to 20.2.701 in Dashboards the localized Fieldnames are not shown. The miracle is that some are shown and other not.
In the Screenshot:
the red are not shown
the blue are shown

Also I use the "Data View Service".
So in 20.2.602 the refrenced and/or not used attriutes are not shown. See the same Screenshot from 20.2.602 here as above in 20.2.701.

I do not recall anything related this is build-in xaf functionality and we have no custom code to it. Can you sample me?

OK. I asked this at Devexpress.

Devexpress got the Error


Avoid rescheduling HostDBContinuation to the ET_DNS thread.

With TS-196 (commit a5345da8), the HostDBContinuation is no longer
reschedule to the ET_DNS. However, the changes only applied to the
HostDBProcessor::getbyname_imm interface.
And the NCA feature was removed by TS-455 (commit 112b03aa), so it is
safe to bring the changes to all the interfaces of HostDBProcessor.

Cherry picked to 8.1.0


Multi member teams

Duplicate commits. Sweetalert commit is here as well.

It's showing only when commit here though 🤔

Made the UI buttons on the event details page functional.
Note that the join team button will appear only when the event has teamSize > 1.


Invaid metrics Json

Hi,
When I use the spring cloud dataflow metrics collector (2.0.0 version) I get this error: Invalid metrics Json.
I use The 1.5.0 version of scdf (spring cloud dataflow) with the 2.11-<IP_ADDRESS> kafka version.
I have deployed a simple stream (time | log) and I have activated the metrics during deployment. I have checked the messages in the metrics topic and it seemed correct.
However I in scdf metrics collector I got the error mentioned above. Apparently the metrics collector can't parse the messages.
I have followed the instructions from scdf documentation.
Could it be a compatibility problem?
A screen of the error:

Thanks for your help.

Hi, @LearningCitizen. It'd be good if you can attach the entire logs as file as opposed to a screenshot. Also, what version of Stream Apps (time  and log) are you using?

Sorry for that.
I have imported time and log from with the properties in bulk import:

time version : time-source-kafka-10:1.3.1.RELEASE
log version : log-sink-kafka-10:1.3.1.RELEASE

I ave deployed it like that : stream deploy --name s1 --properties "deployer..count=2,app..spring.cloud.stream.bindings.applicationMetrics.destination=metrics"
I have attached the metrics collector log into a file.
metricsLog.txt

Thanks for the update. We will have a look.

Hi @LearningCitizen, thanks for your feedback. From the attached log file it seems like you are using metrics collector 2.0.0.M1 instead of the 2.0.0.RELEASE.
Could you please try with the latest Metrics Collector release?  https://github.com/spring-cloud/spring-cloud-dataflow-metrics-collector/tree/v2.0.0.RELEASE

Hi @tzolov ,
Thank you for your remark.
I've tried with the 2.0.0.RELEASE version and I've got the same result.
Here is the log file.
metricsCollectorLog-2.0.0.RELEASE.txt

Hi @LearningCitizen,
I believe i found the cause of this behavior.  Could you please add this property to your MetricCollector startup arguments:
--spring.cloud.stream.bindings.input.consumer.headerMode=embeddedHeaders
This is required only if Kafka binder is used.
Practically to enable interoperability between Spring Cloud Stream (SCSt) application at version 1.3.x  (like the time and log you are using) with SCSt apps at version 2.x (like MetricsCollector internally) you have to explicitly set the spring.cloud.stream.bindings.input.consumer.headerMode=embeddedHeaders property for the SCSt 2.x consumer applications.
Also If the SCSt 2.x application produces data that is consumed by SCSt 1.3.x apps you will need to set also --spring.cloud.stream.bindings.output.producer.headerMode=embeddedHeaders.
The same rules will apply for if you mix SCSt 1.3 apps with the apps from the new coming Darwin release (they all are 2.x based)
@sabbyanandan  I believe we need to document this better both in the Metrics Collector as well as in the Darwin docs

Hi @tzolov,
I have tried what you suggested me and it worked.
Thank you very much !

@LearningCitizen: Thank you for the confirmation. We will use this issue to clarify the reasoning in the collector docs. Do let us know if you have any other feedback.


Fix Peer-to-Peer Payment flows

Create Receiver (remote Incoming Payment) postman request fails with.
{
    "data": {
        "createReceiver": {
            "code": "500",
            "message": "invalid remote incoming payment request",
            "receiver": null,
            "success": false
        }
    }
}

Subsequent requests have not been tested. Peer-to-Peer Cross Currency should also work.

Closed in #2121.


Fix ARGS parsing for run commands

Currently we are not adding the ARGS passed in via Dockerfile
or --build-args into the running container as environment variables.
Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

Fixes https://github.com/projectatomic/buildah/issues/813

I don't think so, args is not configuration for the container image, it is more about passing args around in a Dockerfile.

@giuseppe @umohnani8 @nalind PTAL

LGTM

@rh-atomic-bot r=umohnani8


react-native 0.16 compatible ?

Hi,
I'm trying to use your project with my react-native 0.16 project but I have the following error in Chrome console :
Unhandled rejection Error: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
    at convertError (http://localhost:8081/index.android.bundle?platform=android&dev=true:56761:11)
    at tryCatcher (http://localhost:8081/index.android.bundle?platform=android&dev=true:61503:15)
    at Promise._settlePromiseFromHandler (http://localhost:8081/index.android.bundle?platform=android&dev=true:59609:21)
    at Promise._settlePromiseAt (http://localhost:8081/index.android.bundle?platform=android&dev=true:59683:6)
    at Promise._settlePromises (http://localhost:8081/index.android.bundle?platform=android&dev=true:59799:6)
    at Async._drainQueue (http://localhost:8081/index.android.bundle?platform=android&dev=true:57089:4)
    at Async._drainQueues (http://localhost:8081/index.android.bundle?platform=android&dev=true:57099:6)
    at Async.drainQueues (http://localhost:8081/index.android.bundle?platform=android&dev=true:56981:6)
    at JSTimersExecution.callbacks.(anonymous function) (http://localhost:8081/index.android.bundle?platform=android&dev=true:3845:13)
    at Object.JSTimersExecution.callTimer (http://localhost:8081/index.android.bundle?platform=android&dev=true:3378:1)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true:3434:19
    at Array.forEach (native)
    at Object.JSTimersExecution.callImmediatesPass (http://localhost:8081/index.android.bundle?platform=android&dev=true:3433:16)
    at Object.JSTimersExecution.callImmediates (http://localhost:8081/index.android.bundle?platform=android&dev=true:3449:25)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true:2788:43
    at guard (http://localhost:8081/index.android.bundle?platform=android&dev=true:2712:1)

@guizmaii I will happily look into this problem for you, if you could just let me know which method you are calling and the parameters being passed. Because of the asynchronous nature of JS, it is very difficult to determine this just from the stack trace. Thanks

Closing this due to inactivity.


 It can take 30 minutes to an hour just to find the offending code. If the crash is rare, it could be much much longer. Corrupt backtraces cost countless hours of combined developer time. A fix to solve them is a huge win to make ESP-IDF easier to develop for.
This solution is only 240 lines of code, can be enabled with KConfig, and uses -finstrument-functions GCC flag to create a backup copy of the stack return addresses. This mirrored stack is stored on the heap (or global memory), so it is much much less likely to get corrupted due to stack corruption. We pretty much will always have a real stack trace now.
Implementation notes:

the mirrored stack is only printed if the main stack is corrupted
the required memory is only a hundred bytes or so per task. we only store return addresses, not a full stack.
the perf overhead seems reasonable (about 2x slowdown)
a handful of functions need to be annotated as "no_instrument_function" to prevent infinite recursion

Note:  This PR was created on the v4.4 branch because v5.0 seems to be broken right now? I could not get the PR to compile. ld segfaulted.
Future: Would be great to use this for coredumps as well
Example output:
I (2802) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (2804) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (2804) pd main: app_main() called
This is foo()
This is bar()
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40055601  PS      : 0x00060130  A0      : 0x8200f9a8  A1      : 0x3fcf59a0
A2      : 0x3fcf5a1b  A3      : 0x00000000  A4      : 0x000000ff  A5      : 0x0000ff00
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3fcf5950
A10     : 0x3fcf5a1b  A11     : 0x3de00ae4  A12     : 0xb7c4db23  A13     : 0x3fcf5bc8
A14     : 0x3de00ae4  A15     : 0x00000001  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x40055601  LEND    : 0x4005560e  LCOUNT  : 0xffffffff

Backtrace: 0x400555fe:0x3fcf59a0 |<-CORRUPTED

Backtrace (Mirror): 0x403777bc 0x4200f96c 0x4200fa00
0x403777bc: xt_unhandled_exception at /Volumes/User/MBP-Google-Drive/jamcorder/firmware/esp-idf/components/esp_system/port/panic_handler.c:217

0x4200f96c: bar(char*) at /Volumes/User/MBP-Google-Drive/jamcorder/firmware/jamcorder-firmware/jamcorder_app/main/pd_main.cpp:802

0x4200fa00: foo(char*) at /Volumes/User/MBP-Google-Drive/jamcorder/firmware/jamcorder-firmware/jamcorder_app/main/pd_main.cpp:809

Example Code:
void bar(char* b){
    printf("This is bar()\n");
    char* n = (char*) calloc(1,1);
    sprintf(b, "%s", (char*) n[0]);
}
void foo(char* b){
    printf("This is foo()\n");
    bar(b);
}

void app_main()
{
    ESP_LOGI(TAG, "app_main() called");
    char b[1];
    foo(b);
}

@igrr , @ESP-Marius  hope we can get this into v4.4, v5.1, etc

@chipweinberger I agree that having a way to provide backtraces when the stack is corrupted sounds useful!
Some comments from me so far while we evaluate this:

We are hoping to move closer to upstream Freertos, see amazon-smp-freertos and for that reason we are reluctant to do future changes to the kernel files. But from what I can see this feature should be able to be implemented using the thread local storage pointer as well?
I wonder if there are potential cases where calling this instrument would cause issues? ISRs,  "low level system code" such as right before entering sleep etc. We will have to take a careful look at these edge cases.
Backtrace where ROM functions wont be correct, but I think that is an OK limitation. A partial backtrace is still better than nothing!

In general we dont backport any features, so we won't be able to include this in 4.4. If we end up merging this it will be for the current master release (and any future releases of course)

Thanks for your comments.
I originally implemented this with TLS, but it's very annoying.

user needs to not use that slot
we need to malloc in the __cyg function, which means all malloc related calls need to be infinite recursion safe
all TLS calls need to be made infinite recursion safe
all lock related calls need to be infinite recursion safe (TLS uses a lock)
we'll need to consider what happens if you access this mirror stack from another thread

In the end we need to weigh the complexity of both approaches. IMO, my approach is the clear winner. The FreeRTOS changes are minimal, and simple!

Your points about TLS are valid, I see how just reserving it directly in the tcb is much more convenient.
The major blocker is still the TCB modification, the rest of the changes I'm OK with. We'll still have to do a review + add tests of course, but lets resolve the actual blocker first.
@Dazza0 is responsible for our FreeRTOS port, so i'll leave the final decision to him. (Currently out of office, so the reply might take a while, sorry!) If we do foresee that we will need to modify the TCB for other Espressif purposes anyways then maybe having custom port struct in the TCB is something Amazon could be willing to accept in the upstream port as well.
Thanks again for all your contributions and bug reports @chipweinberger, we do appreciate them, even though we do move a bit slowly some times :smile:

@ESP-Marius @Dazza0 curious your latest thoughts

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

@Dazza0 Appreciate the review.

rebase this for the next release (either v5.1 or v5.2). I'm not sure whether we can merge this directly into the v4.4 branch as it's in its service period already.

Yes. I used 4.4.4 only because I was hitting some unrelated issue on master branch. It should be rather trivial to rebase.

Would it be easier if we handled this feature addition for you

Yes, that would be great and easier.

This should save much more than 30 minutes to check some failures, good approach!!!! thanks!

One issue that still needs to be fixed, it uses waayyyy more ram than I expected:
CONFIG_COMPILER_STACK_MIRROR_DEPTH=12
I (10396) pd main: Internal RAM: 18267 bytes free

CONFIG_COMPILER_STACK_MIRROR= n
I (8812) pd main: Internal RAM: 153315 bytes free

135KB!!! For 22 tasks. You would expect about 22 * (12*4) = 1056 bytes. But for some reason we are using more than 100 times that!!!

@Dazza0 , the circular buffer feature you proposed would actually be very handy.
I'm hitting some issues right now that I think are threading related. A circular buffer of the past X calls would make this very clear.
Something like this:
struct record_t {
      uint32_t threadId
      void* func
}

record_t circularBuffer[256]

@igrr , can you think of a way to minimize the internal ram use by this feature? See this comment: https://github.com/espressif/esp-idf/pull/10984#issuecomment-1565123115
I've tried setting __attribute__((noinline)) on __cyg_profile_func_enter and __cyg_profile_func_exit, but it did not make a difference.
Why do you think internal ram use is so significant?

Looking at the generated assembly, small functions grow about 2x the size.
A lot of code is for setting up the args to void __cyg_profile_func_enter(void *func, void *callsite). This is pretty ridiculous IMO. We could've just gotten the stack ourself, without wasting the space setting up arguments.
Perhaps we could add a new feature to GCC, similar to __cyg_profile_func_enter, but with a void func(void) signature. Or perhaps even just invoke an interrupt at the beginning and end of each function,  that could be done in 1-2 instructions.
With Stack Mirror Enabled:
4211f3b0 <ff_disk_initialize>:
4211f3b0:	006136        	entry	a1, 48
4211f3b3:	c5f881        	l32r	a8, 42110b94 <_ZL11printStringPKcPch+0xd7c> (4211f3b0 <ff_disk_initialize>)
4211f3b6:	c2d531        	l32r	a3, 4210ff0c <_ZL11printStringPKcPch+0xf4> (3fcc1cf4 <__stack_chk_guard>)
4211f3b9:	11b0e0        	slli	a11, a0, 2
4211f3bc:	158e80        	extui	a8, a8, 30, 2
4211f3bf:	0020c0        	memw
4211f3c2:	0398      	l32i.n	a9, a3, 0
4211f3c4:	018820        	slli	a8, a8, 30
4211f3c7:	c5f3a1        	l32r	a10, 42110b94 <_ZL11printStringPKcPch+0xd7c> (4211f3b0 <ff_disk_initialize>)
4211f3ca:	41b2b0        	srli	a11, a11, 2
4211f3cd:	20bb80        	or	a11, a11, a8
4211f3d0:	0020c0        	memw
4211f3d3:	036192        	s32i	a9, a1, 12
4211f3d6:	c2da81        	l32r	a8, 4210ff40 <_ZL11printStringPKcPch+0x128> (40377c50 <__cyg_profile_func_enter>)
4211f3d9:	0008e0        	callx8	a8
4211f3dc:	c5ec81        	l32r	a8, 42110b8c <_ZL11printStringPKcPch+0xd74> (3fcc500c <s_impls>)
4211f3df:	74a020        	extui	a10, a2, 0, 8
4211f3e2:	a08a80        	addx4	a8, a10, a8
4211f3e5:	0828      	l32i.n	a2, a8, 0
4211f3e7:	0228      	l32i.n	a2, a2, 0
4211f3e9:	0002e0        	callx8	a2
4211f3ec:	c5ea81        	l32r	a8, 42110b94 <_ZL11printStringPKcPch+0xd7c> (4211f3b0 <ff_disk_initialize>)
4211f3ef:	11b0e0        	slli	a11, a0, 2
4211f3f2:	158e80        	extui	a8, a8, 30, 2
4211f3f5:	018820        	slli	a8, a8, 30
4211f3f8:	0a2d      	mov.n	a2, a10
4211f3fa:	41b2b0        	srli	a11, a11, 2
4211f3fd:	c5e5a1        	l32r	a10, 42110b94 <_ZL11printStringPKcPch+0xd7c> (4211f3b0 <ff_disk_initialize>)
4211f400:	20bb80        	or	a11, a11, a8
4211f403:	c2d381        	l32r	a8, 4210ff50 <_ZL11printStringPKcPch+0x138> (40377c10 <__cyg_profile_func_exit>)
4211f406:	0008e0        	callx8	a8
4211f409:	0020c0        	memw
4211f40c:	3188      	l32i.n	a8, a1, 12
4211f40e:	0020c0        	memw
4211f411:	0338      	l32i.n	a3, a3, 0
4211f413:	051837        	beq	a8, a3, 4211f41c <ff_disk_initialize+0x6c>
4211f416:	c2d381        	l32r	a8, 4210ff64 <_ZL11printStringPKcPch+0x14c> (40377bac <__stack_chk_fail>)
4211f419:	0008e0        	callx8	a8
4211f41c:	f01d      	retw.n

Stack Mirror Disabled:
42076950 <ff_disk_initialize>:
42076950:	006136        	entry	a1, 48
42076953:	393881        	l32r	a8, 42044e34 <_Z12replace_charPccc+0x3ba4> (3fcaa9a8 <s_impls>)
42076956:	74a020        	extui	a10, a2, 0, 8
42076959:	a08a80        	addx4	a8, a10, a8
4207695c:	376e31        	l32r	a3, 42044714 <_Z12replace_charPccc+0x3484> (3fca780c <__stack_chk_guard>)
4207695f:	0888      	l32i.n	a8, a8, 0
42076961:	0020c0        	memw
42076964:	0398      	l32i.n	a9, a3, 0
42076966:	0888      	l32i.n	a8, a8, 0
42076968:	0020c0        	memw
4207696b:	036192        	s32i	a9, a1, 12
4207696e:	0008e0        	callx8	a8
42076971:	0020c0        	memw
42076974:	3188      	l32i.n	a8, a1, 12
42076976:	0020c0        	memw
42076979:	0338      	l32i.n	a3, a3, 0
4207697b:	051837        	beq	a8, a3, 42076984 <ff_disk_initialize+0x34>
4207697e:	376481        	l32r	a8, 42044710 <_Z12replace_charPccc+0x3480> (403759a0 <__stack_chk_fail>)
42076981:	0008e0        	callx8	a8
42076984:	0a2d      	mov.n	a2, a10
42076986:	f01d      	retw.n

IRAM improvement:

we can reduce the IRAM usage by using -pg instead of -f-instrument-functions. "For such space-constrained environments I'd suggest using '-pg' instead. It emits just one call to the _mcount function on entry without overhead. If you need to hook the exit, you can replace the return address in your implementation of _mcount (this function usually has a non-standard ABI, so it's always necessary to implement it in assembly)." See: https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_node/gprof_25.html

@Dazza0, just want to make sure you see the above comment before doing any work on this! We can reduce IRAM usage a lot, I think.

@Dazza0 are you still interested in this feature? When do you expect to have free time?

@igrr @ESP-Marius @Dazza0 bump. Hoping to catch you guys when you have a free moment.
I am busy on other things for awhile, but using-pg instead of -finstrument-functions should be explored.

bump again =)


Minify css/js

See https://developers.google.com/speed/pagespeed/insights/?url=hackupc.com&tab=mobile

+1


Feature: linkage fixtures to track changes

This is an interesting idea proposed by @ashleygwilliams.
We track linkage data in metadata stored after the build, which does give a historical timeline of linkage changes over time. What if we stored and used linkage data as a kind of snapshot like the insta snapshots we use for our own tests? CI builds could then flag if linkage has changed from the snapshots, providing important information to devs. It could even be used to cause builds to fail if desired in order to avoid possibly broken binaries.

Some more discussion of potential ways to do this in #1249


Add a test for 2019's interaction between additional/unevaluatedItems

The interesting bit here actually only applies to 2019, as it's the only draft containing both unevaluatedItems as well as additionalItems -- the latter in its specified behavior containing:
if "items" is absent or its annotation result is the
boolean true, "additionalItems" MUST be ignored.
(from https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-02#section-<IP_ADDRESS>)
In newer drafts (i.e. 2020), when additionalItems "became" items, this condition was dropped (i.e. items without a neighboring prefixItems now is indeed not ignored).
Refs: https://github.com/orgs/json-schema-org/discussions/57
Closes: #292

This Slack thread (re-)raised the missing test added here.
As mentioned in the thread, around half of all implementations supported by Bowtie get this wrong:
⊙  2>/dev/null bowtie validate -D 2019 $(find ~/Development/bowtie/implementations/ -mindepth 1 -maxdepth 1 -type d | sed 's/.*\/implementations\//-i /') <(printf '{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "additionalItems": {"type": "number"},
  "unevaluatedItems": {"type": "string"}
}
') <(printf '["foo", 1]') | rg implementation | jq '{implementation: .implementation, valid: .results[0].valid}'
{
  "implementation": null,
  "valid": null
}
{
  "implementation": "ghcr.io/bowtie-json-schema/ts-vscode-json-languageservice",
  "valid": false
}
{
  "implementation": "ghcr.io/bowtie-json-schema/python-jsonschema",
  "valid": true
}
{
  "implementation": "ghcr.io/bowtie-json-schema/go-jsonschema",
  "valid": false
}
{
  "implementation": "ghcr.io/bowtie-json-schema/python-jschon",
  "valid": false
}
{
  "implementation": "ghcr.io/bowtie-json-schema/dotnet-jsonschema-net",
  "valid": false
}
{
  "implementation": "ghcr.io/bowtie-json-schema/rust-jsonschema",
  "valid": true
}
{
  "implementation": "ghcr.io/bowtie-json-schema/js-ajv",
  "valid": null
}
{
  "implementation": "ghcr.io/bowtie-json-schema/js-hyperjump",
  "valid": true
}

Where the reasoning is likely easy to understand -- any implementation which implements unevaluatedItems by essentially doing a if additionalItems in instance: short_circuit() is forgetting that that needs to be if additionalItems in instance *and* items in instance: ... to comply with that ignore behavior.

Thanks!


lpr: "prettyprint" only works with text files, it does not work with PostScript files

Hi,
I'm using Mac OS X 10.12 and lpr: "prettyprint" only works with text files, it does not work with PostScript files
Can you help ?

The "prettyprint" option is only applicable to plain text files.


Add Websocket documentation

Adds documentation for Websocket support to Pool and Client methods.

Hi @dhanushreddy291, thanks for the PR! Sorry it took me some time to take a look at it.
Good idea to also document connecting using the Pool class.
From my testing the neonConfig.pipelineTLS and neonConfig.pipelineConnect options didn't affect connecting to the local proxy. So I would suggest leaving them out, or did I miss something there?
I just rearanged the order in the sample a bit to help distinguish which settings are needed for each connection mode, otherwise LGTM.

Sure Timo, I've verified that removing these dependencies doesn't affect the connection functionality. The changes are safe to merge.
Thanks for maintaining the repository, @TimoWilhelm


toy examples

Are there any toy examples/tutorials available? I would be interested in applying this approach to other datasets

Yes! I think this file is a toy example I used. There are some other files on that branch that might be useful too for toy problems. The example gif on this repo and in Figure 1 of the paper is learning the function x^3, which should be a similar setup to the linked script.

@jacobjinkelly Thanks!

Closing this for now, but feel free reopen this one or make a new issue if you have any other questions! :D


Dialog documentation is inconsistent

Reading through the documentation at https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-dialog-manage-conversation-flow?view=azure-bot-service-4.0&tabs=csharp, there are a few inconsistencies that need corrections.
Each of the issues I found are within the Using dialogs to guide the user through steps section.

Under the "Create a composite dialog" section, it indicates that the following snippets are taken from the Microsoft.Bot.Samples.Dialog.Prompts sample code in the botbuilder-dotnet repo. That's the correct repo, but there is no sample given that title in there, nor is the link pointing to the correct place (it yields a 404).

Starting at the example preceded by "In DialogContainerBot.cs, define a class for a profile dialog." it specifies the base string value as "fillProfile" and repeats it as the key for the control two lines later. In the next example, it refers to this profile instead by "getProfile" (again, twice in the example). One of these should be updated.

@WhitWaldo , this article has known issues and is in the process of being rewritten. I don't have a firm date yet, as we mid-process in preparing for the next update of the NuGet packages, which will contain a number of breaking changes.

@WhitWaldo , the article has been updated, and has been split in two:

Manage simple conversation flow with dialogs
Manage complex conversation flows with dialogs

Please reopen if this does not fully address the issue.


Does Leaflet have corresponding components that can convert the data parsed by dxf into geojson?

I plan to import cad files on the web and then use Leaflet to render an editable map. Is there any component of Leaflet that can convert dxf data into geojson?

Hi, great to hear that you find Leaflet useful!
However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.
If you are really sure that this is a bug in leaflet, or a feature request, please change the wording to make it look like a bug report.


How to use in non-android apps?

It's downloading a PersistentCookieJar-v1.0.1.aar file. Where is the jar file?
Have you uploaded?

The implement is based on SharedPreferences, which is an Android class, so I think it can not be used in non-android apps.

Yeah, I found the same issue too in pure java.
The following code is supposed to work fine in java:
final ConcurrentHashMap<String, List<Cookie>> cookieStore = new ConcurrentHashMap<>();
        OkHttpClient client = new OkHttpClient.Builder()
                .cookieJar(new CookieJar() {
                    @Override
                    public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {
                        if (cookies != null) {
                            for (Cookie cookie : cookies) {
                                System.out.println("Save cookie: " + cookie.toString());
                            }
                        }
                        cookieStore.put(url.host(), cookies);
                    }

                    @Override
                    public List<Cookie> loadForRequest(HttpUrl url) {
                        List<Cookie> cookies = cookieStore.get(url.host());
                        if (cookies != null) {
                            for (Cookie cookie : cookies) {
                                System.out.println("Load cookie: " + cookie.toString());
                            }
                        }
                        return cookies != null? cookies : new ArrayList<Cookie>();
                    }
                })
                .build();

But as far as I see, the cookie is not handled in the right way.


Add default survival colors

Open to other color suggestions!

@arahuja

Coverage increased (+0.04%) to 57.923% when pulling<PHONE_NUMBER>b200c09b2aacbddab76398ab1179c1 on default_curve_colors into 0260e1318d1319b0774d5a29660ba7bb3a6e22e4 on master.

👍  No strong preferences on colors, I like that it is configurable.

Coverage decreased (-0.07%) to 57.818% when pulling 01826fc524f2350298bec07e0a62d4ed77fa809e on default_curve_colors into 0260e1318d1319b0774d5a29660ba7bb3a6e22e4 on master.


1970's date shown on chart

Description:
The datapoint inspector is able to show a date in the 1970's first time chart is loaded.
This was replicated on Opera Mac browser, and it shows very very briefly on the inspector, you can barely notice it from the video.

https://github.com/user-attachments/assets/fc2aa4ae-ed2f-4129-a886-16781dfc7b8f

Let's fix the compare view too

compare view should not hide the datapoint inspector

QA passed


Incorrect removal of Span property call

When a code has a Memory variable and call Span for passing as parameter, the call is removed
var encoder = TextEncoding.GetEncoder();
using var bufferOwner = MemoryPool<byte>.Shared.Rent();
var sharedBuffer = bufferOwner.Memory;

encoder.Convert(
    value.AsSpan(charsConverted),
    sharedBuffer.Span, // <-- generate as: sharedBuffer,
    false,
    out int charsUsed,
    out int bytesUsed,
    out _);

There are 2 options here:

var sharedBuffer = bufferOwner.Memory.Span
sharedBuffer.Span (As you suggested)

I'm leaning to 1. to eliminate memory from a sync method altogether
What are your thoughts?

I do prefer the first option too, because I think that it more performant when accessed in a loop. In fact, my original code is like that.


Matrix3 / 4 multiplier order

Correct me if I'm wrong or midunderstangind something, but I think the order of matrix multiplication of VectorMath library seems reversed.
    public static func *(lhs: Matrix3, rhs: Matrix3) -> Matrix3 {

        return Matrix3(
            lhs.m11 * rhs.m11 + lhs.m21 * rhs.m12 + lhs.m31 * rhs.m13,
            .....
    }

    public static func *(lhs: Matrix4, rhs: Matrix4) -> Matrix4 {

        var m = Matrix4.identity

        m.m11 = lhs.m11 * rhs.m11 + lhs.m21 * rhs.m12
        m.m11 += lhs.m31 * rhs.m13 + lhs.m41 * rhs.m14
       ....
    }

According to this, algorithm of two matrices is something like this:

where I believe VectorMath's * operator represents ABin this equation. (meaning you can write A * B in swift to do same calculation.) If so, the function's lhs and rhs is reversed and since Matrix multiplication is not commutative, it'll produce different results.
I did write a simple Matrix4 <-> CATransform3D conversion code and check something like this:
    let m1 = Matrix4( /* init with some values */)
    let m2 = Matrix4( /* init with some other values */)

    let con1 = CATransform3DConcat(CATransform3D(m1), CATransform3D(m2) )
    let con2 = m1 * m2
    XCTAssertTrue(Matrix4(con1) == con2)  // this should pass, but fails

    let con3 = m2 * m1
    XCTAssertFalse(Matrix4(con1) == con3)  // this should pass, but fails

Here's what CATransform3DConcats document says:

Concatenate 'b' to 'a' and return the result: t' = a * b.

I think it would be better to have reversed order for those methods.

Sorry, I think I misunderstood this. If you want to keep apply transform, order of function parameter is better, like those cases:
let m = Matrix4(rotation: ....)
let t = Matrix4(translation: ...)
let s = Matrix4(scale: ...)
let result = t * r * s

Just a bit confusing when you communicate with CATransform3D.

Yeah CATransform works the opposite way round to what you'd expect. I think that's because it's view-centric or something, so it transforms objects from the PoV of the camera rather than the layer's own coordinate space.


Large input seems to be ignored

I continue to investigate bash-language-server 🙂
Install it (although for me the current version on npm doesn't work, so maybe install the previous version npm install -g bash-language-server@1.3.1).
Open bash script, focus on e.g. find command and execute :lsp-hover.
What the language server will do in this case is it will return a huuuge amount of text, the output of man find | col -b. And this output somehow doesn't reach the kak-lsp, I see nothing in kakoune.
Whether it is right or wrong of the language server to produce so much output is a good question, but before I go deeper into investigating this, I just wanted to ask you - do you know if there is currently a limit in kak-lsp code that is ignoring large incoming messages?
I guess the expected result in this case would be a trimmed message, i.e. define a max length, receive whatever the language server is sending, cut the received message, add ellipsis and show in the info box.

At the moment kak-lsp doesn't pose any limits to message size, as well as doesn't do any trimming for better look. I just checked, message reaches Kakoune and lsp-show-hover is executed. I guess it's Kakoune's restriction on max info content length. We could figure it out and do trimming in lsp-show-hover itself (I'd prefer to do it here, and not in Rust code, because someone might want to override lsp-show-hover in his config and deal with full message in sensible way).

https://github.com/mawww/kakoune/issues/2257


make this safe for use with require

this makes it super easy to just require the entire folder like var dismoji = require('discord-emoji'); and then you can be like dismoji.food.pizza.

this is not the good one try #2


Initializer does not override a designated initializer from its superclass

I got this error message after update to xcode 6.3.1.
/Users/MNurdin/Documents/iOS/xxxxx/Pods/CVCalendar/CVCalendar/CVCalendarView.swift:112:14: Initializer does not override a designated initializer from its superclass

File CVCalendarView.swift, line number 112.

Discussed in #54.


Fix clients connected counter

Make clients connected counter more reliable. This will require rewrite of how clients are handled on the server.

Workbench part of client info (number of connected clients) implemented in this commit: https://github.com/evothings/evothings-studio/commit/7e8207647f9212dd849746712cf48729a5467075

Working implementation in this commit: https://github.com/evothings/evothings-server/commit/6777f2d3516a4eb1ebd40a080fb8590024c0e8c4


Fix alarms

Built on #3467, which should be merged first

make kick_poller() do something on POSIX
fix some conditions whereby alarms are held in a pollset exec context for too long
make channel_connectivity tests dependent on the correct behavior

Build on #3467

Ready for review (pending a good Jenkins outcome)


Improve documentation on using Liberty Maven plugin in CI/CD

Short documentation explaining how plugin can be used in CI/CD, with full pom.xml example showing configuration with and without parent POM.
To include parent POM add following:
   <parent>
        <groupId>io.openliberty.tools</groupId>
        <artifactId>liberty-maven-app-parent</artifactId>
        <version>3.3.4</version>
    </parent>

Currently, if you cannot use parent POM following plugin config is required (taken from the parent POM):
            <!-- Enable liberty-maven plugin -->
            <plugin>
                <groupId>io.openliberty.tools</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>3.3.4</version>
                <executions>
                    <execution>
                        <id>stop-before-clean</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>create-server</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>install-server</goal>
                            <goal>create</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install-feature</id>
                        <phase>prepare-package</phase>
                        <goals>
                          <goal>install-feature</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install-apps</id>
                        <phase>package</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package-server</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-start</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>test-start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-stop</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>test-stop</goal>
                        </goals>
                    </execution>
                    </executions>
            </plugin>

Documenting what you need to do today likely leads to the next question:  how to simplify?   That's the subject of issue: https://github.com/OpenLiberty/ci.maven/issues/739.


Include API version for generated reference() function calls on 'existing' resources

Contributing a Pull Request
If you haven't already, read the full contribution guide. The guide may have changed since the last time you read it, so please double-check.
Fixes #1465

Codecov Report

Merging #1466 (68cce30) into main (b95f220) will increase coverage by 0.42%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1466      +/-   ##
==========================================
+ Coverage   94.71%   95.13%   +0.42%
==========================================
  Files         352      348       -4
  Lines       18552    18408     -144
  Branches       14        0      -14
==========================================
- Hits        17571    17513      -58
+ Misses        981      895      -86

Flag
Coverage Δ

dotnet
95.13% <100.00%> (-0.08%)
:arrow_down:

typescript
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/Bicep.Core.IntegrationTests/ScopeTests.cs
100.00% <ø> (ø)

src/Bicep.Core.IntegrationTests/ScenarioTests.cs
100.00% <100.00%> (ø)

src/Bicep.Core/Emit/ExpressionConverter.cs
96.80% <100.00%> (+0.07%)
:arrow_up:

.../Bicep.Core.UnitTests/Assertions/BaselineHelper.cs
63.63% <0.00%> (-15.91%)
:arrow_down:

...cep.Core.UnitTests/FileSystem/FileResolverTests.cs
88.23% <0.00%> (-8.83%)
:arrow_down:

src/Bicep.Core/FileSystem/PathHelper.cs
96.15% <0.00%> (-3.85%)
:arrow_down:

src/Bicep.Core.UnitTests/Utils/OutputHelper.cs
96.55% <0.00%> (-3.45%)
:arrow_down:

src/Bicep.Core.UnitTests/Utils/CompilerFlags.cs
33.33% <0.00%> (ø)

...Bicep.Core.UnitTests/FileSystem/PathHelperTests.cs
100.00% <0.00%> (ø)

src/vscode-bicep/src/language/client.ts

... and 3 more


The complete code is Open Source -Binary Redistribution

Hi,
Is it possible to redistribute "SearchGuard" binaries with our product? if yes, Is there any limitation for that?. Also, I found that In maven, Binary license is mentioned as apache 2.0 license "https://mvnrepository.com/artifact/com.floragunn/search-guard-7/7.4.0-37.1.0-api"

Please ask this kind of question here: https://search-guard.com/contacts/


Array.some / Array.every

You've forgotten Array.every, and replaced Array.some with its definition.

Thanks for letting me know kind sir. I'll fix it right away 👍


Cleanup exception handler

Remove unused local variable
Consistent brace styling
Use app() function instead of importing global

The best thing to use for the application instance is the property set on the service provider by laravel. That's what it's there for.

@GrahamCampbell what would that look like from within BugsnagExceptionHandler? Do you see the potential for unexpected behavior to be introduced by the current use of app('bugsnag')?

hey @GrahamCampbell, just wanted to check in and see if you have any thoughts about potential unexpected consequences associated with this approach. Thanks!