merge me_dev to dev

This PR upstreams a handful of minor bug fixes and the BedRock LCE-CCE-MEM interface refactor from me_dev to dev.
This change relies on a non-master branch of basejump_stl.

Let's hold off until https://github.com/bespoke-silicon-group/basejump_stl/pull/232 to merge.  I pinged for feedback

Let's hold off until bespoke-silicon-group/basejump_stl#232 to merge. I pinged for feedback

Sounds good. I'm still debugging a few final issues from regressions.

@dpetrisko do you want to do a review pass on this while it is still blocked by https://github.com/bespoke-silicon-group/basejump_stl/pull/232?
All the regressions pass and I think it is good to go otherwise.

Ya I’ll take a look today

@dpetrisko this has been updated to no longer rely on bsg_wormhole_streamer branch in basejump. That will be a second change/PR once the basejump merge to master happens.
I would like to merge after regressions pass unless there are comments/objections.

LGTM.  CI is slightly broken as is, I'm working on a patch to fix that. No objections to merging even if the checkpoint jobs hang here

Good catch on the clock name thing!


Smallest Common Multiple works in browser but won't pass last test @ freecodecamp

Challenge Name
https://www.freecodecamp.com/challenges/smallest-common-multiple
Issue Description

The freecodecamp challenge description is:
Find the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.
The range will be an array of two numbers that will not necessarily be in numerical order.
e.g.  for 1 and 3 - find the smallest common multiple of both 1 and 3 that is evenly divisible by all numbers between 1 and 3.
This function code below gives all of the correct answers when I run it in my browser, but it won't pass the last test @ freecodecamp.com.  Below are the 4 tests at freecodecamp:
smallestCommons([1,5]); -- works in browser and also @ freecodecamp
smallestCommons([5,1]); -- works in browser and also @ freecodecamp
smallestCommons([1,13]);  -- works in browser and also @ freecodecamp
smallestCommons([23,18]); -- works in browser, not @ freecodecamp
Browser Information

Browser Name, Version: Google Chrome Version 56.0.2924.87
Operating System: Windows 10 Home

Your Code

function smallestCommons(arr) {
  //find smallest common multiple between the range of two numbers
  var newarr = []; // lower and upper limit in order
  var newarr2 = []; // range between lower and upper limit
  var firstValue = 0; // firstValue of newarr2[];
  var nextValue = 0; // firstValue + 1
  var lastValue = 0; // lastValue of newarr2[]
  var leastCommon = 1;
  var numToLoop = 0; // lastValue of newarr2[]*number of loops
  var leastCommonArr = []; //array to hold true, false
  var leastCommonArrTrue = []; //array of all true for compare
  var foundIt = false;  // trigger to stop trying
  var upperLimit = 1;  // all values in newarr2[], multiplied together

//1 put the numbers in order
if (arr[0] < arr[1]) {
 newarr.push(arr[0]);
 newarr.push(arr[1]);
} else {
 newarr.push(arr[1]);
 newarr.push(arr[0]);
}
console.log("sorted newarr[] is: " + newarr);

//2 add array of numbers from newarr[0] to newarr[1]
firstValue = newarr[0];
console.log("firstValue is: " +firstValue);
lastValue = newarr[1];
console.log("lastValue is: " +lastValue);
nextValue = firstValue;
console.log("nextValue is: " +nextValue);

for (var i = 0; nextValue <= lastValue; i++ ) {
  newarr2.push(nextValue);
 // console.log(newarr2);
  nextValue = nextValue + 1;
 // console.log("nextValue is: " +nextValue);
  }
  console.log("newarr2 with incremental #s is: " + newarr2);

//2.5 create array of false values for leastCommonArr
for (var p = 0; p < newarr2.length; p++ ) {
  leastCommonArr.push(false);
  }
//  console.log("leastCommonArr  is: " + leastCommonArr);

//2.6 create array of true values for leastCommonArrTrue
for (var q = 0; q < newarr2.length; q++ ) {
  leastCommonArrTrue.push(true);
  }
//  console.log("leastCommonArrTrue  is: " + leastCommonArrTrue);

//2.7 find upperlimit by multiplying all values in the array
for (var s = 0; s < newarr2.length; s++){
upperLimit = upperLimit * newarr2[s];
console.log("upperLimit is: "+ upperLimit);
}
//3  find least common multiple by working through the multiples of the last number
lastValue = newarr2[newarr2.length - 1];
//4 test to see if leastCommon is divisible by the other values in the array
//leastCommon starts as lastValue
leastCommon = lastValue;
numToLoop = newarr2.length;
console.log("numToLoop: " + numToLoop);
  var n = 2;
  while( n <= upperLimit) {
  for (var m = 0; m < numToLoop; m++) {
   if(leastCommon % newarr2[m] === 0) {
	leastCommonArr[m] = true;
	   }
//	console.log("n is: " + n + " and m is: " + m);
//	console.log("leastCommon is : " + leastCommon);
//	console.log("newarr2[m] is: " + newarr2[m]);
//	console.log("leastCommon % newarr2[m] is :" +  leastCommon % newarr2[m]);
//	console.log("leastCommonArr is : " + leastCommonArr);
//	console.log("---------");
	}
 for (var x = 0; x < leastCommonArr.length; x++ ){
		if (leastCommonArr[x] === leastCommonArrTrue[x]) {
		foundIt = true;
		}
		else {
		foundIt = false;
		break;
		}
	  }

if (foundIt === true) {
break;
}
  //reset leastCommonArr and increment n
  for (var y = 0; y < newarr2.length; y++ ) {
    leastCommonArr[y] = false;
    }
  //  console.log("leastCommonArr reset is: " + leastCommonArr);
    leastCommon = lastValue * n;
     n = n + 1;
  }
  console.log(leastCommon);
  return leastCommon;
  }

@LFri Thank you for reporting your issue.
Your code did work for me, you might try the following:
Reload the page and run the tests again. A script may have crashed, preventing the tests from running.
Try the challenge in incognito mode. A plugin might be interfering with the tests.
Try the challenge in a different browser. There may be an issue with your version of Chrome.

Thanks OFFLINE.  I tried your three suggestions, and the code works in all three situations in my browser, but freecodecamp will still not pass the function for this test:
smallestCommons([23,18]); -- works for all three suggestions, but still not @ freecodecamp.com

@LFri

the code works in all three situations in my browser, but freecodecamp will still not pass the function for this test

I am bit unclear when you state that it works in all three situations, but not on freeCodeCamp.com
To be sure:

You are on a mobile device as per your opening post.
Did you try the challenge on a desktop where it works but, fails on a mobile.
Can you clarify what you mean exactly when you say it works on browser and fails in freecodecamp.com?

Can you please share screen shots of the challenge to help us better understand your issue?
Thanks a lot.

raisedadead, The "three situations" are in OFFLINE's first reply to me.
The challenge works for all tests on my desktop browser, Chrome, as stated in my first posting.   The last test, smallestCommons([23,18]); works in my browser, but fails @ freecodecamp's window.

Can you please share screen shots of the challenge to help us better understand your issue?

@raisedadead, you need to be working on this challenge @ freecodecamp to understand this issue.

@LFri
Hey Lisa,
This issue is going no where, unless we have the clarification that are needed on queries we have. So once again I request you to kindly:

State the difference between the your browser and freeCodeCamp? Do you mean you run the challenges on the freeCodeCamp website which fails your code but you are able to pass it somewhere else in the browser?

Can you share the screenshots of the issue that you are facing?

Unless you can provided detailed clarification of the exact issue you are facing, I am afraid we wont be able to analyze it.

I guess I assumed that the folks who would respond to this posting understood the basics of how freecodecamp works, and would want to know about this potential glitch in that system.  Instead, the responses (except for @OFFLINE who showed good knowledge of the situation and some very wise suggestions, tyvm!!) have not shown an understanding of the freecodecamp challenge system.
To reproduce this exact issue, all you would have to do is copy/paste my code into the freecodecamp window for the identified challenge and compare that to how the script works in any browser.  Screen shots of the same would be a waste of time.  I have also clearly identified which tests pass and which ones fail. Done.

@LFri
Hey Lisa,
My sincerest apologies, but as a matter of fact we get hundreds of issues everyday, and tens of changes as pull requests to the codebase everyday. So YES, we need very precise issue descriptions to help us help you. This is a voluntary effort which keeps getting back to you.
I have gone through the issue at least three times over to understand your query.
Screenshots maybe a waste of your time, but they surely are essential for the volume of requests we get every day.
Your opening post states that device used was a mobile browser. Hence my need for more specificity in the issue's root cause.
Now coming back to your query, the last test that is not passing because of a check that we have on the code for potential infinite loop.
Just add //noprotect on top of your code. It should pass all the challenges.
Please search the Forum and seek further assistance in the Help Chat Room.

I write it with "// noprotect"
`// noprotect
function smallestCommons(arr) {
var sum = 1, pre = 0, last = 0, re = 0;
var array = [];
if(arr[0] <= arr[1]){
pre = arr[0];
last = arr[1];
}else{
last = arr[0];
pre = arr[1];
}
var flagOuter = true, flagInner = true, k = 1;
while(flagOuter === true){
sum = pre * k;
flagInner = true;
for(var i = pre; i<=last; i++){
if(sum % i !==0) flagInner = false;
}
if(flagInner === true) flagOuter = false;

k++;

}
return sum;
}
smallestCommons([1,13]);`

OK, thank you.  Here's a link to freecodecamp's discussion of // noprotect.  My gut tells me that this would NOT be a best practice in the real world because you'd never want to intentionally allow any browser to just keep processing what it thinks may be an infinite loop, but at freecodecamp's site, I understand that this statement was necessary given it took a very long time for my function to calculate the correct answer for the last test. smallestCommons([23,18]);
https://forum.freecodecamp.com/t/free-code-camp-infinite-loop-protection/19550
For what it's worth, google tells me that // noprotect is needed at a few other online learning sites as well in similar situations.   In a very quick search, I can find no documentation that identifies an appropriate place to use // noprotect in the real world.... but there's probably some very rare case, so it's always good to know about these things.  Thanks.

@LFri
From the same article on forum and the very first line of the article:

The Free Code Camp code runner has a built in Infinite Loop Protect feature, leveraged from JSBin's Loop Protect. The loop protect injects some code into user created loops to allow a safe exit if more than ~500ms has passed without exiting the loop. Loop protect will catch many, but not all infinite loop issues

This is a feature that we specially have developed based on a feature on JSBin (A web IDE for developers).
It's unlikely you will find any documentation because its not a standard tool. But its very much well documented in its use on freeCodeCamp via the same article.
The bottom line here being the solution you have for the last test case triggers this protection.
I suggest that you can either submit the solution with //noprotect with your code as it is,  while sure is not a good practice, which means you may want to refactor your code to not trigger the protection.
You may refer the article on how to work with the //noprotect flag.
Thanks and happy coding!

Yes, it is a loop protection false positive. Please note: the problem described by the OP occurs even when you copy+paste some of the official solutions from https://forum.freecodecamp.com/t/freecodecamp-algorithm-challenge-guide-smallest-common-multiple/16075
I have scrapped my two initial solutions which - it turns out - were algorithmically correct, but triggered the protection. When my third solution didn't work either, I came here looking for a bug. Turns out, all three of my solutions were fine. I'd say it is definitely a bug in FCC code to fail correct solutions without a slightest indication that the problem may be somewhere else (a message such as "we could not test your solution, because it took too long to execute").


Multiple notification baloons

Is there a way to show multiple notifications one top of another?

For baloons notifu is used (https://www.paralint.com/projects/notifu/), and as far as I've seen, there is no current way to do this. I'm sorry.


fscache: add prefetch_all

If prefetch_config.enable = true, prefetch all data after open data blob.
tested with a configuration json like below:
{
  "type": "bootstrap",
  "config": {
    "backend_type": "registry",
    "backend_config": {
      "scheme": "https"
    },
    "cache_type": "fscache"
  },
  "fs_prefetch": {
    "enable": true,
    "threads_count": 2,
    "merging_size": 131072,
    "bandwidth_rate": 0
  }

we need to prioritize this feature.

We should support whether fs_prefetch is or isn't given, otherwise, with old nydus-snapshotter it will print
ERRO[2022-05-06T03:52:14.336433135Z] failed to mount /3/fs, failed to shared mount: failed to erofs mount: request to bind erofs blob: error code: UNDEFINED, error message: ParseBody(Error("missin
g field `fs_prefetch`", line: 1, column: 650))


InvalidParameterValueException: We currently do not support adding policies for $LATEST.

The problem
I'm running into an error while following trying to attach IAM policies to my lambda function. I've modeled my terraform off the complete example in the docs. The result is that they're really similar so I'm not sure how I'm running into this issue. I also see that you've handled this issue before this the source.
Error:
Error: Error adding new Lambda Permission for sign-up: InvalidParameterValueException: We currently do not support adding policies for $LATEST.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "ed82baaf-7fb8-4291-b2af-b8796d7bbea4"
  },
  Message_: "We currently do not support adding policies for $LATEST.",
  Type: "User"
}

  on .terraform/modules/lambda_function/terraform-aws-lambda-1.15.0/main.tf line 161, in resource "aws_lambda_permission" "current_version_triggers":
 161: resource "aws_lambda_permission" "current_version_triggers" {

Terraform
locals {
  table_name = "test"
}

module "lambda_function" {
  source = "terraform-aws-modules/lambda/aws"

  function_name = "sign-up"
  description   = "Allows users to sign up"
  handler       = "index.handler"
  runtime       = "nodejs12.x"
  publish       = true

  source_path = "../../index.js"
  environment_variables = {
    TABLE_NAME = local.table_name
  }

  allowed_triggers = {
    AllowExecutionFromAPIGateway = {
      service = "apigateway"
      arn     = aws_api_gateway_rest_api.sign_up.arn
    }
  }

  attach_policy_statements = true
  policy_statements = {
    dynamodb = {
      effect    = "Allow",
      actions   = ["dynamodb:PutItem"],
      resources = [module.dynamodb_table.this_dynamodb_table_arn]
    }
  }
}

resource "aws_api_gateway_rest_api" "sign_up" {
  name        = "Test rest API gateway"
  description   = "Test"

  endpoint_configuration {
    types = ["REGIONAL"]
  }
}

module "dynamodb_table" {
  source   = "terraform-aws-modules/dynamodb-table/aws"

  name     = local.table_name
  hash_key = "created"

  attributes = [
    {
      name = "created"
      type = "S"
    },
  ]
}

index.js:
exports.handler =  async function(event, context) {
  console.log("EVENT: \n" + JSON.stringify(event, null, 2))
  return context.logStreamName
}

Steps to reproduce

Copy terraform and index.js to testing directory
terraform init
terraform plan
See error.

Please let me know if I can give you more information. Thanks for taking a look!

Hi @agconti !
Thanks for opening this issue. I forgot to describe this case in the README, but I will do this soon.
Here is the solution:
When the Lambda function is created with publish = true the new version is automatically increased and a qualified identifier (version number) created and used when setting Lambda permissions.
When publish = false (default), only unqualified identifier ($LATEST) is available which leads to the error - "We currently do not support adding policies for $LATEST."
The solution is to either disable the creation of allowed triggers for the current version:
create_current_version_allowed_triggers = false

or to enable publish of Lambda function (publish = true).

Fixed in dccacab

Hey @antonbabenko, this worked for me. Thanks for your help!


[WIP] Fix SVG path

This will fix the SVG icon rendering issue on the staging site.

Closing as no longer relevant.


Specify netCDF file type in global parameter file

Renames BINARY_STATE_FILE --> STATE_FORMAT and BINARY_OUTPUT --> OUT_FORMAT.  Allows for the specification of netcdf filetypes for both options in image and cesm drivers. This PR does not change the classic drivers default behavior.
see also https://github.com/UW-Hydro/VIC_sample_data/pull/3

@jhamman : back to you


Why does this package not work on the frontend?

Hi. I would like to know if this package can work on the frontend via webpack? Now i get an error - "JavaScript heap out of memory".
Thanks for you package! 🎉

This project is intended to be used from the CLI or from another node.js application. It is not intended to be run within a browser. As to the "why" in your question: The project uses puppeteer to gather proxies from public proxy sources, which runs a headless browser. It's not possible to run a browser in a browser.


Feature Request: please add support for auto ssl via Lets Encrypt

As above.
It might even be worth adding the ability to use either the Staging or Prod endpoints

Hi,
I haven't use this project anymore but I already create new one at tirev.
It already support autocert (letsencrypt).


Build translations in pre_render hook

Fix against https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/issues/121
In order to enable site.translations(not t),  I made a fix to build site in pre_render(not post_render).
https://github.com/jekyll/jekyll/blob/master/lib/jekyll/site.rb#L187

Have the same issue and confirmed this works. Any way this can be merged?

So how's the review progress? @Anthony-Gaudino @kurtsson

I'd be happy if anyone could take ownership of this great project, there're so many important PR already.

@satzz basically verify the prs and their continued functionality. I can push a new version after that if you want.

In short this project really need a new owner, is that you? Or can you atleast verify all PRs so I can merge and make a release?

@kurtsson This can be merged.


New package: PortAudio v1.1.0

Registering package: PortAudio
Repository: https://github.com/JuliaAudio/PortAudio.jl
Created by: @bramtayl
Version: v1.1.0
Commit: 7e317452f9f21979ed4c68db4a7cdb807f1857ee
Reviewed by: @bramtayl
Reference: https://github.com/JuliaAudio/PortAudio.jl/commit/7e317452f9f21979ed4c68db4a7cdb807f1857ee#commitcomment-50554380

Superseded by #36376 (so I think we can close this)

Ok, but.....

Once you fix the automerge issues you can register again the new revision without changing the version number and this pull request will be automatically updated.


SIGUSR1 only dismisses active notification

This builds upon the commit where herbe waits for the semaphore, it now waits to enable SIGUSR1 until it acquires the lock, meaning that pkill -SIGUSR1 herbe will now only dismiss the active notification.

I was already playing with the idea of dismissing/accepting notifications with corresponding actions. I also updated the README.md with some kind of FAQ about how to use herbe. Tell me what you think and if everything is clear and works properly. I'm kind of tired so I might've missed something. Thank you again.


Feature/#265 create conatiner list component

Sample

Can this be authored to be sticky to the top ?

Done


Release v0.9.0

The NHI-GWO database does not return data for Brabant Water anymore, which is the reason this tests in the PRs was failing. I sent a mail to the NHI helpdesk, with a question why this is the case. For now, maybe we can change the test to a well field of another drinking water company, for example Vitens.


Figure out how to mark Pass and other non-Fail sections

Current code only marks failures, which is great for probably 80% of the time, but the user should have access to the full output of the test run.
Code implementing failure-case marking is in plugin.py, in hook pytest_runtest_logreport. The current implementation of accessing the report.longrepr.chain[0][0].reprentries[0].lines.insert(0, MARKERS["pytest_fold_failure_begin"]) fails with error
INTERNALERROR>   File "/Users/jwr003/coding/pytest-fold/pytest_fold/plugin.py", line 139, in pytest_runtest_logreport
INTERNALERROR>     report.longrepr.chain[0][0].reprentries[0].lines.insert(0, pytest_pass_1)
INTERNALERROR> AttributeError: 'NoneType' object has no attribute 'chain'

Implementation in latest issue10 branch collects PASS/SKIP tests as the test's TestReport is being gathered; then adds them to a list (which is pickled to disk for later retrieval). Rudimentary implementation does in deed show Pass tests.


ng add @angular/pwa cannot find AppModule if imported through index.ts

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request

Area
- [ ] devkit
- [x] schematics

Versions

$ node --version
v8.11.2

$ npm --version
5.6.0

Repro steps

Create an Angular 6 application
If not present, create a index.ts in the App module folder with at least the following content:

export * from './app.module';

In the main.ts, import the App module indirectly by using its parent folder:

import './polyfills.ts';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
import { AppModule } from './app'; // works because ./app/index.ts exports AppModule

if (environment.production) {
    enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);

Now use angular CLI to add PWA

$ ng add @angular/pwa --project <your-project-name-from-angular-json>

The log given by the failure

Installing packages for tooling via npm.

+<EMAIL_ADDRESS>updated 1 package in 11.487s
Installed packages for tooling via npm.
Could not read file (/src/app.ts).

Desired functionality

Make PWA install work even when importing the AppModule  indirectly (through an index.ts).
To be more accurate, the findBootstrapModulePath function from ng-ast-utils.d.ts should properly identify the AppModule path in this setup.
https://github.com/angular/angular-cli/blob/44086c60ff1d6c26d30850bef125120f6c498ac1/packages/schematics/angular/utility/ng-ast-utils.ts#L49
This method is called by updateAppModule from https://github.com/angular/angular-cli/blob/8ce5ef48b81af484c37123d36422b3c58ddc1ffd/packages/schematics/angular/service-worker/index.ts#L99
The failure occurs when trying to update the content of a file which does not exists. Checking the file exists and displaying a better message would also help.
Mention any other details that might be useful

The issue was encountered when attempting to add PWA to our NGXP Seed web side.
$ git clone https://github.com/Monogramm/ngxp-seed.git
$ git checkout develop
$ ng add @angular/pwa --project web

Since we managed to find out the root cause, the workaround of using the complete path will be used for now.

I had similar problem. In my case I'm using tsconfig path mapping and reference AppModule in main.ts with that reference:

import { AppModule } from<EMAIL_ADDRESS>
I get the same type of error: Could not read file (/src/@app/app.module.ts).
Changing back only that reference to import { AppModule } from './app/app.module'; in main.ts results execution of ng add @angular/pwa as expected

We went for the same solution of import { AppModule } from './app/app.module';.
Knowing this workaround makes the issue less critical but it's still a bit weird to be forced to do this just to add a component 😉

it also doesn't find it if you have alias for imports


Inquiry About the Wallpaper Used in the Screenshot

Hello OriginCode
I hope this message finds you well. I recently came across your dotfiles repository and I must say, I’m quite impressed with the setup you’ve shared. I particularly noticed the wallpaper in one of the screenshots and found it to be visually striking. I was wondering if you wouldn’t mind sharing the source or the artist of this wallpaper?

I understand this might be a minor request, but I genuinely appreciate the aesthetics and would love to know more about it. Thank you in advance for your time and assistance.

@uiYzzi This wallpaper is from a visual novel 蒼の彼方のフォーリズム EXTRA1


Convert project gradle file to Kotlin DSL

WHAT
Converting the project gradle file to Kotlin DSL.
WHY
Following up #846 relating to #833. This resolves #833
HOW
Converting the file type to .kts. Then converting the content and checking that it syncs and that the required gradle tasks are passing.
In this file, there was a lot I was not 100% sure about. Leaving this as a draft until I have made sure that everything is working correctly as expected. I think also I need some help with the mavenPublishstuff. This was not very good documented for Kotlin DSL, and I don't quite know how to test it.
I am also a bit unsure if I have correctly converted the dependencyUpdate stuff.
Before there was some logic to check the plugin manager if there is a version catalog update plugin before we apply it in the project gradle file. That did not quite work as the versionCatalogUpdate lambda block would become unresolved.  So now I am applying it, but I don't know if that is the correct solution here. Any input would be highly appreciated :)
Checklist :clipboard:

[x] Add explicit visibility modifier and explicit return types for public declarations
[x] Run spotless check
[x] Run tests
[x] Update metalava's signature text files

Don't worry about the dependency update parts. Can fix next time we run it.
It runs as part of
./gradlew versionCatalogUpdate


A Use Strict Directive may not contain an EscapeSequence or LineContinuation

/*jshint strict: true */
function f() {
  "use\u0020strict";
  return 42;
}

/*jshint strict: true */
/*jshint multistr: true */
function f() {
  "use \
strict";
  return 42;
}

jshint v2.9.4
actual: (no warning reported)
expect: Missing "use strict" statement.
spec:

A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either the exact character sequences "use strict" or 'use strict'. A Use Strict Directive may not contain an EscapeSequence or LineContinuation.

Confirmed. Thanks for the report!


Fix auto_link trailing slash

auto_link('http://example.com/example/');
Result
http://example.com/example/
Fix Result
http://example.com/example/

Please don't change file permissions.
I only noticed this one after merging ... would've refused it if I had seen it before that.

Sorry. Permissions were unintentionally changed


Installing vls from vscode does not work

System Information
Windows 11
VLS Error
Error: Command failed: v -prod -o C:\Users\hassa\.vls\bin\vls.exe cmd/vls
Note: tcc is not recommended for -prod builds
failed thirdparty object build cmd:
"C:\Users\hassa\v\thirdparty\tcc\tcc.exe"   -std=c99 -D_DEFAULT_SOURCE -O2 -DNDEBUG  -I "C:\Users\hassa\.vls\tree_sitter\lib" -o "C:\Users\hassa\.vmodules\cache\98\98631fe4e3fa6233a44d2390f4181f76.o" -c "C:\Users\hassa\.vls\tree_sitter\lib\lib.c"
builder error: In file included from C:/Users/hassa/.vls/tree_sitter/lib/lib.c:14:

C:/Users/hassa/.vls/tree_sitter/lib/./stack.c:274: error: ';' expected (got "StackSliceArray")

Problem Description
I installed Vlang. Downloaded the vscode Vlang extension, created a .v file. Enabled vls from the extension settings then vscode prompted to install vls upon which it failed and the error output is mentioned above.
Steps to Reproduce

Install v
Download the vls vscode extension
Enable vls from the extension settings
Create a .v file and open it in vscode
Install vls on vscode prompt

On mac m1 enabling the VLS on visual studio fails with:
Error: Command failed: v -prod -o /Users/agavalda/.vls/bin/vls cmd/vls
analyzer/symbol_registration.v:173:84: error: `void_sym` evaluated but not used
  171 | fn (mut sr SymbolAnalyzer) struct_field_decl(field_access SymbolAccess, field_decl_node C.TSNode) ?&Symbol {
  172 |     field_type_node := field_decl_node.child_by_field_name('type') ?
  173 |     field_sym := sr.store.find_symbol_by_type_node(field_type_node, sr.src_text) or { void_sym }
      |                                                                                ~~~~~~~~
  174 |     field_name_node := field_decl_node.child_by_field_name('name') or {
  175 |         // struct embedding

@nassah221 I suggest you use our daily builds here in the meantime: https://github.com/vlang/vls/releases
@angel-git Please submit a separate issue. Thanks

Closing this as this should've been fixed in the latest version of vscode-vlang : https://github.com/vlang/vscode-vlang/commit/a9cc6b7f5f19d22d4299d43c49c03be4e6a329e4


Fix missing optional fields should not be validated

Prevent the assumption of null value to be a synonym of value not set. Null values are valid input values (like JSON object with null values)

Most basic test does not work due https://github.com/zendframework/zf2/pull/5271/ getRawValues() returns a list of pairs Input => null which make this logic to fail.

I think this explains and fixes https://github.com/zendframework/zf2/issues/6638

It's not related. This does not change the meaning of any empty value. This only treat the case when the value is not set (not exists !== empty).

There was impossible to check if value exists or not, so I used notEmpty validator to cover this, but that was not ideal because there was some values treated as empty anyway. This fixes my issue because now I can check not set, is set or not empty, before this PR that was impossible. As I understand this PR adds this functionality.

I'm concerned that this changes test assumptions, as that generally indicates a BC break. Looking at the logic, however, it appears sound. I'll review more fully early next week.

Note: It's impossible to undo all BC Breaks introduced in ZF 2.4. The split of null between not set and valid value can't be undone.


1.4.0 build causes "Uncaught TypeError: Super expression must either be null or a function, not undefined" error at runtime

This error only occurs when bundle is produced with production mode of webpack. Keeping everything the same and rolling back to 1.2.7 fixes the issue.

@vlaurin, Thanks for trying it. You can close this issue for now. Project is huge and I don't want to attach all of it here. If I could replicate it in a small sized project, I will definitely upload it. For the time being I'm using 1.2.7. Thanks for your support.


Large PSUs do not work with toggle switches

The RSP-500 and LRS-450 (not 350) are too large for toggle switches. Rocker switches (or an alternate location) are needed for these PSUs.

This is now documented.


Keep original aspect ratios

Fixed in https://github.com/jikuja/svg2drawiolib/commit/ab0d3bbdcc2adcb0d6e4fdd5e65c01d0ede110fc


The display_name parameter is misleadingly named

Bug Report
The MeasurementService.configuration and MeasurementService.output methods have a display_name parameter, which is not the display name but rather the Protobuf field name. The display name is provided by the UI file, and is not required to match the Protobuf field name.
Repro or Code Sample
https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/measurement/service.py#L233
    def configuration(
        self,
        display_name: str,
        type: DataType,
        default_value: Any,
        *,
        instrument_type: str = "",
        enum_type: Optional[Type[Enum]] = None,
    ) -> Callable:

Expected Behavior
Parameter name correctly describes its function.
Current Behavior
Parameter name incorrectly describes its function.
Possible Solution
Rename parameter to name.
Add a keyword-only parameter with the old name (display_name) which defaults to None. If display_name is specified, override name and generate a deprecation warning.
Your Environment

OS & Device: Windows
ni-measurementlink-service version: 1.0 through 1.2.0-dev0
MeasurementLink version: N/A
Python version: N/A

AB#2457655

@bkeryan Although slightly misleading, this is functional. Can we treat it as a tech debt to avoid the >28d bug limit?

Rename parameter to name.
Add a keyword-only parameter with the old name (display_name) which defaults to None. If display_name is specified, override name and generate a deprecation warning.

This doesn't work because the positional parameter is still required.
>           measurement_service.configuration(display_name="float_in", type=DataType.Float, default_value=1.23)
E           TypeError: configuration() missing 1 required positional argument: 'name'

@bkeryan Do you have any other ideas about how to fix this? It's been around for almost 4 months.

We should rethink how we handle configuration/output names. It may be better to accept a user-friendly display name and sanitize it for use in protobuf. Or accept a protobuf-style snake_case name and automatically convert to "Sentence case" for the default naming in the UI.


Basic project structure

Add the basics needed for our first step of this project.
This PR consists of adding:

ExplorerSQL.start_link/1 - a proxy for Postgrex.start_link/1
ExplorerSQL.table/2 - returns an Explorer DF associated with an existing table
ExplorerSQL.to_sql/1 - returns an SQL query based on the operations so far. Right now we only return SELECT * FROM table

cc/ @josevalim


Not Working with Double data type

here price is non null double data type and generated preview class generates double with null value
@DataPreview
data class Product(
var id: String,
var title: String,
var description: String,
var handle: String,
var publishedAt: String,
var createdAt: String,
val price: Double ,
var available: Boolean,
) {
Generate class
val productPreview = Product(
id = "ryan_parker",
title = "e3qtew",
description = "u2iWJ3h",
handle = "9RNNV",
publishedAt = "hS5b2u4R",
createdAt = "ZU3I",
price = null,
available = false,
)

Hi @mkrupal09, thanks for using and reporting the issue. I'll take a look and come back to you soon.

Off topic, I noticed in your Pojo file that some keys are generated as random strings. I added some logic for the 'title', 'description', 'created/published At' keys. Please update to version 1.0.2 and check it as well. ;)

Thanks @Vram-Voskanyan for prompt reply and immediate fix


Correct memory ordering for rcu atomic assign/deref on Apple M1 cpus

Since the addition of macos14 M1 runners in our CI jobs we've been
seeing periodic random failures in the test_threads CI job.
Specifically we've seen instances in which the shared pointer in the
test (which points to a monotonically incrementing uint64_t went
backwards.
I believe the following is whats happening:

ossl_rcu_uptr_deref and ossl_rcu_assign_uptr are implemented using
__atomic_load_n and __atomic_store_n.  The store operation is tagged
as __ATOMIC_RELEASE and the load is tagged as __ATOMIC_ACQUIRE.

On strongly ordered memory access cpus, like x86, this is sufficient,
as instructions are emitted for these builtins to ensure proper
fencing of any prior reads/writes (i.e. a lock prefix may be prepended
to ensure cache synchronization.  See:
https://en.cppreference.com/w/c/atomic/memory_order
Specifically the section on release-acquire ordering

On weakly ordered memory access cpus, like arm, additional fencing
instructions must be issued to ensure prior reads/writes become
visible to other cpus.  Again see:
https://en.cppreference.com/w/c/atomic/memory_order

Ostensibly, I would have assumed that an
__atomic_load_n/__atomic_store_n with the tagged semantics would
have resulted in the implicit emission of a fence instruction to ensure
ordering.  However, disassembling the output of a build on a macosx 14
system with the clang compiler shows that not to be the case:
0000000100120488 <_ossl_rcu_uptr_deref>:
100120488: f8bfc000     ldapr   x0, [x0]
10012048c: d65f03c0     ret
0000000100120490 <_ossl_rcu_assign_uptr>:
100120490: f9400028     ldr     x8, [x1]
100120494: c89ffc08     stlr    x8, [x0]
100120498: d65f03c0     ret
I'm not well versed enough in the standard to know if this translation
would be a compiler bug or not, but it does seem that, in a weakly
ordered system, this series of instructions, when run on multiple
threads may lead to writes getting published to other threads late,
resulting in a counter that appeared to go backwards.
So what to do about it?  From my interpretation of memory fencing:
https://en.cppreference.com/w/c/atomic/atomic_thread_fence
It seems we can issue these atomic loads/stores with a relaxed ordering
and independent fencing.
by doing so, the M1 assembly turns into this:
0000000100120488 <_ossl_rcu_uptr_deref>:
100120488: f9400000     ldr     x0, [x0]
10012048c: d50339bf     dmb     ishld
100120490: d65f03c0     ret
0000000100120494 <_ossl_rcu_assign_uptr>:
100120494: d5033bbf     dmb     ish
100120498: f9400028     ldr     x8, [x1]
10012049c: f9000008     str     x8, [x0]
1001204a0: d65f03c0     ret
In which dmb (memory barrier) instructions are inserted as expected,
enforcing publishing of all prior issued memory instructions.
I've run these changes 10 times through CI (which is the only place
we've found that reproduces this issue), and encountered no subsequent
failures.
Note: To avoid tsan errors that arise from the inability of the
gcc/clang thread sanitizer to properly interpret thread fences, the
addition of TSAN notifications are required to properly inform the
sanitizer that this code is properly ordered

@tom-cosgrove-arm would greatly appreciate your input on this issue please.  Specifically if you could comment on the memory synchronization properties of arm cores in general (and the M1 specifically if possible) that would be a big help.  Trying to concretely understand if an _atomic[load|store] operation with __ATOMIC_RELEASE | __ATOMIC_ACQUIRE ordering is expected to imply a memory fence on code targeting those processors.  The assembly I've observed seems to say "no, it doesnt" but I'm not sure if thats expected or not

To clarify what I think is happening here, as a sequence diagram:

In the above sequence diagram, because (as I believe) arm cpus don't imply fencing on atomic loads/stores, what we see happening is that, multiple writer threads issue store instructions for data in addresses shared by multiple threads, but because of their weak memory ordering semantics, its possible for those writes to be completed in a different order than what two independent cpus issued in the timeline.  As a result, two subsequent reads of that data might see out of order results (i.e. a reading thread might see the value posted by writer thread B first, and then later see the value posted by writer thread A, leading to the error we see in which the reader thinks the shared updated counter went "backwards")

@nhorman Yes, I would generally expect an __atomic_load_n(foo, __ATOMIC_ACQUIRE) or __atomic_store(foo, bar, __ATOMIC_RELEASE)to issue the required memory barrier instructions, and I would assume lack of these to be a compiler bug.
I will check with our compiler folks to get their opinions, however - and with the bank holidays, it will probably take a few days to get an answer

@tom-cosgrove-arm thank you, no rush.  We have a workaround for the 3.3 release on this, just trying to get it fixed properly during 3.4

@tom-cosgrove-arm that matches my observations in the initial problem statement here.  My assumption is that the memory order parameter to these operations only specify restrictions to code hoisting/sinking within the given compilation unit.  It just so happens that on x86, the compiler, in its use of the lock prefix on the load and store instruction implies memory synchronization between cpu caches that isn't guaranteed to exist on other arches.  I'll be interested to see if your compiler team agrees with that assessment.

@tom-cosgrove-arm apologies, don't mean to rush you here, but theres been some shared interest here in determining what the expected behavior on arm is, and if this patch is on the right track for fixing it.

I agree that it certainly seems like atomic_load/store should imply a memory fence, but apparently it's consistent across several versions of clang and gcc.
On a lark I took a look at the assembly for pthread_mutex_lock on arm, and a dmb instruction is emitted on that call to do proper fencing.  I need to follow up and see if the c level code uses a built-in or some hand rolled asm to do it

That it emits locked instructions on x86 but doesn't try on ARM is telling.
If the compiler were just ordering memory accesses, it wouldn't need to emit the lock prefix.

Ah, okay, so actually what's happening is that the Armv8-A ISA includes a pair of instructions Load-Acquire (LDAR)/Store-Release (STLR) with the required semantics, and those instructions are used by the compilers.
For example, __atomic_load(p1, p2, __ATOMIC_ACQUIRE) becomes
        ldar    x8, [x0]
        str     x8, [x1]

and __atomic_store(p1, p2, __ATOMIC_RELEASE) becomes
        ldr     x8, [x1]
        stlr    x8, [x0]

on clang 9, 10, 11, 12, 13 and 14 (and armclang) and
        ldar    x0, [x0]
        str     x0, [x1]

and
        ldr     x1, [x1]
        stlr    x1, [x0]

on gcc 10, 11 and 12.
Unfortunately I missed the a in the ldar and the l in stlr when reading the assembly.
Looking at the assembly in the description we do indeed see ldapr (https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/enabling-rcpc-in-gcc-and-llvm) and stlr, so I'm not sure what the cause of the random failures is now, or that this PR would fix them.

@tom-cosgrove-arm thank you for the update.  Looking further into the lda[p]r and strl instructions here:
https://developer.arm.com/documentation/ddi0602/2023-09/Base-Instructions/LDAPR--Load-Acquire-RCpc-Register-
It indicates:
Load-Acquire RCpc Register derives an address from a base register value, loads a 32-bit word or 64-bit doubleword from the derived address in memory, and writes it to a register.

The instruction has memory ordering semantics as described in Load-Acquire, Load-AcquirePC, and Store-Release, except that:

There is no ordering requirement, separate from the requirements of a Load-AcquirePC or a Store-Release, created by having a Store-Release followed by a Load-AcquirePC instruction.
The reading of a value written by a Store-Release by a Load-AcquirePC instruction by the same observer does not make the write of the Store-Release globally observed.
This difference in memory ordering is not described in the pseudocode.

Looking at the Load-AcquirePC instructions docs:
https://developer.arm.com/documentation/102336/0100/Load-Acquire-and-Store-Release-instructions
It documents (I think) the sequential ordering requirements or ldar/stlr instruction, and also (perhaps notably) discusses limited ordering regions, which (again, I think) constrain the areas of memory to which the ordering of an ldar/stlr instruction apply.
Looking at figure 7, it would seem that, if an area of memory isn't covered by a limited ordering region, the ldar/stlr instructions might effectively reduce to regular loads/stores
Given that this problem (so far) has only been observed on virtualized M1 cpus, I'm wondering if the virtualization software doesn't properly emulate ordering regions (maybe)?
I can try to write some assembly that dumps out the values of the region descriptor to confirm that

well, thats a bust. Accessing LOR* registers while in EL0 is undefined, so we can't actually dump the load ordering regions at run time.

All I've read so far seems to say that the old code was correct, and that we should avoid the memory barrier that this is introducing.
So I'm assuming this is some bug in the virtualization. I think we should at least attempt to report this bug.

In that case we will probably have to workaround this issue somehow? It can be something Apple aarch64 specific. I do not think we want to detect the virtualization.

I've got a hunch that I'm tracking down now, standby

So, Based on @tom-cosgrove-arm input (thanks again!) I noticed something.  In his analysis here he indicates that __atomic_load builtins should produce the following:
ldar    x8, [x0]
str     x8, [x1]

However ,using the clang compiler installed on w-mac-mini-m1-2.openssl.org:
SSL2:~ nhorman$ clang --version
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>.5)
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I see the following instruction emitted for an __atomic_load builtin:
 ldapr   x0, [x0]
 ret

Note the use of ldapr rather than ldar.  Both are atomic load-acquire operations, but the latter is subtly different.  Most notably, according to:
https://developer.arm.com/documentation/ddi0602/2023-09/Base-Instructions/LDAPR--Load-Acquire-RCpc-Register-
ldapr has more relaxed ordering requirements than ldar (I think).  Specifically it honors the Limited ordering register in the arm coprocessor, rather than performing global ordering (again I think).  The LDAR page here:
https://developer.arm.com/documentation/dui0802/b/A64-Data-Transfer-Instructions/LDAR
Is somewhat quiet on its specific ordering constraints, but it seems sensible given that there are 2 instructions to do the same thing.
My hypothesis is that, while I can't dump out the Limited order registers on the M1 (they are only accessible in EL1 and above), that on the physical M1 CPU the entirety of main memory is considered a single ordering region, while on the virtualized cpu there may be multiple (or perhaps there is just a bug in the MacOSX virtualization software, leading to unexpected out of order loads/stores.
As such, I created this dummy PR:
https://github.com/openssl/openssl/pull/24031
It makes the following change:
https://github.com/openssl/openssl/pull/24031/commits/cc8bb7b96b02191ad44528d5f96d5a52d7441235#diff-33114a13bd417cbc08f1be5b6ba0ae94f1a86516e0635d508d6e7fc55908a423R561-R567
So, now, for arm64 builds in the PR, we manually create an atomic load specifically using the ldar instruction
I would assert that, if this makes the threadstest failure abate on the virtualized M1 cpu, then we can at least have a strong suspicion that either this is in fact a compiler bug (as the ldapr instruction can't be used reliably, dependent on the LOR register configuration), or that the virtualized M1 cpu has an ordering problem.
If thats the case, I would say we need to work around this problem by using relaxed ordering and an explicit memory fence (as thats the most portable solution).
and as @kroeckx mentions, we should definately raise this as an issue with apple.  If anyone has a contact method to do so, I would be glad to follow up on that

Note that https://developer.arm.com/documentation/102336/0100/Load-Acquire-and-Store-Release-instructions does describe the ldapr (Load-AcquirePC) intructions semantics. It's now "processor consistent". If there are multiple processors, it does not guarantee the order that the test checks for.

At first sight, the compiler seems to generate code that does not comply with the C11 memory model.

For gcc the defaults are:
from 5.5 gnu11
from 11: gnu17
Can't really find it for clang

@tom-cosgrove-arm, no to the best of my knoweldge we are compiling with either -ansi (for the ansi builds) or -c89 otherwise.
I agree that ldapr is available for use on the M1 platform, just questioning under what conditions its safe to do so.  As @kroeckx indicates ldapr is processor consistent, but only with the limiting odering regions that the coprocessor registers define (which are admittedly opaque).  There is also of course the possibility of a bug in the M1 virtualization code that changes the sematics of ldapr in some way as of yet unknown to us.
trying to make  a developer account with apple now to raise the issue, but the site is failing at the moment, unsure why.
so far, my test pr here  https://github.com/openssl/openssl/pull/24031 is on 5 iterations of the mac os 14 test without failure.  Starting to feel like ldapr in a virt system is a problem here

I don't think we override the default std except in some special builds

My understanding is that our test is written for the acquire release semantics as in C11, but that the compiler generates code for a weaker model, and so that this is a compiler bug.
The RCU code doesn't actually need the acquire release semantics, acquire consume would be enough, but I don't think even that is provided by the compiler.

Actually, could I suggest that we keep the current implementation for most builds, and special case with #ifdef for Apple Silicon the fix in your other PR? i.e. your possible solution (1).
The reason is to have the code reflect reality: the reality that (we think) the current could should work, but a workaround is needed on Apple Silicon (because of the issue when virtualised)
If we don’t do this, and change the code along the lines of solution (2), at some point in the future a well-meaning engineer could easily "improve" the code to the current implementation, at which point we’ll have the virtualised Apple Silicon issue all over again. If not in this project (we might remember, and not allow the change) then if this code gets copied and used elsewhere.

I do have to wonder if #24031 has other optimization side effects, that probably only show up in an LTO build. Is the ldapr vs ldar the only change in generate code? I think we should at least also try this with LTO, and possibly have LTO in CI.

Do we actually have multiple CPUs on the Apple M1 hardware where you've tested this @nhorman ? Because the difference might be in presence of multiple CPUs (not cores) on the testing platform.

I need to augment the get cpu info step in CI to test that, but running:
sysctl -a

on our M1 shows this:
hw.cachesize:<PHONE_NUMBER> 65536 4194304 0 0 0 0 0 0 0
hw.l2cachesize: 4194304
hw.physicalcpu: 8

Which suggests to me there that we have 8 cpu cores, each at least with their own l1 cache, and a shared l2 cache

The github runner reports the following:
machdep.cpu.cores_per_package: 3
machdep.cpu.core_count: 3
machdep.cpu.logical_per_package: 3
machdep.cpu.thread_count: 3
machdep.cpu.brand_string: Apple M1 (Virtual)
hw.cachesize:<PHONE_NUMBER><PHONE_NUMBER>2912 0 0 0 0 0 0 0
hw.l2cachesize: 12582912
hw.physicalcpu: 3
CPUINFO: OPENSSL_armcap=0x987d

which I think suggests that we have 3 physical cpus

@tom-cosgrove-arm yeah, I can be on board with that.
Question: How do we want to detect apple silicon?  The easy method would be to use #ifdef aarch64, but that nets in all arm silicon, not just apple.  I could detect MACOSX, which would be a bit closer to the mark, but would net both physical and virtual cpus, which may be the best we can do without a runtime check (which I would like to avoid for performance reasons)

ok, so since the other PR was just for testing, and all our conversations have been here, I'm going to update this PR with the change to implement __atomic_load using ldar rather than ldpar here

Question: How do we want to detect apple silicon?

I would suggest #if defined(__APPLE__) && defined(__aarch64__). Yes, this will catch physical CPUs as well as virtual ones, but I don't think we can help that.
(And please, a lovely succinct comment explaining why we're special-casing Darwin/aarch64, for when we come back to it in N months time and wonder "huh?"!)

Do both gcc and clang output the errant instruction?
If not, we should condition on the compiler too.

@pauli, unsure, gcc command on our m1 is aliased to clang

The cross compile builds include aarch64 with gcc from memory.

@pauli, unsure, gcc command on our m1 is aliased to clang

@nhorman  - you can install an actual gcc on macOS alongside Clang with Homebrew.
> gcc --version
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

> gcc-12 --version
gcc-12 (Homebrew GCC 12.3.0) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@nSircombe interestingly, I installed gcc-13 via homebrew on our development M1 and built with:
CC=gcc-13 ./Configure

dumping out the assembly for the ossl_rcu_uptr_deref function:
0000000100143a40 <_ossl_rcu_uptr_deref>:
100143a40: c8dffc00     ldar    x0, [x0]
100143a44: d65f03c0     ret
100143a48: d503201f     nop
100143a4c: d503201f     nop

so there is clearly a discrepancy here between gcc and apples clang, which produces:
0000000100120488 <_ossl_rcu_uptr_deref>:
100120488: f8bfc000 ldapr x0, [x0]
10012048c: d65f03c0 ret

The CI job we run on this doesn't install any additional software from homebrew, so I'm relatively certain that its using the apple clang 15 compiler.

Ok, I've updated this patch to no use the relaxed ordering/fencing approach, and instead implemented an ldar based atomic_load function, to be used only when APPLE && clang and aarch64 is defined.  I've run it several times, and encountered no issues on macosx.  Please review and (re)approve when you all can.

I've updated the labels to indicate my committer approval and that an OTC (re-)approval is required

This pull request is ready to merge

Merged to the master and 3.3 branches. Thank you.


Handle file-based heatlists

common format - needed when comp_organizer websites delete their heatlists

Closed with pull request #15


docker-compose for Mysql DB

not able to understand docker-compose for Mysql db...

@nidhi-parmar  are you interesting by adding this feature?

I'll take a stab at this.

Thanks @tscrypter. Could you work on it then submit a Pull Request?

I'll be doing that tonight.

Please reopen if needed


Consider running test262

There is a builtin runner. Sample run with make test2-default
151/39546/8859
Average memory statistics for 39546 tests:

QuickJS memory usage -- BigNum 2021-03-27 version, 64-bit, malloc limit: -1

NAME                    COUNT     SIZE
memory allocated          962   117824  (122.5 per block)
memory used               963   109364  (0 overhead, 8.8 average slack)
atoms                     533    21987  (41.3 per atom)
objects                   171    12349  (72.2 per object)
  properties              877    15778  (5.1 per object)
  shapes                   59    13279  (225.1 per shape)
bytecode functions         13     1549
  bytecode                 13      937  (72.1 per function)
C functions                99
arrays                      1
  fast arrays               1
  elements                  1       16  (1.0 per fast array)

Result: 151/39546 errors, 1487 excluded, 8859 skipped, 135 new, 1 changed
       72.82 real        51.04 user         6.82 sys

I agree, I have it as a TODO in .github/workflows/ci.yml.
I can set it up but do you agree we don't want to vendor tc39/test262? It's pretty big (about 235 MB) so my current thinking is to git-submodule it. I hate them with a passion but it's the least worst option I can think of.

#11

I agree, I have it as a TODO in .github/workflows/ci.yml.
I can set it up but do you agree we don't want to vendor tc39/test262? It's pretty big (about 235 MB) so my current thinking is to git-submodule it. I hate them with a passion but it's the least worst option I can think of.

Makes sense! Alternatively we could git clone or plain download it as part of the test process. But a submodule is the simplest for now!


Is it possible to disable timePicker controller

I am trying to disable the timePicker control (only use for datePicker) and I am not finding anything specific for this.   I know I can set the icons, but this still allows users to "click" that area?
Please forgive me if this has already been asked, not finding what I need querying this specific capability

Of course, after I post the message I find the solution.   Just need to set the format property to date only
format: 'DD/MM/YYYY',


Errors after removing all users

After removing all OUsers, I get an error on inserting a new one:
orientdb {pumpup}> select from ouser

0 item(s) found. Query executed in 0.001 sec(s).
orientdb {pumpup}> insert into ouser set status='ACTIVE', name='garrett', password='test'

Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #5

Error: java.lang.NullPointerException

My fear is that during an import, a user will already have admin, reader, or writer as their name.
This is using 1.7.7.

Thanks for opening this issue. Closing it as we are unable to replicate. Please reopen if appropriate. Thanks again


Set iopub socket hwm to 0

This PR aims to provide a fix for this issue https://github.com/almond-sh/almond/issues/1061
MQ has a concept of high water mark: the maximal number of messages that may be queued on socket. If the queue is full, either new messages are dropped or the socket becomes blocked. The default value for HWM is 1000. If iopub message rate is too high, the new messages are dropped (and for whatever reason the kernel blocks at this moment, see the issue for more details).
Setting HWM to 0 resolves that problem. The only possible downside of this is that the kernel might crash due to OOM if it produces too much output too quickly, but it doesn't seem a huge issue to me.

Alongside that, maybe we should also use some java.io.Buffured* classes here or there, for the output to be sent in bigger batches.

Yes, that's basically what IPython does (I believe that they do flush() asynchronously after a short timeout, but I'm not sure about that


Added babel to transpile to ES5

Now transpile to ES5 to avoid any bug with UglifyJS will come to minify the modules as UglifyJS can't understand ES6.

Nice!
But wouldn't it be better if we transpiled before running tests, and then run the tests on the transpiled file?


use log-driver optin while deploying application inorder to redirect logs to journald

Hi,
We have requirement where we need to redirect logs from marathon deployed applications to go to journald.
docker 1.6 higher support "log-driver" option which pushes logs to journald/json-file
Can this option be used in the json files. If its possible can you please share the sample json file

As far as I know it's not possible due to the way mesos handles docker. Please see the following thread for details:  https://groups.google.com/d/msg/marathon-framework/kaQ6m35AYjQ/wjj9OHn1_9wJ

I got it worked for latest version of docker 1.6 . But seem slike systed_unit in journald is coming as docker.service.  and container name is messos- so there is no way I am able to map the application. Is there any way we can override  container name mesos creates?

Thanks for sharing your findings. I'll reach out to the team and get back to you as soon I have an answer.

Any news on this? Would be great to have the log output to debug containers that fail to start!

+1

:+1:

+1

+1

+1

AFAIK there is no way to rename the container that mesos creates (aside from influencing the cgroup root that mesos uses (cgroups_root flag)).

I'd like to bump this.  I'm tasked with a similar issue and am really interested as to what the solution was.

+1

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-3143. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-3143. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Is the CMake option MI_INSTALL_TOPLEVEL=ON really deprecated ?

Hi,
I tried to ask this question already in https://github.com/microsoft/mimalloc/pull/255#issuecomment-1507110615 but there was no answer. Basically the question is: is the CMake option MI_INSTALL_TOPLEVEL=ON really deprecated ? And if yes how to you expect users to use mimalloc (ie you really want the users to bother about the subfolder name containing the mimalloc version which will regularly change) ?
Also, I quickly checked the fedora package, it uses this option: https://src.fedoraproject.org/rpms/mimalloc/blob/rawhide/f/mimalloc.spec#_37 I don't know if other distro package mimalloc, but they may use this option to. So is it really deprecated ?
Cheers,
Romain

Apologies for not answering earlier;  I undeprecated the option -- backwards compatibility is really important. I only deprecated as I thought there was not much use but I was wrong :-). Thanks!

Part of this is that I have been so amazed how much the CMakefile and options have grown while initially the idea was to have no options at all ... it is just a symptom of its success but I am still trying to minimize the complexity as much as I can.

Ok thanks. In your commit, you didn't remove the  (deprecated) string in the option description ;)
Then we will use this option to package mimalloc in the internal Amadeus build system and try to compare it to other famous allocator and see if it improves our workload. We can close this ticket.
Thanks !

Ok thanks. In your commit, you didn't remove the  (deprecated) string in the option description ;)

Ah, I'll fix that too. Thanks again!


Show huggingface model name instead of file name in model list page

Is your enhancement related to a problem? Please describe.
Huggingface source looks inconsistent

Describe the solution you'd like
Show Hugging Face/Qwen/Qwen2.5-0.5B-Instruct-GGUF and Hugging Face/Qwen/Qwen2.5-0.5B-Instruct for the above cases

UI version: b9c9fe7


Duping exploit in 1.19.2.

Breaking a double chest with items in it really fast causes the dropped chests to duplicate, resulting in players being given double the items. This can be done repeatedly to increase the amount of items exponentially. Here is a video demonstrating this issue:
https://streamable.com/gdk78c

Can't reproduce, could be because of multiple plugins installed conflicting with PortableChests


CP: Fix null check error in DWDS

Cherrypicks of a subset of the upstream DWDS change https://github.com/dart-lang/webdev/commit/be616cd0e34b57c1852ff84fab28541d567e08a0 to fix https://github.com/flutter/flutter/issues/119084

Ignoring the test failures as they should not be running on release candidate branches.


agent loadbalancing doesn't work in MSses

ISSUE TYPE

Bug Report

COMPONENT NAME

MS-cluster

CLOUDSTACK VERSION

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

STEPS TO REPRODUCE

2 MS
2 hosts+SSVM+CPVM == 4 agents

EXPECTED RESULTS

on 4 agents at most 3 would be on one of the two MSses

ACTUAL RESULTS

all 4 agents on one MS

what's the value of global setting indirect.agent.lb.algorithm ?

what's the value of global setting indirect.agent.lb.algorithm ?

that is only for indirect agents is it? not for agents in general. It would explain, as it is static and there is only one ip in host but that still would constitude a bug as the other MS could easily take responsibility for the SVMs, if all hosts are with the first MS.

what's the value of global setting indirect.agent.lb.algorithm ?

that is only for indirect agents is it? not for agents in general. It would explain, as it is static and there is only one ip in host but that still would constitude a bug as the other MS could easily take responsibility for the SVMs, if all hosts are with the first MS.

yep.
You can put all mgmt server IPs in host,  change indirect.agent.lb.algorithm to roundrobin or shuffle
then restart mgmt servers (or agents)

what's the value of global setting indirect.agent.lb.algorithm ?

that is only for indirect agents is it? not for agents in general. It would explain, as it is static and there is only one ip in host but that still would constitude a bug as the other MS could easily take responsibility for the SVMs, if all hosts are with the first MS.

yep. You can put all mgmt server IPs in host, change indirect.agent.lb.algorithm to roundrobin or shuffle then restart mgmt servers (or agents)

This will configure the agents but not let the MSses renegotiate their load. These are two different functionalities. I will do some testing with direct attached host agents (vmware or xen) to see what and when this broke.

what's the value of global setting indirect.agent.lb.algorithm ?

that is only for indirect agents is it? not for agents in general. It would explain, as it is static and there is only one ip in host but that still would constitude a bug as the other MS could easily take responsibility for the SVMs, if all hosts are with the first MS.

yep. You can put all mgmt server IPs in host, change indirect.agent.lb.algorithm to roundrobin or shuffle then restart mgmt servers (or agents)

This will configure the agents but not let the MSses renegotiate their load. These are two different functionalities. I will do some testing with direct attached host agents (vmware or xen) to see what and when this broke.

ok.
I only know the feature introduced by #2469 .
Is there another functionality ? sorry I do not remember it ..

There is also agent.load.threshold global setting which load balances the agents (only hosts [type == Routing]). Check for balancing is done at regular intervals. And once balancing has been triggered, it is not executed again.
This balancing is done per cluster i.e. if migrating all the hosts of the cluster will balance the cluster, then all hosts are migrated to another MS. The balancing happens per cluster probably to support balancing across different hypervisors.
I am not sure about the effort, but we should allow this migration to happen at host level as well depending on the hypervisor.


Refactor pbft blocks gossiping

Task Description
Currently we are open to ddos attack through PbftBlock packets as there are no real checks performed except checking if the block points to the current last pbft block, which is definitely not enough...
We would need the same protection as for votes:

only eligible addresses can actually create pbft blocks
enable only 1 pbft block per period & round & address

Another problems related to pbft blocks (& votes) we have:

without having the actual pbft block, propose votes are useless as they will be filtered out anyway + we will perform some extra useless checks
we have potential "race condition" that pbft block packet is processed later than propose vote packet even if it was sent before propose vote packet

Suggested Solution
As propose vote and pbft block have now this dependency, we could merge them into 1 packet and we would use existing ddos protection (1 unique vote per period & round & address & step), which is already implemented - this would work because each address can create only 1 propose vote and this propose vote can point only to 1 pbft block so problem solved...
Epic Parent

@JakubFornadel  I think your strategy is sound.    Without merging, its reasonable to limit PBFT blocks to only 1 pbft block per period / round / address.   But we can merge.  Downside to merging is that if block ever does grow, or we ever want to performance optimize to optimistically soft vote, then we would have to unmerge later, and creates more work.   But I believe our current design decision we agreed upon is to actually work instead to shrink the size of PBFT block (moving reward votes to DAG)

Implemented by this PR https://github.com/Taraxa-project/taraxa-node/pull/2226


Metadata parsing misses some sections

Describe the bug
When using metadata parsing and then dumping one can see that for copybooks that consist only of one section and multiple paragraphs only the paragraphs are included in the lable symbols, not the SECTIONs that contain them (and therefore "go to definition" does not work).
For programs the first section after the PROCEDURE DIVISION USING seem to be missing, all others seem to be fine.
Expected behavior
Both sections and labels visible in metadata dump.
What user & workspace settings are being used?:
metadata caching on (and as seen with the dump: also works in general and also parses the "target copy")

This not really unexpected, the whole metadata support is a hack upon a hack due to not understanding the context of the copybook itself, which is better but not perfect with the parse_copybooks_for_references support.

This not really unexpected, the whole metadata support is a hack upon a hack due to not understanding the context of the copybook itself, which is better but not perfect with the parse_copybooks_for_references support.

I see, plain scanning for metadata has no context, so the need for "good guess" is heavily increased (in some places maybe scanner enhancements). I guess fixing the first section within the program:
      *-----------------------------------------------------------*
       PROCEDURE DIVISION USING ONE-PARM TWO-PARM.
       S000-STARTER SECTION.
       S000-00.
      *

has the context needed. This is what the copybooks (after many comments that contain their documentation) look like:
      *---------------------------------------------------------*
       C101-INOUT SECTION.
       C101-00.
      *

Metadata dumping shows S000-00 and C101-00 being recognized, S000-STARTER and C101-INOUT being not (the later is recognized with the parse_copybooks_for_references  setting, which can sadly not be use-able in the case of big workspaces with ~25MB metadata and network paths).

I see, plain scanning for metadata has no context, so the need for "good guess" is heavily increased (in some places maybe scanner enhancements). I guess fixing the first section within the program:
      *-----------------------------------------------------------*
       PROCEDURE DIVISION USING ONE-PARM TWO-PARM.
       S000-STARTER SECTION.
       S000-00.
      *

has the context needed. This is what the copybooks (after many comments that contain their documentation) look like:
      *---------------------------------------------------------*
       C101-INOUT SECTION.
       C101-00.
      *

Metadata dumping shows S000-00 and C101-00 being recognized, S000-STARTER and C101-INOUT being not (the later is recognized with the parse_copybooks_for_references  setting, which can sadly not be use-able in the case of big workspaces with ~25MB metadata and network paths).


RaceEditionResults endpoint broken

Hi, thx for the library, it is really helping. In race/race.py there is
self._get_endpoint(endpoint=RaceEditionResults, l=classification_num, e=zero_padded_stage_num)
And in constants.py I see
classifications = {'general': 1, 'youth': 2, 'points': 3, 'mountain': 4, 'sprint': 6}
So I suppose that l=1 should give me the general. However, it does not. FirstCycling seems not to work anymore like that. Can you confirm the current state?

Hi, glad you're finding it useful.
I think you're right and the FirstCycling website has changed how these results work.
It looks like now you don't need to pass in the classification number, and instead all the classifications are returned in the original endpoint. I don't have time to try to fix the package right now, but if you get the beautiful soup for the page, I think you can get each of the classifications using soup.find_all('div', {'class': 'tab-content'}) and soup.find_all('div', {'class': 'tab-content results'}). If you know how beautiful soup works you may be able to update the package to handle this.
Would be very happy to accept a pull request fixing this issue, as I may not be able to get to it for a while.

Hi, I had also a second look in the source code of the page (I thought only the "gc" one was displayed in the first place) and you are right, it is all there. Just need to adapt the parser. Concerning PR, I tried to open a new branch already on your repo, but it says it is forbidden. Right now, my small change is in one fork. I let you know, when I have something (this week for sure).

Fantastic! You're welcome to open a PR from your fork to my repo. Keep me posted 😄


Feature/aem remote assets

Internal PR to do some cleanups before submitting to the main repo

sorry - haha meant to do this on the HS2 repo first...this will be coming later...

Coverage decreased (-0.9%) to 35.109% when pulling 126d96d99179134c4d1affffdc9ac90557f92c10 on HS2-SOLUTIONS:feature/aem-remote-assets into 062b9001b7602093cf76b4e812db4b3e6b584f96 on Adobe-Consulting-Services:master.

hahaha sorry I was hoping i could actually DELETE this PR ... wasnt planning on submitting this until just before SUMMIT AEM Rockstar

I believe if you delete the branch on your fork, the PR will disappear, but I'm not entirely sure.


Add more general ITensorNetwork constructors from collections of ITensors

For example:
i, j, k, l = Index.(fill(2, 4))
A = ITensor(i, j)
B = ITensor(j, k)
C = ITensor(k, l)
tn = ITensorNetwork(["A", "B", "C"], [A, B, C])
tn = ITensorNetwork(["A" => A, "B" => B, "C" => C])

Codecov Report

Merging #107 (0c6d3c3) into main (b108f68) will increase coverage by 0.01%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   78.40%   78.42%   +0.01%
==========================================
  Files          65       65
  Lines        3691     3689       -2
==========================================
- Hits         2894     2893       -1
+ Misses        797      796       -1

Files Changed
Coverage Δ

src/itensornetwork.jl
87.40% <100.00%> (+0.20%)
:arrow_up:

... and 5 files with indirect coverage changes


Filter data for user owner Logged-In, (this.userId)

Hello, @aldeed
I created the same thing (issue #13), but how did he solve it?, I have this problem, in the data i have (example: owner: 4bu9iDhtCDcZ7qJNr).
I applied your solution:
TabularTables ={};

Meteor.isClient && Template.registerHelper('TabularTables', TabularTables);

TabularTables.Dealers = new Tabular.Table({
  name: "Dealers",
  collection: Dealers,
  autoWidth: false,
  responsive: true,
  columns:[
     {data: "owner", title: "ID Proprietario"},
     {data: "p_iva", title: "Partita IVA"},
     {data: "name", title: "Nome"},
  ],
  allow: function (userId, selector) {
    if (selector.userId !== userId && selector.userId !== +selector.userId) {
      return false; // not allowed to access another user's products
    }
  }

But it does not work :(
How to use this? {UserId: Meteor.userId ()} in selector attribute?
How can I fix it? Please help me!

Try this
new Tabular.Table({
  name: "MyTable",
  collection: MyColl,
  selector(userId){
    return {owner: userId}
  },
...

then in your publication logic
Meteor.publish("someCollection", function(userId){
  check(userId, String);
  return Credential.find({owner: userId});
  });
})

@defionscode you don't need custom publish function.


KAFKA-14907:Add the traffic metric of the partition dimension in BrokerTopicStats

Currently, there are three indicators for measuring topic dimensions: MessagesInPerSec, BytesInPerSec, and BytesOutPerSec, but there are two problems:

It is difficult to intuitively reflect the problem of topic partition traffic inclination through these indicators, and it is impossible to clearly see which partition has the largest traffic and the traffic situation of each partition.
For the sudden increase in topic traffic, the indicators of the partition dimension can provide guidance on whether to expand the partition and roughly how many partitions to expand.

The added three partition dimension metrics have passed the unit test in MetricsTest.

Does this PR need a KIP process? Anyone take a look?

Does this PR need a KIP process? Anyone take a look?

Metrics are part of the public api. Changing or adding metrics require a KIP.

Does this PR need a KIP process? Anyone take a look?

Metrics are part of the public api. Changing or adding metrics require a KIP.

Hi, thanks your reply, the KIP is here.

@hudeqi Thanks for the PR and KIP. The KIP has to be discussed and voted by the community. See the process section in https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals
Also a previous KIP had similar goals: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=148642648

Sorry, I didn't notice that KIP mentioned this issue before. I read the previous KIP discussion, and it seems that there is no conclusion, so how to deal with this issue next?


[BUG] update RudrX related stuff in README

Like https://github.com/oam-dev/kubevela#install-vela-binary.
Also please consider get vela binary from the releases.

already done


Lindsay/french

Resolve #265
New news
No longer a draft PR; should run acceptably on French.
Old news:
Draft PR because:

Goal was to get it working on a branch / not meant to be merged.
More work required or preferred:

Language-switching from config (not hard-coded French, as it is now) = required
Changes for behavioral tests
Changes for FAISS encoder

Description:
New news
This code makes Azimuth work on French data/pipelines, and the language can be selected in the config.
Main changes:

Part of Speech tagging: French defaults for spaCy model and dependency tags (to detect subjects and objects)
Behavioral tests: French neutral tokens; fixed removal of space before punctuation (also submitted nlpaug issue)
Config: Dynamic selection of language-specific defaults in the config

Out of scope things that could improve French Azimuth:

Multilingual FAISS encoder (English-trained option works acceptably but not optimally)
Multilingual tokenizer (Only used for comparing average token count per utterance between train and eval, so should have minimal impact on any conclusions)

Old news (for reference)
Addressed one aspect of Azimuth running for French models: spaCy part-of-speech tagging. This branch loads a French model (instead of English) and the missing_xyz smart tag POS/dependency tag lists have been updated to include French tags.
Several issues came up:

Single quote issue: Dataset included text with a single quote instead of an apostrophe, which broke POS-tagging (in particular, j' was not tagged as a subject) and search from the control panel. I added a new function to replace single quotes with apostrophes and used it both for searching and filtering. It worked reasonably well; out of 370 instances of j' in the eval set, 326 were tagged missing_verb before the fix, and 22 afterward (most of which started with "j'aimerais").
So then there was a problem with "j'" in "j'aimerais" being tagged as a subject (sometimes). This was solved with the md spaCy model (instead of sm).
SpaCy sometimes failed to identify verbs when they were the first word (common, especially with the imperative tense, e.g. "aidez-moi...") and/or capitalized (i.e. even in the middle of the sentence, which is not typical). Changing to the md model was a substantial improvement and fixed the majority of the issue. The exceptions seem to all be cases when the verb is capitalized (but not all capitalized verbs have problems; most don't). The capitalization issue seems to be fixed with the lg model...but it's like 500 MB...so I'm not sure if that's worth it (and haven't done it yet).

Checklist:
You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

[x] ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
[x] PRE-COMMIT. You ran pre-commit on all commits, or else, you
ran pre-commit run --all-files at the end.
[x] FRONTEND TYPES. Regenerate the front-ent types if you played with types and routes.
Run cd webapp && yarn types while the back-end is running.
[x] USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
our users.
[x] DEV CHANGES.

Update the documentation if this PR changes how to develop/launch on the app.
Update the README files and our wiki for any big design decisions, if relevant.
Add unit tests, docstrings, typing and comments for complex sections.

Just a note that I realized that I will have to update docs once the code is settled!

@gabegma I'll wait for you to read docs (at your leisure - hope you enjoy nonfiction 😄 📖 ) before merging!


How to discard events from plugins

Hi,
I am using plugins to do some validations on events, there are certain events I will like to discard if a certain condition is met. I have tried using ctx.cancel or throwing an error hoping the event pipeline stops but its just retries. How do I go about discarding events ? Refer to the example code below
const filterEvents: Plugin = {
    name: 'Filter events',
    type: 'before',
    version: '1.0.0',
    isLoaded: () => true,
    load: () => Promise.resolve(),
    track: (ctx: Context) => {

        // if some condition is met I want to discard this event and stop the pipeline processing
        if (condition met) {
            ctx.cancel();
        }

        return ctx;
    };
};

@Adeboye Thanks for opening this issue.
In plugins that are before type, you can call ctx.cancel with a ContextCancelation that turns off retries. That would look like this:
import { Context, ContextCancelation } from '@segment/analytics-next

// ...

track: (ctx: Context) => {
  if (condition_met) {
    ctx.cancel(new ContextCancelation({ retry: false }))
  }
}

Thanks for the answer, I was looking in the docs to find where this is documented, could you point me to the area @chrisradek

@chrisradek tried the above solution you provided, but I still see the retries happening, any ideas why this is till happening ?

You just return null!


WIFI Adapter Issues since installing 2.0.0

Is there any way your app could be causing this issue? I don't see any crazy network draw in task manager while running your app, but maybe the issue is something you have seen before?
Basically, after anywhere between 5 minutes and 24 hours of restarting my computer, the wifi adapter powers off and device manager shows that it cannot be powered back on. So I must restart my computer to get it to work again.

some apps i can not open it on the Taskbargroup for example google chrome and office 365

I don't believe so. We don't interface with the drivers in any way possible.
I assume you aren't using the application to open anything, so I don't believe that is the issue.
I will keep a lookout, but I don't believe this is causing that issue. It may be a physical or driver failure.
See if a new driver from here will help.


Updating for PyUtilib 5.4

Updating version and URL

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


[sbt 1.0] aggregate can now be used inside a .sbt file

Forward port https://github.com/sbt/sbt/pull/2682

Still LGTM :) :+1:


[Bug] Empty code coverage report

Describe the bug
Hey guys, I'm attempting to setup code-coverage for storybook in my project, I'm able to get everything to run smoothy with yarn test-storybook but when I attempt to use yarn test-storybook --coverage I am getting an empty code coverage report.
I am running against a local storybook build on 6006 as well.
Test Suites: 90 passed, 90 total
Tests:       114 passed, 114 total
Snapshots:   0 total
Time:        86.72 s, estimated 87 s
Ran all test suites.
Coverage file (2 bytes) written to .nyc_output/coverage.json
----------|---------|----------|---------|---------|-------------------

File
% Stmts
% Branch
% Funcs
% Lines
Uncovered Line #s

All files
0
0
0
0

----------
---------
----------
---------
---------
-------------------

✨  Done in 111.65s.

In addition to that I am seeing that the coverage/storybook/coverage-storybook file has no data, just an empty object.
I have also added the addon-coverage package and updated my .storybook/main.js with @storybook/addon-coverage
I'm wondering if this is a webpack config issue, but I'm not sure what might be the best way to start debugging this.

Hey @vijaypraju04 can you share a bit more information about your project? What framework are you using? Is your storybook part of a monorepo?
Depending on the framework, you might have to use something other than the addon coverage. You can see recipes here: https://github.com/yannbf/storybook-coverage-recipes

Hey @yannbf it's a react typescript app, not a monorepo.

@yannbf any chance you know where I can start looking in order to debug this issue?

Hey @vijaypraju04 unfortunately I didn't gave time to investigate this yet, but I suspect that your babel loader is overriding the Istanbul babel plugin that comes from the addon-coverage.
I'd recommend to:

comment out your babel loader bit and load a minimal storybook enough to see whether coverage exists
remove addon-coverage and set up the Istanbul babel plugin yourself together with the other babel plugins you have as part of your babel loader. Use this as reference https://github.com/storybookjs/addon-coverage/blob/a31679f9a549767c0f10366ec589acee93b872d2/src/preset.ts#L10

Let me know how it goes!

Hi @yannbf , thank you for your help!
I have the same issue.
I am also using Create React App and Typescript and I do not get anything in __coverage__ either.
Regarding the solution you have suggested, I cannot access to the link, I get a 404.
Maybe there is an issue with the access rights or add-on coverage  is not available anymore because I cannot find add-on coverage in the repository at all.

remove addon-coverage and set up the Istanbul babel plugin yourself together with the other babel plugins you have as part of your babel loader. Use this as reference https://github.com/storybookjs/addon-coverage/blob/a31679f9a549767c0f10366ec589acee93b872d2/src/preset.ts#L10

Hey @yannbf thanks for all the help. I noticed the link you put here is not accessible. Do you have another link?

So sorry about that @ahermant @vijaypraju04, the repo was private (it's newly created) but I turned it into public, so link should be accessible now:
https://github.com/storybookjs/addon-coverage/blob/a31679f9a549767c0f10366ec589acee93b872d2/src/preset.ts#L10

@yannbf thank you ! That link works, I added 'istanbul' to plugins, and now coverage is showing up in storybook.
The issue arising now is that all the storybook executed tests with test-runner are giving timeout errors
page.goto: Timeout 30000ms exceeded.
thrown: "Exceeded timeout of 15000 ms for a test.
Any ideas on why this may be happening? Here's my current config in webpack.storybook.config.js
 module: {
    rules: [
      {
        test: /\.tsx/,
        include: paths.srcDirectory,
        exclude: [],
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/react'],
            plugins: [['@babel/plugin-syntax-dynamic-import'], ['istanbul']],
          },
        },
      },

Any ideas on how to fix this new timeout issue with storybook tests? It's related to adding the istanbul plugin, but not sure why that would start causing tests to fail.

● Test suite failed to run
    page.goto: Timeout 30000ms exceeded.
    =========================== logs ===========================
    navigating to "http://localhost:6006/iframe.html", waiting until "load"
    ============================================================

      at setupPage (node_modules/@storybook/test-runner/dist/cjs/setup-page.js:39:14)
      at CustomEnvironment.setup (node_modules/@storybook/test-runner/playwright/custom-environment.js:9:11)

Hey @yannbf I tried your suggestion, and the preset ran but for some reason it did not give me coverage in storybook. The only way I've gotten it to work so far was to manually add istanbul as a plugin to the babel-loader
  module: {
    rules: [
      {
        test: /\.tsx/,
        include: paths.srcDirectory,
        exclude: [],
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/react'],
            plugins: [
              ['@babel/plugin-syntax-dynamic-import'],
              [
                'istanbul',
                {
                  exclude: defaultExclude,
                  extension: defaultExtensions,
                },
              ],
            ],
          },
        },
      },

Should this work the same way as creating the custom add-on with the preset ?

Issue with current configuration is 100 storybook tests takes over 10 minutes. Any ideas on how to speed up ? Some tests take up to 60 seconds to run.

I'm still getting this error and I don't even have babel-loader in my webpack config. If it helps, I'm using yarn as my package manager.
const path = require("path");
const mixin = require("mixin-deep");

module.exports = {
  features: {
    postcss: false,
  },
  framework: "@storybook/react",
  core: {
    builder: "@storybook/builder-webpack5",
  },
  stories: ["../src/**/*.stories.{tsx,mdx}"],
  addons: [
    "@storybook/addon-backgrounds",
    {
      name: "@storybook/addon-docs",
      options: {
        configureJSX: true,
        babelOptions: {},
        sourceLoaderOptions: null,
      },
    },
    "@storybook/addon-viewport",
    "@storybook/addon-controls",
    "@storybook/addon-toolbars/register",
  ],
  staticDirs: ["../public", "./public"],
  babel: (options) =>
    mixin(options, {
      presets: [
        [
          "@babel/preset-env",
          {
            loose: true,
          },
        ],
        "@babel/preset-typescript",
        "@babel/preset-react",
      ],
      plugins: [
        [
          "babel-plugin-styled-components",
          {
            ssr: false,
            pure: true,
            minify: true,
            displayName: false,
          },
        ],
        [
          "@babel/plugin-proposal-class-properties",
          {
            loose: true,
          },
        ],
        [
          "@babel/plugin-proposal-nullish-coalescing-operator",
          {
            loose: true,
          },
        ],
        [
          "@babel/plugin-proposal-optional-chaining",
          {
            loose: true,
          },
        ],
        [
          "@babel/plugin-proposal-private-methods",
          {
            loose: true,
          },
        ],
        [
          "babel-plugin-react-require",
          {
            loose: true,
          },
        ],
      ],
    }),
  webpackFinal: (config) =>
    mixin(config, {
      performance: false,
    }),
};

Hey @angeloderivco it doesn't seem like you're using @storybook/addon-coverage. That's probably the reason it doesn't work for you.

Hey everyone, I'll be closing this issue as it's not really a bug.
Reason for this to happen:

You are not using @storybook/addon-coverage.
Your project does not use Babel or Vite. Angular, for example. There is a recipe here explaining how to make it work without the addon.
You are using @storybook/addon-coverage however also are manually replacing babel-loader from Storybook to do something custom for your project. This makes it so that the plugin from the addon do not get applied.

If that is not the case and you're experiencing this exact issue, feel free to reopen this!

@yannbf I did have addon-coverage in there but I was playing with some other config and posted the one without it. Either way it still doesn't give me the coverage even if I add the @storybook/addon-coverage plugin.
I tried doing the suggestions in the recipe page (we have react so as per the page, I only needed to add the adon-coverage in there)

So it looks like the problem was on the mixin method as it doesn't work on arrays.
Resolved that but now I get stuck when trying to start storybook without any message whatsoever. This is where it hangs up:

Would you have any idea how I can get more details? Happy to create a different issue if it doesn't involve this package.


M3-2290 Change: Stats request optimization

Description
We don't get stats for a Linode until at least 5 minutes after it has been created. So before requesting stats, make sure the Linode was created more than 5 minutes ago. Doing this avoids an expensive /stats request and console errors.
Type of Change

Non breaking change ('update', 'change')

Thanks @Jskobos – should have put this in the description, but yeah that request is for LinodeNetSummary. It's going away in a few weeks when we get an endpoint for per-Linode network transfer, so I didn't bother with it.


Change icon-color in symbolLayout with GeoJSONLayer

I'm trying to color a marker and at the same time have a corresponding text in a different color beneath the marker.
I can't get the icon-color property to work when using icon-image. I tried creating the marker with plain text, but I can't figure out how to change only a part of a string using data-driven styling.
See example: https://stackblitz.com/edit/react-shs5l2
Creating multiple layers seems to only generate the layer that was added last.
Any ideas on how this can be done?
Thanks!

The icon-color paint property can be used to color sdf icons only

icon-color
Paint property. Optional color. Defaults to "#000000". Requires icon-image. Transitionable.
The color of the icon. This can only be used with sdf icons.
(Source)


Add special tile types

So far tile points can indicate that they speed up, down ( color ), or reverse ( spinning arrow ). They are not "special" in code, the indicators are added when a drawable tile point is initiated based on TilePoint.IsFaster, TilePoint.IsSlower and TilePoint.ChangedDirection.
I propose we add a list of "effects", a derived type of TilePoint or an enum of "effects". These effects would make a tile, usually upon being hit apply some effect to the playfield. The speed-up, slow-down and reverse ones would not change for now - or ever - as they are merely indicators of Tile Point's properties.
The "effects" would be like mods, enabled or disabled at runtime. For example, a "focus" tile, would make make all angles halve like the with the "squashed" mod, and a maching "disable focus" tile would reverse its effects. This could be nice for kiai time. This would require for drawable tiles to implement animated properties like Tile Point angles. Recalculating of TilePoint properties is already implemented, but will need to apply only to upcoming tiles and the animation would need to complete before the first affected tile is hit to make things easier ( so, apply to all tiles after first tile animationDuration ms away. This will lag if applied to everything at once, so it needs to apply to all visiable tiles and all tiles added while the effect is active ).
This would initially be an experimental mod setting as I don't want to push a pretty significant change to gameplay too fast.
Thoughts?

This is supported by default as of Hitokori/remaster. All tile points and tile point connections are able to have arbitrary effects applied to the state of the game. It is even possible to change the amount of orbitals after hitting a tile.