Bundle UMD with rollup

UMD is important as an easy way to use library via <script> tag.
In this diff I added rollup with size snapshot plugin to track final
size of the library with all dependencies (except react ones).
I replaced mixed imports with import * as React from 'react' since
they are being semantically incorrect are failed with rollup.

Thanks for the PR!
Mixed imports are valid syntax, they are described in the Mozilla MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

@FezVrasta I meant with react. It's mixed interop. You should use either default one (which do not include types) or namespace (which will be used when react land esm).

Does the size-snapshot plugin create the minified bundle or do we have to add something like babili to generate it in a separated rollup config?

@FezVrasta Nope it's only track the size. I will add min.

Should we add the UMD build to the browser entry of the package.json?

@FezVrasta Nope. It's bad. webpack prefers browser field over module.

@TrySound your changes are inconsistent with v0.10.3+ can you update the rollup config to be similar.

This is a question of your config. I don't think this package should use other than from "react-popper" entry point.

@virgofx what do you mean exactly?

It looks like the babelrcs/rollups aren't consistent. Just would prefer to make those consistent. I was going to take v0.10.x and incorporate back into v1; however Try beat me however file paths output different.
1.0 is missing a lot of the stuff fixed in v0.10.x and has bad paths.
v.10.x
import babel from 'rollup-plugin-babel';
import minify from 'rollup-plugin-babel-minify';
import replace from 'rollup-plugin-replace';
import nodeResolve from 'rollup-plugin-node-resolve';

const baseConfig = (outputFormat) => {
  const isProduction = process.env.NODE_ENV === 'production';

  let file;
  switch (outputFormat) {
    case 'umd':
    case 'cjs':
      file = 'dist/' + outputFormat + '/react-popper' + (isProduction ? '.min' : '') + '.js';
      break;

    default:
      throw new Error('Unsupported output format: ' + outputFormat);
  }

  return {
    input: 'src/index.js',
    plugins: [
      nodeResolve(),
      babel({
        plugins: [
          // Ensure "external-helpers" is only included in rollup builds
          // Issue: https://github.com/rollup/rollup/issues/1595
          'external-helpers',
        ],
      }),
      replace({
        'process.env.NODE_ENV': JSON.stringify('production')
      }),
      isProduction ? minify({
        comments: false,
      }) : false,
    ],
    external: ['react', 'react-dom', 'prop-types', 'popper.js'],
    output: {
      name: 'ReactPopper',
      file: file,
      format: outputFormat,
      sourcemap: true,
      globals: {
        react: 'React',
        'prop-types': 'PropTypes',
        'popper.js': 'Popper',
      },
    },
  };
};

export default [
  baseConfig('cjs'),
  baseConfig('umd'),
];

1.0
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
import { sizeSnapshot } from 'rollup-plugin-size-snapshot';

const input = './src/index.js';

const umdGlobals = {
  react: 'React',
  'react-dom': 'ReactDOM',
  'popper.js': 'Popper',
};

const getBabelOptions = () => ({
  babelrc: false,
  exclude: '**/node_modules/**',
  presets: [['env', { modules: false }], 'stage-1', 'react'],
  plugins: ['external-helpers'],
});

export default [
  {
    input,
    output: {
      file: 'dist/index.umd.js',
      format: 'umd',
      name: 'ReactPopper',
      globals: umdGlobals,
    },
    external: Object.keys(umdGlobals),
    plugins: [
      nodeResolve(),
      commonjs({ include: '**/node_modules/**' }),
      babel(getBabelOptions()),
      sizeSnapshot(),
    ],
  },

  {
    input,
    output: {
      file: 'dist/index.umd.min.js',
      format: 'umd',
      name: 'ReactPopper',
      globals: umdGlobals,
    },
    external: Object.keys(umdGlobals),
    plugins: [
      nodeResolve(),
      commonjs({ include: '**/node_modules/**' }),
      babel(getBabelOptions()),
      uglify(),
    ],
  },
];

Note that in 1.x we are going to ship only UMD bundles, no CJS anymore

That's totally fine, would prefer to drop the 'umd' sub folder then? or keep consistent?

Umh, maybe it's a good idea to keep it in case in the future we decide to add more bundles (maybe once ES modules get widespread in the browsers?). Good call.

Yeah, it doesn't hurt. I'll make it all consistent later today. Just cut v0.10.4 -- Let's make sure that's 100%. THen i'll test all the SSR/ production builds , readme updates, package.json updates, and rollup sync so everything is smooth upgrading.

I don't think there's anything missing in my config.

Probably replace for warning. Don't know what it is.


p-map + p-queue

Hi @sindresorhus
Maybe I haven't catch right module but it would be great to have mix of p-map + p-queue to be able to run the same promise-returning & async function on inputs queue.
For example:
const queue = new Queue((item) => {
  return got('https://sindresorhus.com/?unicorn=' + item);
}, { concurrency: 2 });

(async () => {
  await queue.add('🦄');
  await queue.add(async () => '🦄');
  await queue.add('🐴');
  await queue.add( '🐙');
})();

You don't need p-map for this. Just define a tiny helper method:
const {default: PQueue} = require('p-queue');
const got = require('got');

const queue = new PQueue({concurrency: 2});

const add = item => queue.add(() => got('https://sindresorhus.com', {searchParams: {unicorn: item}}));

(async () => {
	await add('🦄');
	await add(async () => '🦄');
	await add('🐴');
	await add( '🐙');
})();

If you just need to limit concurrency and don't need a queue, check out https://github.com/sindresorhus/p-limit


Provide a buying strategy

Anderson Strategy . Every time the price is down,2 times the Number of purchase loss

$18 buys 20 EOS and $17 buys 40 EOS.
-1=1820/20-17. 0.333=(1820+17*40)/60-17

-1 = 18 x 20 / 20-17。0.333 =（18 x 20 + 17 * 40）/ 60-17

I don't entirely follow how this strategy works yet. Also since the current bot only looks at candle data and has no context of previous trades at that point I'm not sure if it is possible in the current setup. I would like to hear more about it though. Perhaps you have a link to an explanation of the strategy? Most of the stuff I'm finding is related to the ProfitTrailer bot.

https://www.jianshu.com/p/ad4503310036
This strategy requires a lot of money
As long as there is no big floating drop, they are all profitable.
Not all historical transactions can be obtained from API?
So I'm curious about why you need to use the database

usd 1140
price             Purchase quantity             Existing quantity   Surplus usd
18                        10                                        10                  960
17                        20                                         30                  620
16                        60                                         90                    0
sell    1 440=16*90
.....Continue the cycle
still have a question. Is this program submitted for sale after the purchase is completed?
Please forgive my laziness ^_ ^

Not all historical transactions can be obtained from API?
So I'm curious about why you need to use the database

Oh it's definitely possible. All the parts are there, just not together :)

Is this program submitted for sale after the purchase is completed?

This question I don't quite understand, sorry :(

Hope to support the Huobi exchange.
This should be easy.
Update the ExchangeSharp .
Add the Huobi request API code to the market summary.(They are different)

SqlServerData cannot use the native login, and the account password must be required.
There will be bugs using SqlServerData. Maybe the reason why I run locally?

Made separate issues for those last 2 points.


Can't use add-type / "using assembly" to get types from local project assembly

I have a local C# solution (clone of https://github.com/markm77/open-banking-connector-csharp) and I can't seem to be able to load the types of one of its projects. I am developing a PowerScript module to interface with the C# but and really need to have access to the types for cmdlet input/output.
Steps to reproduce
I re-build the C# solution, then run the following in PowerShelll:
add-type -assemblyname C:\Repos\GitHub\markm77\open-banking-connector-csharp\src\OpenBanking.Library.Connector\bin\Debug\netstandard2.1\FinnovationLabs.OpenBanking.Library.Connector.dll -passthru

Expected behavior
Types are loaded with no errors.
Actual behavior
The following errors are produced:
Add-Type: Unable to load one or more of the requested types.
Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'FluentValidation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7de548da2fbae0f0'. The system cannot find the file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'AutoMapper, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=be96cd2c38ef1005'. The system cannot find the
file specified.
Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

Environment data
ame                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Can you try with Add-Type -Path rather than Add-Type -AssemblyName @markm77 ?

Thanks for the replies but yes I had already tried this with same result.

@markm77 when you just do dotnet build, the dependency assemblies aren't copied.  PowerShell doesn't look at the nuget cache, you need to do a full dotnet publish and import from the $Configuration\$Framework\publish directory.

Thanks @SeeminglyScience , great tip! That solved the errors. I believe the types are loaded now but wondering how to get a full list at any time to check? Get-TypeData seems to ignore types loaded from assemblies..... Also why do you guys recommend Add-Type -Path over Add-Type -AssemblyName as I couldn't see any differences?

PS I will close this issue shortly as believe solved.

Thanks @SeeminglyScience , great tip! That solved the errors. I believe the types are loaded now but wondering how to get a full list at any time to check?

[Runtime.Loader.AssemblyLoadContext]::Default.Assemblies.
    Where{ $_.Location -like "$publishDirectory*" }.
    ForEach('GetTypes').
    Where{ $_.IsPublic }

Or
Install-Module ClassExplorer
Find-Type
Get-Assembly | ? Location -like "$publishDirectory" | Find-Type
Get-Assembly OpenBanking* | Find-Type
Find-Type -Namespace *OpenBanking*

Get-TypeData seems to ignore types loaded from assemblies.....

Yeah that's just for PowerShell's extended type system.  You would use that to get information about loaded .types.ps1xml's for instance.

Also why do you guys recommend Add-Type -Path over Add-Type -AssemblyName as I couldn't see any differences?

Assembly name is meant for things like
System.Management.Automation, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
System.Management.Automation

It may work if you give it a path, but I wouldn't rely on that.  That seems like an accidental implementation detail, I'm not sure if it would be considered part of the change contact.  Either way Path is more explicit in intent.

Thanks again @SeeminglyScience . So I ran the following script to look at loaded types, either from Add-Type or using assembly:
start-transcript -path .\outputFileName.txt
[Runtime.Loader.AssemblyLoadContext]::Default.Assemblies.
Where{ $_.Location -like "$publishDir*" }.
ForEach{ $_.GetTypes().
  Where{ $_.IsPublic }
} | Format-Table -Property IsPublic, Name, Namespace
stop-transcript

and what I noticed was quite weird.
For using assembly when running the first time the dependent types were missing, the second time a block of them were added and the third time a much smaller final block was added. I tried waiting a while after issuing using assembly but no you really do need to run the script 3 times.
For Add-Type when running the first time the first two blocks mentioned above were present, and the second time the final block from above was added.
So I shall always run this command 3 times in future (very strange) to see all loaded types.
I also ran the above command with a C# PS module project after loading the dot-published DLL with using module and using assembly. There using module seemed to pull in all dependencies but using assembly pulled in none, not even those which were used by a PSCmdlet. Since this is my actual use case, a cmdlet with .NET input and output types, seems like I simply need to prefix client PS scripts with using module.
Any thoughts appreciated even though I'll close this now.

When you load an assembly dependencies are typically loaded when they're needed.  Often this is when a method is first jitted.  The only way to ensure that dependency assemblies are loaded before the dependent needs them is to import them yourself.
using module will incidentally end up loading more because your assembly is crawled by PowerShell looking for cmdlets.  During that, some methods may be jitted, some static constructors may be called, but I wouldn't depend on that.

Thanks @SeeminglyScience , I managed to get the same result from using module (3 runs) and using assembly (4 runs) by adding a non-PSCmdlet class with a dependency. So seems using assembly ignores PSCmdlet dependencies which is no good if these are the only dependencies and we want to expose .NET types related to these....
I proved this by dot-publishing the PS binary module with only the PSCmdlet class (with a .NET class input coming from a dependency) and then trying to create an input (.NET class) for the cmdlet:
[PSCmdletInputType]::new()

This succeeded with using module but not using assembly (error: InvalidOperation: Unable to find type [PSCmdletInputType].
Not sure if this is a bug or design behaviour.

using assembly doesn't do anything at parse time (never implemented, but also quite difficult to solve), which I'm guessing is where you're getting those errors (this for PS classes yeah?).  The only way to guarantee that an assembly will be available is to load it before parse time.  Everything else that works incidentally, I wouldn't recommend depending on.

Are you saying it's not safe to do the following with .NET types TypeA and TypeB?
using module ./x.dll # where x.dll depends on y.dll which contains TypeA, TypeB
$a = [TypeA]::new()
$b = MyCmdletFromBinaryModuleX $a # $b is of type TypeB

Yeah.  Even if it happens to work, you would be depending on implementation details that are subject to change.

I believe you are right as now I have moved from a simple example to more realistic code the dependency assemblies are no longer loaded by using module and code above fails due to unknown type.
Is the workaround below safe where we force the relevant dependency to load via using assembly? It works in my testing.
I don't really know what parse-time means but assume this is the first pass of the code by the interpreter?
using module ./x.dll # where x.dll depends on y.dll which contains TypeA, TypeB
using assembly ./y.dll # <-- WORKAROUND
$a = [TypeA]::new()
$b = MyCmdletFromBinaryModuleX $a # $b is of type TypeB

Sorry @SeeminglyScience for spamming you with so many questions! I believe actually the above code is okay as the parse-time issue relates to creation of PS types: https://github.com/PowerShell/PowerShell/issues/3641.
Enjoy the rest of your weekend.

In cases anyone is interested, in the end I decided it was user-unfriendly and fiddly to get users to create .NET types so I've created New cmdlets for their convenience. I can also now use the more flexible Import-Module command instead of using. So the example above becomes
import module ./x.dll # where x.dll depends on y.dll which contains TypeA, TypeB
$a = New-TypeA
$b = MyCmdletFromBinaryModuleX $a # $b is of type TypeB

Everything works so much better!


[AutoPR apimanagement/resource-manager] Fixing entities which should be per ApiRevision instead of just ApiId

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/2622

Codecov Report

Merging #2142 into restapi_auto_apimanagement/resource-manager will not change coverage.
The diff coverage is n/a.

@@                             Coverage Diff                              @@
##           restapi_auto_apimanagement/resource-manager    #2142   +/-   ##
============================================================================
  Coverage                                        53.51%   53.51%
============================================================================
  Files                                             5137     5137
  Lines                                           123411   123411
============================================================================
  Hits                                             66042    66042
  Misses                                           57369    57369

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 e61cc8a...8e8fd2f. Read the comment docs.


fix: typo on README.md

📜 Description
Removed # to make installation instructions more explicit.
💡 Motivation and Context
Commented out code hard to read and notice.
Also added tabs for selection package manager in documentation.
📢 Changelog
Docs

removed # to make installation instructions more explicit in README;
added npm/yarn tabs.

🤔 How Has This Been Tested?
Tested via preview on localhost:3000 and github preview.
📸 Screenshots (if appropriate):

📝 Checklist

[ ] CI successfully passed

Thank you for contribution @bekroz 🙌


Note tab face lift, addition of bullet lists?

I keep a lot of things in my note pad, but it be dreadfully hard to read and keep organized.
I think decreasing the tabbing spacing would go a long way to aid in creating clear notes.
It would also be awesome to add bullet lists with a hot-key to activate.

Use sticky notes

The notes plugin contains only text, we will not be adding any editor-like features that isnt just plain text, but the tab distance makes sense, idk why it is so horrid atm.


Type evaluation gives confusing results

If you use 'type' evaluation and guess the entire text as an entity that has the same type as the first annotation, then you get perfect recall and precision. Example:
"John Jones and Peter Peters came to York"
Gold labels:

John Jones (person)
Peter Peters (person)
York (location)
Prediction:
John Jones and Peter Peters came to York (person)

If you apply your code in "type" mode, the only predicted annotation will be considered correct because it overlaps with 1 and has the right type, and none of the gold labels will be considered MISSING, because they all overlap with the predicted annotation. Thus, you will have 1 correct, and 0 in all other types, leading to Precision=Recall=1

Have rectified it.
You can test your the case after running pip install . under the directory.
Then run
import eval4ner.muc as muc
import pprint
grount_truth = [('PER', 'John Jones'), ('PER', 'Peter Peters'), ('LOC', 'York')]
prediction = [('PER', 'John Jones and Peter Peters came to York')]
text = 'John Jones and Peter Peters came to York'
one_result = muc.evaluate_one(prediction, grount_truth, text)
pprint.pprint(one_result)

The output of would be
{'exact': {'actual': 1,
           'correct': 0,
           'f1_score': 0,
           'incorrect': 1,
           'missed': 2,
           'partial': 0,
           'possible': 3,
           'precision': 0.0,
           'recall': 0.0,
           'spurius': 0},
 'partial': {'actual': 1,
             'correct': 0,
             'f1_score': 0.25,
             'incorrect': 0,
             'missed': 2,
             'partial': 1,
             'possible': 3,
             'precision': 0.5,
             'recall': 0.16666666666666666,
             'spurius': 0},
 'strict': {'actual': 1,
            'correct': 0,
            'f1_score': 0,
            'incorrect': 1,
            'missed': 2,
            'partial': 0,
            'possible': 3,
            'precision': 0.0,
            'recall': 0.0,
            'spurius': 0},
 'type': {'actual': 1,
          'correct': 1,
          'f1_score': 0.5,
          'incorrect': 0,
          'missed': 2,
          'partial': 0,
          'possible': 3,
          'precision': 1.0,
          'recall': 0.3333333333333333,
          'spurius': 0}}

Detailed explanations refer to my blog: link. Hope this helps ;)


Why does this project have a lot of repeated code

ResponseHandler for example is repeated in alot of the folders and has nothing in it.
API Exception is nearly identical in most of the folders, interfaces are called out but why not inherit the class instead of repeating the code.   Or just use a master API Exception in the base layer.
Is this code autogenerated or something.

@rjs5327 Thank you for your contribution. Except for Util and Oauth2 is generated automatically.


Disable formatting for some LSP

In the lspconfig section it is mentioned that we can disable certain LSP features by setting capabilities. Is there any example for turning off formatting for e.g. tsserver?

This is from LazyVim: https://github.com/LazyVim/LazyVim/discussions/242#discussioncomment-4947842
But basically you can add
if client.name == "tsserver" then
    client.server_capabilities.documentFormattingProvider = false
end

to the LspAttach autocomd, inside the nvim-lspconfig config and after defining the client (so after line 503)

@qianxyz do you want to disable lsp formatting completely, or just the autoformat on save? If it's the autoformat on save, there's a recipe from conform.nvim that I use, perhaps I should open a PR for that...

@dam9000 Thanks! I'm aware of the conform.nvim recipe. Basically I'm missing the old behavior with autoformat.lua where there is a :Format command, and you can toggle format on save globally and filter on client.name. All of these are configurable through conform.nvim now so functionally I'm all set.
I'm just curious since this is explicitly mentioned in the comments
https://github.com/nvim-lua/kickstart.nvim/blob/b83b2b061c1fab0e1a3a28c185345be7957e74cd/init.lua#L593-L600
and I'm wondering how to do that here since people may want to disable lsp formatting completely. But as you said, just disabling format on save makes more sense to me now. Thanks!

I opened a PR for the "autoformat on save only for specified filetypes"
https://github.com/nvim-lua/kickstart.nvim/pull/694

I think the comments are misleading: the capabilities field in the servers variable are for defining the client capabilities, but documentFormattingProvider is a server capability. It could instead be modified through a on_attach callback by modifying client.server_capabilities.
But for this particular case, I instead added a filter field to the vim.lsp.buf.format to exclude tsserver:
nmap('<leader>f', function()
    vim.lsp.buf.format {
        async = true,
        filter = function(client) return client.name ~= "tsserver" end,
    }
end, '[F]ormat')


BUG: inside academia research topics scraper function

Is there an existing issue for this?

[x] I have searched the existing issues there is no existing issue for this

What happened?
In academia.py file current scrapping function of get_research_topics() is returning None. Debugged the code already and want to fix it as a contributor. Also this issue can be seen by running its test file.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'24 contributor
[X] I want to work on this issue

Go ahead @GbCderr14


[AutoPR analysisservices/resource-manager] Fix incorrect type of enablePowerBIService property

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5930

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/4786


Option to manually sync the assets?

I’m not sure what you mean. Can you elaborate?

Sometimes there might be the use-case that you dont want to rebuild all pages, but want to deploy updated assets (like css changes) to the static-page. Currently this can only be done manually from a 3rd party instance like ftp/ssh.

Closing feature requests as described in #40.


AO-13872: Accept enabled/disabled as valid bool values in env vars and config files

This PR proposes the change that accepts enabled and disabled as legit values for boolean configuration items in env vars and config files. This makes the env vars more consistent across agents.
See also: https://swicloud.atlassian.net/browse/AO-13872 for more details.

Codecov Report

Merging #117 into master will increase coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #117      +/-   ##
==========================================
+ Coverage   83.85%   83.92%   +0.06%
==========================================
  Files          35       35
  Lines        4324     4324
==========================================
+ Hits         3626     3629       +3
+ Misses        592      589       -3
  Partials      106      106

Impacted Files
Coverage Δ

v1/ao/internal/config/env.go
90.32% <100%> (ø)
:arrow_up:

v1/ao/internal/reporter/reporter_grpc.go
67.99% <0%> (+0.51%)
: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 8dc0d50...83a4978. Read the comment docs.


Why HMS PushKit needs android.permission.REQUEST_INSTALL_PACKAGES

I've tried this sample and I encountered a problem:
Why HMS PushKit needs android.permission.REQUEST_INSTALL_PACKAGES

<uses-permission  android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

This permission is used to update the HMS Core and push kit APK. Push kit strongly depends on the HMS Core and push kit APK. If this permission is not granted, applications may fail to be installed, and causing upgrade failures of the HMS and push kit`s APK.
Therefore, this permission is mandatory.

@Mike-mei Thanks for the answer. So some stores reject application because of this permission (I'm not sure if GP also rejects the app). So what we can do about this?

If you remove this permission, it will not be affected on Huawei phones.but the HMS Core APK may not be installed on non-Huawei phones.
''can it cause to crash in our app because of upgrade failure?''
-- no，only will make the application cannot be automatically upgraded.


Sqlite implementation

This PR adds Sqlite implementation to snarkOS.
Performance benefits due to not using snarkVM serialization at storage layer, much simpler storage implementation.
Includes minor refactor to storage to cleanup.
Adds --sqlite flag to snarkOS, requires sqlite compilation feature to enable.
Non-default/opt-in since we don't use unit tests for it yet, and needs to do some more vetting before we consider any full transfer. Primary use cases right now are testing and Aleo Explorer.

The SQLite impl looks quite solid to me

Same here, currently testing the branch locally 🧪


When emitting no-escape closures, make sure that we copy the closure …

…before we pass it into the partial apply to eliminate an ownership violation.
The problem here is that without this patch we emit code like this:
bb0(%0 : @owned $T):
  %1 = partial_apply %foo(%0)
  %2 = mark_dependence %1 on %0

Since a partial_apply consumes the object, the mark_dependence is a use after
free (especially if one has any further uses of %0 after the mark_dependence).
So what I did was I copied the value before creating the partial_apply. So
now we get this:
bb0(%0 : @owned $T):
  %1 = copy_value %0
  %2 = partial_apply %foo(%1)
  %3 = mark_dependence %2 on %0
  ...
  destroy_value %0

This ensures that one can actually have uses after the mark_dependence of both
operands.
This enables ownership verification to be enabled on
Interpreter/enforce_exclusive_access.
rdar://48521061

@swift-ci smoke test

Uh, what? A noescape closure shouldn't need copying; that defeats the purpose. Why do we need a mark_dependence if the partial_apply takes the closure at +1?

This is inside the code we generate for withoutActuallyEscaping expressions.
We need to make sure that the lifetime of the noescape closure context is not shortened beyond the use of the closure we insert to verify withoutActuallyEscaping.
The code looks like the following (before this patch). We need to make sure that the lifetime of the context of %0 is not shortened to before %3's uses e.g after inlining and other optimizations. Hence the mark_dependence.
@gottesmm I assume there are situations where we end up in this code and the operand to withoutActuallyEscaping is not a trivial value (@noescape closure)?
sil hidden [ossa] @$s11TestClosure9letEscape1fyycyyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () {
// %0                                             // users: %4, %3, %1
bb0(%0 : $@noescape @callee_guaranteed () -> ()):
  debug_value %0 : $@noescape @callee_guaranteed () -> (), let, name "f", argno 1 // id: %1
  // function_ref thunk for @callee_guaranteed () -> ()
  %2 = function_ref @$sIg_Ieg_TR : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () // user: %3
  %3 = partial_apply [callee_guaranteed] %2(%0) : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () // user: %4
  %4 = mark_dependence %3 : $@callee_guaranteed () -> () on %0 : $@noescape @callee_guaranteed () -> () // users: %11, %5
  %5 = begin_borrow %4 : $@callee_guaranteed () -> () // users: %10, %8, %7
  // function_ref closure #1 in letEscape(f:)
  %6 = function_ref @$s11TestClosure9letEscape1fyycyyXE_tFyycyycXEfU_ : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () // user: %7
  %7 = apply %6(%5) : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () // user: %12
  %8 = is_escaping_closure %5 : $@callee_guaranteed () -> () // user: %9
  cond_fail %8 : $Builtin.Int1                    // id: %9
  end_borrow %5 : $@callee_guaranteed () -> ()    // id: %10
  destroy_value %4 : $@callee_guaranteed () -> () // id: %11
  return %7 : $@callee_guaranteed () -> ()        // id: %12
}

Sounds to me like a callee_guaranteed partial_apply shouldn't be taking its argument at +1. Am I missing something?

A regular partial_apply does capture its arguments.

callee_guaranteed describes that invoking the closure does not expect the context at +1 but at +0.

@jrose-apple this "footgun" is why we have wanted to split the capturing box from the partial apply itself. The capturing box in general takes values at +1 no matter the convention. This is easily confused if one sees a signature with a guaranteed argument or sees the partial_apply marked callee_guaranteed.

@aschwaighofer I will add that as a SILGen test case to document this.

@aschwaighofer I am going to do that in a subsequent commit.

@gottesmm This test case already exists: test/SILGen/without_actually_escaping.swift

@aschwaighofer ok. I will add to that one.

What does it mean to copy a noescape closure?

It is a a trivial copy.

@gottesmm I assume there are situations where we end up in this code and the operand to withoutActuallyEscaping is not a trivial value (@NoEscape closure)?

I would not expect that ownership verifier to have a problem with trivial values.

This is the SILGen output when I put the bad SIL into withoutActuallyEscaping.swift. The copy_value that is added by this PR is %15 = copy_value %13. Notice how without that copy, %13 is consumed by the partial apply.
sil hidden [ossa] @$s25without_actually_escaping0A24ActuallyEscapingConflictyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_box ${ var Int }, var, name "localVar" // users: %28, %8, %1
  %1 = project_box %0 : ${ var Int }, 0           // users: %20, %9, %6
  %2 = integer_literal $Builtin.IntLiteral, 0     // user: %5
  %3 = metatype $@thin Int.Type                   // user: %5
  // function_ref Int.init(_builtinIntegerLiteral:)
  %4 = function_ref @$sSi22_builtinIntegerLiteralSiBI_tcfC : $@convention(method) (Builtin.IntLiteral, @thin Int.Type) -> Int // user: %5
  %5 = apply %4(%2, %3) : $@convention(method) (Builtin.IntLiteral, @thin Int.Type) -> Int // user: %6
  store %5 to [trivial] %1 : $*Int                // id: %6
  // function_ref closure #1 in withoutActuallyEscapingConflict()
  %7 = function_ref @$s25without_actually_escaping0A24ActuallyEscapingConflictyyFyycfU_ : $@convention(thin) (@guaranteed { var Int }) -> () // user: %10
  %8 = copy_value %0 : ${ var Int }               // user: %10
  mark_function_escape %1 : $*Int                 // id: %9
  %10 = partial_apply [callee_guaranteed] %7(%8) : $@convention(thin) (@guaranteed { var Int }) -> () // users: %27, %12, %11
  debug_value %10 : $@callee_guaranteed () -> (), let, name "nestedModify" // id: %11
  %12 = begin_borrow %10 : $@callee_guaranteed () -> () // users: %26, %13
  %13 = copy_value %12 : $@callee_guaranteed () -> () // users: %25, %17, %15
  // function_ref thunk for @escaping @callee_guaranteed () -> ()
  %14 = function_ref @$sIeg_Ieg_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () // user: %16
  %15 = copy_value %13 : $@callee_guaranteed () -> () // user: %16
  %16 = partial_apply [callee_guaranteed] %14(%15) : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () // user: %17
  %17 = mark_dependence %16 : $@callee_guaranteed () -> () on %13 : $@callee_guaranteed () -> () // users: %24, %18
  %18 = begin_borrow %17 : $@callee_guaranteed () -> () // users: %23, %21, %20
  // function_ref closure #2 in withoutActuallyEscapingConflict()
  %19 = function_ref @$s25without_actually_escaping0A24ActuallyEscapingConflictyyFyyycXEfU0_ : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Int) -> () // user: %20
  %20 = apply %19(%18, %1) : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Int) -> ()
  %21 = is_escaping_closure %18 : $@callee_guaranteed () -> () // user: %22
  cond_fail %21 : $Builtin.Int1                   // id: %22
  end_borrow %18 : $@callee_guaranteed () -> ()   // id: %23
  destroy_value %17 : $@callee_guaranteed () -> () // id: %24
  destroy_value %13 : $@callee_guaranteed () -> () // id: %25
  end_borrow %12 : $@callee_guaranteed () -> ()   // id: %26
  destroy_value %10 : $@callee_guaranteed () -> () // id: %27
  destroy_value %0 : ${ var Int }                 // id: %28
  %29 = tuple ()                                  // user: %30
  return %29 : $()                                // id: %30
} // end sil function '$s25without_actually_escaping0A24ActuallyEscapingConflictyyF'

So the reason this happens is the thunk we introduce.

It doesn't semantically make sense to copy a value, consume it to produce a new value, and then mark dependence on the thing it was copied from. What does that mean?

I don't understand your issue.
With
%17 = mark_dependence %16 : $@callee_guaranteed () -> () on %13 : $@callee_guaranteed () -> ()
we communicate to the optimizer that all uses of %17 depend on %13 (being alive) - the optimizer is not allowed to move the ultimate destroy of %13 before any of %17's uses. This is a precise semantic meaning?

That's true! But it doesn't make sense to copy %13 and use the copy to generate %16 and then have %16 rely on %13 instead of the copy. That means that %16 isn't actually consuming the copy, since if it were, it wouldn't need %13 to stay alive.

You are right that the constraint is not needed in this case. It is an overly conservative constraint in this case (the argument to withoutAcutallyEscaping being an escaping closure) since the partial_apply captures the reference.
It is not redundant information if the input was a noescape closure (only the trivial value is captured by the partial_apply of a noescape closure type): in which case it means %17 depends on the closure context  of %13 (via transitivity of the mark_dependence chain).
%17 = mark_dependence %16 : $@callee_guaranteed () -> () on %13 : $@noescape @callee_guaranteed () -> ()
If we inline s11TestClosure9letEscape1fyycyyXE_tF into s22closure_lifetime_fixup10testSimple1cyAA1CC_tF the optimizer sees that %4 is ultimately dependent on [ARG] and therefore must not move the ultimate release of [ARG] accross any of %4s uses.
// CHECK-LABEL: sil @$s22closure_lifetime_fixup10testSimple1cyAA1CC_tF : $@convention(thin) (@guaranteed C) -> () {
// CHECK: bb0([[ARG:%.*]] : $C):
// CHECK: [[F:%.*]]  = function_ref @$s22closure_lifetime_fixup10testSimple1cyAA1CC_tFyyXEfU_
// CHECK-NEXT:  strong_retain [[ARG]] : $C
// CHECK-NEXT:  [[PA:%.*]] = partial_apply [callee_guaranteed] [on_stack] [[F]]([[ARG]]) : $@convention(thin) (@guaranteed C) -> ()
// CHECK-NEXT:  [[CL:%.*]] = mark_dependence [[PA]] : $@noescape @callee_guaranteed () -> () on [[ARG]] : $C
// CHECK-NEXT:  // function_ref use_closure(_:)
// CHECK-NEXT:  [[F2:%.*]] = function_ref @$s11TestClosure9letEscape1fyycyyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
// CHECK-NEXT:  apply [[F2]]([[CL]]) : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
// CHECK-NEXT:  dealloc_stack [[PA]] : $@noescape @callee_guaranteed () -> ()
// CHECK-NEXT:  strong_release [[ARG]] : $C
// CHECK-NEXT:  tuple ()
// CHECK-NEXT:  return {{.*}} : $()

sil hidden [ossa] @$s11TestClosure9letEscape1fyycyyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () {
// %0                                             // users: %4, %3, %1
bb0(%0 : $@noescape @callee_guaranteed () -> ()):
  debug_value %0 : $@noescape @callee_guaranteed () -> (), let, name "f", argno 1 // id: %1
  // function_ref thunk for @callee_guaranteed () -> ()
  %2 = function_ref @$sIg_Ieg_TR : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () // user: %3
  %3 = partial_apply [callee_guaranteed] %2(%0) : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () // user: %4
  %4 = mark_dependence %3 : $@callee_guaranteed () -> () on %0 : $@noescape @callee_guaranteed () -> () // users: %11, %5
  %5 = begin_borrow %4 : $@callee_guaranteed () -> () // users: %10, %8, %7
  // function_ref closure #1 in letEscape(f:)
  %6 = function_ref @$s11TestClosure9letEscape1fyycyyXE_tFyycyycXEfU_ : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () // user: %7
  %7 = apply %6(%5) : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> () // user: %12
  %8 = is_escaping_closure %5 : $@callee_guaranteed () -> () // user: %9
  cond_fail %8 : $Builtin.Int1                    // id: %9
  end_borrow %5 : $@callee_guaranteed () -> ()    // id: %10
  destroy_value %4 : $@callee_guaranteed () -> () // id: %11
  return %7 : $@callee_guaranteed () -> ()        // id: %12
}

Forget the implementation. I'm saying that the semantics of "copy a value X to X2, consume X2 to produce Y, and mark that Y is dependent on the original X" are wrong. Either Y now owns X2 (and therefore doesn't need X), or X2 secretly depends on X (and therefore the copy didn't make an independent value). In this case it's the latter.

destroy_value %4 : $@callee_guaranteed () -> () also doesn't make sense. @callee_guaranteed is a form of @guaranteed; it shouldn't be yours to destroy.

If partial_apply could take a borrow this would make a lot more sense, I think.


MatSelectionList with Radiogroup

feature request
What is the expected behavior?
I would like to have a new option for MatSelectionList Component to only make one choice at a time possible.
If this option is true, the Checkboxes should become Radiocontrols.
What is the current behavior?
There is no option to make only one choice exclusive.
What are the steps to reproduce?
https://material.angular.io/components/list/overview#selection-lists
You are able to tick every single option.
What is the use-case or motivation for changing an existing behavior?
Sometimes you would like to indicate all possible variants but the User is only able to chose one of them. In a Poll with only one valid choice for Example.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
latest stable
Is there anything else we should know?
I currently fake the exclusive choice by unticking the whole selectionList and only tick the selected Item; The Checkboxes annoy the user as they indicate a multiple-choice-option.

You can do the same with an ngFor and classic radio input no ?

Indeed, @WizardPC this also applies to Checkboxes: I can use default Checkbox Component and ngFor them.
A ngFor Radiogroup would not have the native design like a MaterialList and there would be a lot effort to copycat the MaterialSelectionList CSS-Rules into the handcrafted Radiogroup.

I think it should also be possible to hide the checkbox or the radiobutton. If you want a single select list that forwards you to somewhere or pops a modal to edit the item you don't want any kind of selection marker.

Duplicate #10213 #7157
I'm interested in this as well

Can't the attribute RadioGroup of matRadioButton associate radio-button with radio-group?

Closing as a duplicate of https://github.com/angular/components/issues/7157.


pool#wait_done exits prematurely

Testcase:
require 'thread/pool'
require 'thread/future'

pool = Thread.pool(4)

Thread.future(pool) do
  puts "future 1 starting"
  sleep(5)
  puts "future 1 ending"
end

Thread.future(pool) do
  puts "future 2 starting"
  sleep(20)
  puts "future 2 ending"
end

puts "Spawned futures. Going to wait for them"
pool.wait_done

Expected:
future 1 starting
Spawned futures. Going to wait for them
future 2 starting
future 1 ending
future 2 ending

Instead, I get:
future 1 starting
Spawned futures. Going to wait for them
future 2 starting
future 1 ending

That is, the program exits when the first future ends. This happens because report_done reports as being done if there are idle threads, and there are.

Thanks, fixed on master.


Add presubmit checks

travis, lint, coverage and anything else we can leech off main or contrib repo. See checks that some other repos under kubernets/ have, eg: https://github.com/kubernetes/minikube or https://github.com/google/cadvisor. Assigning to Manuel since I think he already has something.

This is ready. Closing.


Replace S0004 With RBAC service Check

This replaces the inefficient puppet infra status check
this particular test case only looks for RBAC, the other services will follow in later additions
There is no negative test for this API call, as S0019 test this mechanism, and the positive test case that exists  is sufficient proof

If feel that the original check of the services API (/status/v1/services) was able to provide a wider health check of the status of the infrastructure than the current rbac-service (e.g. /status/v1/services/rbac-service). As such, I will see it as more beneficial to parse the response to /status/v1/services for xxx.include?('Unknown') || XXX.include?('Unreachable') references than the still valid but narrower view that we get with /status/v1/services/rbac-service. However, we are restricted by the shaver function status_check as it hardcores the URL as per below https://#{host}:#{port}/status/v1/services/#{endpoint}".
In order to make all this more general which would allow the xxx.include?('Unknown') || XXX.include?('Unreachable') for this PR, I would suggest a change to the function status_check as follows https://#{host}:#{port}#{api}#{endpoint}" with the associated changes to it. As such, for this PR the parameter endpoint will be blank/empty and will allow for the necessary flexibility to get the general status of  /status/v1/services API


Weird notifications.Which is not good for User Experience (Details Inside)

I think these notifications will confuse users and I don't think its helping users in any way so they should be removed Or make it user-friendly...

Such a video is only in the debut version, it should not be in the release.

This is visible only in the debug version, this should not be in the release.

This is visible only in the debug version, this should not be in the release.

Okay cool, Thanks


Automator: update proxy@master in istio/istio@master

Generated by Automator - 2021-06-15T05:51:54+00:00

@istio-testing: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-mc-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-mc-k8s-tests_istio

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

@istio-testing: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-mc-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-mc-k8s-tests_istio

integ-telemetry-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-k8s-tests_istio

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

/retest

@istio-testing: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-mc-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-mc-k8s-tests_istio

integ-telemetry-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-k8s-tests_istio

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

@istio-testing: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-k8s-tests_istio

integ-telemetry-mc-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-mc-k8s-tests_istio

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

@istio-testing: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-k8s-tests_istio
509f2e2bbce8edf9ca5bc822e1ccfe9407447654
link
/test integ-telemetry-k8s-tests_istio

integ-telemetry-mc-k8s-tests_istio
9e6b88b3351e96c335cfa26d2e1448f26189518d
link
/test integ-telemetry-mc-k8s-tests_istio

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

@kyessenov Looks like an error trying to pull the new Envoy into istio.


Book method for fetching number total number of keys

Hi,
is a good idea to add to Book class method, which will return a count of stored keys?
(and not use getAllKeys().size())
If it is a good idea, I can work on an implementation of this feature.

Hi! Thank you for reaching me with this idea! However, for now, I don't think it would be a nice addition to the API.


Helpers.js now takes the position of the scroll container into accoun…

…t, instead of defaulting to the top of the browser window.
This allows you to nest a react-scroll area.

Great, I will check it out tomorrow :)

I would be very interested in this feature for our application

I'm also very interested in this feature for our application :-)

Merged. Just made a small fix to .getBoundingClientRect because it doesn't exists on document.


Evaluate maven-wrapper to fix inconsistencies in dependencies.md

Background
Since beginning of 2023 some of the builds show inconsistencies in file dependencies.md, see issues #436, #440.
Latest investigations indicated that different versions of maven itself could be the root cause.
For example the local machine might use version 3.8.6, while the CI build on GitHub uses a newer version, e.g. 3.9.0.
The current assumption is

A specific version of maven also defines implicit dependencies to specific versions of some default plugins, e.g. maven-clean-plugin.
When GitHub runner uses a different version of maven, then the versions of the plugins differ, too.
This in turn causes different content in files dependencies.md and changes_*.md.
This leading to errors during validation by PK and RD.

Proposed solution
Use maven-wrapper
mvn wrapper:wrapper

Todo
Update project-keeper to

use maven-wrapper in generated build scripts instead of mvn
add validation for integrity of maven wrapper jar to prevent pull requests to injectt malicious code instead of the maven wrapper jar in the repository,  see https://github.com/loosebazooka/maven-wrapper-validation-action

Impact
This will require all maven projects using project-keeper to

add some files:

mvnw
mvnw.cmd
.mvn/wrapper/maven-wrapper.properties
.mvn/wrapper/maven-wrapper.jar

update build scripts (automated if generated by pk)

Otherwise using maven wrapper was nearly straight forward:

cd <sample-project>
run mvn wrapper:wrapper
make shell script executable git update-index --chmod=+x mvnw
In build script .github/workflows/ci-build.yml simply replace all occurrences of mvn with ./mvnw
commit the files

Team has voted to install on the local machines the same maven version as on GitHub (3.8.7)


Enable ESLint & TS for smoke tests

What it says on the tin, minimal changes

the only thing I found/could think of was: should the package.json have main and types entries? non-blocking.

Not needed strictly because this doesn't actually output anything. The entire package is a package of test suites.


Add pytest CI action

Github actions will run based on these conditions below.
pull-request - pr.yml
Run tox -e static and tox -e test only on a single environment (ubuntu environment with python version 3.9)
Upload coverage-report as an artifact.
merge to main - main.yml
Run tox -e static on ubuntu environment with python version 3.9
Run tox -e test on 9 different environments (ubuntu/mac-os/windows with python version 3.9/3.10/3.11)
main.yml will also be triggered when the file itself is updated in the pull-request.

pull-request - pr.yml
Run tox -e static and tox -e test only on a single environment (ubuntu environment with python version 3.9)
[...]
merge to main - main.yml
Run tox -e static on ubuntu environment with python version 3.9 Run tox -e test on 9 different environments (ubuntu/mac-os/windows with python version 3.9/3.10/3.11)

You are not going to be happy with this, since we will have broken main builds in many cases (most common candidate: Windows, since its Python int is 32 bit by default).
That being said, do we even need Windows? The ESS instruments will definitely run Linux.

pull-request - pr.yml
Run tox -e static and tox -e test only on a single environment (ubuntu environment with python version 3.9)
[...]
merge to main - main.yml
Run tox -e static on ubuntu environment with python version 3.9 Run tox -e test on 9 different environments (ubuntu/mac-os/windows with python version 3.9/3.10/3.11)

You are not going to be happy with this, since we will have broken main builds in many cases (most common candidate: Windows, since its Python int is 32 bit by default).
That being said, do we even need Windows? The ESS instruments will definitely run Linux.

I am very happy to remove Windows : D....


Create Issue & PR templates

Adding a few templates:

bug type
feature request
blank template
PR template

Fixes the comment in #15

@shivay-at-pieces This is awesome! Let's wait for Jordan before merging.

would love to get a design template added here for any designers that are in the program that want to open up some visual based issues @shivay-at-pieces @Sophyia7

@shivay-at-pieces if you haven't started this. I would like to work on the design template.

Sure if you wish to add to this @Sophyia7 go ahead.

@Sophyia7 lets get the design issue template added on a separate PR whenever you have time, I will create the issue and tag you on it


Custom form data part

What's in this PR?
Let user input specific file's name and content type using DataPart
Example
.upload("/post")
.dataParts { request, url ->
   listOf(
      DataPart(File(currentDir, "lorem_ipsum_short.tmp"), "image/jpeg"),
      DataPart(File(currentDir, "lorem_ipsum_long.tmp"), "second-file", "image/jpeg")
   )
}
.responseString { req, res, result -> }

And also avoid null content type by using MimetypesFileTypeMap
Merging this should close #155 and #161

*copy here
And I suggest that we have one overloading method. in the case, where user just want to upload one file, so it should be extremely simple.
Like
Fuel.upload("/upload").source { req, url -> File(currentDir, "foo.txt") }.responseString()

Maybe we can construct DataPart object from a File object. With Kotlin, I think you can do DataPart(val file: File, val name: String = file.name, val type: String? = null).
Hence, if the File is supplied, we can infer name by using the filename.
So, in that case, we can keep the source API and use that to upload a single file only? What do you think?

:claps: :green:

@babedev merge?

Merged :D


BlockSpecialChar and Random Generator Updated

Related Issue
Closes: #174
Description of Changes
The following changes were made to the code in the GitHub pull request:

In the guest.php file, the function blockSpecialChar(e) was removed.

In the newlink.php file, the function blockSpecialChar(e) was removed.

The removed function blockSpecialChar(e) was replaced with the following code block in both guest.php and newlink.php files:

<!-- *************************** Block SpecialChar ***************************** -->
<script>
    $("#shortenLink").on("input", function () {
        var c = this.selectionStart,
            r = /[^a-z0-9 ]/gi,
            v = $(this).val();
        if (r.test(v)) {
            $(this).val(v.replace(r, ""));
            v.length--;
            c--;
        }
        this.setSelectionRange(c, c);
        var previewBtn = document.querySelector('#previewBtn');
        console.log(v.trim().length);
        if (v.trim().length != 0) {
            previewBtn.removeAttribute("hidden");
        } else {
            previewBtn.setAttribute("hidden", true);
        }
    });
</script>
<!-- *************************** Block SpecialChar Ends ***************************** -->

The following code block was modified in the newlink.php file:

<input type="text" onkeypress="return blockSpecialChar(event)"
    placeholder="Custom Name" style="border:0px;max-width: 50%;"
    required id="shortenLink" name="shortenLink" />

It was updated to:
<input type="text" placeholder="Custom Name"
    style="border:0px;max-width: 50%;" required id="shortenLink"
    name="shortenLink" />

Similar changes were made to the guest.php file as well.

The following code block was added to the newlink.php file to update the random number generator function:

<!-- *************************** Generate Random Number ***************************** -->
<script>
    document.querySelector('#generateRandom').addEventListener('click', function () {
        var randNum = Array.from({ length: 6 }, () => Math.floor(Math.random() * 16).toString(16)).join('');
        console.log(randNum);
        let v = document.querySelector('#shortenLink').value = randNum;
        var previewBtn = document.querySelector('#previewBtn');
        if (v.trim().length != 0) {
            previewBtn.removeAttribute("hidden");
        } else {
            previewBtn.setAttribute("hidden", true);
        }
    });
</script>
<!-- *************************** Generate Random Number ends ***************************** -->

These changes were made to remove the blockSpecialChar function, update the event handlers for the shortenLink input field, and modify the random number generator function in both the newlink.php and guest.php files.
Checklist:

[x] My code adheres to the established style guidelines of this project.
[x] I have conducted a self-review of my code.
[x] I have included comments in areas that may be difficult to understand.
[ ] I have made corresponding updates to the project documentation.
[x] My changes have not introduced any new warnings.

Screenshots
Issue
https://github.com/apoorvaron/Shorty/assets/85815172/ad46f035-b9f8-4c0f-bc7e-8ce8b683316f
Solution
https://github.com/apoorvaron/Shorty/assets/85815172/ad0a2bae-e664-4bb8-a4b9-1059078ea591
Please provide any necessary screenshots to illustrate the changes made.

@apoorvaron Kindly review my PR and let me know any help


RegEx: add a way to get the positions of groups

When executing a RegExp, groups are returned as a map of Strings. However, for some use cases it is really important to get the index of where these groups are in the input string, rather than just the text.
For example, I have the following code:
final pattern = RegExp('(?:(?<=[^\\\\])|^){{(\\w*)}}');
final match = pattern.firstMatch('A captured word I {{capture}}');
print(match.group(1));

This correctly prints 'capture'. However, there is no way to know (at least, in my use case where I am being fed regexps from an external file) whether this group is referring to 'capture' in the source string at span 2-10 or 20-28. In this case the answer is 20-28 and that is what I would like to be able to retrieve.
In other languages:
In python you would call match.span(1) which would return a tuple of the start and end position. In Dart this could be replaced with an object.
In JavaScript this is not supported, meaning this feature would probably not be supported in dart2js.

We are deliberately JavaScript RegExp compatible because Dart is compiled to JavaScript, and the JavaScript RegExp doesn't provide that information. Adding a feature which won't work when compiled to JavaScript requires a very compelling argument. I don't see that happening any time soon.
For your use case, you can find the start/end easily because it's match.start+2/match.end-2. I know it's not always that easy.
(Also, your RegExp can be abbreviated to RegExp(r'(?<!\\){{(\w+)}}'), although I'd probably escape the { characters just to be sure).

That use case was just an example, in reality I will be getting a lot of regexes from a file with a predefined syntax so I can't just modify them to work differently.
Here's a JS library that provides this functionality by extending the RegEx class: http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/
Something like that could be written for Dart too, but I'd imagine it is significantly slower than just getting the information directly from the Regex engine. But perhaps you could use something like that to make it work in dart2js.
I think this is a very noticeable omission from the dart stdlib as this functionality is in nearly every modern language apart from JS: C#, Python, Ruby, Java, Rust, Go, Kotlin... in fact I can't find another language besides JS that omits this. Several of those languages also compile to JS, taking varying approaches of either omitting the functionality for the JS target or implementing their own regex engines which support it (usually in WASM).

Even ChatGpt can do this better:
To get the end position of the second capturing group in Dart, you can use the end property of the Match object, but you need to be aware that capturing group indices are 1-based. Here's how you can do it:

dart
Copy code
void main() {
  RegExp regex = RegExp(r'(\d+) (\w+)');
  String text = '123 example 456 test';

  Match match = regex.firstMatch(text);

  if (match != null) {
    // Get the start and end positions of the second capturing group (index 2)
    int start = match.start(2);
    int end = match.end(2);

    print('Second capturing group start position: $start'); // Prints 'Second capturing group start position: 4'
    print('Second capturing group end position: $end');     // Prints 'Second capturing group end position: 11'
  }
}
In this example, we define a regular expression RegExp(r'(\d+) (\w+)'), which captures two groups. To get the start and end positions of the second capturing group (index 2), we use match.start(2) and match.end(2).

Keep in mind that capturing group indices are 1-based, so the first capturing group has an index of 1, the second capturing group has an index of 2, and so on.

This is what I end up doing:
line = line.substring(match!.start + match!.group(1)!.length + match!.group(2)!.length);

JavaScript RegExps now allow access to the capture group indices when using the d flag.
That makes it possible for Dart to do the same.
We can add a similar indices array or method to RegExpMatch.
I'd prefer to refactor Match to be more homogenous and Dart-like, rather than add another weird method.

I'd prefer to refactor Match to be more homogenous and Dart-like, rather than add another weird method.

@lrhn do you have a concrete idea of how you would prefer API to look like?
@matthew-carroll

will this work definitely be done?

If somebody does it.
We welcome patches as well - this is a fairly straightforward thing to implement because internally regexp engine is representing groups by their start and end indices anyway. So all the necessary work is around changing Dart code to expose this information.
The biggest question is the API design - but I am sure @lrhn can provide a sketch.

To just add this feature, I'd add a way to get a Match object for RegExp match captures.
There are several ways to do that.
The very-small increment approach would be just adding to RegExpMatch:
int groupStart(int groupNumber);
int groupEnd(int groupNumber);

That is incredibly simple, and requires no extra allccation, but it's also not a great API.
(int start, int end) groupLimits(groupNumber);

is not much better, but does introduce an allocation, so it's like the worst of both worlds.
I'd prefer to not add yet-another partial way to access a capture.
Rather, I'd introduce something to represent the entire capture, start, end and match string, like a mini-Match, except that I don't want the extra baggage of Match. (I don't really need a reference to the pattern here. But then, neither does Match. Can't remember ever using it, and not being in a context where I could just have referred to the pattern directly).
Consider something like
interface class MatchSlice {
  final String source
  final int start;
  final int end;
  String? _slice;
  MatchSlice(this.source, this.start, this.end);
  String get match => slice ??= source.substring(start, end);
}

// We can make `Match` implement `MatchSlice`, which will give it the `.match` which is the non-nullable
// version of `[0]` that we're sorely lacking.

abstract interface class Match implements MatchSlice {
  ///
  String get match => this[0]!;
}

// Then add to `RegExpMatch`

final class RegExpMatch implements Match {
  // ...

  /// The capture groups of this match.
  ///
  /// An unmodifiable list of slices for each capture group of this
  /// regular expression which participated in the match.
  ///
  /// The list has length [groupCount] + 1, and has an entry for each
  /// capture group of the regular expression, plus an entry for the
  /// entire match, treated as capture group zero.
  /// The entry for a capture is `null` if the capture did not participate in the
  /// entire match.
  /// The entry at index zero is always this `RegExpMatch`. The remaning
  /// entries are not `RegExpMatch`es, just plain `MatchSlice` objects.
  List<MatchSlice> get captures;

  /// ... same for named capture groups ...
  Map<String, MatchSlice> get namedCaptures;

That does mean accessing these captures will involve an allocation per match accessed (can be cached if accessed more than once), and maybe an allocation for captures and namedCaptures themselves, which can hopefully be inlined in most cases.
Longer-term, I'd like to remove group/groupCount/groups entirely, and remove [] from Match and only keep it on RegExpMatch. That means that only a RegExpMatch has captures, which will likely require making Pattern generic as interface class Pattern<M extends Match> { ... }, so that we can make it String.replaceAllMapped<M extends Match>(Pattern<M> pattern, String Function(M match) replace) { ... }, making "abc-def-ghi".replace(RegExp(r'(\w)(\w*)'), (m) => "${m[1]!.toUpperCase()}${m[2]}") type-check and infer RegExpMatch for m. (I hope this can work.)


Mastering Mixology Point Balancing

Could you add an option where it balances points based on rewards, I ran the plugin for 1 hour and I have way more green points than blue, and more blue points are needed to purchase all rewards. Other than that great plugin.
Thank you!

#2 when integrated will have various highlight options (balance, exp, specific paste type, etc)

Extra callout here, it'd be cool if we could have a rough # of potions until reward tracker assuming we optimize for a specific reward.

I added a few new strategies for potion order highlighting in the latest update, i'll still add one that tries to balance out reward points in the future.

I added a few new strategies for potion order highlighting in the latest update that should partially help with this, I'll still add one that tries to balance out reward points in the future.

Looks like the meta-shifted when they added the ability to turn in multiple potions at a time. Can you add the enhancement instead to toggle off specific orders (e.g. MMA/MML/MMM pots)? I think right now the meta is always turn in as many good pots you can simultaneously unless you're restricted with your paste quantity.

I think i'd be wise to wait a few days to see what jagex settles with before proceeding then

Strategy has been removed


Be able to tell if code is running inside Xcode and adjust paths accordingly

Currently, code is not portable between Xcode and command-line. As an improvement, we want to be able to run the apps inside Xcode without any modifications.

Closed by #28


[Refactor] remove nested scaffolding structure

This is not good practice according to flutter guidelines

I think this is obsolete


Didn't understand how my commenting syntax for h2 had worked.

Challenge Specify How Fonts Should Degrade has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

i thought commenting would ignore a particular code or command therefore h2 font should be a default one rather I had noticed lobster font and my tutorial indicated that above step would degrade the font to monospace which didn't happen either.

@udayduvvuru  you should not comment the h2 tag.Instead you should comment your link tag like this

For commenting CSS you should use
/* h2 {
    font-family: Lobster, Monospace;
  } */

And to add to @ganes1410's comment
 is an HTML comment and cannot be used to comment anything else.

in
On Thu, Apr 6, 2017 at 3:52 PM, Jools<EMAIL_ADDRESS>wrote:

And to add to @ganes1410 https://github.com/ganes1410's comment
 is an HTML comment and cannot be used to comment
anything else.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/freeCodeCamp/freeCodeCamp/issues/14268#issuecomment-292131724,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXc-HT-D2g_-buMT3SiPHA_LmJa9A8Zxks5rtL0DgaJpZM4M1IOc
.

See  is for html commenting and this /*     */ is for css  and
since inside html

The issue here is not what was done wrong in the original example. The issue is that the original example passes all tests, while it shouldn't. The tests here should be more specific.


make it build on systems using /usr/lib64

Do not hardcode <prefix>/lib/ as a library path, that is used in Debian,
but not in many other distributions (e.g. Fedora). Use GNUInstallDirs
cmake module to automatically get the proper location for your
distribution.
A relevant discussion is here:
https://cmake.org/pipermail/cmake/2013-July/055371.html
The cmake module is documented here:
https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
This patch helped me to build glxosd on Fedora (when run as cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALLATION_SUFFIX_64=lib64 -DINSTALLATION_SUFFIX_32=lib -G "Unix Makefiles").
Please note that I'm not a C developer and I have no experience with cmake, so please make sure this still builds well for you on Debian/Ubuntu.

Thank you. I'll merge this once I get the chance to recheck the Debian packages.

The CMake files in GLXOSD version 3 use GNUInstallDirs wherever it is possible. Thank you very much for reporting this issue and thank you very much for your pull request.


Enh/add zenodo json

adds .zenodo.json
With this PR a .json file containing metadata is added.
In previous releases, Zenodos automatic metadata collection tool was used, which gave mixed results.
(see: elephant 0.9.0 https://doi.org/10.5281/zenodo.4271489)
Adding .zenodo.json will overwrite the metadata for the specified fields. This aims to get a list of authors including their ORCiDs. A good example is given by NEST.
(see: https://doi.org/10.5281/zenodo.5886894)
background
Zenodo automatically extracts metadata about a release from GitHub APIs. For example, the authors are determined from the repository’s contributor statistics. To overwrite some of the default metadata that would come from a regular GitHub release this PR includes a .zenodo.json file at the root of your GitHub repository, to manually control the list of contributors and other data fields.
list of contributors
The current list of contributors was extracted from the commit history of NeuralEnsemble/elephant (master) since Release 0.10.0 #407 and all open PRs labeled Milestone v.0.11.0. (see below)
If an author has been forgotten or an error in name or orcid has crept in, please let us know. Once v0.11.0 is released no changes can be made to the DOI and its corresponding metadata
Contributors to release 0.11.0
[Enhancement] Change test framework from Nose to pytest #413

@kohlerca

Changed repr in BinnedSpikeTrain to support quantities<0.12.4 #418

kohlerca

[Enhancement] Set complexity dtypes for memory efficiency #412

@morales-gregorio
Kleinjohann

Optimized SPADE analysis #419

@pbouss
@stellalessandra
@mdenker
@Kleinjohann
Pilz, Sarah
Porrmann, Florian

Fixing doc builds #429

mdenker

Fixed random seed selection to use numpy #430

mdenker

Fix proposed by #420. #421

mdenker

Update of copyright year #433

@rjurkus

Various Features Spike Train Generation #416

pbouss
stellalessandra

BUG-Fix #424: t_start information was lost while transposing lfp #432

@ojoenlanuca
@rgutzen

Fixed test suite building for multiple modules #426

rjurkus

Fix for figures in the Granger causality tutorial #434

rjurkus

Updated zscore for in-place operations #440

kohlerca

Issue with units in BinnedSpikeTrain #425

@PaulinaDabrowska

updated spade tutorial to work with viziphant 0.2.0 (#88) #444

@Moritz-Alexander-Kern

Add zenodo badge to README.md #445

Moritz-Alexander-Kern
mdenker

Fix pytest #449

Moritz-Alexander-Kern
mdenker

Feature/multitaper psd estimate #458

rjurkus
@ackurth

Add a function to discretise spiketimes #454

Kleinjohann

will be merged for 0.11.0
Fix/instantaneous rate #453

Moritz-Alexander-Kern

Enh/add dois to documentation #456

Moritz-Alexander-Kern

Support SpikeTrainList object in Elephant #447

mdenker

Fixes neo_tools unit tests to work with Neo 0.10.0+ #446

mdenker

Fix/update tutorials asset and unitary_event_analysis to use nixio 1.5.0 #441

Moritz-Alexander-Kern

Boundary correction rate for firing rate estimator with Gaussian KDE #414

pbouss
stellalessandra

Coverage remained the same at 88.622% when pulling ca2d938d4cb54ca52d92bcfbe75d7ac323c1a866 on INM-6:enh/add_zenodo_json into 0074a14bf6380d485e047d847efff69d1d965d98 on NeuralEnsemble:master.


Implement Helix Search Categories end-point & update /setgame

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable

Description
Implements https://github.com/Chatterino/chatterino2/issues/2599

Works well, cheers


Updating lock files for latest crayfish-commons changes

Required for: https://github.com/Islandora-Devops/claw-playbook/pull/14
What does this Pull Request do?
Updates the composer lockfile for each microservice.  Now we'll have the latest crayish-commons changes so we can deploy with Postrgres using Ansible.
Interested parties
@jonathangreen

@dannylamb looks like we have some PHP 5 version issues here...

@jonathangreen Gah, dangit... I'm gonna have to manually roll those back in the lockfile or figure out something more clever...
Or we just drop 5 and run away :grin:

@dannylamb... its probably getting close to time to just 🔥burn 🔥 PHP 5 for CLAW and be done with it.
On the other hand, if you updated the lock files from a box with PHP 5 it would probably work for PHP 7, but I feel like this will continue to nag us for the next year until PHP 5 is officially dead.

@jonathangreen Or we just stop providing lockfiles? :man_shrugging: This is only going to get worse as 5 gets older, and really the lockfile on individual production systems are what people want.  We can't provide one for 7 if folks are going to run this for 5.

@dannylamb I could be convinced that we should yank the lock files... just makes testing a bit more crazy, since we will never be totally sure what versions people are running...
Do you think a PHP5 lock file will work on PHP7? That might be the solution till we drop PHP5.

@jonathangreen Let's try the lockfile with 5 and see what happens.
Maybe we should press the issue about removing 5 early.  That's a big bullet we could dodge a year down the road.

@dannylamb I'd be for it. I'm not sure anyone is CLAW-land would be opposed.

🍾

For posterity, to install 5.6 and update the lock files on a fresh 16.04 environment, I did the following:
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install -y php5.6
$ sudo apt-get install php5.6-dom
$ sudo apt-get install php5.6-mbstring

Then in each microservice, I installed a local copy of composer using php 5, which amounted to copy/pasting the composer install instructions and changing php to php5.6.  Your hash will vary from these instructions, so get the newest official instructions instead of blindly executing this:
$ sudo php5.6 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ sudo php5.6 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ sudo php5.6 -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ sudo php5.6 composer-setup.php
$ sudo php5.6 -r "unlink('composer-setup.php');"

Then I used 5.6 to run composer update:
$ sudo php5.6 composer.phar update


adds Java 9 to releases on 1.7.10, 1.9.4 and 1.12.2

i am not sure how java support is determined but is there any way to limit it to just java 8 compatibility being listed ?

Update to 1.1.1, Java 9 detection is now disabled by default.
fd909db6b8c20e6c6dd69367213e005dbc3463cd


Switch to stable actions/stale once my PR is merged

https://github.com/actions/stale/pull/119

Has been merged, so can be updated in all repos now.


Container not starting after azd up 'You must install or update .NET to run this application.'

Discussed in https://github.com/Azure/azure-dev/discussions/3217

Originally posted by mip1983 January 23, 2024
I've been working through adding aspire into my existing .net application. Similar to the aspire starter template, I've a .net 8 Blazor web app and a .NET 8 API.
I am using 'azd infra synth' to generate a bicep file to reference some existing resources (vnet). Apart from that, I'm pretty much following the same steps as here: https://www.youtube.com/watch?v=HYe6y1kBuGI
I've successfully deployed my application to Azure with azd up, the resource group is there as is the container app environment, everything else and the container apps themselves.
However, both my API and web project container apps fail to start and have the same message:
2024-01-23T12:14:26.223945758Z You must install or update .NET to run this application.
2024-01-23T12:14:26.223974311Z
2024-01-23T12:14:26.223978739Z App: /app/ecoDriverAnalytics.Web.dll
2024-01-23T12:14:26.223982316Z Architecture: x64
2024-01-23T12:14:26.223985552Z Framework: 'Microsoft.AspNetCore.App', version '8.0.0' (x64)
2024-01-23T12:14:26.223996533Z .NET location: /usr/share/dotnet/
2024-01-23T12:14:26.223999578Z
2024-01-23T12:14:26.224002914Z No frameworks were found.
2024-01-23T12:14:26.224049512Z
2024-01-23T12:14:26.224054942Z Learn more:
2024-01-23T12:14:26.224079878Z https://aka.ms/dotnet/app-launch-failed
2024-01-23T12:14:26.224082994Z
2024-01-23T12:14:26.224086120Z To install missing framework, download:
2024-01-23T12:14:26.224097251Z https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=8.0.0&arch=x64&rid=linux-x64&os=debian.12
I'm a bit stumped by this, in the demo vids I've watched I've not seen others having this issue or having to do something to include the framework?
Edit:
Actually, the same is happening for me with the starter app as well.
I can see if I turn on debug output:
Building image 'azd-deploy-webfrontend-1706014618' with tags 'latest' on top of base image 'mcr.microsoft.com/dotnet/runtime:8.0'.
So I can't see why it wouldn't have the .net runtime.

I found this is a problem with the current aspire preview using a preview version of the .net sdk (8.0.200-preview.23624.5).
If I add a global.json file in the root of my solution with:
{
    "sdk": {
        "version": "8.0.100"
    }
}

That sorts it for now, after azd deploy my containers have started.
Aspire issue link:
https://github.com/dotnet/aspire/issues/1737

Thanks @mip1983 . This helped me figure it out :)
So for anybody that doesn't have 8.0.100 installed, you need to download the SDK first. I downloaded 8.0.101 (8.0.100 is no longer available as there was a security patch applied to it). I tried using "version" : "8.0.101" and didn't work. It strictly worked only with "version": "8.0.100".


Add a note about core-js polyfilling

Making such a polyfill seems premature, since the naming is not locked down, nor is the shape (one method, one method with an option, or two methods).

We already talk about this too much, why bring this up again?
Since it's not stage 3+, it's not something for production usage, it's for experimenting. It's much better to play with real code than with something in the imagination, so it will improve the users and implementors (my in this case) feedback to the proposal.

@jridgewell


Remove TestECSSuite from flake list

What does this PR do?
Removes TestECSSuite from list of known flakey tests
Motivation
The tests have been stable on main since 8/28:

Related to #incident-28805
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes

/merge


Run training environments at the evaluation time?

Hi, thanks for your great work. But it seems that you run the training environments at the evaluation time:
https://github.com/katerakelly/oyster/blob/cd09c1ae0e69537ca83004ca569574ea80cf3b9c/rlkit/core/rl_algorithm.py#L413

Thanks. My obliviousness.


feat(docs): add to readme a link to contributing

@benjie

@valorize Thanks 👍  have tweaked and will merge.
In future, I'd advise that you create a branch for each pull request - pulling from your master means any changes you make to your master before the PR is merged will be added to the PR which may not be what you intend.
Also have a look at the commit naming in contributing.md :)

@calebmer Just wanted to check you're okay with this change.

When I run the tests, should all tests pass in the moment (commit: 7f1a21b4b5e907a72f093bd72667477b7c608110)? Because two of 2 of 498 failed.

Summary of all failing tests
 FAIL  src/graphql/schema/__tests__/createMutationGqlField-test.js
  ● will add `outputFields` in payload type and skip falsies

    expect(received).toEqual(expected)

    Expected value to equal:
      {"args": [{"defaultValue": undefined, "description": null, "name": "arg", "type": {"_scalarConfig": {"description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String", "parseLiteral": [Function parseLiteral], "parseValue": [Function String], "serialize": [Function String]}, "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String"}}], "deprecationReason": Symbol(deprecationReason), "description": Symbol(description), "isDeprecated": true, "name": "c", "resolve": [Function anonymous], "type": {"_scalarConfig": {"description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String", "parseLiteral": [Function parseLiteral], "parseValue": [Function String], "serialize": [Function String]}, "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String"}}
    Received:
      {"args": [{"defaultValue": null, "description": null, "name": "arg", "type": {"_scalarConfig": {"description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String", "parseLiteral": [Function parseLiteral], "parseValue": [Function String], "serialize": [Function String]}, "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String"}}], "deprecationReason": Symbol(deprecationReason), "description": Symbol(description), "isDeprecated": true, "name": "c", "resolve": [Function anonymous], "type": {"_scalarConfig": {"description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String", "parseLiteral": [Function parseLiteral], "parseValue": [Function String], "serialize": [Function String]}, "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "name": "String"}}

    Difference:

    - Expected
    + Received

      Object {
        "args": Array [
          Object {
    -       "defaultValue": undefined,
    +       "defaultValue": null,
            "description": null,
            "name": "arg",
            "type": GraphQLScalarType {
              "_scalarConfig": Object {
                "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                "name": "String",
                "parseLiteral": [Function parseLiteral],
                "parseValue": [Function String],
                "serialize": [Function String],
              },
              "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
              "name": "String",
            },
          },
        ],
        "deprecationReason": Symbol(deprecationReason),
        "description": Symbol(description),
        "isDeprecated": true,
        "name": "c",
        "resolve": [Function anonymous],
        "type": GraphQLScalarType {
          "_scalarConfig": Object {
            "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
            "name": "String",
            "parseLiteral": [Function parseLiteral],
            "parseValue": [Function String],
            "serialize": [Function String],
          },
          "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
          "name": "String",
        },
      }

 FAIL  src/postgraphql/__tests__/postgraphqlIntegrationOperations-test.js (58.01s)
  ● operation dynamic-json.graphql

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot 1.

    - Snapshot
    + Received

      Object {
    -   "data": Object {
    -     "a": true,
    -     "allTypes": Object {
    -       "nodes": Array [
    -         Object {
    -           "json": Object {
    -             "a": 1,
    -             "b": 2,
    -             "c": 3,
    -             "d": Object {
    -               "e": 4,
    -               "f": 5,
    -               "g": Array [
    -                 6,
    -                 7,
    -                 8,
    -                 "x",
    -                 false,
    -                 null,
    -               ],
    -             },
    -           },
    -           "jsonb": Object {
    -             "1": "a",
    -             "2": "b",
    -             "3": "c",
    -             "4": Object {
    -               "5": "d",
    -               "6": "e",
    -               "7": Array [
    -                 "f",
    -                 "g",
    -                 "h",
    -                 42,
    -                 true,
    -                 null,
    -               ],
    -             },
    -           },
    -         },
    -       ],
    -     },
    -     "b": false,
    -     "c": 42,
    -     "d": 3.1415,
    -     "e": "hello, world!",
    -     "f": Object {
    -       "a": 1,
    -       "b": 2,
    -       "c": 3,
    -     },
    -     "g": Array [
    -       1,
    -       2,
    -       3,
    -       4,
    -     ],
    -     "h": Object {
    -       "array": Array [
    -         1,
    -         2,
    -         3,
    -         4,
    -       ],
    -       "boolean": true,
    -       "float": 3.1415,
    -       "integer": 42,
    -       "object": Object {
    -         "a": 1,
    -         "b": 2,
    -         "c": 3,
    -       },
    -     },
    -     "i": Array [
    -       true,
    -       42,
    -       3.1415,
    -       Object {
    -         "a": 1,
    -         "b": 2,
    -         "c": 3,
    -       },
    -       Array [
    -         1,
    -         2,
    -         3,
    -         4,
    -       ],
    -     ],
    -     "j": Array [
    -       true,
    -       null,
    -       42,
    -       3.1415,
    -       Object {
    -         "a": 1,
    -         "b": null,
    -         "c": 3,
    -       },
    -       Array [
    -         1,
    -         2,
    -         null,
    -         3,
    -         4,
    -       ],
    -     ],
    -   },
    +   "errors": Array [
    +     [GraphQLError: Syntax Error GraphQL request (14:32) Unexpected Name "null"
    +
    + 13:   i: jsonIdentity(json: [true, 42, 3.1415, { a: 1, b: 2, c: 3 }, [1, 2, 3, 4]])
    + 14:   j: jsonIdentity(json: [true, null, 42, 3.1415, { a: 1, b: null, c: 3 }, [1, 2, null, 3, 4]])
    +                                    ^
    + 15:   allTypes {
    + ],
    +   ],
      }

      at next (native)
      at process._tickCallback (internal/process/next_tick.js:103:7)

As it happens that's exactly the same reason https://github.com/calebmer/postgraphql/pull/212 is failing.
@calebmer 🚨  I think we should change the ts-node dependency from "ts-node": "^1.6.1" to "ts-node": "^1.6.1 <1.7" (or whatever the semver spec is) if we don't have time to fix whatever's broken. (It's still beyond me, I'm afraid.)
@valorize Try: npm install<EMAIL_ADDRESS>and try again.

What this failure looks like to me is a GraphQL version less then 0.8.2 which adds support for null literals. My theory on why Travis is failing is I believed they recently moved to Yarn over npm, so the resolution algorithm/cache may be pulling in the wrong GraphQL version. I’m going to experiment :+1:

Yeah, anyway thanks so much for this change @valorize :tada:
I can confirm that the failing tests are caused by a GraphQL-js version less then 0.8.x. I just merged a PR which hopefully will enforce version 0.8.x in development. We support any version of GraphQL-js in production, but the tests depend on version 0.8.x :blush:

Cool with the latest npm update all tests went green.


Simplify WorkerEntrypoint::maybeAddGcPassForTest()

All the KJ_DEBUGs made this hard for me to read, and the intent of the code appears to be a KJ_ON_SCOPE_SUCCESS use case.

heh, I forgot that KJ_ON_SCOPE_SUCCESS existed. Nice.

I think we should revert this to not be a coroutine. Otherwise it is adding overhead for every request, whereas pre-coroutines it only added overhead in testing mode.

Going to close this as a competing change landed here already.


Spy on WebSocket construction does not work

Reposting this SO question:
I am trying to spy on WebSocket construction with the following code (requirebin):
sinon = require('sinon');

sinon.spy(window, 'WebSocket');
// throws an error (see console)
new window.WebSocket("ws://example.com");

In Chrome it fails with Uncaught TypeError: Failed to construct 'WebSocket': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
In Safari and PhantomJs it fails with TypeError: Attempted to wrap object property WebSocket as function
What am I doing wrong?

Native objects are notoriously unreliable as spying/stubbing targets.
If you're working with a level of indirection like Socket.IO, then I'd recommend targeting that for spying/stubbing. There are examples of how to do this with Sinon.JS.
If you're working closer to the metal, then I'd recommend using a very thin wrapper around the target natives, to allow spying/stubbing.
I created wrapple for this purpose, but it's simple enough to create your own.
// totally making things up here
function WrapWebSocket(){
    return window.WebSocket;
}

// in your code
function init(){
    var WS = WrapWebSocket();
    var ws = new WS();
}

// in your test
var spy = sinon.spy();
sinon.stub(window, 'WrapWebSocket', function(){
    return spy;
});
init();
assert(spy.calledWith('someurl');

Thanks for the explanation, now I understand what the problem is.
Wrapple seems like a reasonable workaraound. Thanks again!


Add badges to VSCode marketplace

Help me, @AlexShemeshWix , you're my only hope
https://code.visualstudio.com/docs/extensionAPI/extension-manifest#_marketplace-presentation-tips

Both Travis and ApVeyor are on the approved list.

Im like...driving on 6 highway. Will do tomorrow?
On 31 Oct 2017 18:05, "Ory Henn"<EMAIL_ADDRESS>wrote:

Both Travis and ApVeyor are on the approved list.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/wix/stylable-intelligence/issues/116#issuecomment-340812058,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVGz1EQMehmXnwf8Rj7iZLYm_4D-PPEaks5sx0VLgaJpZM4QM_mJ
.

Not urgent in any way. I put them back in the readme for now, seems to be working.

Added badges in proper readme. Closing.


List players on all proxied servers in tab-list

Is it possible to list all players online on each server when the player views a tablist?
e.g.

server 1
server 2
server 3

player 1
player 3
player 6

player 2
player 4

player 5

I've looked into the source-code and documentation but couldn't figure out how I could do that.

Yes, you can modify the tablist for every player via https://github.com/minekube/gate/blob/133de6f30cfec5b52036fd0f2cfc5776a85463d7/pkg/edition/java/proxy/player.go#L93 and add entries.
For further questions join the discord :D