v3.0.0 + TypeScript Cannot find module 'redux-actions' from ...

The new ESM version fails to be imported by TypeScript.
Here's a reproducible comparison:

v2.6.5<EMAIL_ADDRESS>v3.0.0<EMAIL_ADDRESS>
In the shell, run:
tsc index.ts

v2.6.5: compiles successfully
v3.0.0:

~/ReduxActionsV3BugReportTS$ tsc index.ts
index.ts:1:30 - error TS2307: Cannot find module 'redux-actions' or its corresponding type declarations.

1 import { createAction } from 'redux-actions';
                               ~~~~~~~~~~~~~~~

Found 1 error in index.ts:1

The applied typescript configuration still transpiles to node's require:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var redux_actions_1 = require("redux-actions");
var myAction = (0, redux_actions_1.createAction)('MY_ACTION');

This doesn't work with the ESM only build we currently have. @timche this could be a case why a commonJS export still might have relevance.

@kaelig With this configuration it should work: https://replit.com/@alexander-heimb/ReduxActionsV3BugReportTS
v3.0.0 provides the same API as v2.6.5, so for projects that might not be able to switch to ESM this should work as well. I will close this bug but if you that doesn't solve your issue feel free to reopen it.

Thank you! Simply adding the types did fix the build.
That said, for some reason our Jest + @swc/jest setup still throws the same error so I need to investigate further...
Any tips appreciated!

Hey @kaelig,
the jest error might be due to the configured jest runtime. Could you share the configuration? Btw. it just sprung to my mind that we worked for the same company (Salesforce) a while ago :D

Oh, what a fun coincidence!
Here's our jest.config.js configuration:
import hq from 'alias-hq';

const ESM_NODE_MODULES = {
  '@devcycle/devcycle-js-sdk/node_modules/uuid/*': ['uuid'],
  '@storybook/addon-docs/*': ['@mdx-js/react'],
  'markdown-table': undefined,
  'node-fetch': ['data-uri-to-buffer', 'fetch-blob', 'formdata-polyfill'],
  'parse-domain': ['ip-regex', 'is-ip'],
  'react-markdown': [
    'bail',
    'decode-named-character-reference',
    'hast-util-whitespace',
    'is-plain-obj',
    'mdast-util-from-markdown',
    'mdast-util-to-hast',
    'micromark',
    'remark-rehype',
    'trim-lines',
    'trough',
    'unified',
    'unist-util-generated',
  ],
  'strip-ansi': ['ansi-regex'],
};

const ignoreESMNodeModules = (delimiter = '|') => {
  return `<rootDir>/node_modules/(?!${Object.entries(ESM_NODE_MODULES)
    .map(([key, values = []]) => [key, ...values].join(delimiter))
    .join(delimiter)})`;
};

/** @type {import('jest').Config} */
// eslint-disable-next-line import/no-anonymous-default-export
export default {
  setupFiles: ['<rootDir>/test/setup.ts', 'jest-canvas-mock'],
  setupFilesAfterEnv: ['<rootDir>/test/setupAfterEnv.ts'],
  transform: {
    '^.+\\.(t|j)sx?$': [
      '@swc/jest',
      {
        jsc: {
          parser: {
            syntax: 'typescript',
            decorators: true,
          },
          transform: {
            react: {
              runtime: 'automatic',
            },
          },
          experimental: {
            plugins: [['jest_workaround', {}]],
          },
        },
      },
    ],
  },
  transformIgnorePatterns: [ignoreESMNodeModules()],
  automock: false,
  testMatch: [
    '<rootDir>/(src|functions)/**/*.spec.[jt]s?(x)',
    '<rootDir>/*.spec.[jt]s?(x)',
  ],
  modulePaths: ['<rootDir>/src', '<rootDir>/test'],
  moduleFileExtensions: ['js', 'cjs', 'json', 'jsx', 'ts', 'tsx'],
  moduleNameMapper: {
    '\\.(css|jpg|png|webp)$': '<rootDir>/test/empty-module.cjs',
    '\\.svg$': '<rootDir>/test/svg-file-mock.ts',
    // Load path aliases from tsconfig.json
    ...hq.get('jest', { format: 'array' }),
  },
  collectCoverageFrom: [
    'src/**/*.[jt]s?(x)',
    'functions/**/*.[jt]s?(x)',
    '!**/src/**/*.stories.[jt]s?(x)',
    '!**/node_modules/**',
    '!**/.netlify/**',
    '!**/src/config/**',
    '!**/src/ampli/**',
    '!**/__generated__/**',
    '!**/*.d.ts',
  ],
  reporters: [
    'default',
    [
      'jest-junit',
      { outputDirectory: 'reports/jest', outputName: 'report.xml' },
    ],
  ],
  testEnvironment: 'jest-environment-jsdom',
  testEnvironmentOptions: {
    url: 'http://localhost/',
    resources: 'usable',
  },
};

@kaelig did you tried to add redux-actions to the ESM_NODE_MODULES? Might be worth a try.

That's the first thing I tried, but sadly it didn't solve it :/

@kaelig did you solve this? Running into the same issue

I haven't had time to look into this dependency upgrade. Since 3.0.0 doesn't bring any new features, I've deprioritized it.
If anybody finds a workaround, please post here!

Hey @kaelig,
That is a valid approach. v3 is dedicated to bring ESM compatibility. In case you want to give it a try I managed to provide a minimal example with v3 and Jest<EMAIL_ADDRESS>Also a different way would be to use vitest as an alternative test runner.

Hey @alexander-heimbuch, here's my jest config
"jest": {
    "globalSetup": "./test/jest.global-setup.js",
    "setupFilesAfterEnv": [
      "./test/jest-per-test-setup.js"
    ],
    "collectCoverageFrom": [
      "src/**/*.{js,jsx,ts,tsx}",
      "!src/**/*.d.ts",
      "!src/setup*.js",
      "!src/utils/DraggableManager/demo/*.tsx",
      "!src/utils/test/**/*.js",
      "!src/demo/**/*.js",
      "!src/types/*"
    ],
    "reporters": [
      "default",
      "jest-junit"
    ],
    "transform": {
      "\\.(css|png)$": "./test/generic-file-transform.js",
      "\\.([jt]sx?|svg)$": "./test/babel-transform.js"
    },
    "transformIgnorePatterns": [
      "[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx|mjs|cjs|ts|tsx)$"
    ],
    "testEnvironment": "jsdom",
    "snapshotFormat": {
      "escapeString": true,
      "printBasicPrototype": true
    }
  }

The app is running fine but it's giving errors in test, it is giving Module Not Found error in all places where it's imported

@kaelig @markthiessen did you guys find any solution?

I haven't found any solutions, sorry!


Ratio for AAA should be 7:1 rather than 7.5:1

I love whocanuse and am recommending it to all my contacts.
I noticed that the threshold for rating AAA appears to be 7.5:1 on whocanuse, instead of 7:1.  According to https://www.w3.org/TR/WCAG21/#contrast-enhanced it is 7.1.
Have I misunderstood?  Or if not could the site be updated to rate >7:1 as AAA?

You're absolutely right, no idea how I missed that or when it came in. Just made a PR and it should be all fixed it now :) Let me know if you have anything issues, thanks mate! https://github.com/CoreyGinnivan/whocanuse/pull/29


Publish Updated Docs

Docs (gh-pages branch) haven't been updated in 3 years! It has v3 as the latest. v4 was released a bit ago.
I am not sure if there is another place for updated docs, but the links still go to https://availity.github.io/availity-uikit/ which has v3.1 as the latest.

I believe this is purely because of the lack of automation in the release process for this project. I think the 4.0 release turned out to be minor changes and the current docs still reflect the correct UI style guidelines for projects based on Bootstrap v4.


SudsLibrary 0.8 is not compatible with suds-jurko

The suds-jurko fork removed the UTC class. The code needs to be rewritten so as to not depend on it.
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from SudsLibrary import SudsLibrary
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\apps\Python27\lib\site-packages\SudsLibrary\__init__.py", line 23, in <module>
    from .wsse import _WsseKeywords
  File "C:\apps\Python27\lib\site-packages\SudsLibrary\wsse.py", line 21, in <module>
    from suds.sax.date import UTC
ImportError: cannot import name UTC

Whats the solution for this error ?
20160827 00:26:03.254 [WARN]: Importing test library "SudsLibrary" failed
Traceback (most recent call last):
Importing test library 'SudsLibrary' failed: ImportError: cannot import name UTC
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py", line 143, in import
return import(name, fromlist=fromlist)
File "C:\Python27\lib\site-packages\SudsLibrary_init.py", line 23, in
from .wsse import _WsseKeywords
File "C:\Python27\lib\site-packages\SudsLibrary\wsse.py", line 21, in
from suds.sax.date import UTC
PYTHONPATH:
C:\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\Python27\Scripts
C:\WINDOWS\SYSTEM32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
C:\Python27\lib\site-packages\robotide\spec
File "C:\Python27\lib\site-packages\robotide\spec\librarymanager.py", line 81, in _fetch_keywords
return get_import_result(path, library_args)
File "C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py", line 20, in get_import_result
lib = robotapi.TestLibrary(path, args)
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 46, in TestLibrary
return_source=True)
File "C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py", line 67, in import_class_or_module
self._raise_import_failed(name, err)
File "C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py", line 103, in _raise_import_failed
raise DataError('\n'.join(msg))

Any updates of this issue?


Installation problems

Hello, thanks for sharing your work. I'm facing two issues.

ModuleNotFoundError: No module named 'cpuinfo'. The module 'py-cpuinfo' is missing from requirements.txt
ModuleNotFoundError: No module named 'dskernels'. The module 'DeepSpeed-Kernels' is missing from requirements.txt and DeepSpeed-Kernels is not compatible with windows, and thus the project will not run on windows either. Did you test in windows or only linux?

Thank you in advance.

thanks for your interest, you can try to delete deepspeed==0.15.2 in requirements.txt and then install it. We have only tested it on Linux so far, and will test it on Windows as soon as possible

Redirect to https://github.com/PKU-YuanGroup/ConsisID/issues/13


Duplicate of https://github.com/eemeli/yaml/issues/105

Wanted to put this in as a new issue, because the old one is closed and wanted to make sure it gets re-visited.
https://github.com/eemeli/yaml/issues/105

Please expand on the actual problem that you're experiencing, and clarify how the answer given in https://github.com/eemeli/yaml/issues/105#issuecomment-479947900 is not sufficient? It's not clear what you're looking for, and what you imagine an acceptable solution looking like.

Closing due to silence.


Improve ObjectTree and AsyncDataTree interop

We need a SyncDataTree (name isn't final) which lets users reuse their data providers among different trees.

[x] Change the DataProvider.getChildren result type from Promise<T> to T[] | Promise<T[]>. https://github.com/Microsoft/vscode/commit/3ccc7a9a1f9fa54dfc696b489461b9c376a3064b
[x] Create a DataTree which, along with a IDataProvider, will allow sync tree updates using a data provider pattern. It will also enable people to reuse providers across the DataTree and the AsyncDataTree. https://github.com/Microsoft/vscode/commit/12682daf54bbf3735f986929a015d5282fd20904
[x] Bring back the concept of tree.input which lets users drop all the references to their model and use the tree as a place to keep that reference.
[x] Introduce WorkbenchDataTree :man_facepalming:

cc @jrieken @isidorn @roblourens

I've introduced the DataTree, which is basically an ObjectTree which works with a sync data source.
I've brought back the concept of a tree input. This will allow you to stop giving your data provider model objects and just give it to the tree directly. It also means that, in order to keep TypeScript helping us, the AsyncDataTree and DataTree now have a new generic type TInput which lets you type the input. This type bubbles down to the IDataSource types in the following way:
export interface IDataSource<TInput, T> {
	getChildren(element: TInput | T): T[];
}

export interface IAsyncDataSource<TInput, T> {
	hasChildren(element: TInput | T): boolean;
	getChildren(element: TInput | T): T[] | Promise<T[]>;
}

This is the proper typing of the same old-tree behavior.
This means null no longer represents the tree root element, but instead by an element of type TInput. You no longer call refresh(null) to set the initial input, but setInput(input) or refresh(input) if it's already set.
I have migrated all trees in master and tested them out as well as I knew how. @jrieken @isidorn @weinand Please quickly check your specific tree changes in https://github.com/Microsoft/vscode/commit/419d5bbaedebef63cff9bc248f8407cda5d40562 and sanity check them just to make sure they are still OK.
@isidorn I couldn't migrate repl.ts because of the weird selectSession hackery you're doing over there, so I left null representing the root (TInput is null). If you're interesting in cleaning it up, check up my changes on callstackView for a reference. What you should strive to do is avoid that patter of setting a property on the data source: it should be stateless.

@joaomoreno thanks for converting my trees.
I have tackled the repl via 3f7ff31cb9


Using gulp-newer for supporting many to one mapping

According to http://stackoverflow.com/questions/24730215/gulp-newer-vs-gulp-changed
gulp-newer is able to do many:1 source:dest mapping, such feature can correct some plugins like gulp-concat, gulp-compass or gulp-sass which aggregate many files into one file.

ok, it seems that gulp-changed would cause big problems for us, let's transfer to gulp-newer with many to one mapping.


[6.x] Fix Str@contains for PHP 8.0.1

Fix issue described in #35891.
The issue only happens when running PHP >= 8.0.1. if the $haystack parameter when calling mb_strpos is not a string, PHP will throw and error.
After fixing it one test started failing. I then fixed Illuminate\Database\Query\Builder@where to explicitly cast the $haystack parameter to a string when calling Str@contains.
It was failing on the last assertion of the Illuminate\Tests\Database\DatabaseQueryBuilderTest@testMySqlWrappingJsonWithBoolean test.
Issue was, besides the Builder@where docblock accept \Closure|string|array the assertion was passing a Illuminate\Database\Query\Expression object as the column name on ->where() call.
I didn't fix the docblock for the Builder@where on this PR, as I think it should be fixed in a separate PR.
One alternative approach is to always cast the $haystack to a string inside the Str@contains implementation.
I prefer the implementation I sent in this PR (return false if not a string) instead, as it conforms with the method current dockblock and with the "Principle of least astonishment".
But I can update the PR if you prefer the alternative implementation.

@rodrigopedra Can you raise this change at bugs.php.net as a bug. It seems odd this is the only function with that change, and laravel is not calling the function with strict types enabled.

@rodrigopedra Can you raise this change at bugs.php.net as a bug. It seems odd this is the only function with that change, and laravel is not calling the function with strict types enabled.

Thanks for the review @GrahamCampbell . Will open the bug for PHP tomorrow.

Thanks for the review @GrahamCampbell . Will open the bug for PHP tomorrow.

Hey @GrahamCampbell ,
Before sending the bug to PHP I installed and tested it on PHP 8.0.1, and it actually works:
https://3v4l.org/bh9aV
Even when $haystack is null.
Maybe who opened #35891 have strict types enabled, or the issue is somewhere else.
I am closing this, as by reverting the unneeded cast, the only change would be one test assertion of a Stringable object, which most of the other tests don't use (it is only used to test the Str@is method).
Thanks for your and @crynobone 's time, and please apologize for sending this based only on that issue description.

Hey @GrahamCampbell ,
Before sending the bug to PHP I installed and tested it on PHP 8.0.1, and it actually works:
https://3v4l.org/bh9aV
Even when $haystack is null.
Maybe who opened #35891 have strict types enabled, or the issue is somewhere else.
I am closing this, as by reverting the unneeded cast, the only change would be one test assertion of a Stringable object, which most of the other tests don't use (it is only used to test the Str@is method).
Thanks for your and @crynobone 's time, and please apologize for sending this based only on that issue description.

If both of you think it is worth, I can send a new PR just adding assertions to test Stringable instances for all the tests in that test class.

If both of you think it is worth, I can send a new PR just adding assertions to test Stringable instances for all the tests in that test class.


Testing With Datetime Deltas

Do you have any recommendations for how to handle testing that relies on the delta index in this implementation? I can always just re-index completely after creating objects, but the stock delta implementation made this much easier as the delta indices were appropriately processed every time I created a new object with FactoryGirl, so switching is breaking a bunch of my tests and I wonder if there's a better way to do this besides just adding index calls everywhere it's needed.

I guess there may not be a good way to deal with this. You could potentially have testing run with real-time delta processing somehow (stock implementation) while production runs with the timestamps.

Hi Nick
Sorry for a complete lack of a speedy reply. I can't think of a way of handling this without any index calls, but it's worth noting that ThinkingSphinx::Test.index does accept arguments of index names… so you could use ThinkingSphinx::Test.index 'article_delta' and thus only process the delta index (faster and a more accurate representation).
Still, that still requires you modifying your tests accordingly. Not ideal, but I've not thought of anything else at this point.


IOS-7792 Merge tag '3.8.2' from rs/SDWebImage into master

Code change does not seems to have much impact on us (in terms of methods we interact with)
prev version we use is 3.7, so should not break anything
already tested locally

:shipit: please send out a new external beta tonight @gyfelton


Add footer with a link to the source code

Just make sure of that:

Footer should follow similar design as the rest of the website.

hi, I want to work on this issue. Assign me and kindly explain a bit more.

@ChaudaryHammad just add a footer on the main screen of the website here:

The footer should have a link to this repo and say "source code".
Also the footer should have rounded border, and be the same color as the cells in tic tac toe

ok

Is this is enough?

Closed by #2


Question: prayerTimes.currentPrayer()

at 4am i checked prayerTimes.currentPrayer() it returns  "ishabefore" string
what dost it mean can you explain ?
and can you please tell me all possible values of return of prayerTimes.currentPrayer()

there was an functionality which im working on it
once it's complete , i will be inform you
maybe it's complete on next update


Add an AfterFn mock-delay-returning function

When combined with a func provided to Return, this can be used to
simulate dynamic / open-ended respons and delay sequences on activity
and workflow functions.
This is particularly useful for running tests with randomized behavior,
as now another important piece of behavior can be varied.  Previously
only the number of calls and the return value could be changed easily.

Since the MockCallWrapper (and testify's mock.Call) don't appear to validate
that e.g. "Return" isn't called multiple times, I didn't add an error / panic to
After or AfterFn to prevent combining them.
I'd be happy to panic on misuse / make other changes if you'd prefer!
Tests are also fairly simple at this point, in part because there are few helpers,
and to do a lot better would mean a lot of copypasta.  I can also do that though,
and mirror all the After tests / add extras if you'd like.

Coverage decreased (-0.006%) to 68.865% when pulling 30144306b21d0d816d2d514afe5a38f6fa8eb2c6 on Groxx:afterfn into 9c04ba209944db06e2e16e18a37842c90375a2a2 on uber-go:master.

can't figure why coverage would be decreasing, unless it's comparing between branches (instead of against master)...


Is it possible to add Python to an existing instance of VS2017?

I am somewhat new to GitHub.  I need to add Python from [(https://github.com/Microsoft/PTVS/)] to my existing VS2017.

It looks like the only way to do this is to completely uninstall VS 2017 and re-install.
I tried using the VS2017 installer, but this puts me in an endless "Please update Visual Studio Installer" loop.

Did you get past this? I see you reported #2766 later and it sounds like you got further.
If not, I'd support using the Report a Problem tool from in the installer (if possible) or your existing Visual Studio installation to let the team know. This is an installer issue, and while I can forward your report to them, if you do it using the tool it will automatically include the logs they need to resolve the problem.
Lack of disk space on your C drive is potentially the problem. The installer does not allow you to customize its location.


Windows 19H1 blog go-live

OPS Build status updates of commit 4baeb0b:
:warning: Validation status: warnings

File
Status
Preview URL
Details

documentation/blog/MS-WININTBLOGLP/53b99f95-5895-4a48-95a9-c050acfdf1d5.md
:warning:Warning

Details

documentation/blog/MS-WININTBLOGLP/666a7dfe-d4a4-4598-9008-64fd4616a2fd.md
:warning:Warning

Details

documentation/blog/MS-WININTBLOGLP/73707139-6e59-4c86-b811-50156dda7b0f.md
:warning:Warning

Details

documentation/blog/MS-WININTBLOGLP/8f87919b-e389-4179-9a79-29a6dcd8c370.md
:warning:Warning

Details

documentation/blog/MS-WININTBLOGLP/toc.yml
:white_check_mark:Succeeded

documentation/blog/MS-WININTBLOGLP/53b99f95-5895-4a48-95a9-c050acfdf1d5.md

[Warning] Author openspecs-office cannot be recognized in GitHub.

documentation/blog/MS-WININTBLOGLP/666a7dfe-d4a4-4598-9008-64fd4616a2fd.md

[Warning] Author openspecs-office cannot be recognized in GitHub.

documentation/blog/MS-WININTBLOGLP/73707139-6e59-4c86-b811-50156dda7b0f.md

[Warning] Author openspecs-office cannot be recognized in GitHub.

documentation/blog/MS-WININTBLOGLP/8f87919b-e389-4179-9a79-29a6dcd8c370.md

[Warning] Author openspecs-office cannot be recognized in GitHub.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Update create-sensitivity-labels.md

Fixing typo on "portal" on line 41 and 126. (Changing "porta" to "portal."

@jeffkizn  Thanks for flagging this - looks like search & replace gone wrong during our recent rebranding. It should actually be "Microsoft Purview compliance portal".  Can you make the full change, or prefer me to do this?

@jeffkizn Thanks for flagging this - looks like search & replace gone wrong during our recent rebranding. It should actually be "Microsoft Purview compliance portal". Can you make the full change, or prefer me to do this?

@cabailey - Done.

#sign-off


Error on FreeBSD

Electrum-Ravencoin Version: 1.2.0
FreeBSD 14.0
Spesmilo Electrum run fine on FreeBSD https://github.com/spesmilo/electrum/archive/refs/tags/4.4.6.tar.gz
dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 % ./run_electrum
Traceback (most recent call last):
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/./run_electrum", line 94, in <module>
    from electrum.logging import get_logger, configure_logging  # import logging submodule first
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/__init__.py", line 20, in <module>
    from .wallet import Wallet
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/wallet.py", line 74, in <module>
    from .storage import StorageEncryptionVersion, WalletStorage
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/storage.py", line 38, in <module>
    from .wallet_db import WalletDB
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/wallet_db.py", line 108, in <module>
    class WalletDB(JsonDB):
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/wallet_db.py", line 724, in WalletDB
    def add_verified_asset_metadata(self, asset: str, metadata: StrictAssetMetadata, source_tup: Tuple[TxOutpoint, int], source_divisions_tup: Tuple[TxOutpoint, int] | None, source_associated_data_tup: Tuple[TxOutpoint, int] | None):
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 %

What python version are you running with?

@kralverde Python 3.9.18

Ah i see the issue; using "|" as a union type declaration is only valid 3.10+, could you use that version?

Unfortunately, FreeBSD 14 only support Python 3.9
https://www.freshports.org/lang/python
Newer Python 3.10 & 3.11 are available, but seems broken (no pip, no base modules, no qt5 modules, etc).

from __future__ import annotations
Seems to fix the "|" issue on Python 3.9.
But another error when installing kawpow module.

dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 % pip-3.9 install kawpow
Defaulting to user installation because normal site-packages is not writeable
Collecting kawpow
  Downloading kawpow-<IP_ADDRESS>.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 6.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.9/site-packages (from kawpow) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.9/site-packages (from cffi>=1.12->kawpow) (2.21)
Building wheels for collected packages: kawpow
  Building wheel for kawpow (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for kawpow (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.freebsd-14.0-RELEASE-amd64-cpython-39
      creating build/lib.freebsd-14.0-RELEASE-amd64-cpython-39/kawpow
      copying bindings/python/kawpow/_build.py -> build/lib.freebsd-14.0-RELEASE-amd64-cpython-39/kawpow
      copying bindings/python/kawpow/__init__.py -> build/lib.freebsd-14.0-RELEASE-amd64-cpython-39/kawpow
      running build_ext
      generating cffi module 'build/temp.freebsd-14.0-RELEASE-amd64-cpython-39/_kawpow.c'
      creating build/temp.freebsd-14.0-RELEASE-amd64-cpython-39
      -- [cable ] Cable 0.4.1 initialized
      -- [cable ] Build type: Release
      -- The C compiler identification is Clang 16.0.6
      -- The CXX compiler identification is Clang 16.0.6
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Performing Test fstack-protector
      -- Performing Test fstack-protector - Success
      -- Performing Test Wimplicit-fallthrough
      -- Performing Test Wimplicit-fallthrough - Success
      -- Performing Test mtune=generic
      -- Performing Test mtune=generic - Success
      -- Configuring done (0.9s)
      -- Generating done (0.0s)
      -- Build files have been written to: /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/build/temp.freebsd-14.0-RELEASE-amd64-cpython-39
      [ 11%] Building C object lib/keccak/CMakeFiles/keccak.dir/keccak.c.o
      [ 22%] Building C object lib/keccak/CMakeFiles/keccak.dir/keccakf800.c.o
      [ 33%] Building C object lib/keccak/CMakeFiles/keccak.dir/keccakf1600.c.o
      [ 44%] Linking C static library libkeccak.a
      [ 44%] Built target keccak
      [ 55%] Building CXX object lib/kawpow/CMakeFiles/kawpow.dir/kawpow.cpp.o
      In file included from /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/kawpow.cpp:5:
      In file included from /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/kawpow-internal.hpp:13:
      /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/endianness.hpp:39:9: error: 'bswap32' macro redefined [-Werror,-Wmacro-redefined]
      #define bswap32 __builtin_bswap32
              ^
      /usr/include/sys/endian.h:66:9: note: previous definition is here
      #define bswap32(x)      __bswap32(x)
              ^
      In file included from /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/kawpow.cpp:5:
      In file included from /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/kawpow-internal.hpp:13:
      /tmp/pip-install-lbdy60gx/kawpow_a36bbe7684de4bff9d6a4edab5d4335a/lib/kawpow/endianness.hpp:40:9: error: 'bswap64' macro redefined [-Werror,-Wmacro-redefined]
      #define bswap64 __builtin_bswap64
              ^
      /usr/include/sys/endian.h:67:9: note: previous definition is here
      #define bswap64(x)      __bswap64(x)
              ^
      2 errors generated.
      gmake[2]: *** [lib/kawpow/CMakeFiles/kawpow.dir/build.make:76: lib/kawpow/CMakeFiles/kawpow.dir/kawpow.cpp.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:157: lib/kawpow/CMakeFiles/kawpow.dir/all] Error 2
      gmake: *** [Makefile:136: all] Error 2
      error: cmake build failed with exit status 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for kawpow
Failed to build kawpow
ERROR: Could not build wheels for kawpow, which is required to install pyproject.toml-based projects
WARNING: There was an error checking the latest version of pip.
dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 %

Hmm, I'll need to look into this more. Would the prebuilt app image work on openbsd?

The kawpow compilation error looks like a redefinition of something that is already named in FreeBSD's std lib. I think a fix to that will require tinkering with the kawpow wheel source.

Hmm, I'll need to look into this more. Would the prebuilt app image work on freebsd?

I never use AppImage on FreeBSD. I think that's a Linux thing.
#else

#include <endian.h>

//#define bswap32 __builtin_bswap32
//#define bswap64 __builtin_bswap64

#endif

Removing #define on endianness.hpp works to build kawpow.
But other error occurred.
dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 % ./run_electrum
Traceback (most recent call last):
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/./run_electrum", line 94, in <module>
    from electrum.logging import get_logger, configure_logging  # import logging submodule first
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/__init__.py", line 20, in <module>
    from .wallet import Wallet
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/wallet.py", line 76, in <module>
    from .ipfs_db import IPFSDB
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/ipfs_db.py", line 23, in <module>
    from .network import Network
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/network.py", line 55, in <module>
    from . import blockchain
  File "/home/dns/Downloads/electrum-ravencoin-1.2.0/electrum/blockchain.py", line 38, in <module>
    import kawpow
  File "/usr/local/lib/python3.9/site-packages/kawpow-<IP_ADDRESS>-py3.9-freebsd-14.0-RELEASE-amd64.egg/kawpow/__init__.py", line 5, in <module>
    from _kawpow import ffi, lib
ImportError: /usr/local/lib/python3.9/site-packages/kawpow-<IP_ADDRESS>-py3.9-freebsd-14.0-RELEASE-amd64.egg/_kawpow.abi3.so: Undefined symbol "__gxx_personality_v0"
dns@fbsd14:~/Downloads/electrum-ravencoin-1.2.0 %

According to https://stackoverflow.com/questions/203548/undefined-symbol-gxx-personality-v0-on-link
it's caused by cmake build using Clang C compiler rather than C++ compiler.
I'm gonna investigate to this issue next year.

I'm able to build on FreeBSD 14.
It's easier to use GCC rather than Clang, because Clang doesn't define __builtin_bswap* macro.
Electrum-RVN, and Kawpow source code still need to be modified.
Kawpow need to be build manually (pip won't work), caused by _build.py only recognize linux but not other OS.
Electrum-RVN
[EDIT] electrum-ravencoin-1.2.0/verifier.py
[EDIT] electrum-ravencoin-1.2.0/wallet_db.py
from __future__ import annotations

Kawpow
[EDIT] kawpow-<IP_ADDRESS>/bindings/python/kawpow/_build.py
if sys.platform == 'linux':
    stdlib.append('stdc++')
else:
    stdlib.append('stdc++')

Build commands (using csh):
setenv CC /usr/local/bin/gcc
setenv CXX /usr/local/bin/g++
setenv AR /usr/local/bin/ar
setenv LD /usr/local/bin/ld
setenv LINKER /usr/local/bin/ld
setenv NM /usr/local/bin/nm
setenv OBJDUMP /usr/local/bin/objdump
setenv RANLIB /usr/local/bin/ranlib

pkg install -y py39-aiohttp-socks py39-aiohttp py39-aiorpcX py39-attrs py39-bitstring py39-certifi py39-dnspython py39-httplib2 py39-jsonrpclib-pelix py39-pbkdf2 py39-protobuf py39-QDarkStyle py39-qrcode py39-requests py39-secp256k1 py39-sqlite3 py39-bitbox02 py39-btchip-python py39-ckcc-protocol py39-hidapi py39-keepkey py39-trezor py39-cryptography py39-setuptools py39-qt5-pyqt py39-sip py39-cython py39-aiofiles
pip-3.9 install -y multiformats aioipfs ipfs-car-decoder kawpow

cd kawpow-<IP_ADDRESS>
pip-3.9 uninstall -y kawpow; python3.9 setup.py clean; rm -rf build/*, dist/*; python3.9 setup.py install --verbose
cd ..
cd electrum-ravencoin-1.2.0
./run_electrum

@kralverde Do you know where Kawpow repository?
https://github.com/RavenCommunity/cpp-kawpow/tree/kawpow_full_cache seems doesn't have bindings/python/kawpow/_build.py

The easiest thing to do is probably fork all of these repos and make changes as needed. I will do this for the next update and follow up to make sure everything works for you

can you confirm that the master branch works for you as-is?

kawpow master branch? The kawpow repo is nowhere to be found on github. Only on pypi. I think it's unmaintained.
https://github.com/RavenCommunity/cpp-kawpow/blob/master/bindings/python/ethash/_build.py
There's no /bindings/python/kawpow/_build.py to be found.
Btw, I've created https://github.com/DNS/kawpow

No, I've made modifications to electrum-ravencoin and it should work for openbsd as-is now

No, I've made modifications to electrum-ravencoin and it should work for freebsd as-is now

And the repo it is using is https://github.com/kralverde/cpp-kawpow

And the repo it is using is https://github.com/kralverde/cpp-kawpow

https://github.com/kralverde/cpp-kawpow/blob/master/bindings/python/kawpow/_build.py
if sys.platform in ('linux', 'freebsd', 'openbsd'):
    stdlib.append('stdc++')

Oh, ok.
But sys.platform on my freebsd installation contain 'freebsd14' so it wont match.
dns@fbsd14:~ % python3.9
Python 3.9.18 (main, Nov 30 2023, 01:13:45)
[Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1 on freebsd14
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'freebsd14'
>>>

Probably better to match the string using regex or fnmatch.
import re, sys

os_match = re.match(r'.*bsd.*', sys.platform, re.IGNORECASE)

if sys.platform == 'linux':
    stdlib.append('stdc++')
elif os_match:
    stdlib.append('stdc++')

This would match freebsd/openbsd/netbsd followed by their version number.
or unify linux/bsd in regex together:
import re, sys

os_match = re.match(r'linux|.*bsd.*', sys.platform, re.IGNORECASE)

if os_match:
    stdlib.append('stdc++')

That sounds good. Want to make a PR and I'll just merge it? I'm out right now.

Pull request  https://github.com/kralverde/cpp-kawpow/pull/1


cdemu: updates, fixes and build simplification

Description of changes

rely on wrapGApps*Hook for gobject-introspection access
use callPackage as intended

fix https://github.com/NixOS/nixpkgs/issues/311690
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[x] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 311780 run on x86_64-linux 1

5 packages built:

cdemu-client
cdemu-daemon
gcdemu
image-analyzer
libmirage

still not able to use buildPythonApplication because of https://github.com/NixOS/nixpkgs/pull/311780#discussion_r1601451210, but this is good enough for now.


adds ability to transform payload to the config similarly to official client

** Context **
The official client allows to pass as configuration a transform function, that enables consumers to transform the payload before it is sent (see docs)
I allowed myself not to support the ability to pass in an async function as it adds a bit of complexity that I don't believe we require (it would be possible to extend later on if needed).
We want the transform ability to be able to alter stack traces as per the source maps on many domains concept.
Changes:

Added transform function to the code
Added README and CHANGELOG documentation for it
Added tests (and updated the ones with strict checks on configuration)

@serenematt-babbel ah shoot I had started on another branch while my local was not up to date and forgot to use the right branch, closing this one and opening the correct one 🙈
Thanks for hte heads up


distribute precompiled via npm

Hi!
I really like where you're headed with this. To make adoption easy, you should set up a version task in the package.json that precompiles this package so it can be used without having the same build pipeline. See https://github.com/rackt/redux/blob/master/package.json for an example on how to do this well.
Keep up the good work!

:+1:

Hi @VinSpee and @keisans!
Great idea. I previously had a dist folder, but didn't commit it due to the fact that the built version included the React library, which isn't ideal as you'll have your own version of React installed.
Whats the usual way to get around this? Or is that acceptable?
Thanks.

@andrewhathaway I usually stand on the shoulders of giants in this case, and @react-redux does it like this:

declare react as a devDependency in [package.json] (https://github.com/ide/react-redux/commit/b8833e9d31c99b19215477f7116b622a02c31adc)
have a build step that runs before you publish to npm

This allows the consumer to use whichever version of react that they have, avoiding the double-dependency and any peerDep issues. Thanks!


Webots scene screen goes black or might go black when clicking on scene objects.

Environment
Windows 10 Enterprise 21H2 Build number : 19044.1706
No WSLg
Your Distribution version: Ubuntu 20.04
(I use VcxSrv to display Linux GUI apps on Windows 10)
I know WSLg is only Windows 11 feature, but I setup Windows 10 with VcxSrv, and I can use Linux GUI apps in WSL 2 ubuntu perfectly, but there is an application which has some rendering issues. This application is Webots.
Right now, I have no means to install windows 11, so this bug ticket can be considered rather a favour to test this theoritical bug , which is present on windows 10 , but might not be present on windows 11 with the new WSLg.
So, I would like to ask someone if they can test this issue on a windows 11 system with WSLg, if the issue does not come please consider this ticket irrelevant.
If the issue is not present on Windows 11 with WSLg, I will have a strong reason to update from Windows 10 to Windows 11.
Steps to reproduce

I setup ROS on my windows 10 with Ubuntu in WSL 2 according to this tutorial:
https://jack-kawell.com/2020/06/12/ros-wsl2/
I could run Linux GUI apps after this (xcalc, gedit, and Rviz as well)
(This part might be skipped if GUI apps work out of the box on your Windows 11 with WSL 2 Ubuntu 20.04.)

I installed Webots with APT :
https://cyberbotics.com/doc/guide/installation-procedure#installing-the-debian-package-with-the-advanced-packaging-tool-apt
I could start the Webots simulator with the command : webots

I tried to complete the first tutorial in Webots:
https://cyberbotics.com/doc/guide/tutorial-1-your-first-simulation-in-webots?tab-language=c
The basic scene was created with the RectangleArena , WoodenBox and the E-puck (Robot)

When I clicked in the Scene display with the mouse and tried to move around by dragging the mouse and change the view it was possible, but when I tried to do the same by clicking on the objects in the scene RectangleArena , WoodenBox and the E-puck (Robot), the scene display turned black, and reloading the world did not solve it, I had to restart the webots application.

It is reproducable all the time. If i click the objects again accidentally and the scene turns black, I always need to restart the application.

Note:
If I set my ~/.bashrc to have:
export DISPLAY=$(ip route list default | awk '{print $3}'):0
export LIBGL_ALWAYS_INDIRECT=0
export WEBOTS_HOME=/usr/local/webots
export LIBGL_ALWAYS_SOFTWARE=1
The GPU acceleration switched off, and the rendering is done by the CPU. In this case there is no issue when I click on the objects.
The scene display does not turn to black and I can drag the view in the scene with the mouse with no issues at all.
glxinfo
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce 940MX) (0xffffffff)
Version: 21.2.6
Accelerated: yes
Video memory: 10020MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce 940MX)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
hardware info
processor i5-6440HQ CPI @ 2.60 GHz
Intel(R) HD Graphics 530 (Integrated)
NVIDIA GeForce 940MX
I have latest drivers.
Expected behavior
I can click on the E-puck (Robot) or the WoodenBox, and works fine.
I should be able to click in the scene and move around the view by dragging the mouse, whithout any issues.

Actual behavior
When I click in the display scene on an object the scene turns black.

Update:
I could ask a collague to help test out the theory.
It's a driver issue on my laptop with OpenGL renderer: D3D12 (NVIDIA GeForce 940MX).
Although I have latest driver the issue still happens.
He has the same Windows 10 as me, but OpenGL renderer: D3D12 (NVIDIA GeForce MX450). He does not experience this black screen in the scene when clicking on objects.
I'm closing the ticket, as it's a driver/hardware issue.


Rendering of a circle is broken

This is a minimized test case from material design icons.
Failing test case:
<svg xmlns="http://www.w3.org/2000/svg" width="1488" height="1488">
    <path d="M571.953 103.845c-128.952-128.953-337.823-128.953-466.775 0-128.953 128.952-128.953 337.823 0 466.775 128.952 128.953 337.823 128.953 466.775 0 128.953-128.952 128.953-337.823 0-466.775zM520.09 518.756c-100.192 100.192-262.856 100.192-363.047 0C56.85 418.565 56.85 255.9 157.042 155.71c100.191-100.192 262.856-100.192 363.047 0 100.192 100.191 100.192 262.856 0 363.047z"/>
</svg>

I'm guessing we're failing to detect the extrema correctly, since the control points are not on extrema.

Looks like this is due to solving for derivatives giving me NaN/inf. Sigh.


All tests fail

Hi everyone, I'm running magenta and trying to simply install it. All the tests fail locally with bazel.

virtualenv tensorflow 0.10,
bazel 0.3.1,
python 2.7
OS X 10.11 - GPU
CUDNN v5, and CUDA 7.5

Tensorflow imports and runs fine on the GPU.
When I try to run the magenta tests I get a total failure.
The logs all look like this
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_EnRatz/ff3e5bd3f6602e5c161954fd8b97e695/execroot/magenta/bazel-out/local-opt/bin/magenta/models/shared/melody_rnn_graph_test.runfiles/__main__/magenta/models/shared/melody_rnn_graph_test.py", line 17, in <module>
    import tensorflow as tf
  File "/Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: dlopen(/Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.7.5.dylib
  Referenced from: /Users/EnRatz/repos/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so
  Reason: image not found

So libcudart is not found, but I've linked it correctly here per Tensorflow's directions
echo $DYLD_LIBRARY_PATH
/Developer/NVIDIA/CUDA-7.5/lib:/usr/local/cuda/lib:/usr/local/cuda/lib:/Users/EnRatz/torch/install/lib:

echo $CUDA_HOME
/usr/local/cuda

 ls /usr/local/cuda/lib | grep libcudart
libcudart.7.5.dylib
libcudart.dylib

I've heard that bazel might strip some environment variables, so I tried running a single test
bazel test //magenta/music:events_lib_test and it returns the same test.log
I tried running a  CPU version, and that works just fine with the same software installed.
I've also tried bazel 0.2.3, and it returned the same results.
I'd appreciate some help, I've been at this for a while

I'll close this. After 5 consecutive cleans and rebuilds, all the tests passed. There is no sane reason for this, and I am certain no definitive solution exists to deal with Bazel.


kops: 1.25.1 -> 1.25.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/kubernetes/kops/releases.
meta.description for kops is: "Easiest way to get a production Kubernetes up and running"
meta.homepage for kops is: "https://github.com/kubernetes/kops"
meta.changelog for kops is: "https://github.com/kubernetes/kops/tree/master/docs/releases"
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.25.2 with grep in /nix/store/nsrmf7kcx69p1vkdicn6kkb8l3jx4wcf-kops-1.25.2
found 1.25.2 in filename of file in /nix/store/nsrmf7kcx69p1vkdicn6kkb8l3jx4wcf-kops-1.25.2

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
kops
kops_1_25

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/nsrmf7kcx69p1vkdicn6kkb8l3jx4wcf-kops-1.25.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A kops https://github.com/r-ryantm/nixpkgs/archive/b7750a48bc41b3b87eabe24d96a9e8fa1bd3c26f.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/nsrmf7kcx69p1vkdicn6kkb8l3jx4wcf-kops-1.25.2
ls -la /nix/store/nsrmf7kcx69p1vkdicn6kkb8l3jx4wcf-kops-1.25.2/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

kops

Maintainer pings
cc @offlinehacker @zimbatm @DiegoLelis @yurrriq for testing.

Thanks. Works on my machine too.


The argument "region" is required, but no definition was found.

hello,
I'm getting the following error when attempting to use the module. :

terraform apply
<skip output >
 Warning: Empty provider configuration blocks are not required
│
│   on .terraform/modules/vpc-peering/provider.tf line 11:
│   11: provider "aws" {
│
│ Remove the aws.this provider block from module.vpc-peering. Add aws.this to the list of configuration_aliases for aws in
│ required_providers to define the provider configuration name.
│
│ (and one more similar warning elsewhere)
╵
╷
│ Error: Missing required argument
│
│   on .terraform/modules/vpc-peering/provider.tf line 11, in provider "aws":
│   11: provider "aws" {
│
│ The argument "region" is required, but no definition was found.
╵
╷
│ Error: Missing required argument
│
│   on .terraform/modules/vpc-peering/provider.tf line 15, in provider "aws":
│   15: provider "aws" {
│
│ The argument "region" is required, but no definition was found.

im using another module to define VPCs . In the definition of that module the
provider.tf:
provider "aws" {
  access_key = var.AWS_ACCESS_KEY
  secret_key = var.AWS_SECRET_KEY
  region     = var.AWS_REGION
}

the code:
main.tf
module "vpc" {
  source   = "git::https://bitbucket.org/private_repo"
  AWS_REGION = "us-east-1"
  vpc_name = var.vpc_name
}

rds_vpc.tf:
module "rds_vpc" {
  source   = "git::https://bitbucket.org/private_repo"
  AWS_REGION = "us-east-1"
  vpc_name = var.rds_vpc_name
}

module "vpc-peering" {
  source = "grem11n/vpc-peering/aws"
  version = "3.1.0"
//  providers = {
//    aws.this = aws
//    aws.peer = aws
//  }

  this_vpc_id = module.vpc.vpc_id
  peer_vpc_id = module.rds_vpc.vpc_id

  auto_accept_peering = true

  tags = {
    Name        = "tf-single-account-single-region"
    Environment = "DEV"
  }
}

I'm not sure what to take out of this.

Hello, @az-z ,
Could you advise which version of Terraform are you using as well as which version of the module, please?
Also, you can refer to the examples of this repo. CI uses the code from that directory to run the tests. So, you can be sure that it works for matching TF & module versions

@grem11n ,
im using
terraform -v
Terraform v0.15.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v3.43.0

Your version of Terraform is out of date! The latest version
is 0.15.5. You can update by downloading from https://www.terraform.io/downloads.html

the module version is
module "vpc-peering" {
  source  = "grem11n/vpc-peering/aws"
  version = "3.1.0"
}

It looks like, providers stanza is required. I ran the tests using your TF version 0.15.2 as well as the latest 0.15.5 here:
https://github.com/grem11n/terraform-aws-vpc-peering/pull/79/checks?check_run_id=2767020979
So, you can see that the code from examples works

Try using default aws region as environment variable
export AWS_REGION="<default_aws_region>"

Closing old issues.


Moondrop greenhouses overproducing lamps with the "moon light" T.U.R.D. upgrade

Mod source
Factorio Mod Portal
Operating system

=Windows 10

What kind of issue is this?

[ ] Compatibility
[ ] Locale (names, descriptions, unknown keys)
[ ] Graphical
[ ] Crash
[ ] Progression
[X] Balance
[ ] Pypostprocessing failure
[ ] Other

What is the problem?
Since before the 2.0 update, I've been using the "Moon light" T.U.R.D. upgrade on moondrop greenhouses as a source of methane. The original recipe consumed 1 lamp and had 95% chance of outputting a lamp. This meant that, with a steady supply of lamps merging with a prioritized feedback loop of the outputted lamps, the process ran indefinitely.
After the update, however, the greenhouses gained a 35% productivity bonus, which seems to be added by the "Moon light" upgrade itself. However, this changed the balance of the recipe, so the greenhouses produce MORE lamps than they consume. In other words, unless the excess lamps are manually used or destroyed by burners, the process eventually grinds to a halt.
Notice that I'm not using modules or beacons on the greenhouses. At this point in the game, I don't even have them unlocked.
Steps to reproduce

Unlock and apply "Moon light" T.U.R.D. upgrade for moondrop greenhouses.
Build a moondrop greenhouse with the "Methane" recipe, which consumes lamps and water and produces 95% lamp, methane and oxygen.
Leave it running for a while to see lamps multiply, or look at the recipe description on the sidebar, where it says the recipe consumes 0.25 lamps and produces 0.32 lamps.

Additional context
No response
Log file
No response

fixed in pyAL 3.0.11


How to show the raw plain text secret detected by detect-secrets?

I want to retrieve the exact matched string from hashed secret provided by the tool. So, I ran the detect-secrets tool for willymcallister/spinningnumbers repository and a sample output of the tool is shown below:

The tool has found a private key in line 184 of _articles/staticman-heroku.md file.

However, I tried to compute the hashed secret using hashlib with different combinations of the secrets such as by removing unnecessary texts. But I could not compute the exact hashed secret provided by the tool.

Which part of the actual secret string has been used to calculate the hashed secret? Or Is there any way to get the plain text secret instead of hashed secret in the report using any flag? Please let me know your feedback.

Hey, you can go into the library and remove a line in detect_secrets/core
/potential_secret.py at line number 56 , and insert this: self.secret_hash: str = secret

Better yet, you can keep the secret_hash field and instead just add this to the json() function that starts on line 98 of detect_secrets/core/potential_secret.py:
attributes['raw_secret'] = self.secret_value

So the modified function would look like this:
    def json(self) -> Dict[str, Union[str, int, bool]]:
        """Custom JSON encoder"""
        attributes: Dict[str, Union[str, int, bool]] = {
            'type': self.type,
            'filename': self.filename,
            'hashed_secret': self.secret_hash,
            'is_verified': self.is_verified,
        }

        if hasattr(self, 'line_number') and self.line_number:
            attributes['line_number'] = self.line_number

        if hasattr(self, 'is_secret') and self.is_secret is not None:
            attributes['is_secret'] = self.is_secret

        # Include plaintext secret (NOT RECOMMENDED DUE TO SECURITY CONCERNS)
        attributes['raw_secret'] = self.secret_value

        return attributes

For one project, I personally modified it to also include the full line of source code that contains the secret (for easier contextual understanding):
    def json(self) -> Dict[str, Union[str, int, bool]]:
        """Custom JSON encoder"""
        attributes: Dict[str, Union[str, int, bool]] = {
            'type': self.type,
            'filename': self.filename,
            'hashed_secret': self.secret_hash,
            'is_verified': self.is_verified,
        }

        if hasattr(self, 'line_number') and self.line_number:
            attributes['line_number'] = self.line_number

            # Include the relevant line of source code (NOT RECOMMENDED DUE TO SECURITY CONCERNS)
            with open(os.path.abspath(self.filename)) as fp:
                for i, line in enumerate(fp):
                    if i == self.line_number-1:
                        attributes['source_code'] = line.strip()
                        break

        if hasattr(self, 'is_secret') and self.is_secret is not None:
            attributes['is_secret'] = self.is_secret

        # Include plaintext secret (NOT RECOMMENDED DUE TO SECURITY CONCERNS)
        attributes['raw_secret'] = self.secret_value

        return attributes

Your resulting findings will look like this:
// ...
{
  "type": "GitHub Token",
  "filename": "src/test.js",
  "hashed_secret": "ffffffffffffffffffffffffffffffffffffffff",
  "is_verified": false,
  "line_number": 451,
  "raw_secret": "ghp",
  "source_code": "let ghToken = \"ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\";"
},
// ...

Note, of course, that none of this is recommended - it's bad practice to unnecessarily store plain-text secrets.

Hello everyone, @SeanPesce is right in bringing up the fact that writing the raw secrets in .secrets.baseline is a security issue and defeats the purpose of running detect-secrets to avoid pushing those secrets to your remote repository. I'll change the status of this issue as won't fix for now, but won't close it so it can stay under our radar and we (and you all) can find a solution to address this in a way that would make sense.


Add knee plots

Hi @drbecavin,
this package looks great! We are currently considering to add it to the nf-core scrnaseq workflow (see https://github.com/nf-core/scrnaseq/issues/80).
One feature I'd love to see are knee plots for QC metrics. I find them superior over the current violin plots for finding inflection points and they would also be easy to render for many samples simultaneously.
In particular, I think the following plots would be useful:

cell rank vs. total counts
cell rank vs. detected genes
cell rank vs. mitochondrial fraction

Here's an example from the cellranger report

Here's another example from some custom python script I usually use for single cell QC with scanpy:

(y-axis= cell rank, n_genes_by_counts = number of detected genes, red lines indicate cutoffs I chose)
The knee plots could be (as opposed to the violin plots) easily combined into a single, interactive multiQC figure. This helps identifying outliers with bad quality when working with many single-cell samples. Here's an example of such a plot from the nf-core/rnaseq multiqc report:

Thank you for your interest in checkatlas !!!
First of all, I was planning to add the QC in tables so MultiQC can plot all on the same plot. I was planning to do that first thing in the morning on monday. You are right the violin plot superposed will not readable, so I will work directly with knee-plot. I'll let you know !
For the variables:
cell rank vs. total counts
cell rank vs. detected genes
cell rank vs. mitochondrial fraction
How can we get cell rank from the cellranger h5 file ? Check atlas only process these files, along with scanpy and seurat files.
If you want a complete integration of cellranger output into MultiQC. You should look at this PR: https://github.com/ewels/MultiQC/pull/1689
Cellranger will be integretad in the new version of MultiQC

How can we get cell rank from the cellranger h5 file

I mean the rank is essentially just the numeric index of the cell when sorted by counts/genes/fraction.
Here's a solution with pandas: https://github.com/icbi-lab/luca/blob/6f2ea7203272b6d6f7e415f7abf0d247c8368ed4/modules/local/scqc/qc_plots.py#L76-L77

If you want a complete integration of cellranger output into MultiQC. You should look at this PR: https://github.com/ewels/MultiQC/pull/1689
Cellranger will be integretad in the new version of MultiQC

The nf-core scrnaseq pipeline supports four different aligners: alevin, kallisto, starsolo and cellranger. We have now implemented that independent of the aligner a single h5ad object is generated. We would therefore be very interested in something that works off the h5ad file, independent of the aligner.
I'll definitely take a look at the cellranger multiqc module, though, which we could consider adding in addition for more alignment-focused metrics.

I have just push the modificaton to add Kneeplot in the checkatlas report.
You need checkatlas version 0.0.13 for that.
And (for the moment) my forked version of MultiQC https://github.com/becavin-lab/MultiQC
You shoud obtain something like that:

I am open to every suggestion for improvement.

fantastic!
IMO log scale on the x axis (optionally also y axis) would make it a bit more readable!

Log scale add been added and will be available in next release of MultiQC !


Update environment-groups.md

The original documentation does not make it clear that this feature is ONLY for managed environments. My changes improve the clarity of the role of managed environments within this feature.

Hi @@.***>,
With Sally out of office, I just wanted to let you know that I have reviewed the PR and recommended one slight tweak. Overall, the proposed changes are already quite good.
Thank you!

Mikaël "Mik" Ferland, Senior Product Manager
Power Platform - Power Apps - Scale
Teams:  Chat with @.***>
LinkedIn: https://www.linkedin.com/in/mikael-ferland/
From: Bishal Goswami @.>
Sent: Wednesday, May 22, 2024 3:01 AM
To: MicrosoftDocs/power-platform @.>
Cc: Mik Ferland @.>; Assign @.>
Subject: Re: [MicrosoftDocs/power-platform] Update environment-groups.md (PR #2629)
Assigned #2629https://github.com/MicrosoftDocs/power-platform/pull/2629 to @mikferland-msfthttps://github.com/mikferland-msft.

Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/power-platform/pull/2629#event-12889447898, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVTQTMQN6B5EMO3NVXBNGYDZDQ7C3AVCNFSM6AAAAABIC3GTDKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSHA4DSNBUG44DSOA.
You are receiving this because you were assigned.Message ID<EMAIL_ADDRESS>


Mayble way to fix error 11

Try to use APKTool jar2dex. Compiled files independently, and its launched!

Hmm can you give me a link some where i keept having this problem and wont launch


OSX: Mouse cursor position wrong after click-dragging numeric input

Operating system or device - Godot version:
MacOS 10.12.5
Godot 2.1.3.stable.official
Issue description:
After click-dragging on a numeric entry to change the value, the cursor position is set to the bottom right of my entire screen. I would expect the cursor position to be reset to its position when the gesture began.
Steps to reproduce:
Click-drag numeric input.

Can't reproduce on linux on 7ac50b523b8cb313245e2fbdd16b5561c88b3aeb so it's probably OSX related issue

@jscheel can you check if the issue is present in 3.0 alpha?

@kubecz3k yes, can confirm that it is still present in 3.0 alpha

Here is a recording of what is happening. First, I use the slider to change the value. Second, I drag directly on the number. After I let go, the cursor jumps to the bottom right, which I then bring back into the view.

also have this issue. (macOS)

Same issue (macOS 12.12.5), looks like OS_OSX::warp_mouse_pos is broken.

@bruvzg is it possible that this is only broken on retina displays? I don't recall this happening on my external monitor. Can't test until next week though :(

@jscheel No I am using non retina display.

Haha, sorry, had to post this here: https://github.com/godotengine/godot/blob/263452ee91c7d76f3a2b1503ce8fbd0d35bbb6e4/platform/osx/os_osx.mm#L1084

sorry for tag jugglery, junior job usually raises a chance for external pr, and in the issue here has enough info for less experienced contributors to try his bugfixing powers, haven't noticed the proper pr is already waiting to be merged :)


[Feature]: limit number of samples when running predictions in ultralytics callbacks

Description
When executing plot_pose_validation_results from wandb.integration.ultralytics.pose_utils', we can limit the number of batch, but not the batch size. This results in endless predictions when the batch size is very big, hanging to generate a lot of predictions to be logged in wandb.
Suggested Solution
Add an extra optional argument to limit the number of samples in a batch to run predictions.
Alternatives
No response
Additional Context
No response

Hey @geoffrey-g-delhomme, thank you again for the PR! Please let me know if there's anything else I can help you with

WandB Internal User commented:
umakrishnaswamy commented:
Hey @geoffrey-g-delhomme, thank you again for the PR! Please let me know if there's anything else I can help you with


CIDR math functions for Azure Networking calculations

Discussed in https://github.com/Azure/bicep/discussions/3940

Originally posted by JohnDelisle August  9, 2021
What's the idiomatic way to perform CIDR math in Bicep?
How for example do I calculate the Xth IP in a subnet, or split a prefix into two smaller prefixes?
example network library https://github.com/lduchosal/ipnetwork#example-5

Also from the referenced discussion:

split a prefix into two smaller prefixes
what is the x IP from the network.

Any updates on this? CIDR calculations are a must have in modern IaC solutions, it's hard to promote bicep, if terraform has this since forever (https://www.terraform.io/language/functions/cidrsubnets).

No updates. It makes sense to add, but don't have the bandwidth to work on it right now. If this gets a lot more upvotes, we can revisit the prioritization.

Any Updates on this So far ?
I am also looking out for something similar and its getting hard with BICEP to achieve this

Bump, I need to implement something like this, too. We seem to have a number of upvotes to get cracking on this :)

Here is how TF handles this:
https://developer.hashicorp.com/terraform/language/functions/cidrhost

We would like to pick this up soon. Can anyone on this thread provide pseudo-code samples of what they would hope to be able to express in bicep (i.e. what resource types, what values are being passed around to what properties, etc.)? The more detailed the scenarios can be, the better.

We should try to knock this out with #9091

@alex-frankel Many, many years ago, on a project far, far away... we used CIDR calc with a module in Terraform, and called things dynamically by their name. That would be a nicety, but at the very least you can see how we use the CIDR-Calc to populate stuff.

We would like to pick this up soon. Can anyone on this thread provide pseudo-code samples of what they would hope to be able to express in bicep (i.e. what resource types, what values are being passed around to what properties, etc.)? The more detailed the scenarios can be, the better.

I would like to be able to define subnets in a virtual network using an expression like this:
var baseAddress = '<IP_ADDRESS>/21'
var subnetCidr = 24

...
subnets: [for i ...
    ...
    addressPrefix: network_range(baseAddress, subnetCidr, i)
]

This fictitious network_range function would take the base address as the starting point and calculate the ith subnet of the size given in subnetCidr.

The scenarios for CIDR operation that I'm seeing right now in this issue and in #7401 appear to be the following:

Parsing an IP address into individual components and other useful information such as network, subnet, etc.
Calculating either a set of subnets by CIDR or the ith subnet.
Calculating the ith IP address on a network
Converting CIDR notation to subnet notation

Are there any other CIDR functions that we would need?

The scenarios for CIDR operation that I'm seeing right now in this issue and in #7401 appear to be the following:

Parsing an IP address into individual components and other useful information such as network, subnet, etc.
Calculating either a set of subnets by CIDR or the ith subnet.
Calculating the ith IP address on a network
Converting CIDR notation to subnet notation

Are there any other CIDR functions that we would need?

The 'Microsoft.DBforPostgreSQL/servers/firewallRules@2017-12-01' requires you to have have an endIpAddress. Having a function to calculate that given a CIDR would be helpful

The 'Microsoft.DBforPostgreSQL/servers/firewallRules@2017-12-01' resource definition requires you to have have an endIpAddress. Having a function to calculate that given a CIDR would be helpful

Makes sense. I think we could achieve that with a parse function by having it return an object with properties like FirstUsable and LastUsable in the issue description.

@SvenAelterman Would we also need to have a function that can calculate the max value for i given baseAddress and subnetCidr?

Possibly... I am not sure how I would use that though.

It would be needed if you wanted to get ALL the possible subnets or the index of the last one. Seems to me like a lower priority requirement than the others, though.

For calculating subnet ranges, would you specify the desired size of the subnet in terms of additional bits or the desired number of bits in the subnet?

Btw, we've started design work on the requested functions. We will share the proposal on GitHub once it's ready to be reviewed.

Hello everyone! Here is the proposal for some of the requested networking cidr functions:
CIDR Functions.md
Any feedback would be greatly appreciated!

This would be a very valuable addition to Bicep!

This will be an excellent addition as it means when creating VM's we can use the subnet address prefix directly when setting an IP address and increment accordingly

We've made some changes to the design as part of the implementation:

The makeSubnets() function was renamed to cidrSubnet() and now takes the 0-based index of the subnet as the 3rd parameter. The function will now return a single subnet IP range in CIDR notation instead of an array.
We've removed the usable property from the parseCidr() function return value for now due to Bicep type system limitations (no BigInteger support... yet).

The PR was merged before the backend change was deployed which caused us to incorrectly close this issue. The CIDR functions will be released in Bicep 0.17.

5/1 - you can see all our milestones with ship dates in the milestones page

Any update on the release of 0.17 ?

@samhodgkinson it's out now.
We do have instructions to test the nightly build, if you need access to features early as well.

Until we get the official docs published, I created a rough write up of the function signatures and a sample of usage: https://gist.github.com/majastrz/bdd776addfa72c0719334996c0aa78f5

Just to be clear, with the release of 0.17, the cidr() function is available now?

@SvenAelterman
3 functions, each works with ipv4 or ipv6.
parseCidr('<IP_ADDRESS>/20')
cidrSubnet('<IP_ADDRESS>/20', 24, i)
cidrHost('<IP_ADDRESS>/24', i)

output from Marcins gist examples

I've added these functions into some modules provisioning networking, VNets, NSG's etc; works great! This really simplifies the planning and design of repeatable networks! Thanks for this.

The first 3 host addresses are reserved by Azure in <IP_ADDRESS>/24.
// Reserved by Azure
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'

Does this mean that the consumers of the cidrHost function should take this into consideration and plan the usable IP addresses properly?
It will be cool if the function can return the response as below.
// calculate the first five usable host IP addresses from the specified /24
output v4hosts array = [for i in range(0, 5): cidrHost('<IP_ADDRESS>/24', i)]

/*
Returns:
[
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'
  '<IP_ADDRESS>'
]
*/

@Lddeiva Yes, that's right. Please see https://github.com/Azure/bicep/issues/10822 for more details.
For variable size subnets, can you open a new issue to track the feature request?


Pop up swipe - desktop: Pop ups should be contain within the max width on desktop

Checked on Dev and QA environment
Work as per requirements. The pop-up is centered when user changes the scale.
Dev environment:
https://www.dropbox.com/s/n5aeo6gko3rp46y/2019-11-01_11-04-38.mp4?dl=0
QA environment:
https://www.dropbox.com/s/dper2u2okcn1hs9/qa.mp4?dl=0


Update reason-react to v0.11

Remove subdir lib stanza
Add pin
Removed pinning to .dev opam file (inexisting)

I guess #13 is doing this too.


infinite loop (iteration)

It would be nice to be able to create a never ending animation with the setting data-wow-iteration="-1".
This is useful for the pulse animation for instance.
Or am I missing a setting?

Never mind! providing "infinite" did the trick...

Yep, and here's why.


Update classifiers for pipy

This PR updates the setup classifiers. As such, this PR is not about code but about documentation for Pipy: https://pypi.org/project/straxen/

Not a reviewer but I approve this change. Thanks for the expansion to new versions!

Thanks Sophia, also as not requested-reviewer, you can submit a review.


Add some simple markdown like bold, underline, italics

Add some simple markdown like bold, underline, italics, links, inline images.
Add space as a trigger.

Done!


Feature request: CoerceToNonGeneric for TOut types

System Details

FluentValidation version: 8.4.2

Issue Description
I'm writing some (generic) custom validators, and I was inspired by the way you wrote the LengthValidator. However, I was wondering, why you have multiple CoerceToNonGeneric extensions but not just one like the one below:
public static Func<object, TOut> CoerceToNonGeneric<TIn, TOut>(this Func<TIn, TOut> func)
{
    return x => func((TIn)x);
}

Less code, and supports all flavors you could wish for out of the box. Or am I missing something?
(I can create a pull request if you like)

No particular reason...it probably seemed the simplest thing to do at the time. The codebase has been around for over 10 years and on a codebase that old there are bound to be things that are less than ideal.
These methods should actually all be internal, not public, or which will be fixed in 9.0 so I might clean them up as part of that.

@JeremySkinner The namespace gave it a way. ;)
The reason I bumped into this, was of course, I was implementing both a validator and an extension method to make usage easier. And it makes sense to make the exertions generic, where the validator is not. I just created my own (internal) extension method, but wanted to share it nevertheless.
I like FluentValidation a lot! The only thing that I think is missing is guidelines how to extend it.

Guidelines for extending FV, this is covered here: https://fluentvalidation.net/custom-validators this shows the several different ways you can implement custom validation. Is there anything else you think that should cover?

I'll dive into that document, and will come back with feedback. Thanks for the quick responses so far!

Some questions raised to my mind:

When writing an extension for a (property) validator, can/should you reuse one instance of the rule (or does it contain state)
What is the preferred way of providing localized strings? (And why does FluentValidation.NET not use the resource mechanism of .NET)
In what kind of scenario's is having a ValidationContext at hand useful when generating ValidationFailures? (it is part of the IStringResource interface after all)
When should a custom (property) validator have a decorator interface? (EmptyValidator does, but StringEnumValidator does not)
Should you be defensive or strict when a property is provided of a type the rule is not intended for?
If a rule is available via the fluent syntax, what is the added value of exposing the validator and/or its constructor publicly?
What is the preferred way of defining fluent extensions: one extensions class, or a on per validator (and in the same file)?
What is the purpose of error codes? (And should you try to adopt?)
What was the reasoning behind supporting attributes only? (Opposed to MS's DataAnnotations that also supports members)

For most of these questions I assume to have an answer myself, but I think it is insightful to know about your reasoning (assumptions are the mother of all f#<k ups). It definitely helps when building (generic) custom rules, or doing pull requests.
I'm currently implementing one, having a look at that might also give insight on how I understood some of what you built: https://github.com/Qowaiv/Qowaiv/pull/61

When writing an extension for a (property) validator, can/should you reuse one instance of the rule (or does it contain state)

Not sure what you mean here? Rule instances are created at the time RuleFor is called, and are stored inside the AbstractValidator, so they have the same lifetime as their containing validator.

What is the preferred way of providing localized strings?

Whatever's most appropriate for your application. Standard .NET resource manger is still the normal way. This is covered here, but inshort if you're using the old-style strongly typed resource wrappers generated by VS then WithMessage(x => MyResources.SomeResourceName), or inside a custom property validator's constructor you can pass in a LazyStringSource containing the same delegate.
If you're using asp.net core, which doesn't use strongly-typed resource classes then you inject an IStringLocalizer instance into the AbstractValidator instead, and use this inside the call to `WithMessage(x => localizer["mystring"]).
For a custom validator, you can either specify the default message inside the validator class itself, or inside the extension method using WithMessage.

(And why does FluentValidation.NET not use the resource mechanism of .NET)

It used to, and was the biggest most common complaint I received. As I'm sure you know, using resx files causes satellite assemblies to be generated that have to be deployed with your application. FluentValidation supports 32 languages, which means 31 localization dlls plus the core dll have to be shipped as part of FV. The most common request I received was not to provide these in the package. FluentValidation's LanguageManager allows me to ship a single dll, but still support multiple languages.

In what kind of scenario's is having a ValidationContext at hand useful when generating ValidationFailures? (it is part of the IStringResource interface after all)

ValidationContext literally contains everything about the validation request. It's used to obtain the current instance being validated, the name of the property being validated etc. This is all useful information that could potentially be used when generating the error message.

When should a custom (property) validator have a decorator interface? (EmptyValidator does, but StringEnumValidator does not)

For a custom validator, probably never. This is literally only here for asp.net client-side integration:
https://github.com/JeremySkinner/FluentValidation/blob/9ae2b801376a761771164c6333e7e4cbd6817556/src/FluentValidation.AspNetCore/FluentValidationClientModelValidatorProvider.cs#L39-L54
It allows mapping of a property validator to its associated client-side adapter. By using an interface, it potentially allows a user to hook up a different implementation of an "empty validator" to a client-side required rule. I kinda moved away from this approach in newer versions, although the interfaces are still in place for backwards compatibility. I'm probably going to get rid of them for v9.

Should you be defensive or strict when a property is provided of a type the rule is not intended for?

What do you mean? Like, you have a custom validator that expects a string and then associate it with an integer property? If so then I'd handle this in your extension method with generics so the compiler wouldn't allow it.

If a rule is available via the fluent syntax, what is the added value of exposing the validator and/or its constructor publicly?

There isn't any. For the vast majority of cases I'd even say not to use a class for a custom property validator - most of the time an extension method that wraps wraps Custom (or Must if it's simple) is sufficient.

What is the preferred way of defining fluent extensions: one extensions class, or a on per validator (and in the same file)?

No preference. Whatever you feel like makes most sense for you. I have them all in one file as I find it easier to navigate.

What is the purpose of error codes? (And should you try to adopt?)

Error codes determine the default/fallback validation message. By default the validator's class name is the error code. So a call to NotNull() sets the error code to "NotNullValidator", and this is the string that's used to look up the error message from the LanguageManager. This is something that's on my list to document but haven't had time to do so.

What was the reasoning behind supporting attributes only? (Opposed to MS's DataAnnotations that also supports members)

Not sure what you mean? FluentValidation doesn't use attributes for validation.

Not sure what you mean here? Rule instances are created at the time RuleFor is called, and are stored inside the AbstractValidator, so they have the same lifetime as their containing validator.

Take this example:
private static readonly NoIPBasedEmailAddressValidator _validator = new NoIPBasedEmailAddressValidator();

public static IRuleBuilderOptions<TModel, EmailAddress> NotIPBased<TModel, EmailAddress>(this IRuleBuilder<TModel, EmailAddress> ruleBuilder)
{
    Guard.NotNull(ruleBuilder, nameof(ruleBuilder));
    return ruleBuilder.SetValidator(_validator);
}

Is reusing the same instance tricky here?

It used to, and was the biggest most common complaint I received. As I'm sure you know, using resx files causes satellite assemblies to be generated that have to be deployed with your application. FluentValidation supports 32 languages (..)

Fair point. The library I built 'only' supports 6 languages, but can already be tricky. You made me reconsider.

When should a custom (property) validator have a decorator interface? (EmptyValidator does, but StringEnumValidator does not)

For a custom validator, probably never. This is only here for asp.net client-side integration (..)
I suspected something like that.

If a rule is available via the fluent syntax, what is the added value of exposing the validator and/or its constructor publicly?

There isn't any. For the vast majority of cases I'd even say not to use a class for a custom property validator - most of the time an extension method that wraps wraps Custom (or Must if it's simple) is sufficient.

Makes sense too. I think generic documentation on when to implement a custom validator, and when to just extend on existing ones in an extension method make more sense would help developers a lot.

What was the reasoning behind supporting attributes only? (Opposed to MS's DataAnnotations that also supports members)

Not sure what you mean? FluentValidation doesn't use attributes for validation.
My mistake. I meant Properties only. And of course (if you use expressions on fields, they work to, I noticed), but in your naming you went for "Property", not for "Member".

In general, the thing that misses, is some reasoning behind design decisions, and a document that answers the question: "I want to build e generic (reusable) rule, what should I do?". The documentation on how to use it is awesome, just like the library as whole! (And I'm impressed with the speed in which you respond to my questions)

Is reusing the same instance tricky here?

You definitely shouldn't do that. A validator stores all of its configuration, so for example if you call WithMessage on this validator, it will affect the NoIPBasedEmailAddressValidator across all validator, which you definitely don't want (and also isn't thread-safe). You should instantiate it each time.

I think generic documentation on when to implement a custom validator, and when to just extend on existing ones in an extension method make more sense would help developers a lot.

I think this is already pretty clear in the docs. Under the section on property validator classes section it says "This is an advanced technique that is usually unnecessary." Basically: property validator classes are how FluentValidation itself is implemented. Typically using this lower-level API would be unnecessary for consumers, and breaks you out of the "fluent" world, but the option is there. I don't feel that offering advice on when to use one approach over the other is necessarily something I want to do - I present both options in the docs and it's really up to you as the developer to decide which approach you prefer.

My mistake. I meant Properties only. And of course (if you use expressions on fields, they work to, I noticed), but in your naming you went for "Property", not for "Member".

Member is a more generic term that covers both fields and properties. You can of course use FluentValidation against both (as well as even method calls if you really want to, but that's not a great idea as it bypasses all caching), but in the .NET world generally fields are not exposed publicly, but are encapsulated behind properties. Because FluentValidation is designed to validate the public surface of an object, it makes more sense to refer to properties (as this is the intended use case) as this is what users are more likely to be exposing publicly.
Hope that makes sense


improvement: use unified invocation context

Pull Request Test Coverage Report for Build 1035

10 of 20 (50.0%)  changed or added relevant lines in 2 files are covered.
24 unchanged lines in 7 files lost coverage.
Overall coverage increased (+0.4%) to 62.815%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

server/restful/restful_server.go
0
1
0.0%

core/handler/tracing_handler.go
10
19
52.63%

Files with Coverage Reduction
New Missed Lines
%

core/config/sr_config.go
2
0.0%

eventlistener/loadbalance_event_listener.go
2
66.67%

core/handler/tracing_handler.go
2
35.87%

core/rest_invoker.go
2
93.94%

core/registry/util.go
4
65.63%

client/rest/rest_client.go
5
79.8%

server/highway/highway_conn.go
7
75.68%

Totals

Change from base Build 1029:
0.4%

Covered Lines:
4968

Relevant Lines:
7909

💛  - Coveralls


[ENG-5209] fixed preprints service startup in docker-compose

Purpose
Preprints service won't start as entrypoint is using bower which is missing from container runtime
Changes
Removed line in entrypoint which invoked bower
QA Notes
Documentation
Side Effects
Ticket
https://openscience.atlassian.net/jira/software/c/projects/ENG/boards/145?selectedIssue=ENG-5209

@opaduchak  I just noticed this didn't get merged, maybe you can clean-up the PR? It seems like it should be closed, or merged.


fix: gcp rds 默认不使用vpc网络

这个 PR 实现什么功能/修复什么问题:
gcp rds 默认不使用vpc网络
是否需要 backport 到之前的 release 分支:

release/3.2

/area region
/cc @zexi

Codecov Report

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

@@           Coverage Diff           @@
##           master    #6268   +/-   ##
=======================================
  Coverage    7.07%    7.08%
=======================================
  Files         651      651
  Lines      111299   111299
=======================================
+ Hits         7878     7880    +2
+ Misses     102810   102809    -1
+ Partials      611      610    -1

Flag
Coverage Δ

#aFlag
7.08% <ø> (+<0.01%)
:arrow_up:

Impacted Files
Coverage Δ

pkg/appsrv/response.go
70.58% <0.00%> (+2.94%)
:arrow_up:

Continue to review full report at Codecov.

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


Initiate GCFA conversations with Microsoft

Describe the issue
We need to begin conversations with Microsoft to understand their contractual relationship with Govt. of Canada including the terms and conditions (Annex-E) and see if we can get access to their contract documentation
Which Sprint Priority is this issue related to?
Sprint 12
Additional context
Definition of done

Set up meeting with Microsoft to go over the GoC Framework agreement
Prepare an agenda to discuss terms and conditions
Meeting happened and next steps are discussed

Meeting done and next steps identified. Closing this ticket!


Update PHPStan baseline

The PHPUnit baseline apparently has been created with an older version of PHPStan. I have recreated it with the latest version 1.2.0 which is also currently used by the CI.

Thank you


Explore using ULIDs as identifiers

Explore using ULIDs instead of UUIDs for identifiers as they are lexically sortable (https://github.com/oklog/ulid)
Since PostgreSQL uuid type does not support UUID, char(size of ulid) should be required in identifier columns.

Using ULID would require us to use CHAR(26) or TEXT instead of UUID, which is twice the size as an uuid column.
select pg_column_size('01AN4Z07BY79KA1307SR9X4MV3'::text) as text_size,                                                          pg_column_size('110ec58a-a0f2-4ac4-8393-c866d813b8d1'::uuid) as uuid_size,
pg_column_size('01AN4Z07BY79KA1307SR9X4MV3'::char(26)) as char_size;
 text_size | uuid_size | char_size
-----------+-----------+-----------
        30 |        16 |        30

@erizocosmico curious what you did here. We are starting to use PostgreSQL UUID and are looking to store ULID in there. What we do is decode the ULID to integer, then integer to hex, and then we pad it with zeros (usually one zero) to get to the proper UUID length.
What are your thoughts or what did you do?


I cant login and register

Can you give me database structere, can you export firebase database?

The Database structure is provider and very visible to-date @ketanchoyal  has updated the repo structure...to help you with the logic of login  just deal with the login flow as shown in the dbstructure folder (it contains picture of almost every steps)    and you will be able to login
Duplicate of #9

@nonameclub  close this issue


Let's clean these up.

Closed by #55

Not actually completed.

It actually was completed. User issue lol


Fix tooling API metadata - bundling attribute

Currently there are two different bundlings used in the metadata:

runtime variant: SHADOWED
sources variant: EXTERNAL

Because of that, a resolution without requested attributes is not able to identify the 'runtime' variant as the preferred one.
To resolve that, we now set the sources variant to SHADOWED as well to match the library variant it belongs to. Although it technically does not contain all the sources of the shadowed classes.
Then legacy behavior like: 'configurations.compile.files' (resolving the Tooling API directly through the 'compile' configuration) still works as before. The runtime variant is selected.
This has been fixed in retrospect for 6.2 and 6.2.1 by removing the module metadata file
(in previous releases we also only published pom)

I added a small test to make sure we won't break this again.
@ljacomet if there are no objections, I would go ahead and merge this.

@jjohannes I agree this fix might not be the most correct one, though we could fix that by shadowing all sources in there.
But it seems like the best short term solution, so 👍


Incorrect examples for MatchedBraces

Open: https://javacc.github.io/javacc/#example
Observed:
Examples of legal strings in this grammar are:

{}, }}} // … etc

Expected:
Examples of legal strings in this grammar are:

{}, {{{}}} // … etc

I think there is an issue with the documentation processor, because the example is correct on GitHub:
https://github.com/javacc/javacc/blob/master/docs/index.md#example

Ok, will see if replacing the {{{{{}}}}} by {{{{{}}}}} solves the issue.


simple_query command tag

for simple_query, CommandComplete(tag) now contains a new CommandTag struct. This lets the client introspect the actual tag that was received.

Looks like we don't need this anymore, since we're moving to pg_cat.
I'm closing this PR.


Request: Add PreserveWhitespace property to XmlDocument

We need to be able to set the PreserveWhitespace property on XmlDocuments. We use some web services that are sensitive to whitespace.

We will look into change


graph_models doesn't generate the characters

I have django 1.11.23, django-extensions 1.7.7, and running it in a Docker container, then ssh into it and pip install pydotplus graphviz, then I ran ./manage.py graph_models -a -g -o my_project_visualized.png. It generated a file with model and relationship. But all the characters render as squares, as if they are unicode or something. All my models are English, so should be within ASCII range.

It's more probably a missing pango library in docker. This library is necessary for doing font rendering if I'm not mistaken.
This perfectly normal that this library is not installed by default in a docker and the python library cannot request for it.

@jrd
Thanks for the hint. Do you know which package I should install? When I try to install pydotplus and graphviz, it didn't mention anything else, and I think the dependencies should be automatically installed.

If I just generate a dot file, it uses Helvetica as the font.

Should have read @jrd comment more carefully. I didn't use your solution. Instead I copy the dot file into my local machine and use graphviz to convert it into svg.

If you use alpine docker image, you should apk add ttf-freefont. @XinyuHou


Feature request: open vod in browser

hey,
it would be nice if there is a button/feature to open that vod in my browser so i can easily find my part to crop the download.

tried just clicking on the video in the search result view? 😄


fix: only delete uncofirmed txs if they exist

Related to #565

Description
#565 may be happening for other reasons, but right now I noticed on the logs that sometimes we were trying to delete non-existent txs. This PR fixed that
Test plan

Add two of your addresses to some paybutton, one of which has spendable coins.
Transfer money from one to the other. On ABC's wallet you can do that by right clicking an address and selecting "Spend from this address".
When the tx is confirmed, it should in parallel try to delete the unconfirmed tx twice. This makes so that we get the error "Record doesn't exist", but this can also not happen since async is non deterministic (one process can be executed quite further away from the other so that when it tries to find the unconfirmed tx this has already been deleted). This error should happen on master but not in this branch.

Overall, this is tricky to test and long also. The changes only makes so that we ignore the case where we try to delete a transaction that doesn't exist, so one option is just to approve it and see if we actually stop getting this error on prod.

I'm going to skip testing this one for the review and do a full test in prod to make sure things are working at that point.
We are now only deleting txs that were double spent effectively, which is correct.


Intersection Point of Two Linked Lists

💥 Proposal
" Intersection Point of Two Linked Lists " is a very popular question and is being asked many times in many companies in their interviews .
I would like to add this problem into NeoAlgo's  repo named as Tesseract Coding .
Please assign me to work on this issue with tag DWOC
Have you read the Contributing Guidelines on Pull Requests?
YES

I am willing to contirbute

@manvi0308
I have already requested for the assignment of issue first

I would like to do this in C++, for tag DWOC

I would like to work on this issue under DWOC

I would like to do this in java

I have a solution ready for it in cpp. May I proceed with this under DWOC ?
@dwoc

assigned @Sarthak-9 and @Jassi10000

assigned @Sarthak-9 and @Jassi10000

I mistakengly removed the assignment as my screen was hanging so the click went on wrong place
but
I have also made the made PR before , plss check

I mistakengly removed the assignment as my screen was hanging so the click went on wrong place
but
I have also made the made PR before , plss check