feat(minifier): imprve more conditional expr minification with boolean lit

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#8209
#8208  👈 (View in Graphite)
#8207
#8206
#8205
main

How to use the Graphite Merge Queue
Add either label to this PR to merge it via the merge queue:

0-merge - adds this PR to the back of the merge queue
hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

Merge activity

Dec 31, 9:30 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.


Fixed Flaky tests in ParserTest.java

Description
Fixes the following 6 flaky tests in found org.apache.druid.math.expr.ParserTest.
org.apache.druid.math.expr.ParserTest.testFunctions
org.apache.druid.math.expr.ParserTest.testApplyFunctions
org.apache.druid.math.expr.ParserTest.testSimpleAdditivityOp1
org.apache.druid.math.expr.ParserTest.testSimpleAdditivityOp2
org.apache.druid.math.expr.ParserTest.testSimpleLogicalOps1
org.apache.druid.math.expr.ParserTest.testSimpleMultiplicativeOp1
Root Cause
The above mentioned tests have been reported as flaky when ran against the NonDex tool. The tests failed because they were trying to compare a Array List of strings (getRequiredBindingsList) to a hardcode string converted to a List (identifiers). The List in Java does not store the inserted order of their values. As a result, when the expected converted List is compared with the actual ArrayList, it failed.
Fix
Used the existing method which returns a set getRequiredBindings() instead of getRequiredBindingsList() and compared it with identifiers converted to a HashSet. getRequiredBindings() returns a set of identifiers while getRequiredBindingsList() wraps a list around the set returned by getRequiredBindings()
How has this been tested?
Java: openjdk version "<IP_ADDRESS>"
Maven: Apache Maven 3.6.3
Module Build - Successful
Command used - mvn install -pl processing -am -DskipTests
Regular Test - Successful
Commands used -
mvn -pl processing test -Dtest=<above mentioned tests>
Non Dex Test - Failed
Commands used -
mvn -pl processing edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=<above mentioned tests>
NonDex test passed after the fix.

Few comments

(getRequiredBindingsList) - Try to hyperlink the function with exact lines of code. same for identifiers
Instead of mentioning the commands for each test, which are going to be the same except for the test name, reduce the description length by mentioned -Dtest=<test_mentioned_above> or something like that .
could you also explain a bit more about getRequiredBindingsList()  and getRequiredBindings() because its not very clear from the lines of code and the PR description

changing list to set makes the tests weaker.

Hi @zzjas So, I am working with @deekshacheruku on the these tests due to a conflict (I was assigned the same set of tests in MP1).
Considering that they are using ImmutableList.of() to create the list with the given elements in order, which is then being compared to another hashset converted to an arraylist - causing the flakyiness, would it be appropriate to make a code change in the repo and change it to LinkedHashSet? This will preserve the order of the elements. (We initially did not want to go with this method as it would be a code change, but this seems to the only way to preserve the order)
Would greatly appreciate your comment on this!


This expression is not constructable. Type 'typeof import("/sandbox/node_modules/qr-code-styling/lib/index")' has no construct signatures.ts(2351)

I am not able to make this work in Angular. Here is your example: https://codesandbox.io/s/agitated-panini-tpgb2?file=/src/app/app.component.ts
As you can see, there is an error in the example code where it says new QRCodeStyling() as QRCodeStyling is not constructable.
I have tried changing import * as QRCodeStyling from "qr-code-styling"; to import QRCodeStyling from "qr-code-styling"; but it still doesn't work.
I'm using Angular 12.2.3.
Please advise.

Not sure why the example has import * as QRCodeStyling from 'qr-code-styling'; but i think it should be import QRCodeStyling from 'qr-code-styling';

Try this.
Inside your project's tsconfig.json add the following to the "compilerOptions" node
 {... "compilerOptions":{     ...     "esModuleInterop":true,     ...     } }

Facing the same issue on Angular 13.0.0


Improved regex for user mentions and TELLRAW

Tested on 2 x 24/7 servers

1.15.2 Vanilla
FTB-Beyond 1.11.0

Does not conflict with pull request #55
Details:

I improved the regex for user mention detection to work with Discord users with spaces in their names. It now searches for any string that starts with an @ symbol and ends with a # sign with 4 numbers after it<EMAIL_ADDRESS>
Verified at https://regexr.com/ and in live server

I wanted to do a more complex tellraw where I used a variable more than once. However, only the first instance of a variable would be replaced. The changes I made replace ALL instances of each variable in a given MINECRAFT_TELLRAW_TEMPLATE

The example below is where I had to use this. The blue text when shift-clicked in game will populate the Minecraft chat prompt with discordusername#delimiter so the Minecraft user does not have to type out an entire desired discord user's username and delimiter manually to mention them.
Here is the TELLRAW used to test this
"MINECRAFT_TELLRAW_TEMPLATE": "["",{"text":"Discord ","bold":true,"color":"blue"},{"text":"<"},{"text":"%username%","color":"aqua","insertion":"@%username%#%discriminator% "},{"text":"> %message%"}]",
This is what it looks like in game.

and in discord

If you like my template and want to add it to the repo as the default or as a suggestion in the readme, let me know and i'll add it to this pull request.

Sorry for the late response, though this LGTM!


issue with provider

Steps to Reproduce

Run flutter create bug.
Update the files as follows: ...
...

Expected results:
Actual results:

Logs

This is spam issue, looks lile.
79,000 🎉

provider is a third-party package; if you have issues with it you need to report them to the developer of the package.

ahhahagh this one goes to my favourites


Completed zh-1.3.0

Hey there! Thank you so much for doing this. Super happy to see you’ve already updated your translation. I added a few comments if you don’t mind? :)


New User: BitMEX

Closes #719

Needs rebase, needs to be 500x200 (2.5x1), and please run through svgo

My bad, thanks - ran it through svgo though, it's just large (text at the bottom).

Given that size on an svg is just an attribute, and the browser scales it, does it really matter? I'm actually curious, if, say, there's a performance difference or anything tangible.

There tends to be differences between different browsers

:+1: Thanks for your patience

Sorry, I don't mean to be nitpicky but would it be okay to remove the white background?

No worries, amended.


Merge remote-tracking branch 'upstream/stable' into merge_stable

@burner yah, what @CyberShadow said.

Ok, what does this mean for this PR?

I fixed the merge conflict.

Can we please merge this, don't want to rebase it again.

LGTM

Auto-merge toggled on


DNS: Fix hostedZoneRole regex Pattern

The regex pattern to match the AWS ARN was incorrect.
cc @gcs278 @Miciah @mrunalp @deads2k

/lgtm

/lgtm


failed to cherry pick PR 3762 from ty-dc, to branch release-v0.8

commits 2522f8355ccfc5fbcac993164a0e11f396c77815 of ty-dc conflict when merging to branch release-v0.8, please manually cherry pick it by yourself.
PR https://github.com/spidernet-io/spiderpool/pull/3762 ,  action https://github.com/spidernet-io/spiderpool/actions/runs/10093142827
Auto-merging docs/usage/install/overlay/get-started-cilium-zh_cn.md
CONFLICT (content): Merge conflict in docs/usage/install/overlay/get-started-cilium-zh_cn.md
Auto-merging docs/usage/install/overlay/get-started-cilium.md
CONFLICT (content): Merge conflict in docs/usage/install/overlay/get-started-cilium.md
error: could not apply 2522f835... Merge pull request #3762 from ty-dc/fix/cilium-vlanBypass
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

https://github.com/spidernet-io/spiderpool/pull/3815


Webpack v5 type incompatibility for OutputFileSystem

Bug report
Type definition error for OutputFileSystem when assigning to memory volume.
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
error TS2322: Type 'MemoryFileSystem' is not assignable to type 'OutputFileSystem'.
  Types of property 'mkdir' are incompatible.
    Type '{ (path: string, callback: (err: Error | null) => void): void; (path: string, optArg: {}, callback: (err: Error | null, result?: any) => void): void; }' is not assignable to type '(arg0: string, arg1: (arg0?: ErrnoException | undefined) => void) => void'.
      Types of parameters 'callback' and 'arg1' are incompatible.
        Types of parameters 'arg0' and 'err' are incompatible.
          Type 'Error | null' is not assignable to type 'ErrnoException | undefined'.
            Type 'null' is not assignable to type 'ErrnoException | undefined'.

Reproduce:
import MemoryFs from 'memory-fs';
compiler.outputFileSystem = new MemoryFs();

or
import { Volume } from 'memfs';
compiler.outputFileSystem = createFsFromVolume(new Volume());

What is the expected behavior?
Previously, with webpack v4 it was working when using the DefinitelyTyped webpack definitions.
Other relevant information:
webpack version: 5.11.1
Node.js version: 14.15.4

Duplicate https://github.com/webpack/webpack/issues/11630, please use search

Duplicate https://github.com/webpack/webpack/issues/11630, please use search

This is a different issue

This is a different issue

Yes, the type is not missing -- it is different definition.

Yes, the type is not missing -- it is different definition.

@sokra thank you 🥺

@sokra thank you 🥺


[SPARK-19843] [SQL] UTF8String => (int / long) conversion expensive for invalid inputs

What changes were proposed in this pull request?
Jira : https://issues.apache.org/jira/browse/SPARK-19843
Added cheap checks to UTF8String to check if it can be converted to int / long. The logic is motivated from LazyUtils.isNumberMaybe in Hive.
How was this patch tested?

Added new unit tests
Ran a prod job which had conversion from string -> int and verified the outputs

Performance
Attached UTF8StringBenchmark with the PR. Here is the summary:
conversion to int:                      Best/Avg Time(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------
without check over valid integers              500 /  503         33.6          29.8       1.0X
with check over valid integers                1069 / 1072         15.7          63.7       0.5X
without check over in-valid integers        34515 / 36096          0.5        2057.3       0.0X
with check over in-valid integers              718 /  895         23.4          42.8       0.7X

Note that this PR is a tradeoff. If the data does not have any invalid inputs, then performance of conversion is hurt by 2x. Based on the numbers in the benchmark, if more than 2.5% of input cannot be converted to int, then it will add perf. gains. For my workloads, I could see on average 37% savings (best case 2.08x performance gain).

Jenkins test this please

Test build #74061 has started for PR 17184 at commit adcb405.

Test build #74061 has finished for PR 17184 at commit adcb405.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74061/
Test PASSed.

cc @cloud-fan for review

also, cc @gatorsmile

Ideally we need a better way to indicate an invalid input, as exception handling is too expensive. Adding a check before process is one approach, but as you said, it has performance penalty if all records are valid.
How about we use C-style function and return the result via parameter?. e.g.
class ToIntResult {
  int res = 0;
  boolean valid = true;
}

public void toInt(ToIntResult t) {
  ...
  if (something wrong) {
    t.valid = false;
  }
  ...
  t.res = xxx;
}

Test build #74156 has started for PR 17184 at commit a91ca1b.

Test build #74159 has started for PR 17184 at commit 7ae2f73.

Generated code (in case anyone reviewing the PR wants to see):
/* 001 */ public Object generate(Object[] references) {
/* 002 */   return new GeneratedIterator(references);
/* 003 */ }
/* 004 */
/* 005 */ final class GeneratedIterator extends org.apache.spark.sql.execution.BufferedRowIterator {
/* 006 */   private Object[] references;
/* 007 */   private scala.collection.Iterator[] inputs;
/* 008 */   private scala.collection.Iterator inputadapter_input;
/* 009 */   private UTF8String.IntWrapper project_wrapper;
/* 010 */   private UTF8String.LongWrapper project_wrapper1;
/* 011 */   private UTF8String.IntWrapper project_wrapper2;
/* 012 */   private UTF8String.IntWrapper project_wrapper3;
/* 013 */   private UnsafeRow project_result;
/* 014 */   private org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder project_holder;
/* 015 */   private org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter project_rowWriter;
/* 016 */
/* 017 */   public GeneratedIterator(Object[] references) {
/* 018 */     this.references = references;
/* 019 */   }
/* 020 */
/* 021 */   public void init(int index, scala.collection.Iterator[] inputs) {
/* 022 */     partitionIndex = index;
/* 023 */     this.inputs = inputs;
/* 024 */     inputadapter_input = inputs[0];
/* 025 */     project_wrapper = new UTF8String.IntWrapper();
/* 026 */     project_wrapper1 = new UTF8String.LongWrapper();
/* 027 */     project_wrapper2 = new UTF8String.IntWrapper();
/* 028 */     project_wrapper3 = new UTF8String.IntWrapper();
/* 029 */     project_result = new UnsafeRow(4);
/* 030 */     this.project_holder = new org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(project_result, 0);
/* 031 */     this.project_rowWriter = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(project_holder, 4);
/* 032 */
/* 033 */   }
/* 034 */
/* 035 */   protected void processNext() throws java.io.IOException {
/* 036 */     while (inputadapter_input.hasNext() && !stopEarly()) {
/* 037 */       InternalRow inputadapter_row = (InternalRow) inputadapter_input.next();
/* 038 */       boolean inputadapter_isNull = inputadapter_row.isNullAt(0);
/* 039 */       UTF8String inputadapter_value = inputadapter_isNull ? null : (inputadapter_row.getUTF8String(0));
/* 040 */
/* 041 */       boolean project_isNull = inputadapter_isNull;
/* 042 */       int project_value = -1;
/* 043 */       if (!inputadapter_isNull) {
/* 044 */         if (inputadapter_value.toInt(project_wrapper)) {
/* 045 */           project_value = project_wrapper.value;
/* 046 */         } else {
/* 047 */           project_isNull = true;
/* 048 */         }
/* 049 */
/* 050 */       }
/* 051 */       boolean inputadapter_isNull1 = inputadapter_row.isNullAt(1);
/* 052 */       UTF8String inputadapter_value1 = inputadapter_isNull1 ? null : (inputadapter_row.getUTF8String(1));
/* 053 */       boolean project_isNull2 = inputadapter_isNull1;
/* 054 */       long project_value2 = -1L;
/* 055 */       if (!inputadapter_isNull1) {
/* 056 */         if (inputadapter_value1.toLong(project_wrapper1)) {
/* 057 */           project_value2 = project_wrapper1.value;
/* 058 */         } else {
/* 059 */           project_isNull2 = true;
/* 060 */         }
/* 061 */
/* 062 */       }
/* 063 */       boolean project_isNull4 = inputadapter_isNull;
/* 064 */       byte project_value4 = (byte)-1;
/* 065 */       if (!inputadapter_isNull) {
/* 066 */         if (inputadapter_value.toByte(project_wrapper2)) {
/* 067 */           project_value4 = (byte) project_wrapper2.value;
/* 068 */         } else {
/* 069 */           project_isNull4 = true;
/* 070 */         }
/* 071 */
/* 072 */       }
/* 073 */       boolean project_isNull6 = inputadapter_isNull;
/* 074 */       short project_value6 = (short)-1;
/* 075 */       if (!inputadapter_isNull) {
/* 076 */         if (inputadapter_value.toShort(project_wrapper3)) {
/* 077 */           project_value6 = (short) project_wrapper3.value;
/* 078 */         } else {
/* 079 */           project_isNull6 = true;
/* 080 */         }
/* 081 */
/* 082 */       }
/* 083 */       project_rowWriter.zeroOutNullBytes();
/* 084 */
/* 085 */       if (project_isNull) {
/* 086 */         project_rowWriter.setNullAt(0);
/* 087 */       } else {
/* 088 */         project_rowWriter.write(0, project_value);
/* 089 */       }
/* 090 */
/* 091 */       if (project_isNull2) {
/* 092 */         project_rowWriter.setNullAt(1);
/* 093 */       } else {
/* 094 */         project_rowWriter.write(1, project_value2);
/* 095 */       }
/* 096 */
/* 097 */       if (project_isNull4) {
/* 098 */         project_rowWriter.setNullAt(2);
/* 099 */       } else {
/* 100 */         project_rowWriter.write(2, project_value4);
/* 101 */       }
/* 102 */
/* 103 */       if (project_isNull6) {
/* 104 */         project_rowWriter.setNullAt(3);
/* 105 */       } else {
/* 106 */         project_rowWriter.write(3, project_value6);
/* 107 */       }
/* 108 */       append(project_result);
/* 109 */       if (shouldStop()) return;
/* 110 */     }
/* 111 */   }
/* 112 */ }

Test build #74161 has started for PR 17184 at commit 51e7e3f.

Updated the perf. numbers with latest version of code

Test build #74156 has finished for PR 17184 at commit a91ca1b.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 public static class LongWrapper
 public static class IntWrapper

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74156/
Test FAILed.

Test build #74159 has finished for PR 17184 at commit 7ae2f73.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74159/
Test FAILed.

Test build #74161 has finished for PR 17184 at commit 51e7e3f.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74161/
Test PASSed.

thanks, merging to master!

I believe IBM J9 actually improved this specific case (their JIT handles tons of exceptions better). Oh well -- if only JIT is perfect.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_b4z1x5e16k/clone/recipe/meta.yaml:15: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_b4z1x5e16k/clone/recipe/meta.yaml:23: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_b4z1x5e16k/clone/recipe/meta.yaml:24: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_b4z1x5e16k/clone/recipe/meta.yaml:31: missing_pip_check: For pypi packages, pip check should be present in the test commands
WARNING: /tmp/abs_b4z1x5e16k/clone/recipe/meta.yaml:40: missing_description: The recipe is missing a description
Errors were found


New Release?

Would it be possible to publish a new release to Pypi? I fixed some issues in #7 that are affecting a package I am making.

Closing this due to inactivity :+1:


Paper information

Where can I get the paper for now?

Here's the URL for the paper.
https://proceedings.mlr.press/v202/shin23e/shin23e.pdf


CodeChecker analyze fails for 6.22.2 under Windows with AttributeError: module 'os' has no attribute 'uname'

Describe the bug
Executing CodeChecker analyze leads to AttributeError: module 'os' has no attribute 'uname'.
 Traceback (most recent call last):
   File "D:\somedir\lib\site-packages\codechecker_common\cli.py", line 167, in main
     add_subcommand(subparsers, subcommand,
   File "D:\somedir\lib\site-packages\codechecker_common\cli.py", line 57, in add_subcommand
     command_module.add_arguments_to_parser(sc_parser)
   File "D:\somedir\Lib\site-packages\codechecker_analyzer/cmd\analyze.py", line 456, in add_arguments_to_parser
     clang_has_z3 = analyzer_types.is_z3_capable()
   File "D:\somedir\lib\site-packages\codechecker_analyzer\analyzers\analyzer_types.py", line 73, in is_z3_capable
     enabled_analyzers, _ = check_supported_analyzers([ClangSA.ANALYZER_NAME])
   File "D:\somedir\lib\site-packages\codechecker_analyzer\analyzers\analyzer_types.py", line 144, in check_supported_analyzers
     context = analyzer_context.get_context()
   File "D:\somedir\lib\site-packages\codechecker_analyzer\analyzer_context.py", line 314, in get_context
     return Context()
   File "D:\somedir\lib\site-packages\codechecker_common\singleton.py", line 20, in __call__
     super(Singleton, cls).__call__(*args, **kwargs)
   File "D:\somedir\lib\site-packages\codechecker_analyzer\analyzer_context.py", line 68, in __init__
     machine = os.uname().machine
 AttributeError: module 'os' has no attribute 'uname'

The problematic code has been introduced with 6.22.2: https://github.com/Ericsson/codechecker/compare/v6.22.1...v6.22.2#diff-b65c399d1bcab9aba1b50586c3ef10dfd319e80a985396c6739f83980a085a98R68
CodeChecker version
6.22.2
To Reproduce
see above
Expected behaviour
Run the analysis without an error
Desktop (please complete the following information)

OS: Windows
Version: 10
Python 3.10.0

Additional context
Add any other context about the problem.

Hi @petermbauer , I admit that feature was not implemented in a platform-independent manner, if you start a python interpreter, and do the following, can you post the output of platfom.uname()?
python3
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.uname()

Hi @vodorok , thanks for caring, here is the output:
λ python
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.uname()
uname_result(system='Windows', node='myhostname', release='10', version='10.0.19045', machine='AMD64')

Hi @vodorok , any chance this will be fixed in the near future? The only other option would be to switch back to Python <3.10 to be able to use 6.22.1 again.

Hi,
Just to know, same issue with version 6.22.2 (python 3.8.10).

same issue with python 3.11

Are you willing to release a 6.22.3 if a fix is contributed?

Hi, we are planning the next release in October with CodeChecker 6.23.0. Unfortunately, this is the earliest date, that I can tell now according to our schedule.

To all who commented "same": Is this a Windows-specific issue, or are you using Linux and getting the issue?

To all who commented "same": Is this a Windows-specific issue, or are you using Linux and getting the issue?

seems it is a windows issue

To all who commented "same": Is this a Windows-specific issue, or are you using Linux and getting the issue?

seems it is a windows issue

Yes, only windows

Fixed by #4012.

Hi, we are planning the next release in October with CodeChecker 6.23.0. Unfortunately, this is the earliest date, that I can tell now according to our schedule.

@bruntib , any update on the planned release date?

any update on the planned release date?

@petermbauer We're trying to wrap everything up by the end of this month. A release candidate will come very soon, and the clean release will be published in late November.


--- gets ignored, possibly including comments from the previous YAML document

# Previous YAML document
---
# -- Some comment
foo: bar

results in "description": "Previous document\nSome comment", while I'd expect "description": "Some comment".
I'm actually a bit surprised that --- "document borders" seem to be completely ignored here, but

I only noticed this because of #47
it wouldn't be an issue after fixing #48
I can't think of a reason to have multiple documents with data in values.yaml (empty documents should be fine and expected because of one of the yamllint default rules document_start)
I'm not even sure how helm handles values.yaml with data in multiple documents

But wanted it to document anyway, maybe there are other issues with --- as well.
Edit: Using newest helm-schema version 0.12.0.

Played around a bit more - --- gets ignored doesn't seem to be true in all cases, weirdly enough...
# -- Description in first document
keyFirstDoc: foo

# Previous document
---
# -- Description in second document
keySecondDoc: bar

generates the schema only until ---, ignoring everything after?
{
  "additionalProperties": false,
  "properties": {
    "global": {
      "description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
      "title": "global",
      "type": "object"
    },
    "keyFirstDoc": {
      "default": "foo",
      "description": "Description in first document",
      "title": "keyFirstDoc",
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": [
    "keyFirstDoc"
  ]
}

I've never considered a case eith multiple documents in a single values.yaml. Is this even possible? Is it used often?

So apparently yaml.v3 ...decodes the first document found within the in byte slice only.
In case of
# foo
---
bar: 1

the first comment is not considered a valid document and gets added to the HeadComment field of the next parsed yaml.Node. The literal --- is not part of the HeadComment and thats why we can't detect it manually :(


simulation backend working but image static then agents and time are not moving.

any ideas?

do you web client work normal? @ElliottDyson

@sentball backend takes some time to initialize everything and start the simulation. please try to run some steps and you should see movement!

@sentball backend takes some time to initialize everything and start the simulation. please try to run some steps and you should see movement!

@sentball Precisely this, if you're seeing the terminal stop producing anything new or coming up with an error then that will definitely be something to investigate.
However due to the way each character is initialised sequentially, if you are producing tokens at a lowish rate it can take quite a while before seeing any outputs.


Test fix

#5

Deploy preview processing.
Built with commit b6a19d4259edf1d5d2145a480f7d44dbd1f24357
https://app.netlify.com/sites/open-sauced/deploys/59d886baa6188f7d0bd19923


Update request for tsc2046 TS_MAX_BUTTONS

Hi,
For the upcoming MAX78002EVKIT facial recognition demo, we need to use nearly 30 touchscreen buttons.
Is it possible to update, the default number for tsc2046.h TS_MAX_BUTTONS numbers to 32?
Regards,
Oguzhan Buyuksolak

Hi @oguzhanbsolak, we can support this.  I'll add the ability to change this compiler definition per-project.

@oguzhanbsolak FYI this is also merged.  See the PR description above - this one is implemented with a simpler compiler definition.


Phil crashes on dictionary initializer

new Dictionary<string, string> { { "foo", "bar" } };
On cursor position before the last curly brace, Phil crash with the message:

'FillInitializerRefactoring' encountered an error and has been disabled.

Hmmrf.


Support string repeat SQL

This PR implements repeat SQL, and closes #68.
Example:
strs = ['abc', null, '',  'xyz']
out  = repeat(strs, 3)
out is ['abcabcabc', null, '',  'xyzxyzxyz']

repeatTimes = [1, 2, 3, 4]
out = repeat(strs, repeatTimes)
out is ['abc', null, '',  'xyzxyzxyzxyz']

@ttnghia the commit needs to be signed off, see the signoff section in the contributing guide for details.

@ttnghia please retarget to branch 21.10 when you get a chance.

build

The latest test run failed because of a breaking change in the cudf APIs that was merged in and the corresponding plugin change has not gone in yet.

build

hi. please check the build log before trigger againm thx!
[2021-08-04T16:34:40.039Z] found modified files during mvn verify:
[2021-08-04T16:34:40.039Z]  M docs/configs.md
[2021-08-04T16:34:40.039Z]  M docs/supported_ops.md
[2021-08-04T16:34:40.039Z] [ERROR] Command execution failed.

this PR does not include RapidsConf and SupportedOpsDocs update, so it failed the check

hi. please check the build log before trigger again thx!
[2021-08-04T16:34:40.039Z] found modified files during mvn verify:
[2021-08-04T16:34:40.039Z]  M docs/configs.md
[2021-08-04T16:34:40.039Z]  M docs/supported_ops.md
[2021-08-04T16:34:40.039Z] [ERROR] Command execution failed.

this PR did not include RapidsConf and SupportedOpsDocs update, so it failed the check

Oh thanks for letting me know.
@jlowe I hate to ask you to approve the third time but I have to. I also hate github that discards PR approval every time I push.

hi. please check the build log before trigger again thx!
[2021-08-04T16:34:40.039Z] found modified files during mvn verify:
[2021-08-04T16:34:40.039Z]  M docs/configs.md
[2021-08-04T16:34:40.039Z]  M docs/supported_ops.md
[2021-08-04T16:34:40.039Z] [ERROR] Command execution failed.

this PR did not include RapidsConf and SupportedOpsDocs update, so it failed the check

Oh thanks for letting me know. I have updated the docs.
@jlowe I hate to ask you to approve the third time but I have to. I also hate github that discards PR approval every time I push. Maybe we need to modify that behavior for better convenience.

Actually I think we should not, otherwise people could push new commits which could do whatever they want to our repo after the initial approval, this could be horrible :P

Oh thanks for letting me know. I have updated the docs.
@jlowe I hate to ask you to approve the third time but I have to. I also hate github that discards PR approval every time I push. Maybe we need to modify that behavior for better convenience.

Actually I think we should not, otherwise people could push new commits which could do whatever they want to our repo after the initial approval, this could be horrible :P

People should know what they are doing, not "whatever they want" like that :smiley:. I observed (from cudf) that after approvals the authors usually push more minor changes related to docs/typos etc. If every new change requires approvals again then it is very inconvenient for both the authors and the reviewers.

Oh thanks for letting me know. I have updated the docs.
@jlowe I hate to ask you to approve the third time but I have to. I also hate github that discards PR approval every time I push. Maybe we need to modify that behavior for better convenience.

Actually I think we should not, otherwise people could push new commits which could do whatever they want to our repo after the initial approval, this could be horrible :P

People should know what they are doing, not "whatever they want" like that 😃. I observed (from cudf) that after approvals the authors usually push more minor changes related to docs/typos etc. If every new change requires approvals again then it is very inconvenient for both the authors and the reviewers.
Of course, if there are new changes in the code then the authors can request re-review anytime.

haha yeah, I mean cudf approval is horrible. For our repo, if PR tests pass pre-merge CI but requires to add some minor changes like comments only, people could just add [skip ci] to the title to skip the additional full tests run w/ new commit approval :)

Oh thanks for letting me know. I have updated the docs.
@jlowe I hate to ask you to approve the third time but I have to. I also hate github that discards PR approval every time I push. Maybe we need to modify that behavior for better convenience.

Actually I think we should not, otherwise people could push new commits which could do whatever they want to our repo after the initial approval, this could be horrible :P

People should know what they are doing, not "whatever they want" like that 😃. I observed (from cudf) that after approvals the authors usually push more minor changes related to docs/typos etc. If every new change requires approvals again then it is very inconvenient for both the authors and the reviewers.
Of course, if there are new changes in the code then the authors can request re-review anytime.

haha yeah, I mean cudf approval is horrible. For our repo, if PR tests pass pre-merge CI but requires to add some minor changes like comments/docs only (not for generated docs like configs.md or supported_ops.md), people could just add [skip ci] to the title to skip the additional full tests run w/ new commit approval :)

It may be inconvenient, but a review on a change, even a small one, is worth the trouble to minimize potential problems.  Doing a review on every change is a good habit.  We can still move quickly while doing the reviews.

build


Refactor primary key & softDeletes in mship_role

In gitlab by @A-Lawrence on Apr 6, 2016, 17:46

[x] role_id => id
[x] remove deleted_at
[x] refactor softDelete trait
[x] run tests

In gitlab by @NFarrington on May 17, 2016, 01:03
Marked the task role_id => id as completed

In gitlab by @NFarrington on May 17, 2016, 01:03
Marked the task remove deleted_at as completed

In gitlab by @NFarrington on May 17, 2016, 01:03
Marked the task refactor softDelete trait as completed

In gitlab by @NFarrington on May 17, 2016, 01:03
Marked the task run tests as completed

In gitlab by @NFarrington on May 17, 2016, 01:03
Resolved by 83a373a132df074a9545dcfb888c5ace8e6e1034 and b907969a99d9700040d4f7af8b61f896de11936a


Chokidar crashes on windows

I first came across this issue when I was using Chokidar to watch files with NW.js. It works great on my MacBook pro, but crashes on my windows machine. But it's the weirdest thing, node just ends and there's absolutely no error reports or stack traces. I even installed node-debug to see what was going wrong, and still it wouldn't give me any answers.
Here's the code:
var c = require('chokidar');
var path = require('path');
curdirpath = path.resolve('C:/Users/JBarna/');
var watch = c.watch(curdirpath);

The program crashes when c.watch(curdirpath) is executed.
I'm using IO.js v2.0.2.
I'm free to help debug. It's happened on two different window machines so far.

try
c.watch(curdirpath, {persistent: true})

Unfortunately it's still not working. What I posted was just a simpler example but in my node-webkit app, the program shouldn't stop running even if I had set persistent to false. But the program stops completely without giving any details. Do you have any suggestions for debugging? It's strange.

On windows chokidar is just using node's native fs.watch. Not likely there's anything within chokidar's control causing it.
Does this occur outside of NW.js (just running your script with io.js or node)? Sounds like it might need to be reported to that project.

es128, good question.
This issues happens both with NW.js and outside of NW.js on both io.js and regular node. The script I posted initially ran on io.js, and if I had attached any listeners (for added files or directories) the program would exit before any would be called.

I don't know. Can't reproduce, and seems like something more localized to what you're doing somehow. If chokidar suddenly stopped working or caused node processes to crash for all windows users (or even a significant segment of it), we'd be hearing about it from a lot of people. And we have heard from other users of NW.js on Windows along the way (having much more minor problems)
Perhaps there's a weirdly problematic fs entry where you're watching? What happens if you watch a much smaller directory in a completely different area of the system's file tree?

When I get home I'll check it out on my windows machine with smaller directories. If we can't reproduce it after that then feel free to close the issue.

Would be interested to know what happened @JBarna

So it's still crashing on my machine. I tried hard to install node-segfault-handler and after installing Microsoft Visual Studio 2013, I found out that node-segfault-handler doesn't even work with windows :(.  So.... there's really no way for me to debug this issue sadly.

Happens for me too.

Found an interesting article that might be relevant http://stackoverflow.com/a/8636001

Happens to me too. 1 in like 10 event catches crash the whole app. I get crash dumps, but I didn't manage to read them, since the  is kinda unclear and windows symbols file download link doesn't work...

Is this still an issue on windows? How did you resolve these/any other libraries to use cross platform?

Me too.  I can watch single file or sub folder in running folder. But when I change to be full path, It does not work like your issue.


npm i reports many vulnerabilities

After I forked this repo, cloned locally and ran npm i I got a lot of messages and this summary:
45 vulnerabilities (2 low, 6 moderate, 32 high, 5 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

I've never seen this screen like this before.


Meta model rework

This is a small rework of the meta_model.py. It mainly extracts code snippets of the device creation into methods to get more readable code.
It also contains a small fix we needed for the multi-layered heat storage.

Is the "fix" that you introduced the option to have unbalanced storages?

I misremembered what we did in the multi-layered storage, but yes, we introduced the ability to have an unbalanced storage.
As I can see, we defaulted to unbalanced storage. I could change that to balanced storage as default

If it's not the ability to have an unbalanced storage, I do not see the fix.
I edited the comment about it. Before, it was not possible to set the balance state of the heat storage at all from the MetaModel. The change in the multi-layer heat storage class "fixes" this.

You should to maintain the behaviour for people who update.
I also updated the class to default to true


ctrl + shift + f does not work while in editor

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version:
OS Version:
Version: 1.85.1
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:49:35.427Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

Steps to Reproduce:

See video
ctrl + shift + e works in editor
ctrl + shift + f does not work in editor
But pressing ctrl + shift + f works if in explorer

https://github.com/microsoft/vscode/assets/946010/f663c2fa-f097-4038-a47a-2140b40e7aa5

Hi @bilogic :-)
Thanks for filing this issue!

Could you provide your keybindings.json file contents? (invoke command "Preferences: Open Keyboard Shortcuts (JSON)" to open it)

Could you please try the following:

Run the command "Developer: Toggle Keyboard Shortcuts Troubleshooting" (you can, for example, run it from the Command Palette).
This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.

Press exactly the keybinding you desire

Check what VS Code detects

If you are having trouble understanding the output, please feel free to paste here and we'll be happy to help ☺

I can't repro, but I see from your screencast that ctrl+shift+f isn't reaching the keybinding service of vscode while in editor, so I suspect chrome or some plugin you have has the same shortcut and processes it before the event reaches vscode.

Thanks for getting back. I tried again and it works as it should now.
I did check through the keyboard shortcuts of my Chrome extensions before opening this issue, but since it works now, let's consider this closed. I will update again with better info if it comes back.

The problem is back and here are more thoughts:
Since ctrl+shift+f reached in VSCode explorer, why would Chrome and its extensions be suspect?
Here is the screencast you requested, ctrl+shift+e and ctrl+shift+f looks a bit different to me though
https://github.com/microsoft/vscode/assets/946010/b99583f0-3460-4493-a765-b5eedac4bebc

It seems that when the issue occurs, ctrl+shift+f keydown does not reach the webpage

I'm having similar issues, except I'm running VS Code desktop client on windows.
With the editor focused, I get the following log. It looks like the "f" key isn't reaching KeyBindingService.
2024-01-04 10:10:21.106 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-04 10:10:21.106 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-04 10:10:21.107 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2024-01-04 10:10:21.107 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2024-01-04 10:10:21.107 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-04 10:10:21.109 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-04 10:10:21.109 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-04 10:10:21.109 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 16, key: Shift
2024-01-04 10:10:21.109 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 4 ('Shift')
2024-01-04 10:10:21.109 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-04 10:10:21.574 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

When I focus anywhere other than the editor, I get this
2024-01-04 10:11:06.718 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-04 10:11:06.718 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-04 10:11:06.718 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2024-01-04 10:11:06.718 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2024-01-04 10:11:06.719 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-04 10:11:06.774 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-04 10:11:06.774 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2024-01-04 10:11:06.775 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 16, key: Shift
2024-01-04 10:11:06.775 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 4 ('Shift')
2024-01-04 10:11:06.775 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2024-01-04 10:11:06.902 [info] [KeybindingService]: / Soft dispatching keyboard event
2024-01-04 10:11:06.903 [info] [KeybindingService]: | Resolving ctrl+shift+F
2024-01-04 10:11:06.903 [info] [KeybindingService]: \ From 3 keybinding entries, matched workbench.action.findInFiles, when: no when condition, source: built-in.
2024-01-04 10:11:06.903 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl,shift], code: KeyF, keyCode: 70, key: F
2024-01-04 10:11:06.903 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: KeyF, keyCode: 36 ('F')
2024-01-04 10:11:06.903 [info] [KeybindingService]: | Resolving ctrl+shift+F
2024-01-04 10:11:06.904 [info] [KeybindingService]: \ From 3 keybinding entries, matched workbench.action.findInFiles, when: no when condition, source: built-in.
2024-01-04 10:11:06.904 [info] [KeybindingService]: + Invoking command workbench.action.findInFiles.
2024-01-04 10:11:07.190 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.

and ctrl+shift+f is successfully triggered.

I like to emphasize, this issue is very intermittent. Hope we lean on trying to reproduce it rather than classify it as isolated cases.

More and more keys are randomly not working, e.g. home, end when typing a commit message, to fix, I had to close the vscode window and open it again. However Chrome did not restart, implying that Chrome extensions were not restarted

Each time I face this, I have to press ctrl+shift+e to jump into explorer first, then press ctrl+shift+f works. I can't quite comprehend how this can be caused by Chrome.

(ctrl+shift+f is currently working for me again)
Thanks @bilogic for the ctrl+shift+e idea. Great temporary fix for next time it stops working.

@ulugbekna
What other info do you need?

Hey @ulugbekna, this issue might need further attention.
@bilogic, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@ulugbekna thanks, I have not encountered it for a while now, but will need some time to verify it.
Meanwhile, is this a PR something you can help approve? https://github.com/microsoft/vscode/pull/207721
Thanks!

same. Haven't been an issue for me for a while now.

Thanks! Closing for now since it seems fixed

@ulugbekna thanks, would you be able to help with https://github.com/microsoft/vscode/pull/207721?

I'll try

thanks!

@ulugbekna possible? haha thank you

The corresponding issue was closed without getting support, so the PR will not likely be merged.
cc @benibenj

Do you mean not reaching 20 votes? Does every issue have to be voted on this way to be merged?

It depends on the area owner -- for this issue, it's Ben cc'ed above.


Added shapeless

@milessabin I saw the branch in your fork but you didn't open a PR. Are you OK with merging this?

Sorry, yes ... I was in a rush and forgot to hit the buttu. ... fire away 🙂

OK, great. The PR had a merge conflict so I updated the file directly on master.


Provided language modeling script run_mlm.py does not work with HuggingFace Datasets library

Environment info

transformers version: 1.1.1
Platform: Windows-10-10.0.19041-SP0
Python version: 3.7.7
PyTorch version (GPU?): 1.7.1+cu110 (True)
Tensorflow version (GPU?): not installed (NA)
Using GPU in script?: yes
Using distributed or parallel set-up in script?: parallel

Information
I am trying to train a language adapter using XLM-RoBERTa model on Oscar corpus provided by the HuggingFace.
The problem arises when using:

the official example script: /examples/language-modeling/run_mlm.py

I want to perform masked language modeling on BERT and RoBERTa multilingual models using the provided script in the examples. The issue happens when the script tries to concatenate already tokenized texts.
To reproduce

Run the script with the command (using --dataset_name <DATASET_FROM HF_HUB>) provided in the examples/language-modeling/ section.
The problem arises in the  group_texts method which has as input a tokenized text as it can be seen bellow. (line 313)

    concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}

TypeError: can only concatenate list (not "int") to list

Expected behavior
Maybe the texts should be first concatenated and than tokenized or there is a better way to concatenate the texts before generating max_length chunks.
Moreover, it would be nice if there is a working example how to train language adapter using Datasets.

The issue was that some datasets from the Datasets library have a numerical column ( id in my case) despite the text column. To fix this, remove_columns should be used.


Fix for hue logging issue

When changing the color of a light, Abode will sometimes return a hue value that is off by 1 resulting in a warning log message, "Set color mismatch for device...". In an attempt to reduce unnecessary logging messages (mostly to reduce extraneous logging messages in Home Assistant), this pull request makes a slight modification to the comparison of the requested and response object hue value using the math standard library. The isclose method (added in Python 3.5) is used with abs_tol set to 1. This way, if the values are ever anything greater than 1.0, the warning log message will appear, which shouldn't happen unless something is really off. If the values are equal to or less than 1.0, the warning log message will not appear. I've only seen this "issue" with the hue value, hence the reason I only made the change there.
Edit: Just spent more time than I'd like to admit on confusion with the or  operator. The parenthesis around the entire if statement led me down the wrong path, then trying to format the code so the line wasn't too long confused me even more. It should be correct now.
math.isclose(response_object["hue"], int(hue), abs_tol=1) will return True if the difference between the hue values are less than or equal to 1.
So basically my logic is, if not true (i.e. the difference between the hue values are greater than 1) or the saturation values don't match, then log the warning. Clear as mud.... I need some sleep.

Coverage increased (+0.01%) to 85.325% when pulling 5820cbb77e83a56d604c45170d3a003a07fcdea9 on shred86:light_fix into c4108eccea28d332926112b8f129ffe1b4b96ae8 on MisterWil:master.

So it only happens occasionally, and it happens because abode is rounding or sending a value 1 off from the value we're sending? I remember writing some code that was converting 0-255 to 0-100, so it's not because HASS is rounding incorrectly/differently?

That was on the Home Assistant side where HA sends a brightness value of 0-255 which needs to be converted to a value of 0-99 (not 100), source code here. The issue was Abode would reject a brightness value of 100 for whatever reason.
This “issue” is with the hue value. When we send a hue value, the response from that request will sometimes come back with a value that is off by 1 from what we sent, which triggers the warning log message. My only guess is Abode is doing some sort of conversion of the value on their end and it gets converted back for the response message which results in a rounding error in some cases. I knew about this when adding the support for changing colors, but just accepted it at the time. At first I was thinking we should suppress the log message but I think this solution is better - if it’s performing as expected, don’t log.

Cool seems good to me!


IE 11 HTMLElement.scrollIntoView() doesn't execute

Firstly, great polyfill – it works perfectly for scrollTo, however I'm unable to get scrollIntoView working.
Environment
IE 11 on Windows 10
Expected behaviour
When I call HTMLElement.scrollIntoView, I expect the page to scroll to the element.
Current Behaviour
When I call HTMLElement.scrollIntoView nothing happens; no console errors, no scroll, nothing.
Implementation
I have a function which I call, that looks like this:
async function scrollToSection(section) {
    if (!('scrollBehavior' in document.documentElement.style)) {
        console.log('Loading scroll behaviour polyfill...');
        await import('scroll-behavior-polyfill');
    }
    const container = document.querySelector(`.Section--${section}`);
    container && container.scrollIntoView();
}

My scrolling element is a custom element (so not the html or body elements). Do you think this is what could be causing the issue?
As a work-around, I've done this:
async function scrollTo(scrollContainer, {x, y, behavior = 'smooth'}) {
    if (!('scrollBehavior' in document.documentElement.style)) {
        console.log('Loading scroll behaviour polyfill...');
        await import('scroll-behavior-polyfill');
    }
    scrollContainer.scrollTo({left: x, top: y, behavior});
}

function scrollToSection(section) {
    const scrollContainer = document.querySelector('#root-app');
    const container = document.querySelector(`.Section--${section}`);
    if (container) {
        const {top} = container.getBoundingClientRect();
        scrollTo(scrollContainer, {y: top});
    }
}

Hey there. Are you attaching a shadow root to your scrolling element? In any case, there should be no issues since this polyfill is built with full Shadow DOM support. Is there a way for you to provide me with a simple reproduction of this problem that occurs so I can investigate it? scrollIntoView at least under some circumstances should work just fine in IE 11, so I'd like a repro to work from ☺

I'm using this inside of a React-based application, so no shadow DOM, just the normal DOM of the page. I can confirm the element is mounted before I load the polyfill. I'm on mobile right now, but I'll share a CodeSandbox link when I'm on my home machine. Note that scrollTo works with this polyfill; it's only scrollIntoView that's not working as expected.

Oh, alright. You mentioned it was a custom element, so I figured you might be using Shadow DOM. Anyway, that sounds great. I'll take a look at it when you have it. And thanks for reporting this bug!

Here is a reproducable error: https://codesandbox.io/s/crazy-hopper-nfp2l
Let me know if you can see the issue on IE11.

Hello, I believe I ran into the same issue, this polyfill was included in a project where a non-functional scrollIntoView call was reported as a bug when using IE11, I suspect it might have to do with our specific layout, but I created an example barebones react app that reproduces the broken behavior. Due to none of the code editors I found online actually working in IE11 I'm 📎 attaching the app as a zip, extract it then run
npm install
npm install -g serve
npm build
serve -s build

If you open the URL the last command prints in current stable Chrome/Firefox and IE11 you can see that pressing the button to scroll to the element at the 500th index does nothing in IE while it works in other browsers. In my experience this is because an element in the list of parents actually appears scrollable, but when you set its scrollTop then try to look at it immediately after it remains unchanged at 0. Before I discovered this polyfill was already pulled in I wrote my own solution in TypeScript which seemed to do the trick, just trying to scroll all parents until one of them actually accepts the change. Hopefully this helps in finding a proper solution:
/**
 * This is a polyfill for the HTMLElement.scrollIntoView function for IE11
 * Based on https://github.com/tidal-engineering/ie11-scroll-into-view
 */
export const applyScrollIntoViewPolyfill = () => {
    const isIE = typeof window !== 'undefined' && window.navigator.userAgent.indexOf('Trident/') > 0;

    if (!isIE) return;

    const getComputedStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el, null);
    const overflowScrollable = (text: string) => text === 'scroll' || text === 'auto' || text === 'visible';
    const isXScrollable = (elem: HTMLElement) => (
        elem.clientWidth < elem.scrollWidth
        && overflowScrollable(getComputedStyle(elem).overflowX)
    );
    const isYScrollable = (elem: HTMLElement) => (
        elem.clientHeight < elem.scrollHeight
        && overflowScrollable(getComputedStyle(elem).overflowY)
    );
    const hasScrollbar = (elem: HTMLElement) => isYScrollable(elem) || isXScrollable(elem);
    const offsetTop = (el: HTMLElement) => el.getBoundingClientRect().top + document.body.scrollTop;

    /** @return A list of parent elements that are likely to be scrollable */
    function findScrollableParents(el: HTMLElement): HTMLElement[] {
        let checkElement: HTMLElement = el;
        const scrollableParents = [];

        while (checkElement !== null) {
            if (hasScrollbar(checkElement))
                scrollableParents.push(checkElement);

            checkElement = checkElement.parentNode as HTMLElement;
        }

        return scrollableParents;
    }

    /**
     * Turns out IE11 just "gives up" when the native scrollIntoView method is called with
     * the current layout, so we need to manually try to scroll all scrollable parents
     * until one of them bites.
     */
    const ieScrollIntoView = (el: HTMLElement) => findScrollableParents(el).some((scrollContainer) => {
        const [targetOffset, currentOffset] = [offsetTop(el), offsetTop(scrollContainer)];
        const newScrollTop = scrollContainer.scrollTop + targetOffset - currentOffset;
        scrollContainer.scrollTop = newScrollTop;

        /**
         * Check whether setting the scroll position silently failed
         *
         * If difference is below an arbitrary threshold we assume the scroll position
         * was set to the expected value and stop looking for the right element
         *
         * Normally the difference is 0 but scroll positions are sometimes floats so a
         * threshold is more likely to cover all bases and avoid rounding errors.
         */
        const difference = newScrollTop - scrollContainer.scrollTop;
        if (difference < 1.2) return true;
    });

    HTMLElement.prototype.scrollIntoView = function () {
        ieScrollIntoView(this);
    };
};

This also doesn't work on Chrome for Android, at least on versions 38.0.2125 through 68.0.3440


Token Endorsement Validation logic

This code has been explicitly tested using WebChat and Teams to insure that the logic flow is correct.


Update base JRuby version to <IP_ADDRESS>

Just like it says on the tin

The tin forgot to adjust the travis.yml - afterwards good to go :)

CI seems to fail consistently on openJDK 7 with some SSL errors or whatever :|
Looks like a regression on the JRuby side though...
1) Furoshiki::JarApp when creating a .app creates a .app

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  2) Furoshiki::JarApp when creating a .app includes launcher

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  3) Furoshiki::JarApp when creating a .app makes launcher executable

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  4) Furoshiki::JarApp when creating a .app deletes generic icon

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  5) Furoshiki::JarApp when creating a .app injects icon

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  6) Furoshiki::JarApp when creating a .app injects jar

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  7) Furoshiki::JarApp when creating a .app removes any extraneous jars

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  8) Furoshiki::JarApp when creating a .app template_path

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  9) Furoshiki::JarApp when creating a .app Info.plist sets identifier

     Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

     OpenSSL::SSL::SSLError:

       Unsupported record version Unknown-0.0

     # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

     # ./lib/furoshiki/jar_app.rb:101:in `download'

     # ./lib/furoshiki/jar_app.rb:97:in `download_template'

     # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

     # ./lib/furoshiki/jar_app.rb:52:in `package'

     # ./spec/app_spec.rb:62:in `block in (root)'

     # ./spec/app_spec.rb:59:in `block in (root)'

  10) Furoshiki::JarApp when creating a .app Info.plist sets display name

      Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

      OpenSSL::SSL::SSLError:

        Unsupported record version Unknown-0.0

      # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

      # ./lib/furoshiki/jar_app.rb:101:in `download'

      # ./lib/furoshiki/jar_app.rb:97:in `download_template'

      # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

      # ./lib/furoshiki/jar_app.rb:52:in `package'

      # ./spec/app_spec.rb:62:in `block in (root)'

      # ./spec/app_spec.rb:59:in `block in (root)'

  11) Furoshiki::JarApp when creating a .app Info.plist sets bundle name

      Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

      OpenSSL::SSL::SSLError:

        Unsupported record version Unknown-0.0

      # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

      # ./lib/furoshiki/jar_app.rb:101:in `download'

      # ./lib/furoshiki/jar_app.rb:97:in `download_template'

      # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

      # ./lib/furoshiki/jar_app.rb:52:in `package'

      # ./spec/app_spec.rb:62:in `block in (root)'

      # ./spec/app_spec.rb:59:in `block in (root)'

  12) Furoshiki::JarApp when creating a .app Info.plist sets icon

      Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

      OpenSSL::SSL::SSLError:

        Unsupported record version Unknown-0.0

      # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

      # ./lib/furoshiki/jar_app.rb:101:in `download'

      36m# ./lib/furoshiki/jar_app.rb:97:in `download_template'

      # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

      # ./lib/furoshiki/jar_app.rb:52:in `package'

      # ./spec/app_spec.rb:62:in `block in (root)'

      # ./spec/app_spec.rb:59:in `block in (root)'

  13) Furoshiki::JarApp when creating a .app Info.plist sets version

      Failure/Error: Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

      OpenSSL::SSL::SSLError:

        Unsupported record version Unknown-0.0

      # ./lib/furoshiki/jar_app.rb:111:in `download_following_redirects'

      # ./lib/furoshiki/jar_app.rb:101:in `download'

      # ./lib/furoshiki/jar_app.rb:97:in `download_template'

      # ./lib/furoshiki/jar_app.rb:77:in `cache_template'

      # ./lib/furoshiki/jar_app.rb:52:in `package'

      # ./spec/app_spec.rb:62:in `block in (root)'

      # ./spec/app_spec.rb:59:in `block in (root)'

Finished in 27.32 seconds (files took 1.33 seconds to load)

48 examples, 13 failures

Ok tried switching us over to JDK 8 in hopes that it's just a JDK7 oddity and we can just up requirements and not deal with it.

Well, what do you say - is just running on JDK8 good enough (tm) ?

Busy weekend and didn't get 👟  time!
JDK8 is totally "Good Enough"! :shipit:

No worries, was just looking at stuff and if we wanted to implement this over in the main repo as well and was wondering whether you had any objections :)


Cannot import Random

After installation, I was getting the 'cannot import Random', there was conflict between your bsuite/baselines/random/random.py and system random.Random class (as suggested here). After refactoring to random_baseline.RandomBaseline everything seems to work.

Hi there! Thanks for the bug report. How are you importing this? If you use absolute imports this should work, i.e.
from bsuite.baselines.random import random

Unfortunately I don't remember exactly how I imported that, but I think I was just running the code from the repo. Anyway, if there are no others with the issue, maybe the problem was on my side, so closing this.


[bug 1170333] es

r?

This switches us from ElasticUtils to elasticsearch-dsl and also is a complete overhaul of the Elasticsearch using code.
Changes of note:

we switched from facets to aggregations (facets are deprecated and will go away soon)
we switched from the MoreLikeThis to the morelikethis search query (MoreLikeThis is deprecated and will go away soon)
I moved some code around to make the API a little easier to work with
I took the time to move the graph that's on the front page dashboard and only shows up if you're an analyzer to the analyzer search.

Things that probably aren't of interest:

Reindexing from the command line takes about the same amount of time as it did before. I spent some time tinkering with the code and I'm pretty sure at this point that it's bound on how fast we can get data out of the db. We could speed it up a bit more by getting dicts out instead of model instances, but that requires us to duplicate some code here and there and will make maintenance harder and mistakes more likely.
elasticsearch-dsl won't store empty string values (https://github.com/elastic/elasticsearch-dsl-py/issues/202). I ended up writing a .to_index() on ResponseDocType which both reduces the number of objects created thus speeding indexing up significantly and also gets around the empty string value problem.

To review:

read my blog post for some context on the changes: http://bluesock.org/~willkg/blog/mozilla/ditching_elasticutils.html
read through the code--half of it is a "this to that" translation and the other half is more involved because I rewrote a bunch of code
run the tests
run the various es_* commands on the command line

I went through, added a bunch of comments to the PR to make it clearer why things happened and then also fixed some minor things.

^^^ Fix typo.

@mythmon What do you think here? Is it good enough to land?

I don't really understand the reason to split DocTypes and managers, but I don't really understand the reason behind Django's split either, so that isn't a huge deal. The interface makes sense and looks easy to use on both sides, so :+1:.
Should you add elasticsearch-dsl-py to one of the requirements files? I tried to install it from there, but I didn't find it. I'm also having some trouble with git submodule that I think is something wrong locally. I need to check that out. Either way, I'm not able to actually test this locally right now. I can work on that more this afternoon.
I don't see anything else in the code I want to comment on. The tests and running the code should cover any changes in behavior, so I'm pretty confident in that (assuming I can get it running). The comments and the blog post were very helpful, thanks!

I think the split between Model and ModelManager is that ModelManager is an instance of a class that lets you operate on groups of objects whereas Models are about specific things. It lets you do things like have multiple ModelManagers available that think about different groups of objects and in doing that, you get more readable code.
The split here between DocType and DocTypeManager is probably overengineering at this point, but it seemed easier to implement it now this way and see how it feels than it did to just implement DocType and have to potentially fix it later.
I'll look at the requirements file--I probably forgot to do that.
I'm not sure why you're having problems with vendor/, though. Are there error messages?

^^^ Rebased against master and also add the requirements.

Travis is green. I've addressed all the issues. I did another round of testing. I'm going to call it "good enough" and land it. I'll test extensively on -stage next to make sure I didn't break anything. Then push it to prod either tonight or tomorrow.

@mythmon Thank you!


dispose representation by name

based on the NGL example:
https://codepen.io/pen?&editors=001
stage.loadFile("data://1blu.mmtf").then(function (o) {
  o.addRepresentation("ball+stick", {
color: "red",
name: "sel1"})
   o.autoView()
})

How can I remove the representation by its name sel1?
I tried:
stage.getRepresentationsByName('sel1').dispose()
stage.removeRepresentation('sel1')
stage.getRepresentationsByName('sel1').removeRepresentation()
stage.disposeRepresentation('sel1')
But none are working

stage.getRepresentationsByName returns an RepresentationCollection http://nglviewer.org/ngl/api/classes/stage.html#getrepresentationsbyname, so I think the full version would be:
stage.getRepresentationsByName('sel1').list[0].dispose()
If the name matches multiple representations you can dispose all of them like this
stage.getRepresentationsByName('sel1').list.forEach(r => r.dispose())

stage.getRepresentationsByName returns an RepresentationCollection http://nglviewer.org/ngl/api/classes/stage.html#getrepresentationsbyname, so I think the full version would be:
stage.getRepresentationsByName('sel1').list[0].dispose()
If the name matches multiple representations you can dispose all of them like this
stage.getRepresentationsByName('sel1').list.forEach(r => r.dispose())


Any particular reason to remove it?


Mod platform publishing task

Mod publishing
This PR adds the modpublisher plugin which simplifies the process of publishing to CurseForge & Modrinth.
For an overview, see their readme or their full documentation.
Usage
After creating a release (setting version, release type, patching changelog, committing), you will use the publish task.
publish is Gradle's "umbrella" task, which depends on all publishing tasks. If you only want to publish to modding platforms, you can use publishMod instead, or even publishCurseforge & publishModrinth to publish only to Curseforge and Modrinth respectively.
Note there is also a publishGitHub task provided by modpublisher, however this will do nothing because we haven't configured modpublisher for GitHub Releases (see below). We can't disable the task (which would hide it) because publishMod depends on it.
GitHub Releases
Publishing to GitHub is not covered by this PR. That may be better achieved as part of a CI/CD setup using GitHub Actions/Workflows.
modpublisher has built-in support for publishing GitHub releases, however for our use case the "version" would need to be different and we'll probably need more control...
Secrets
API tokens/keys must be set to actually do any publishing. These can either be gradle properties (curseforge_token & modrinth_token) or environment variables (CURSEFORGE_TOKEN & MODRINTH_TOKEN).
Personally, I'd probably set these as "user" gradle properties by creating a gradle.properties file in the GRADLE_USER_HOME directory (~/.gradle or C:\Users\<USERNAME>\.gradle). Setting up .env is another option.
Definitely do not put them in the project gradle properties, as these get committed to git :joy:!
We'll also want these saved in the repo secrets if we ever setup a CI job to automate publishing.
Published Jars
The appropriate jars are published to each platform; all platforms use the normal build variant (remapJar) except for Modrinth, which uses the output from remapModrinthJar.
Changelog
I haven't added anything to the changelog as this PR only affects internal (dev-facing) stuff, which is already mentioned in the changelog.
The published release will contain the changelog entry relating to the current mod_version.
The changelog section header is omitted, because that should be self-evident from the release the changelog is attached to, however this is configurable and could be included if desired.
Alternative plugins
We initially explored using shedanial's unified-publishing, however we ran into an issue setting "embedded" related mods for the Modrinth platform. Seeing as everything we needed worked on  modpublisher & that project appears to be more actively maintained, we decided to use that instead.
Original PR description
Hidden for brevity
This PR implements shedanial's unified-publishing plugin to streamline the curseforge/modrinth publishing process.
Publishing to GitHub is not covered by this PR. That may be better achieved as part of a CI/CD setup using GitHub Actions/Workflows.
That said, modpublisher has built-in support for publishing GitHub releases as part of a unified publish task, so we could consider using that instead.
API tokens/keys must be set to actually do any publishing. These can either be gradle properties (curseforge_token & modrinth_token) or environment variables (CURSEFORGE_TOKEN & MODRINTH_TOKEN).
Personally, I'd probably set these as "user" gradle properties by creating a gradle.properties file in the GRADLE_USER_HOME directory (~/.gradle or C:\Users\<USERNAME>\.gradle). Setting up .env is another option.
Definitely do not put them in the project gradle properties, as these get committed to git :joy:!
Run using gradlew publishUnified.
I haven't tested this, since I don't have access to your tokens. It's possible I've misinterpreted what is meant by "modrinth id"; currently it's set to "freecam".
When testing, I'd recommend changing the releaseType to alpha and changing mod_version to something like "TEST".
Come to think of it, releaseType should probably be set as in gradle.properties... Any other feedback, questions, etc welcome.

Fixes #134

@hashalite the next release could be a good opportunity to test this out? You could merge this locally and try using it without actually merging it on GitHub.
I'm happy to help worth through any teething issues with you on Discord, since I can't really test this myself without setting up Curseforge/Modrinth pages.

I've ported over to modpublisher after our conversation earlier.
Once this is tested/refined further I'll squash the commits, but I've kept it separate for now in-case we decide to revert.
The issue with the fabric project not correctly configuring the requirements might be resolved by putting it in an afterEvaluate block (if it isn't already). Otherwise we can fallback to moving them to the root gradle script under an if (project.name == "fabric") block.

I've polished a bit further and implemented the ability to list additional supported mc versions using supported_mc_versions etc. minecraft_version is always marked as supported.
I was able to do some limited testing by setting a dummy api key & debug=true, everything appeared to work correctly.
The issue we were experiencing with modrinth dependencies should be resolved, but I can't test that.
The issue with project.version not being defined is now resolved.

Bumped to modpublisher 2.0.5, so the modrinth slug->id issue should be fully resolved now.
Worked correctly in my tests:
"dependencies": [
    {
      "projectId": "P7dR8mSH",
      "dependencyType": "required"
    },
    {
      "projectId": "mOgUt4GM",
      "dependencyType": "optional"
    },
    {
      "projectId": "9s6osm5g",
      "dependencyType": "embedded"
    }
  ],


Added the possibility to set a table title class per column

I do not know if you didn't add the possibility to add style classes to the title of a column in the table component but we did use the feature in previous versions of vuikit 😃
For instance when align the column to the right we set the cell and the title classes to uk-text-right.

The new version considers the column head as the main element, meaning it should inherit all attributes. Just set the class as usual :)

Aha I see, that's great! 👍


[fix][misc] Fix bugs in hash bucket algorithm implementation in Pulsar collections

Fixes #21106
Fixes #21108
Motivation

Fix a bug in ConcurrentLongLongPairHashMap, ConcurrentLongPairSet and ConcurrentOpenHashMap where the hash bucket's storage index was incorrectly calculated.

the impact of the bug has been that the implementations have been rather unoptimal because of of frequent collisions in storing the item to the underlying array. Essentially the hash bucket algorithm hasn't been properly used.

Fix a bug in signSafeMod function which is duplicated in all classes. The buggy implementation didn't return correct results for negative input values.

Modifications

rename bucket to bucketIndex to indicate that it's the bucket index in the storage array that needs to be calculated.
calculate bucketIndex by multiplying the hash bucket by the item size (4 or 2).
fix the signSafeMod function which wasn't sign safe at all. Currently the logic is duplicated in all classes.

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

The signSafeMod bug must have impacted also all other collection classes where the invalid implementation was used.

I also left a comment on another related PR. Maybe we should consider to replace the customized map with ConcurrentHashMap.


Update README.md

just trying to understand how branches work on github. copies of the main code that you use to add your features. Then they are pulled and approved then added to the main project.

I think i have finally reached the merging point to my program


[ROCKETMQ-102] When shutdown(), the persisted offet is not the latest consumed message, which may cause repeated messages.

Solution: add interface for push consumer to accept await termination time to await consuming.
JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-102
UnitTest in DefaultMQPushConsumerTest.java
@Test
public void testShutdownAwait() throws Exception {
    final LinkedList<Long> consumedOffset = new LinkedList<>();
    pushConsumer.setPullInterval(0);
    pushConsumer.getDefaultMQPushConsumerImpl().setConsumeMessageService(new ConsumeMessageConcurrentlyService(pushConsumer.getDefaultMQPushConsumerImpl(), new MessageListenerConcurrently() {
        @Override public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs,
            ConsumeConcurrentlyContext context) {
            for (MessageExt msg : msgs) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {e.printStackTrace();}
                synchronized (consumedOffset) {
                    consumedOffset.add(msg.getQueueOffset());
                }
            }
            return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
        }
    }));
    pushConsumer.getDefaultMQPushConsumerImpl().doRebalance();
    PullMessageService pullMessageService = mQClientFactory.getPullMessageService();
    pullMessageService.executePullRequestImmediately(createPullRequest());
    Thread.sleep(1000);
    pushConsumer.shutdown(10 * 1000);//await consume for at most 10 seconds
    //pushConsumer.shutdown();//here if we do not await, the test case will not pass
    long persitOffset =pushConsumer.getDefaultMQPushConsumerImpl().getOffsetStore().readOffset(new MessageQueue(topic, brokerName, 0), ReadOffsetType.READ_FROM_MEMORY);
    Thread.sleep(1000);//wait for thread pool to continue consume for sometime if not terminated well
    Collections.sort(consumedOffset);
    Assert.assertEquals(consumedOffset.getLast() + 1, persitOffset);//when shutdown with await, the persisted offset should be the latest message offset
}

Can you provide some test data, say before/after applying this patch, how many duplications are found respectively?
IMHO, we should make the API as concise as possible.

@lizhanhui
The problem exists for long, please review an old issue.
https://github.com/alibaba/RocketMQ/issues/367
The number of duplicated messages are depending on how many messages are consuming in the thread pool or in the pending queue. This should be very easy to meet when consumptions are takes long and with massive accumulation.
The problem should be addressed since rocketmq should prevend duplication as much as possible.

I know this issue has been brought up in the past. What I suggest here is providing some testing data to consolidate the rationality of this patch. By doing so, you'll find it easier to get developers convinced.
Anyway, thanks a lot for bringing this issue back to attention.

@lizhanhui please refer to the test case and just switch the shutdown(long milis) method to shutdown() to find out the problem

@lizhanhui @zhouxinyu @vintagewang
What do you think my proposol of adding a field called awaitMilisWhenShutdown in DefaultPushConsumer, which will not need to add a shutdown(long awaitMilis) interface but one more config field.

Coverage decreased (-0.3%) to 31.215% when pulling db9e92a87e4da5c9480cd0be29d0ddac9845280d on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage decreased (-0.3%) to 31.215% when pulling db9e92a87e4da5c9480cd0be29d0ddac9845280d on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage decreased (-0.3%) to 31.215% when pulling db9e92a87e4da5c9480cd0be29d0ddac9845280d on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Hi @Jaskey ,
Thanks for this PR, I added two comments for your reference.

Coverage increased (+0.5%) to 31.992% when pulling b178d2fb1c138b8f89d8d670ee39daa96c72a2d1 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage increased (+0.5%) to 31.992% when pulling b178d2fb1c138b8f89d8d670ee39daa96c72a2d1 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

@lizhanhui @zhouxinyu
please review the updated pr, which remains the same interface of push consumer.

Coverage increased (+0.2%) to 31.691% when pulling d714c6c7aca67ab1de715e99112f551f00d60682 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage increased (+0.2%) to 31.691% when pulling d714c6c7aca67ab1de715e99112f551f00d60682 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage increased (+0.4%) to 31.919% when pulling 5667cdfdddf02cd397640347312a490cd53a34d9 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage increased (+0.4%) to 31.919% when pulling 5667cdfdddf02cd397640347312a490cd53a34d9 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

Coverage increased (+0.4%) to 31.919% when pulling 5667cdfdddf02cd397640347312a490cd53a34d9 on Jaskey:ROCKETMQ-102-shutdown-await into 573b22c37806a21543b90707bcce6022243a62da on apache:master.

@zhouxinyu
Please check the updated pr.
Since shutdownNow needs developer to take respond to interrupts but actually they should not care about this, so I still remain using shutdown , and after timeout , the method will return and remains the very same flow.
BTW, unit test has been updated using  AssetThat

Changes Unknown when pulling 67cbdc35e908c888976b0e4464ef87cedef88104 on Jaskey:ROCKETMQ-102-shutdown-await into ** on apache:master**.

Changes Unknown when pulling 67cbdc35e908c888976b0e4464ef87cedef88104 on Jaskey:ROCKETMQ-102-shutdown-await into ** on apache:master**.

Changes Unknown when pulling 67cbdc35e908c888976b0e4464ef87cedef88104 on Jaskey:ROCKETMQ-102-shutdown-await into ** on apache:master**.

Coverage increased (+0.3%) to 31.243% when pulling 3da9a7983d2171f09c24a930d367b17b227fad86 on Jaskey:ROCKETMQ-102-shutdown-await into e3f4251c91a73f4e51732bcb1690554ac5fb3096 on apache:develop.

Repeated messages is a big problem for a message queue, and this is a known issue. When can this pr be reviewed and merged?
@lizhanhui @zhouxinyu @vongosling

I request a another issue  #2085 since I find this feature is still not supported for the latest release


fix(cli-service): update global entryFiles when reassign rawConfig.entry

What kind of change does this PR introduce? (check at least one)

[x] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Docs
[ ] Underlying tools
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

Other information:
fix #5508

Thanks!


fix(axis): fix time axis labels and ticks being overlapped

Brief Information
This pull request is in the type of:

[x] bug fixing
[ ] new feature
[ ] others

What does this PR do?
Fix the cases when time axis labels and ticks being overlapped.
Fixed issues
#17198
Details
Before: What was the problem?
Some of the labels are too close to each other.
After: How does it behave after the fixing?
Labels with larger level (e.g., year labels have larger levels than month labels) are first displayed and then display labels with smaller levels when there is enough space.
Document Info
One of the following should be checked.

[x] This PR doesn't relate to document changes
[ ] The document should be updated later
[ ] The document changes have been made in apache/echarts-doc#xxx

Misc
ZRender Changes

[ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs
N.A.
Others
Merging options

[ ] Please squash the commits into a single one when merging.

Other information

I'm not sure but this seems has been addressed in https://github.com/apache/echarts/pull/15583

https://github.com/apache/echarts/pull/15583 's fixing may have a potential problem that the ticks of the overlapped labels are not hidden, so that the ticks are not always the same with the labels. @pissang Do you think it a better idea to avoid overlapping as in this PR so that the ticks are always the same with the labels?
And after the change in #15712, it requires hideOverlap to avoid overlap, but I think this should be a default behavior (or at least the default value of hideOverlap of the axis labels should be set to be true). This should not considered as backward compatibility because the overlapped labels are bugs.

@pissang If you think I'm on the right track, I can keep fixing this PR. For now, this PR has a problem that when calculating the bounding box of each label, the unparsed text is used. For example, {primary|8th} may be used to calculate the text width rather than 8th so it may overkill the overlapping. This is also a bug for category axis labels.
If you think it is not a big deal if the ticks are not always the same as the labels, we can keep the current code and discuss if it's better to make hideOverlap: true by default.


Simplify Air less

This change is

#778  👈
dev

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

Join @spapinistarkware and the rest of your teammates on  Graphite

Codecov Report
Attention: Patch coverage is 94.62366% with 5 lines in your changes missing coverage. Please review.

Project coverage is 93.04%. Comparing base (2baab80) to head (14b3136).

Files
Patch %
Lines

crates/prover/src/core/prover/mod.rs
85.71%
3 Missing and 2 partials :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #778      +/-   ##
==========================================
- Coverage   93.34%   93.04%   -0.30%
==========================================
  Files          89       89
  Lines       11957    11974      +17
  Branches    11957    11974      +17
==========================================
- Hits        11161    11141      -20
- Misses        695      729      +34
- Partials      101      104       +3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


I'm guessing I'm now missing godot_native_init_options... ?:)

The binding are updated,
Now you need to define.
void gdnative_init(godot_gdnative_init_options *o)
{
}

void gdnative_terminate(godot_gdnative_terminate_options *o)
{
}

void nativescript_init()
{
    godot::register_class<SomeClass>();
}

Thanks @RameshRavone
It compiles now, but it won't accept my .gdn anymore, renaming it to tscn it has issues with that too not recognising the platforms, so I wager that has all changed too ?
I'll be on IRC in a few hours :)

its .gdns
On 25-Jul-2017 12:01 pm, "Bastiaan Olij"<EMAIL_ADDRESS>wrote:

Thanks @RameshRavone https://github.com/rameshravone
It compiles now, but it won't accept my .gdn anymore, renaming it to tscn
it has issues with that too not recognising the platforms, so I wager that
has all changed too ?
I'll be on IRC in a few hours :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GodotNativeTools/cpp_bindings/issues/22#issuecomment-317642829,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJp7PqYprzxTzrE0-4ZDVIm8PAMZX-MRks5sRYvFgaJpZM4OiAYo
.

@RameshRavone , is there a writeup somewhere on creating those, can't seem to find what needs to change...

not at the moment, but rather simple to adapt you just need to create a
NativeScript resource GDNativeScript is dropped and script name is now
class name.
GDNativeLibrary is the same.
On 25-Jul-2017 2:53 pm, "Bastiaan Olij"<EMAIL_ADDRESS>wrote:
@RameshRavone https://github.com/rameshravone , is there a writeup
somewhere on creating those, can't seem to find what needs to change...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GodotNativeTools/cpp_bindings/issues/22#issuecomment-317681072,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJp7Pt29JmjozvmfdpeJwj7WGkog0b23ks5sRbQpgaJpZM4OiAYo
.

I'll make a PR to update README.md soon.

Still doing something wrong unfortunately, it seems to want to load the gdns file now but it's still complaining the platforms don't exist.
Here is my mesh_tree.gdns:
[gd_resource type="NativeScript" load_steps=2 format=2]

[sub_resource type="GDNativeLibrary" id=1]

platform/unix = ""
platform/x11 = "res://bin/space_colonization.so"
platform/server = ""
platform/android = ""
platform/blackberry = ""
platform/haiku = ""
platform/mac = "res://bin/libspace_colonization.dylib"
platform/ios = ""
platform/osx = "res://bin/libspace_colonization.dylib"
platform/html5 = ""
platform/windows = "res://bin/space_colonization.dll"
platform/uwp = ""

[resource]

resource_name = "MeshTree"
library = SubResource( 1 )
script_name = "MeshTree"

And this becomes the error output:
ERROR: set_library_path: No such platform: unix
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: x11
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: server
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: android
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: blackberry
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: haiku
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: mac
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: ios
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: osx
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: html5
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: windows
   At: modules/gdnative/gdnative.cpp:130.
ERROR: set_library_path: No such platform: uwp
   At: modules/gdnative/gdnative.cpp:130.
ERROR: initialize: No library set for this platform
   At: modules/gdnative/gdnative.cpp:203.
ERROR: init_call_cb: No valid library handle, can't call nativescript init procedure
   At: modules/nativescript/register_types.cpp:45

That Resource is dropped, You need to create a new one called NativeScript,
[gd_resource type="NativeScript" load_steps=2 format=2]

[sub_resource type="GDNativeLibrary" id=1]

platform/X11_32bit = ""
platform/X11_64bit = "res://addons/GodotAI/lib/libgodot_ai_pro.so"
platform/Windows_32bit = ""
platform/Windows_64bit = ""
platform/OSX = ""
platform/Android = ""
platform/iOS = ""
platform/WebAssembly = ""
_sections_unfolded = [ "platform" ]

[resource]

class_name = "RootRes"
library = SubResource( 1 )

@RameshRavone thanks, getting really close now, I think I'm probably missing some declarations still on those gdnative_init and gdnative_terminate methods as it now comes back with:
ERROR: open_dynamic_library: Can't open dynamic library: /Users/basolij/Development/Godot/GDNative/GDNative-demos/cpp/space_colonization/bin/libspace_colonization.dylib. Error: dlopen(/Users/basolij/Development/Godot/GDNative/GDNative-demos/cpp/space_colonization/bin/libspace_colonization.dylib, 2): Symbol not found: __Z13gdnative_initP27godot_gdnative_init_options
  Referenced from: /Users/basolij/Development/Godot/GDNative/GDNative-demos/cpp/space_colonization/bin/libspace_colonization.dylib
  Expected in: flat namespace
 in /Users/basolij/Development/Godot/GDNative/GDNative-demos/cpp/space_colonization/bin/libspace_colonization.dylib

For me this one worked perfect,
using namespace godot;

/** GDNative Initialize **/
GDNATIVE_INIT(godot_gdnative_init_options *options) {
}

/** GDNative Terminate **/
GDNATIVE_TERMINATE(godot_gdnative_terminate_options *options) {
}

/** NativeScript Initialize **/
NATIVESCRIPT_INIT() {
         register_class<SimpleClass>();
}

@RameshRavone yeah thats working for me now too, I had missed a typo that prevented it from compiling so it was still coming back to the older issue.
Anyway, it looks like its loading it properly now but I'm guessing the notation in GDScript has changed as well? It doesn't like this anymore:
onready var treemesh = preload("res://mesh_tree.gdns")

func _ready():
	$Tree.mesh = treemesh.new()

Yes the Interface is changed, but I didn't think that new() is changed.

Well then something is still broken.. hmm

If you want to have a look, this is the latest source:
https://github.com/BastiaanOlij/GDNative-demos/tree/space_colonization/cpp/space_colonization

Is your godot the current one, apparently @karroffel forgot to bind new and made the PR later with #9822

I updated this morning... I can update again just to be safe but I think it was probably included

Are you sure it not running, It works fine for me

@RameshRavone nah, it was indeed that last fix @karroffel made, just rebased to master and its running now :)
Thanks for all the help man!

Oh all this stuff happened while I was asleep 😄 Sorry for not being around and thanks so much to @RameshRavone for helping him out :)