Upgrade to python3

Updated python3 branch with master and made changes to support python3.7+. Able to run the server, some tests are failing locally either due to bytes/str conversion or jpype upgrade.
Main changes done in this PR:

Updated python3 branch with master.
Updated requirements.txt - all packages are updated to a newer version with python3.7+ support.
jpype changed JavaException to JException.
Python3 related changes -

izip changed to zip
relative imports
Use wb instead of w when opening files - to write bytes content

Django2 related changes -

is_authenticated() changed to is_authenticated
on_delete=models.CASCADE added to foreign keys
Fixed example dir path by settings up EXAMPLES_DIR variable in setting.py

Ran 2to3 on the whole code
Updated tests to use bytes when comparison
Update dockerfiles, github workflow for py3
Updated Readme.md for py3 install and run instructions (Major change is to remove virtualenv install since python3 supports virtual env itself with python -m venv

Major Issue Left to Address:

Python3 changed how we used to represent in strings in python2. Now HttpResponse and opening/writing file uses bytes instead of string- https://docs.python.org/3.0/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit
This issue made a lot of tests fail due to comparision b/w str and bytes. Most of them are fixed by changing expected comparison to bytes by adding b in the str. Although, more robust changes might be required to come up with a way to compare actual output - either changing the response to str by encoding or str to byted by decoding. (encode()/decode() functions of str)

Some of the changes are picked from https://github.com/spdx/spdx-online-tools/pull/178, although it was not updated with master and did not have the full changes, so had to create a new PR. Thanks @victorphoenix3 for all the work.

To review this PR, either checkout the branch locally and run the server or check the git diff with "master" instead. I'll open a new PR from python3->master once this gets merged with all failures resolved.
Fixes #58 #24

Would appreciate your review and local testing
cc @goneall  @techytushar  @Ugtan  @kmehant

@rtgdk Could you add/update the dockerfile configurations?  I'll do some local tests using Docker now that I have the production infrastructure (mostly) working.

@goneall The docker files are updated with master, do you want me to update them with your PR #212 changes ?

Also, the server runs fine but some tests are failing due to reasons mentioned in the description (mostly because of the difference b/w bytes and str in python3). So, you can expect some functionalities to not work fully.

I'm getting errors bringing up the server in the spdx-license-matcher:

EXITED (1)

Traceback (most recent call last):

File "src/manage.py", line 22, in <module>

execute_from_command_line(sys.argv)

File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line

utility.execute()

File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv

self.execute(*args, **cmd_options)

File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 361, in execute

self.check()

File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check

all_issues = self._run_checks(

File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks

issues.extend(super()._run_checks(**kwargs))

File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 377, in _run_checks

return checks.run_checks(**kwargs)

File "/usr/local/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks

new_errors = check(app_configs=app_configs)

File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique

all_namespaces = _load_all_namespaces(resolver)

File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces

url_patterns = getattr(resolver, 'url_patterns', [])

File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__

res = instance.__dict__[self.name] = self.func(instance)

File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 584, in url_patterns

patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__

res = instance.__dict__[self.name] = self.func(instance)

File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 577, in urlconf_module

return import_module(self.urlconf_name)

File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

File "<frozen importlib._bootstrap>", line 991, in _find_and_load

File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 671, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 783, in exec_module

File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

File "/spdxonlinetools/src/src/urls.py", line 49, in <module>

path('app/', include('app.urls')),

File "/usr/local/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include

urlconf_module = import_module(urlconf_module)

File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

File "<frozen importlib._bootstrap>", line 991, in _find_and_load

File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 671, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 783, in exec_module

File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

File "/spdxonlinetools/src/app/urls.py", line 19, in <module>

from app import views

File "/spdxonlinetools/src/app/views.py", line 51, in <module>

import app.utils as utils

File "/spdxonlinetools/src/app/utils.py", line 24, in <module>

from spdx_license_matcher.build_licenses import build_spdx_licenses

File "/src/spdx-license-matcher/spdx_license_matcher/build_licenses.py", line 8, in <module>

from normalize import normalize

ModuleNotFoundError: No module named 'normalize'

Looks like a python3 relative import issue with https://github.com/spdx/spdx-license-matcher. I think license matcher was written in python2.  @Ugtan  can you confirm? python3 changed how we used to import relative modules/files.

@rtgdk Yeah. The license matcher is written in python2. Do you want it to be compatible with both python2 and 3 or if we are planning to drop support for spdx online tools python2, we could simply drop it from the license matcher too. Let me know your thoughts. I will update the license matcher accordingly.

@Ugtan I think we can have a separate branch python3 in  https://github.com/spdx/spdx-license-matcher which is compatible with python3 and later on merge this with master. Maybe when we merge it, we can move the python2 code to another branch - python2 so that we preserve that state for future.
I'll update the requirements for this branch and point it to spdx-license-matcher python3 branch.

I reviewed the changes and only found a couple very minor documentation related items.  I'll add a PR to this branch with suggested changes.

Trying this out on Windows using Python version 3.8, I'm getting the following error trying to import the spdx_license_matcher functions:
  File "C:\Users\gary\git\temp\spdx-online-tools\src\app\utils.py", line 24, in <module>
    from spdx_license_matcher.build_licenses import build_spdx_licenses
  File "c:\users\gary\git\temp\spdx-online-tools\venv\src\spdx-license-matcher\spdx_license_matcher\build_licenses.py", line 8, in <module>
    from normalize import normalize
ModuleNotFoundError: No module named 'normalize'

Note that I'm getting the following errors during the requirements installatin which are referenced in https://github.com/spdx/spdx-license-matcher/issues/5
ERROR: spdx-license-matcher 0.0.1 has requirement jpype1==0.6.3, but you'll have jpype1 1.0.1 which is incompatible.
ERROR: spdx-license-matcher 0.0.1 has requirement python-dotenv==0.13.0, but you'll have python-dotenv 0.14.0 which is incompatible.
ERROR: spdx-license-matcher 0.0.1 has requirement requests==2.22.0, but you'll have requests 2.24.0 which is incompatible.

@rtgdk Could you merge in the last few commits from master?  I don't think they will conflict - it's just a few fixes to the production scripts.

I ran into the same error ModuleNotFoundError: No module named 'normalize' using the Docker image.

@goneall Apologies for not mentioning earlier. Yeah, this error occurs since spdx-license-matcher is not updated to python3 (relative imports doesn't work as it used to). I had raised a PR - https://github.com/spdx/spdx-license-matcher/pull/12 for that. Turns out I don't have merge permission for that.  For my local development, I switched to that branch and installed it manually (python setup.py install). I don't have write access to merge the PR. Also, once merged we need to create a new release v2.0 and update requirements.txt.
If you have the repo setup locally, then just pull the branch rtgdk:python3 and run python setup.py install after activating the virtualenv.

@goneall I have merged master. This part is not needed in python3 from the encoding PR.
Also, have created a new release v2.0 for license-matcher and updated requirements. Let me know, if you face the above import error again.

Thanks @rtgdk  - This resolved the issue.
I'm still doing some testing - I found another str.decode(... call which was causing an issue in license submissions.  I created a PR to resolve.
I'll do some more testing tomorrow - so far, looking pretty good 👍

Just a note on unit test failures - these may be the same as mentioned at the start of the PR - just adding a few details.
Here's some of the specifics on the unit test failures:
Traceback (most recent call last):
  File "C:\Users\gary\git\temp\spdx-online-tools\src\api\tests.py", line 182, in test_convert_xlsxtordf_api
    resp = self.client.post(reverse("convert-api"),{"file":self.xlsx_file,"from_format":self.xlsx,"to_format":self.rdf,"cfilename":"xlsxtordf-apitest"},format="multipart")
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\rest_framework\test.py", line 293, in post
    response = super().post(
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\rest_framework\test.py", line 206, in post
    data, content_type = self._encode_data(data, format, content_type)
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\rest_framework\test.py", line 179, in _encode_data
    ret = renderer.render(data)
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\rest_framework\renderers.py", line 914, in render
    return encode_multipart(self.BOUNDARY, data)
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\django\test\client.py", line 201, in encode_multipart
    lines.extend(encode_file(boundary, key, value))
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\django\test\client.py", line 253, in encode_file
    to_bytes(file.read())
  File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 1786: character maps to <undefined>

Similar errors occurs for several tests.
TypeError: a bytes-like object is required, not 'str'

error occurs in several test case files.
Traceback (most recent call last):
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "C:\Program Files\Python38\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\Python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

occurs in several test cases - this may be a missing configuration on my part
======================================================================
ERROR: test_generate_xml (api.tests.SubmitLicenseModelsTests)
View for generating an xml from license submittal form fields
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\gary\git\temp\spdx-online-tools\src\api\tests.py", line 390, in test_generate_xml
    xml = generateLicenseXml(self.osiApproved, self.shortIdentifier, self.fullname, self.listVersionAdded,
  File "C:\Users\gary\git\temp\spdx-online-tools\src\api\views.py", line 613, in generateLicenseXml
    xmlString = ET.tostring(root, method='xml').replace('>','>\n')
TypeError: a bytes-like object is required, not 'str'

Running into an issue submitting a new license:
Unexpected error, please email the SPDX technical workgroup that the following error has occurred: Traceback (most recent call last): File "/spdxonlinetools/src/app/views.py", line 152, in submitNewLicense matches, issueUrl = utils.check_new_licenses_and_rejected_licenses(licenseText, urlType) File "/spdxonlinetools/src/app/utils.py", line 497, in check_new_licenses_and_rejected_licenses licenseData = get_license_data(issues) File "/spdxonlinetools/src/app/utils.py", line 473, in get_license_data licenseText = parseXmlString(licenseXml)['text'] File "/spdxonlinetools/src/app/utils.py", line 373, in parseXmlString tree = ET.ElementTree(ET.fromstring(xmlString)) File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML parser.feed(text) File "<string>", line None xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1

The string being passed into xml.etree.ElementTree.ParseError is:
'b\'<SPDXLicenseCollection xmlns="http://www.spdx.org/license"><license isOsiApproved="true" licenseId="testid" name="Test License [Please Ignore]" listVersionAdded=""><crossRefs><crossRef>http://source1.com</crossRef></crossRefs><standardLicenseHeader /><notes /><text>
test not there yet
</text></license></SPDXLicenseCollection>\''

This is fetched from the database from the following code in utils.py:
licenseXml = str(LicenseRequest.objects.get(id=dbId, shortIdentifier=licenseIdentifier).xml)

@rtgdk @Ugtan  let me know if you have any ideas - looks like something related to string encoding.

@goneall Regarding the test failures - yes mostly they are related to encoding difference b/w bytes and str. I had to make many forceful string to bytes conversion in tests in src/app/tests.py file to make them pass since our Django server API code is returning bytes output.
Regarding the xml.etree.ElementTree.ParseError error - again this is due to incorrect conversion of bytes to str.

Line 472: utils.py - licenseXml = str(LicenseRequest.objects.get(id=dbId, shortIdentifier=licenseIdentifier).xml) causes this incorrect conversion.  So in our database, some row data (xml column) is saved in bytes instead of string. We can confirm this by looking at the dbId this license submission is failing.
Ultimately, we have to fix this by using decode("utf-8")

@goneall Have opened #272 to track this issue. I opened the PR #273  to fix this issue instance. Again, we have to be sure that decode("utf-8") doesn't fail for any other case - like unicode string, non-ascii characters, etc. Also, we need to make our database consistent in terms of type of data we store. That license was most probably created using python2, that's why it was saved in bytes format.
Maybe we should revisit the models structure and make sure that only string type is used everywhere for any new data that comes in.
@Ugtan Let us know if you any other ideas/something we might have missed.

Thanks for the heads up @Thrameos

Merging to python3 branch for @Ugtan to work on top of these changes. We will try no more changes go into master. python3 will become master once project completes and master will be changes to python2 to support old version.
Manual testing done.
Test coverage

Total no of tests
Passed

app.tests
86
46

api.tests.ValidateFileUploadTests
2
2

api.tests.SubmitLicenseModelsTests
5
1

api.tests.CheckLicenseFileUploadTests
2
1

api.tests.CompareFileUploadTests
2
-

api.tests.ConvertFileUploadTests
8
-

@goneall Thanks for the contribution.


Define variable or fact when debug is set

Proposal: Define variable or fact when debug is set
Author:  jdh239
Date: 2018/04/18

Status: New
Proposal type: Feature Request

Motivation
I would like to be able to skip or execute certain tasks based on debug verbosity level.
Problems
What problems exist that this proposal will solve?

Problem #1:  meta: end_play when debug level is greater than <#>.  This would allow easier debugging and prevent execution beyond the current point of debugging
Problem #2:  Allow me to skip/execute specific tasks when debugging.

Probably a lot of other scenarios to use this in, but that is all I have for right now.
Solution proposal
Set a variable or fact that can be used in conditionals based off of the verbosity level. (ie. ansible-playbook -vv myplay.yml)
meta: end_play
when: verbosity >= 2
or

name: Sample task
shell: "Some stuff"
register: myvar
when: verbosity >= 3

It would allow more flexibility while debugging.  I can execute my playbook without debugging and have it execute the whole thing, or terminate early with debugging without having to constantly edit my playbook to add meta: end_play statements, etc.

This has recently been implemented in https://github.com/ansible/ansible/pull/38231 and will appear in the 2.6 release.
The var will be ansible_verbosity

Sweet!  Thanks!


The update to a new version happens silently without user consent

Environment
Windows build number: Windows 10
Windows Terminal version: 0.11.1191.0 (currently installed)

Steps to reproduce

Expected behavior
Let the user decide when to update to a newer version or opt out from automatic updates.

Actual behavior
The software is silently updating without user consent!
After last update there were breaking changes (1. My custom color scheme stopped working. Out of  nowhere I got black text on black background - which you can imagine is a very cool experience when you are in a hurry and need to get things done fast. 2. The syntax to overwrite shortcuts to switch to a tab by number changed, so my navigation shortcuts stopped working, hitting my productivity).
Again: Updates, especially breaking changes should not happen without user consent, otherwise this software is not reliable to be used in a production environment!
Also, I don't think it`s hard to migrate the syntax in settings.json when you do it in defaults.json (Like it happend with breaking change 2 that I mentioned earlier)! Just saying..

I'm sorry about all that. We haven't been able to get the store to stop killing us -- even when the application says "hold up, I'm in use", it gets terminated automatically. I'm in talks with the store and servicing folks about how best to handle this.
Also, I'm sorry about the one-time breaking settings change. This software really isn't intended to be used in a production environment when it's a technical preview. I know that we do that, and a lot of folks are doing that, but it's like being in the Windows Insider program.
After 1.0, settings changes will come with migration.
I'm gonna close this one out with a hat tip to #5458 and /dup #3915.
Thanks for letting us know. I know it's been rough. ☹

(The main issue is that we yanked all the code that re-wrote a user's settings file, because it was unreliable and dangerous. We didn't want to reintroduce it so late in the cycle when we were worried it would end in something worse than "my key bindings aren't working".)

Thanks for the reply. I understand the situation.
I am glad that you are working to solve it. I hope you'll manage to find a solution before the next update.
Also, thanks for caring about the user experience even thou the terminal is still in preview.
Keep up the good work :)

before the next update

We definitely won't before then, but we won't have any breaking settings changes in it at least 😬


ocamlPackages.hpack: 0.11.0 → 0.13.0

Description of changes
https://raw.githubusercontent.com/anmonteiro/ocaml-h2/0.13.0/CHANGES.md
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

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

The changes looks good, we should just format the files according to the format RFC


feat: dag adds LenVertex and RangeVertex func

Signed-off-by: Gaius<EMAIL_ADDRESS>
Description

DAG adds LenVertex and RangeVertex func.

Related Issue

Motivation and Context

Screenshots (if appropriate)
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation Update (if none of the other choices apply)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.

Codecov Report

Merging #1470 (113a380) into main (311ca60) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1470      +/-   ##
==========================================
- Coverage   43.92%   43.87%   -0.05%
==========================================
  Files         120      120
  Lines       10835    10840       +5
==========================================
- Hits         4759     4756       -3
- Misses       5594     5601       +7
- Partials      482      483       +1

Flag
Coverage Δ

Object-compatibility-e2etests
?

e2etests
?

unittests
43.87% <100.00%> (-0.05%)
:arrow_down:

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

Impacted Files
Coverage Δ

pkg/dag/dag.go
68.67% <100.00%> (+2.00%)
:arrow_up:

client/daemon/rpcserver/subscriber.go
47.76% <0.00%> (-2.24%)
:arrow_down:

client/daemon/peer/peertask_conductor.go
56.12% <0.00%> (-0.50%)
:arrow_down:


3.1.0 release breaks example in docs -- crashes after starting a conference

Describe the bug
The example listed here crashes when you click the Join Room button.
Expected Behaviour
[Describe the expected behaviour of the feature.]
Steps to Reproduce the Problem

Run the example from the docs site
Click "Join Room"
💥

Specifications

Device: Web chrome
OS: macOS 10.15.7
Platform: Web / chrome
Version:

@voxeet/react-components 3.1.0

Fixed by #103

any update on this bug?

which will be deployed soon.

Hi @Energizz, any news on this ?


Match Colors is misleading

Describe the bug
When choosing the Match Colors options, I would expect the primary role to match the primary colour specified.
This is not happening, its close, but to designer, QA, and management who don't understand what's happening, it is simply the wrong colour.
To Reproduce
This is demonstrable on the Web version of the Material Theme Builder.
Expected behavior
When I specify a specific colour, and request the builder not to change it by checking the "Match Colors" option, then I expect it not to change the colours.
Additional context
Although I love the way the colours organize themselves for Material3, when building a product, I am usually required to use a specific colour for some things, and I just need the core colours to remain exactly as the are specified.

Same problem here on the web as well as in the desktop version. And I am expecting the same behaviour as you described.

Hey y'all, sorry for the confusion. Color match adds the input colors as the container colors in order to keep contrast between all the other roles. I've shared feedback back to the team, we're always looking for ways to improve the systems.

Hey y'all, sorry for the confusion. Color match adds the input colors as the container colors in order to keep contrast between all the other roles. I've shared feedback back to the team, we're always looking for ways to improve the systems.

As a designer and a developer, I really appreciate the assistance in keeping everything balanced.
However, clients are extremely picky about their colours, and we really need a switch that will simply turn off all the smart tools, and keep what we set.
Alternatively, It would be ideal if the bulk was generated, as it is now, from the primary colour, but in "fixed" mode, a user altered colojr should become "sticky" and not change, unless explicitly reset.


[population pipeline] Benchmark NAGIM run

First draft:
https://docs.google.com/spreadsheets/d/1bIU9tFvBuwSbc5oxAtflw-fKgljWGKXIGoXteShSgRE/edit#gid=1759300377
Need to double check it's correct

Thank you! Also worth thinking about how to best automate cost accounting tasks like these. You mentioned some interesting thoughts on storing cost information in the sample metadata tables, which I think is a great idea. Not sure if there's already another issue to track this? (@illusional FYI)


Add per-subcommand ca_bundle config option

verify_ssl is nice, but if you expect to have a long-lived certificate anyway, may as well download it and use it when verifying requests. Plus, then we avoid the need to ignore InsecureRequestWarnings.
Maybe not necessary, since you could just append the certificate to the per-profile ca_bundle?
I'm still rather torn about this — I probably should have looked at https://github.com/aws/aws-cli/#other-configurable-variables a bit more before adding another option.

Good job,  Thanks a lot 💯


feat: Update HERE Wallet  and add topLevelInjected

It was necessary to add the ability to associate an application inside an iframe with a parent window and allow seamless initialization and method calls. This will help integrate applications inside wallets. For example Telegram HERE Wallet:
https://github.com/near/wallet-selector/assets/14349805/0e9bbc9f-5222-40bf-9592-3689e151d317
topLevelInjected method is needed because wallet-selector is designed in such a way that only modal-ui knows about the contract that the application uses.

@AZbang can you help me understand why topLevelInjected is different from a normal injected wallet?  (Also if we go forward with this PR, you'll have to document that option anyway.)

@ewiner  Added a description to the metadata parameters

@ewiner The video in the PR description shows that when opening a site inside an iframe, here-wallet transmits wallet data inside the site through here-wallet/core using an iframe postMessage. However, in order for the wallet to be immediately initialized inside wallet-selector, it is necessary to call initialization through modal-ui. The only way to tell modal-ui whether to signIn immediately is to pass a special parameter to metadata.
TopLevel means that the wallet is injected from the parent window or, in the case of native mobile applications, the WebView controller.

So the idea is for an injected wallet to force automatic sign-in, so the user doesn't have to click "Connect Wallet" or "Sign In".
I'm new to this codebase, but two questions/comments come to mind:

Shouldn't that be a decision for the app developer to make instead of the wallet provider?  Are there apps that would break if the signIn happens upon initialization instead of when the user asks?
The wallet selector supports multiple injected wallets - it seems to me like with this change one of those wallets could force sign-in and prevent you from using others.

@ewiner

wallet-selector remembers the last authorized wallet between sessions and automatically logs in upon initialization; the application should not care how wallet-selector received the active wallet in own reactive state. By design of the library, the application must subscribe to changes in the selector state.
Adding the same code to every application seems less sensible than simply updating a tool that is designed to provide access to wallets through a unified API.

In general, yes, if there are two topLevelInjected wallets, then wallet-selector will consider the last one in the list to be the active wallet.
However, in practice, topLevelInjected should only be used if the wallet is confident that it runs in its native environment and will not conflict. For example, native WebView controllers or embedded widgets on websites.

This PR will be eligible for merge into main after review by community and Pagoda. Thanks!

@kujtimprenkuSQA is no longer working on this project. If he wants to volunteer his personal time, it would be welcome, however I don't want any SQA folks added as reviewers. I am trying to encourage the community to review this PR. This is still in progress. Thanks!

Agree with @ewiner. This PR change is tailored for specific problem that Here wallet is experiencing. Not disagree with the direction of the PR, but ideally this should have been proposed on NEP and approved by the community and users.
Or at least, I would prefer to get reviewed/feedback by other builder group community, specially around the maintainers of other injected wallets.

The idea of wallet-selector is to help projects have access to users. Now we have a Telegram Wallet where 95% of all active users are on NEAR. At the same time, no project on NEAR can provide services to such users. By delaying, you are isolating the ecosystem from users.
I believe that taking into account the real state of affairs in the ecosystem, this PR is for the public good and should be implemented in the near future.

@ewiner @trechriron @hcho112
I really don't understand why you consider topLevelInjected a specific feature for HERE Wallet. Any other wallets will be able to use this to integrate web dApps inside their mobile wallets. This seems very useful. Just because we're the only ones who want to use it doesn't mean it's a feature only for us.

thank you @Patrick1904


Windows Firewall Com Sample

added samples for the firewall,
This took some effort to figure out, so hopefully it helps some one else
What's this all about?
Fixes: #0000 ⬅ Be sure to refer to an existing issue here!

no fixes, only a sample of the firewall api/com object. It's not straight forward and might help some one out!

@microsoft-github-policy-service agree

Thanks for sharing! We already have a number of COM-related samples, so I'd prefer to leave it as is.

Thank you!
I'm not familiar with Windows API or this crate, and I was looking for exactly this.


not support 128 bit?

000000000001c8ec:  str x7, [sp, 0x128]                      |  x7,296,sp,+,DUP,tmp,=,=[8]
000000000001c8f0:  str **q0,** [sp, 0x70]                       |  q0,112,sp,+,DUP,tmp,=,=[16]
Unknown word: q0
thread '<unnamed>' panicked at 'attempt to shift right with overflow', /r2/radius/radius/src/memory.rs:595:47

I'm seeing this when run radius for aarch64.

There is some support for instructions with 128 bit regs, and this ESIL expression should work but I need to make these values 128 bit when pushed to the stack. I will try to fix it now.

Oh I didn't realize its not recognizing q0, thats weird. Which disassembler are you using? If you haven't changed it its either capstone 4 or 5. what output do you get from r2 -c "aL~arm" -q - ?

Ok so in arm 64 r2 only has v0-31 but they should also be labeled with q0-31 . I will add them to the register profiles. This might work if you try the arm.v35 plugin by calling radius.set_option("asm.arch", "arm.v35"). But there are also some issues with the vector35 disassembly plugin also that I need to fix with a PR to r2.

FYI anyway.
> e asm.arch
arm

[0x00006000]> aL~arm
a___  _16_32_64  arm.as      LGPL3   as ARM Assembler (use R2_ARM32_AS and R2_ARM64_AS environment)
adAe  _16_32_64  arm         BSD     Capstone v5 ARM disassembler
_dA_  _16_32_64  arm.gnu     GPL3    Acorn RISC Machine CPU
_dA_  _64        arm.v35     Apache  Vector35 ARM64 disassembler
_d__  _16_32     arm.winedbg LGPL2   WineDBG's ARM disassembler

I am gonna close this as the q* register aliases have been added to r2 and expressions like the above will work now
*[main][~/radius]$ radius2 -p /bin/ls -v -x 0x100003f00 -e '16,q0,=,q0,sp,=[16],sp,[16],.'
0x100003f00    0x00000000000000000000000000000010 "\u{10}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}"

0x100003f00    pacibsp

However there are probably lots of instructions using the SIMD registers that will still not be quite right. I am going to open a new issue and try to better document these so they can be properly tackled.


[RESOLVED] High ICMP ping response time

Problem started at 09:10:16 on 2023.05.19
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Operational data: Value: 890ms
Original problem ID: 20939
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23135&eventid=20939

Problem has been resolved in 5m 0s at 09:15:16 on 2023.05.19
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Original problem ID: 20939


Server won't start because of Bot [BUG]

What happened?
The server won't start because of what I assume to be an issue with the Bot.
What should happen?
The server starts up and the bots turns on and works.
Steps to reproduce
Start up the server
Version

[✅ ] 1.12
[ ] 1.16

Platform

[✅ ] Forge
[ ] Spigot

Mod version:
2.2.0
Config file
`# General options for the bot
[general]
The channel ID where the bot will be working in
botChannel = "854531918779777094"
The bot's status message

PLACEHOLDERS:
%online% - Online Players
%max% - Maximum Player Amount
botStatusName = "%online% players Online"
Type of the bot's status
Allowed Values: DISABLED,PLAYING,WATCHING,LISTENING,STREAMING
botStatusType = "PLAYING"
URL of the bot's stream when using the status type 'STREAMING'
Has to start with https://twitch.tv/ or https://www.youtube.com/watch?v=
streamingURL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Enable checking for updates?
Notification will be shown after every server start in log when update is available
enableUpdateChecker = true
The minimum release type for the update checker to notify
Allowed values: release, beta, alpha
updateCheckerMinimumReleaseType = "release"
Configuration options for commands
[commands]
The Role IDs of your Admin Roles
Now supports multiple roles which can access admin commands
adminRoleIDs = [830951266662219806]
The prefix of the commands usable in discord
prefix = "/"
Set to true to require an space after the prefix (e.g. 'mc help')
spaceAfterPrefix = false
Add your Custom commands to this JSON
You can copy-paste it to https://jsoneditoronline.org  Make sure when pasting here, that the json is NOT mulitlined.
You can click on "Compact JSON Data" on the website
NOTE: The JSON string must be escaped. You can use this website to escape or unescape: https://www.freeformatter.com/java-dotnet-escape.html

mcCommand   -   The command to execute on the server. use %args% to place the arguments inside of the command
adminOnly   -   True: Only allows users with the Admin role to use this command. False: @everyone can use the command
description -   Description shown in /help
aliases     -   Aliases for the command in a string array
useArgs     -   Shows argument text after the command in the help command
argText     -   Defines custom arg text. Default is
channelIDs  -   Allows you to set specific text channels outside of the server channel to use this command (make it an string array), Set to ["00"] to allow from all channels
customCommandJSON = "{"kick":{"adminOnly":true,"mcCommand":"kick","description":"Kicks a player from the server","useArgs":true,"argText":" [reason]"},"stop":{"adminOnly":true,"mcCommand":"stop","description":"Stops the server","aliases":["shutdown"],"useArgs":false},"kill":{"adminOnly":true,"mcCommand":"kill","description":"Kills a player","useArgs":true,"argText":""}}"
You must op this UUID in the ops.txt or some custom commands won't work!
senderUUID = "8d8982a5-8cf9-4604-8feb-3dd5ee1f83a3"
Enable help command?
Disabling also removes response when you entered an invalid command
Requires server restart
helpCmdEnabled = true
Enable the list command in discord
Requires server restart
listCmdEnabled = true
Enable the uptime command in discord
Requires server restart
uptimeCmdEnabled = true
Set to false to completely disable the "Unknown Command" message
showUnknownCommandMessage = true
Set to true to enable the "Unknown Command" message in all channels
showUnknownCommandEverywhere = false
Toggle some message related features
[messages]
Enable formatting conversion (Markdown <==> Minecraft)
convertCodes = true
Send formatting codes from mc chat to discord
Has no effect when markdown <==> Minecraft is enabled
formattingCodesToDiscord = false
Should /say output be sent to discord?
sendOnSayCommand = true
Should /me output be sent to discord?
sendOnMeCommand = true
When an /say command's message starts with this prefix, it will not be sent to discord
sayCommandIgnoredPrefix = "§4§6§k§r"
Should tamed entity death be visible in discord?
sendDeathMessagesForTamedAnimals = false
Advanced options
[advanced]
Custom channel ID for server specific messages (like Join/leave)
Leave 'default' to use default channel
serverChannelID = "831610931405389874"
Custom channel ID for death messages
Leave 'default' to use default channel
deathsChannelID = "832330956983369728"
Custom channel for for ingame messages
Leave 'default' to use default channel
chatOutputChannelID = "831920446400102481"
Custom channel where messages get sent to minecraft
Leave 'default' to use default channel
chatInputChannelID = "831920446400102481"
Custom Channel ID list for the help command. Set to 00 to allow usage from everywhere and to 0 to allow usage from the bots default channel
helpCmdChannelIDs = [  "0"  ]
Custom Channel ID list for the list command. Set to 00 to allow usage from everywhere and to 0 to allow usage from the bots default channel
listCmdChannelIDs = [  "0"  ]
Custom Channel ID list for the uptime command. Set to 00 to allow usage from everywhere and to 0 to allow usage from the bots default channel
uptimeCmdChannelIDs = [  "0"  ]
Config options which only have an effect when using forge
[forgeSpecific]
A list of blacklisted modids
Adding one will prevent the mod to send messages to discord using forges IMC system
IMC_modIdBlacklist = [  "examplemod"  ]
Show item information, which is visible on hover ingame, as embed in discord?
sendItemInfo = true
Configuration for linking
[linking]
Should discord linking be enabled?
If whitelist is on, this can NOT be disabled
DOES NOT WORK IN OFFLINE MODE!
enableLinking = true
Role ID of an role an player should get when he links his discord account
Leave as 0 to disable
linkedRoleID = "0"
Enable discord based whitelist?
This will override the link config!
To whitelist use the whitelist command in the bot DMs
whitelistMode = false
Adding Role IDs here will require the players to have at least ONE of these roles to link account
requiredRoles = [    ]
# Allows you to configure the default values of some personal settings
[linking.personalSettingsDefaults]
  default_useDiscordNameInChannel = true
  default_ignoreReactions = false
  default_pingSound = true

Webhook configuration
[webhook]
Whether or not the bot should use a webhook (it will create one)
enable = false
The avatar to be used for server messages
serverAvatarURL = "https://raw.githubusercontent.com/ErdbeerbaerLP/Discord-Chat-Integration/master/images/srv.png"
The name to be used for server messages
serverName = "Minecraft Server"
The URL where the player avatar gets fetched from

PLACEHOLDERS:
%uuid% - Returns the player's UUID with dashes
%uuid_dashless% - Returns the player's UUID without dashes
%name% - Returns the player's name
%randomUUID% - Returns an random UUID which can be used to prevent discord cache
playerAvatarURL = "https://minotar.net/avatar/%uuid%?randomuuid=%randomUUID%"
Allows you to modify and translate most of the messages this bot will send
[localization]
This is what will be displayed ingame when someone types into the bot's channel
PLACEHOLDERS:
%user% - The username
%id% - The user ID
%msg% - The message
ingame_discordMessage = "§6[§5DISCORD§6]§r <%user%> %msg%"
This is what will be displayed ingame when someone sends an reply into the bot's channel
PLACEHOLDERS:
%user% - The username
%id% - The user ID
%msg% - The reply message
%ruser% - The username of the message that got the reply
%rmsg% - The replied message
ingame_discordReplyMessage = "§6[§5DISCORD§6]§r §a%user%§r in reply to §3%ruser%§r: %msg%"
Message shown when hovering over the username of an discord message
PLACEHOLDERS:
%user% - The username/nickname (Someone123)
%user#tag% - The username with tag (someone#0001)
%id% - The user ID

NOTE: using an @ here can cause ping sounds ingame
discordUserHover = "§3Discord User %user#tag%\n§aClick to mention"
This message will edited in / sent when the server finished starting
serverStarted = "Server Started!"
Message to show while the server is starting
This will be edited to SERVER_STARTED_MSG when webhook is false
serverStarting = "Server Starting..."
This message will be sent when the server was stopped
serverStopped = "Server Stopped!"
The message to print to discord when it was possible to detect a server crash
serverCrash = "Server Crash Detected :thinking:"
Gets sent when an player joins

PLACEHOLDERS:
%player% - The player's name
playerJoin = "%player% joined"
Gets sent when an player leaves

PLACEHOLDERS:
%player% - The player's name
playerLeave = "%player% left"
Gets sent when an player dies

PLACEHOLDERS:
%player% - The player's name
%msg% - The death message
playerDeath = "%player% %msg%"
Message sent instead of playerLeave, when the player times out

PLACEHOLDERS:
%player% - The player's name
playerTimeout = "%player% timed out!"
Gets sent when an player finishes an advancement
Supports MulitLined messages using \n

PLACEHOLDERS:
%player% - The player's name
%name% - The advancement name
%desc% - The advancement description
advancementMessage = "%player% just made the advancement %name%\n_%desc%_"
The chat message in discord, sent from an player in-game

PLACEHOLDERS:
%player% - The player's name
%msg% - The chat message
discordChatMessage = "%player%: %msg%"
Sent to a player when someone reacts to his messages
PLACEHOLDERS:
%name% - (Nick-)Name of the user who reacted (format: 'SomeNickName')
%name2% - Name of the user who reacted with discord discriminator (format: 'SomeName#0123')
%msg% - Content of the message which got the reaction
%emote% - The reacted emote
reactionMessage = "§6[§5DISCORD§6]§r§7 %name% reacted to your message "§9%msg%§7" with '%emote%'"
# Strings about the discord commands
[localization.commands]
  # Shown in console when trying to use the discord command
  ingameOnly = "This command can only be executed ingame"
  # Shown when successfully reloading the config file
  configReloaded = "Config reloaded!"
  # Shown when an subcommand is disabled
  subcommandDisabled = "This subcommand is disabled!"
  # Message sent when user does not have permission to run a command
  noPermission = "You don't have permission to execute this command!"
  # Message sent when an invalid command was typed
  #
  # PLACEHOLDERS:
  # %prefix% - Command prefix
  unknownCommand = "Unknown command, try `%prefix%help` for a list of commands"
  # Message if a player provides less arguments than required
  notEnoughArguments = "Not enough arguments"
  # Message if a player provides too many arguments
  tooManyArguments = "Too many arguments"
  # Message if a player can not be found
  #
  # PLACEHOLDERS:
  # %player% - The player's name
  playerNotFound = "Can not find player \"%player%\""
  # The message for 'list' when no player is online
  cmdList_empty = "There is no player online..."
  # The header for 'list' when one player is online
  cmdList_one = "There is 1 player online:"
  # The header for 'list'
  # PLACEHOLDERS:
  # %amount% - The amount of players online
  cmdList_header = "There are %amount% players online:"
  # Header of the help command
  cmdHelp_header = "Your available commands in this channel:"
  # Message sent when ignoring Discord messages
  commandIgnore_ignore = "You are now ignoring Discord messages!"
  # Message sent when unignoring Discord messages
  commandIgnore_unignore = "You are no longer ignoring Discord messages!"
  # Message sent when using the uptime command
  #
  # PLACEHOLDERS:
  # %uptime% - Uptime in uptime format, see uptimeFormat
  cmdUptime_message = "The server is running for %uptime%"
  # The format of the uptime command
  # For more help with the formatting visit https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/DurationFormatUtils.html
  uptimeFormat = "dd 'days' HH 'hours' mm 'minutes'"

    # Command descriptions
    [localization.commands.descriptions]
      settings = "Allows you to edit your personal settings"
      uptime = "Displays the server uptime"
      help = "Displays a list of all commands"
      list = "Lists all players currently online"
      link = "Links your Discord account with your Minecraft account"
      whitelist = "Whitelists you on the server by linking with Discord"

# Strings about the account linking feature
[localization.linking]
  # Sent to the user when he linked his discord successfully
  # PLACEHOLDERS:
  # %player% - The in-game player name
  # %prefix% - Command prefix
  linkSuccessful = "Your account is now linked with %player%.\nUse %prefix%settings here to view and set some user-specific settings"
  # Sent to the user when linking fails
  linkFailed = "Account link failed"
  # Sent when an already linked user attempts to link an account
  # PLACEHOLDERS:
  # %player% - The in-game player name
  alreadyLinked = "Your account is already linked with %player%"
  # Sent when attempting to use personal commands while not linked
  # PLACEHOLDERS:
  # %method% - The currently enabled method for linking
  notLinked = "Your account is not linked! Link it first using %method%"
  # Message of the link method in whitelist mode
  # Used by %method% placeholder
  linkMethodWhitelist = "`%prefix%whitelist <Name-Or-UUID>` here"
  # Message of the link method in normal mode
  # Used by %method% placeholder
  linkMethodIngame = "`/discord link` ingame"
  # Sent when attempting to whitelist-link with an non uuid string
  # PLACEHOLDERS:
  # %arg% - The provided argument
  # %prefix% - Command prefix
  link_argumentNotUUID = "Argument \"%arg%\" is not an valid UUID or Name. Use `%prefix%whitelist <Name-or-UUID>`"
  # Sent when attempting to link with an unknown number
  invalidLinkNumber = "Invalid link number! Use `/discord link` ingame to get your link number"
  # Sent when attempting to link with an invalid number
  linkNumberNAN = "This is not a number. Use `/discord link` ingame to get your link number"
  # Message shown to players who are not whitelisted using discord
  # No effect if discord whitelist is off
  notWhitelisted = "§cYou are not whitelisted.\nJoin the discord server for more information\nhttps://discord.gg/someserver"
  # Sent when trying to link without an required role
  link_requiredRole = "You need to have an role to use this"
  # Sent when trying to link as an non-member
  link_notMember = "You are not member of the Discord-Server this bot is operating in!"
  # Sent to the user when he linked his discord successfully
  # PLACEHOLDERS:
  # %name% - The linked discord name
  # %name#tag% - The linked discord name with tag
  linkSuccessfulIngame = "Your account is now linked with discord-user %name#tag%"
  # Message shown to players who want to link their discord account ingame
  #
  # PLACEHOLDERS:
  # %num% - The link number
  # %prefix% - Command prefix
  linkMsgIngame = "Send this command as a direct message to the bot to link your account: %prefix%link %num%\nThis number will expire after 10 minutes"
  # Shown when hovering over the link message
  hoverMsg_copyClipboard = "Click to copy command to clipboard"

# Strings about the personal settings feature
[localization.personalSettings]
  # Message for getting an setting's value
  personalSettingGet = "This settings value is `%bool%`"
  # Sent when user sucessfully updates an prersonal setting
  settingUpdateSuccessful = "Successfully updated setting!"
  # Header of the personal settings list
  personalSettingsHeader = "Personal Settings list:"
  # Error message when providing an invalid personal setting name
  invalidPersonalSettingKey = "`%key%` is not an valid setting!"
  # PLACEHOLDERS:
  # %prefix% - Returns the current command prefix
  settingsCommandUsage = "Usages:\n\n%prefix%settings - lists all available keys\n%prefix%settings get <key> - Gets the current settings value\n%prefix%settings set <key> <value> - Sets an Settings value"
  # Sent when setting an personal setting fails
  settingUpdateFailed = "Failed to set value :/"

    # Descriptions of the settings
    [localization.personalSettings.descriptons]
      ignoreDiscordChatIngame = "Configure if you want to ignore discord chat ingame"
      useDiscordNameInChannel = "Should the bot send messages using your discord name and avatar instead of your in-game name and skin?"
      ignoreReactions = "Configure if you want to ignore discord reactions ingame"
      pingSound = "Toggle the ingame ping sound"
      hideFromDiscord = "Setting this to true will hide all of your minecraft messages from discord"

Configuration for the in-game command '/discord'
[ingameCommand]
Enable the /discord command to show an custom message with invite URL?
enabled = true
The message displayed when typing /discord in the server chat
message = "Join our discord! http://discord.gg/myserver"
The message shown when hovering the /discord command message
hoverMessage = "Click to open the invite url"
The url to open when clicking the /discord command text
inviteURL = "http://discord.gg/myserver"
The command log channel is an channel where every command execution gets logged
[commandLog]
Channel ID for the command log channel
Leave 0 to disable
channelID = "0"
The format of the log messages

PLACEHOLDERS:
%sender% - The name of the Command Source
%cmd% - executed command (e.g. "say Hello World"
%cmd-no-args% - Command without arguments (e.g. "say"
message = "%sender% executed command %cmd%"
A list of commands that should NOT be logged
ignoredCommands = [  "list", "help", "?"  ]
Configure votifier integration here
(Spigot only)
[votifier]
Should votifier messages be sent to discord?
enabled = true
Custom channel ID for Votifier messages
Leave 'default' to use default channel
votifierChannelID = "default"
The message format of the votifier message

PLACEHOLDERS:
%player% - The player´s name
%site% - The name of the vote site
%addr% - (IP) Address of the site
message = ":ballot_box: %player% just voted on %site%"
Name of the webhook title
name = "Votifier"
URL of the webhook avatar image
avatarURL = "https://www.cubecraft.net/attachments/bkjvmqn-png.126824/"
Configure Dynmap integration here
[dynmap]
The message format of the message forwarded to discord

PLACEHOLDERS:
%sender% - The sender´s name
%msg% - The Message
dcMessage = "<%sender%> %msg%"
Custom channel ID for dynmap chat
Leave 'default' to use default channel
dynmapChannelID = "default"
Name of the webhook title
name = "Dynmap Web-Chat"
URL of the webhook avatar image
avatarURL = "https://styles.redditmedia.com/t5_2kl3ct/styles/communityIcon_am5zopqnjhs41.png"
The name format of the message forwarded to the dynmap webchat

PLACEHOLDERS:
%name% - The discord name of the sender (including nickname)
%name#tag% - The discord name with tag of the sender (without nickname)
webName = "%name% (discord)"
Name shown in discord when no name was specified on the website
unnamed = "Unnamed"
Configure some plugin-specific BStats settings here
Everything can be seen here: https://bstats.org/plugin/bukkit/DiscordIntegration/9765

Only applies to spigot as there is no BStats for Forge
[bstats]
Allow sending of installed addon stats (Name and version of installed addons)
sendAddonStats = true
Settings for servers running as Bungeecord-suberver
[bungee]
Set this to true if the server is running as an subserver of an bungeecord network and therefore needs to be in offline mode
Setting this will force account linking in offline mode
Do NOT use for actual offline mode servers, as this will break the linking feature because of the UUIDs!

Currently no support for floodgate running on bungee
isBehindBungee = false`
https://pastebin.com/jyAuHjr3
Additional info

You just leaked the bot token.
CHANGE / REGENERATE IT IMMEDIATELY!
If you don't, others can do stuff as your bot with it's permissions!
Editing it out is too late, as you can view edit history.
About the bug, i will be investigating it in a few hours

That was my bad, I edited it out weird but it's all sorted. Thanks again.

ah. it is an config issue...
You put the token like botToken = abcdxyz
It should actually be botToken = "abcdxyz"
Fixing that should get the mod to load


Regression from EvoCrash and small stacktrace

Characteristics

Issue Type: [bug/feature/test report]
Reproducibility: [always]
Severity: [major]
Tool/Service/Component: [Botsing, 1.0.3]
Execution Environment: [Linux]
Reporter: [Mael<EMAIL_ADDRESS>
Description
By upgrading from EvoCrash to Botsing, I was not able to regenerate a test from a log that worked with EvoCrash. The stack trace is very small making it very hard to identify the issue. Is there way to increase the stack trace from Botsing ?
Here is the logs from Botsing:
Exception type is detected: org.objectweb.proactive.extensions.dataspaces.exceptions.SpaceNotFoundException
An error happened while generating a new output: For input string: "(Native Method"

Steps to reproduce
Clone https://github.com/stamp-project/botsing-gradle-plugin
Run ./gradlew shadowJar in botsing-gradle-plugin root directory
Clone https://github.com/ow2-proactive/scheduling
Modify build.gradle to add botsing plugin dependency the configs (there is an example in botsing-gradle-plugin) :
botsing {
    libsPath="dist/lib/"
    targetFrame="1"
    logPath="PATH/SpaceNotFound.log"
}

Run in scheduling root directory:
./gradlew compileJava
./gradlew botsing

Other files and URLs
Log file : https://github.com/STAMP-project/evocrash-usecases-output/blob/master/Activeeon/Evocrash/scheduling/SpaceNotFoundException/SpaceNotFound.log

Dear Mael,
You should remove any frame in stack trace which does not have any line number. According to the error message, one of the frames of the stack trace has string "Native Method" instead of a line number.

Thanks it solved the issue. It seems with a better knowledge of Botsing, the stack trace is not that short.


Empty window opens in restricted mode

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

VS Code Version: 1.66.2
OS Version: Windows 11 22000.613

Steps to Reproduce:

Open an untrusted file.
Close the file leaving VSCode empty.
Click on File - Exit.
Reopen VSCode.
Behold an empty VSCode window open in restricted mode with no easy way to switch back to unrestricted.

Please try:

Click the restricted mode status in the status bar

Click trust

Yes that works.
I didn't know that was possible.
Why can an empty windows be restricted though?
Wouldn't it make sense to automatically unrestrict empty windows?

Empty windows can be made restricted to make opening untrusted loose files faster without a prompt to decide what you want to do.

But at the very least when I close VSCode entirely and reopen it it shouldn't open back (entirely empty) restricted, should it?
That is just a nuisance.

Actually there's even a setting for that, security.workspace.trust.emptyWindow, which is ticked by default, yet empty windows don't get auto-trusted.
Could someone please chime in why the setting is ignored?

The setting is not ignored. Though I definitely can understand the confusion and am thinking on how we can improve here.
Empty workspaces have a unique identifier. In order to support the various flows, we remember if an empty workspace identifier has already been trusted/restricted. In your example, the empty workspace has the same identifier until a non-empty workspace is opened or a new empty workspace is created (a second window). For this reason, it just keeps the restricted state.


Tutorial code on linear regression is missing a line

Hello,
The tutorial code on the main website is missing a line that makes it crash when testing.
Here is the page of the tutorial: https://www.tensorflow.org/get_started/get_started
Here is the said code:
import numpy as np
import tensorflow as tf
# Declare list of features, we only have one real-valued feature
def model(features, labels, mode):
  # Build a linear model and predict values
  W = tf.get_variable("W", [1], dtype=tf.float64)
  b = tf.get_variable("b", [1], dtype=tf.float64)
  y = W*features['x'] + b
  # Loss sub-graph
  loss = tf.reduce_sum(tf.square(y - labels))
  # Training sub-graph
  global_step = tf.train.get_global_step()
  optimizer = tf.train.GradientDescentOptimizer(0.01)
  train = tf.group(optimizer.minimize(loss),
                   tf.assign_add(global_step, 1))
  # ModelFnOps connects subgraphs we built to the
  # appropriate functionality.
  return tf.contrib.learn.ModelFnOps(
      mode=mode, predictions=y,
      loss=loss,
      train_op=train)

estimator = tf.contrib.learn.Estimator(model_fn=model)
# define our data sets
x_train = np.array([1., 2., 3., 4.])
y_train = np.array([0., -1., -2., -3.])
x_eval = np.array([2., 5., 8., 1.])
y_eval = np.array([-1.01, -4.1, -7, 0.])
input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_train}, y_train, 4, num_epochs=1000)

# train
estimator.fit(input_fn=input_fn, steps=1000)
# Here we evaluate how well our model did.
train_loss = estimator.evaluate(input_fn=input_fn)
eval_loss = estimator.evaluate(input_fn=eval_input_fn)
print("train loss: %r"% train_loss)
print("eval loss: %r"% eval_loss)

The eval_input_fn is missing, just add this line:
eval_input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_eval}, y_eval, 4, num_epochs=1000)

after the input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_train}, y_train, 4, num_epochs=1000) line.
Hope it'll help someone.

Thank you for your catch. This has been fixed, it will be correct in the next website update.


enhancement

I have tested this, this extension is fully compatible with Firefox (I'm on version 125.0.3 on macOS 13.5) and just needs to be built/signed for it. It would be lovely to see it moved over.


Marketing Analytics: Bing Conversion Tracking

As a Opentrons marketer, I would like to be able to track conversions from Bing.
Acceptance Criteria

TBD

bing UET tag.txt


KAFKA-8215: Upgrade Rocks to v6.0.1

Users have indicated that the memory usage of RocksDB can be excessive, in particular as it scales with the number of rocksdb instances meaning it could cause OOM if a thread ends up with a large number of stores following a rebalance.
Upgrading Rocks exposes a number of new configs, including the WriteBufferManager which --along with the existing TableFormatConfigs -- allows users to limit the total memory allocated to Rocks across all instances in a single process
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Looks like facebook finally got sick of me bugging them to publish the latest RocksJava ;)
@cadonna @mjsax @vvcephei @abbccdda @guozhangwang @bbejeck

Can we run systems test for this update?

Can we run systems test for this update?

Ack

Java 8 passed, Java 11 failed with  /home/jenkins/tools/gradle/4.10.2/bin/gradle: No such file or directory
retest this please

What testing have we done to ensure that the memory is actually bounded the way we expect?

I think it is a bit hard to write a unit test to make sure the memory for block cache is bounded. What we can do though, is to have an one-off benchmark that gradually add more state stores into a dummy topology, and measure the JVM memory with v.s. w/o this PR, and see if that increased differently maybe? @ableegoldman

I agree I'm not sure how one would get this into a unit test, but I'm working on a simple streams app that should demonstrate whether or not it's working. Unfortunately it's off-heap memory so we can't just look at the JVM usage

Sorry, I didn't mean a unit test. I think a manual test which clearly shows the memory bounds with and without this change in rebalance scenario is enough. Documenting the test and the observed results is desirable.

Closing this in favor of minor version bump


Lemonbuddy disappears after using fullscreen on any software

Print: http://imgur.com/a/iXWgy

I think I know what's causing this, will fix this for the next release


(docs) Fix formatting for strftime('%s')

This will fix the Seconds since the Epoch table in https://puppet.com/docs/puppet/6/function.html#strftime and up.


decimal changes in price oracles

Issue 81
Change the decimals in price oracle from uint256 to uint32

Codecov Report

Merging #176 (e914ea0) into master (112095d) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   15.94%   15.94%
=======================================
  Files          16       16
  Lines        1737     1737
  Branches      321      321
=======================================
  Hits          277      277
  Misses       1460     1460

Impacted Files
Coverage Δ

contracts/CreditLine/CreditLine.sol
9.82% <0.00%> (ø)

contracts/Pool/Pool.sol
0.00% <0.00%> (ø)

contracts/PriceOracle.sol
27.39% <0.00%> (ø)

Continue to review full report at Codecov.

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

won't merge as uint8 might not to any advantages and it might slightly increase gas costs


[MRG] Parallelizing windowers over BaseDatasets

In my previous experiments on large datasets I found that an easy way to dramatically speed up the preprocessing is to parallelize the windowing step over BaseDatasets using joblib. This PR introduces this feature through a small refactoring of the windowing functions. I ended up adding joblib as a dependency - I wasn't sure whether it should actually be a soft dependency though (i.e. only try to import it if using this feature).
Also, I wasn't sure how to test that multiple processes are actually used when n_jobs>1. For the moment I only made sure that the results were the same as with n_jobs=1.

so far so good. Let us know what's it's ready to merge from your end @hubertjb

Ready to merge on my side!

let's fix CIs before we merge PRs
ping me when green. thx

ok then let's use this to switch entire to github actions I would say. CircleCI now just times out even if errors are fixed. And from my side Github Actions PR almost ready (only deploy to github pages missing, should be quick). Then hubert could rebase his PRs after Github Actions PR is merged to master.

you will look an easy access to artifacts... we have this one click button
to see artifact now. It's super convenient.
If it's not broken don't fix it. Travis is not working as before we need a
replacement. circle-ci works just fine
and offers something GH action does not offer.

CircleCI atm is broken for us as it always times out. Would need to fix this again, possibly caching problem, problems we had before also already...
Github Actions resulting setup seems quite a bit simpler to me

what caused the time out on Circle? new pytorch version is slower? new
examples?
yes GH action is easier... but I really like that we can see the rendered
examples
in one click....

To be honest, I don't really know what causes the slowdown on CircleCI. Definitely the sleep staging and self supervised (relative positioning) examples are fairly slow (from https://app.circleci.com/pipelines/github/braindecode/braindecode/533/workflows/5426103a-34c8-412d-bc53-027bd37fdb63/jobs/635, last successful build on CircleCI):
computation time summary:
    - ../examples/plot_sleep_staging.py:              985.15 sec    204.4 MB
    - ../examples/plot_relative_positioning.py:       620.72 sec    559.9 MB
    - ../examples/plot_bcic_iv_2a_moabb_cropped.py:   452.23 sec    925.8 MB
    - ../examples/plot_bcic_iv_2a_moabb_trial.py:     438.41 sec   1101.4 MB
    - ../examples/plot_regression.py:                  24.56 sec    201.9 MB
    - ../examples/plot_split_dataset.py:               17.79 sec    406.9 MB
    - ../examples/plot_dataset_example.py:              9.01 sec    385.5 MB
    - ../examples/plot_custom_dataset_example.py:       2.82 sec    116.9 MB
    - ../examples/plot_mne_dataset_example.py:          0.92 sec     69.1 MB
    - ../examples/benchmark_lazy_eager_loading.py:      0.00 sec      0.0 MB

But in my experience, CircleCI always seemed to have quite variable running times, even for identical commits, indeed also this last successful build was a rerun, same commit failed by timeout before: https://app.circleci.com/pipelines/github/braindecode/braindecode/533/workflows/10edeb1e-cf55-4554-bdec-d911abac0c79/jobs/649
MNE Data caching seems to not work properly according to output in successful build. Unless cache was not there since simply too long time since last successful build...

I'll try to fix circle-ci in
https://github.com/braindecode/braindecode/pull/206
let's focus on killing travis using GH actions

here you could also rebase. and maybe if you move the new private functions below the old public ones diff could get much smaller? now it is huge diff and hard to see what changed

GH actions tests don't run in the PRs now. Can you rebase now that I merged https://github.com/braindecode/braindecode/pull/208 ? thx @hubertjb

So seems some problem with tests @hubertjb ? Can you have a look, are those running locally?
Also seems the idea for making diff smaller didn't work but ok - so did you only wrap the existing functions to parallelize them or also change something inside? :)

Btw @agramfort here we also see a recurring problem for us with CircleCI: urllib.error.HTTPError: HTTP Error 403: Forbidden  that seemingly randomly appears at times (https://app.circleci.com/pipelines/github/braindecode/braindecode/613/workflows/29ecd173-4dc8-4bc0-a2ab-33ec8fe5e9ae/jobs/723 ) and normally disappears on rerunning the workflow (https://app.circleci.com/pipelines/github/braindecode/braindecode/613/workflows/e3930173-7518-453c-9221-22c872352ba5/jobs/725)

I suspect the data http server starts to filter connections from
certain IPs and it suggests our caching
still doesn't work as it should be.

Moving discussion of CircleCI to https://github.com/braindecode/braindecode/pull/209

So seems some problem with tests @hubertjb ? Can you have a look, are those running locally?
Also seems the idea for making diff smaller didn't work but ok - so did you only wrap the existing functions to parallelize them or also change something inside? :)

Mmh weird, the tests did work locally. I'll investigate more.
About the functions - it's really only a refactoring, so the content didn't change.

I'm not sure why these two tests are failing, they seem to be working locally. In any case I've made a little change so that the test is more meaningful (the parallelization was only done over 1 dataset, now it's over 8), I don't think this will fix the problem though.
Could it be that multiprocessing jobs are handled differently on the CI?

Did you see my comment in the code?

Did you see my comment in the code?

Mmh I don't see your comments. Did you leave them as PR review comments?

Yes exactly

Yes exactly

The comments seem to be "pending", I think you have to click on "finish review" or something like that!

Good point about the == @robintibor . Here it's done on mne.Epochs objects but I'll test that more extensively.

@robintibor I just had a look, and the mne.Epochs object does have an overridden __eq__ method (defined in the SizeMixin https://github.com/mne-tools/mne-python/blob/main/mne/utils/mixin.py#L39). The method computes the hash of the two objects to be compared, and so both a difference in the underlying numpy arrays or in the other attributes of the objects will return False.
I've also added missing checks for the other attributes of the WindowsDataset and BaseConcatDataset objects.
I'm not sure I get your point about np.allclose though. Can't we expect the numpy arrays to be exactly the same in this case here?

In general, I think it almost always bad practice to compare any floating points numbers or arrays via ==, e.g. see https://bitbashing.io/comparing-floats.html https://possiblywrong.wordpress.com/2013/11/15/floating-point-equality-its-worse-than-you-think/ https://floating-point-gui.de/errors/comparison/
So better do a suitable check for closeness of floating point numbers.

@robintibor this last commit fixes the tests if you want to take a look!

Great thanks! merged @hubertjb


preserve \n

in the streaming output, all the \n was filtered. how can i preserve it

in this case, If there are more than two ‘\n’ in the chunks data, like this:  'data: event\n\n\n\n', the output should be: data: 'event\n\n'

i found the 2nd '\n' was passed
pls help

Hi! This is actually in line with the EventSource specification, and also how browsers interpret this.
To preserve newlines, you have to break them into separate data:  chunks. In your example, data: event\n\n\n\n needs to be encoded as the following:
data: event
data:
data:

As a javascript string, that would be:
"data: event\ndata: \ndata: \n\n"

Note that the last two newlines is to complete the message - the empty data lines are to indicate newlines.
Here's a function that encodes strings like this:
function encodeTextData(text) {
  const data = `${text}`.replace(/(\r\n|\r|\n)/g, '\n')
  const lines = data.split(/\n/)
  let line

  let output = ''
  for (let i = 0, l = lines.length; i < l; ++i) {
    line = lines[i]

    output += 'data: ' + line
    output += i + 1 === l ? '\n\n' : '\n'
  }

  return output
}

console.log(encodeTextData('event\n\n')) // "data: event\ndata: \ndata: \n\n"

ok, thank you very much!


Skill added from zipped manifest files causes manifest URL to be broken in Composer

Describe the bug
I've added a skill by using a zipped manifest. When I try to view the Manifest URL link in Composer for the skill, Composer opens a link in my browser that fails to resolve.
Version
Version:  2.1.0
Electron: 8.2.4
Chrome: 80.0.3987.165
NodeJS: 12.13.0
V8: 8.0.426.27-electron.0
Browser

[x] Electron distribution
[ ] Chrome
[ ] Safari
[ ] Firefox
[ ] Edge

OS

[ ] macOS
[x] Windows
[ ] Ubuntu

To Reproduce
Steps to reproduce the behavior:

Follow initial instructions for importing a skill from a zipped manifest.

Create an empty bot and provision it.
Add a skill from a zip file.
The skill is added to the project.

Select the remote skill.
In the properties pane, see that the Manifest URL, Endpoints, and Activities properties all have what look like reasonable values.
Select the skill's manifest URL.
Error: Composer opens a browser tab for the bot that just just has a loading status that never completes.

If I work backward from the endpoint URL and construct what the remote skill manifest URL should be, that works correctly.

Expected behavior
Either:

Show the local manifest file, locally in Composer, without opening the browser, or
Attempt to construct the remote manifest URL from the local manifest file, and open that, if it exists.

The first option is probably the best, since the skill developer may not have exposed a remote skill manifest.
Screenshots
The link in Composer that takes me...nowhere?

Where the link in Composer takes me:

The actual remote manifest:

Additional context
Having a hyperlink that goes nowhere is not a good feature.

@vivekkshankar , Do you have suggestion on this?


Misleading documentation

Support guidelines

[X] I've read the support guidelines

Description
The example configuration.yaml  is a bit misleading. It mentions:
provider: mijnafvalwijzer       # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, afvalstoffendienstkalender or rova

It would be clearer if it would refer to the list of collectors (that is shown when clicking on the custom component in HACS) as possible values. Suppose you live in Almere, then the configuration should contain:
provider: almere

BTW: it is also confusing to use two terms for the same thing (provider and collector).
Expected behaviour
The component uses the right endpoint to get the data.
Actual behaviour
I thought I needed to select one of the mentioned three options, so I took mijnafvalwijzer and then for my postal code I got no data back, making the sensor return an error, resulting in no card being shown.
Version

HASS version: 2024.1.0
Component version: 2023.12.02
Useful system info:

HASS logs
2024-01-04 10:52:22.033 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up afvalwijzer platform for sensor
Traceback (most recent call last):
File "/config/custom_components/afvalwijzer/collector/mijnafvalwijzer.py", line 41, in get_waste_data_raw
if not response["ophaaldagen"]:
~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'ophaaldagen'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/afvalwijzer/sensor.py", line 65, in async_setup_platform
collector = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/afvalwijzer/collector/main_collector.py", line 40, in __init__
waste_data_raw = mijnafvalwijzer.get_waste_data_raw(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/afvalwijzer/collector/mijnafvalwijzer.py", line 45, in get_waste_data_raw
raise KeyError(f"Invalid and/or no data received from {url}") from err
KeyError: 'Invalid and/or no data received from https://api.mijnafvalwijzer.nl/webservices/appsinput/?apikey=5ef443e778f41c4f75c69459eea6e6ae0c2d92de729aa0fc61653815fbd6a8ca&method=postcodecheck&postcode=XXXXXX&street=&huisnummer=XX&toevoeging=&app_name=afvalwijzer&platform=web&afvaldata=2024-01-04&langs=nl&'

Note: address above is anonymized

Valid point. I`ll update it in the upcoming weeks to make it more clear.
You could also create a PR if you like to.


Uncaught TypeError: Cannot read property 'viewRangeLength' of undefined

When opening a timeline-chart from the theia-trace-extension I get the following error:
Uncaught TypeError: Cannot read property 'viewRangeLength' of undefined
node_modules/timeline-chart/src/layer/time-graph-chart.ts:185
<anonymous> @ /home/user/git/theia-training/theia-trace-extension/node_modules/timeline-chart/src/layer/time-graph-chart.ts:185:48
step @ localhost:3000/44.bundle.js:148540:23
  async function

Fixed by theia-ide/timeline-chart#107


[numpy] ndarray.reshape accepts a shape as *args

Based on numpy-0622's build
The following codes work in numpy while not mxnet.np
a = np.zeros((2, 3))
a.reshape(3, 2)

@mxnet-label-bot add [numpy]

This feature is documented in https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.reshape.html

Fixed by this PR: https://github.com/apache/incubator-mxnet/pull/15332/files#diff-2867f3bd5e893c32c128044e32d821d6R576

Fixed in https://github.com/apache/incubator-mxnet/pull/15332.


TypeError: Cannot use 'in' operator to search for 'level' in undefined

https://github.com/923132714/ScreepsScript/issues/17

Fixed: https://github.com/LokiSharp/ScreepsScript/commit/9a8ca2a00cf51560187d5bba298801b1784f7d14


Correction to be able to retrieve ctk locations via berry::Platform

Two bugs in berry::InternalPlatform:

confusion between service variables installLocation and instanceLocation,
locations are not closed correctly that gives a segfault when the application closes.

Important: to have the functionality, there is also a correction in ctk to apply (cf. https://github.com/commontk/CTK/pull/719). The second bug can be seen only after applying the ctk correction, without it InternalPlatform cannot find locations at all (all pointers are null).

Looks good to me. A MITK maintainer needs to merge this.

Thank you! 👍


Collection project badge added to owner's obs when it should be

Create a new collection project.
Add one or two user requirements (for accounts which are not yours)
Check "Project members only"
Save project
There will be 0 observations in the project
Check your observations - they'll all have a badge for this project even though they're not included in the project

FWIW, this might be a react issue, but I'm guessing it's an API issue instead. Needs investigation.

I believe this is fixed now. It was an issue with logic in the API


zoom in/out  issue

I am controlling the zoom like below ,
<ChartCanvas
xExtents={[xAccessor(leftmost bar i want to see), xAccessor(right most bar )]}
...

and its setting the zoom level as expected  but when I try to zoom in/out or reset nothing works . Its behaviour is kind of static . Could you please help me to solve this issue .
Thank you,

could you try to
componentWill/DidMount or some other method() {
  this.setState({
    xExtents: [xAccessor(leftmost bar i want to see), xAccessor(right most bar )]
  })
}
render() {
  return (
    <ChartCanvase xExtents={this.state.xExtents} ...
  )
}

by doing xExtents={[a, b]} xExtents is a new array every time the render function is called.

Yeah  will try that , Thank you

Yeah it works , thank you .


Support % based rootMargin

I would like to use ember-in-viewport in only the horizontal direction.
The product use case here is a VERY large data table with 2000+ rows of 40+ columns, whose column headers have in-viewport checks on them that control if we should render a column's cells.
When the column headers are scrolled off-screen vertically, I don't want to cull the cells.  I only want the intersection checking in the horizontal/X direction.
This is possible with IntersectionObservers, by specifying a rootMargin in % values.
This line here: https://github.com/DockYard/ember-in-viewport/blob/58c3f97bcfdac85d862f21730b184c9755355901/addon/services/in-viewport.js#L183
Forces us to use pixel values.  If we pass % based values, we get errors like:

I suggest we either:

Remove the string concatenation and force the developer to specify px/% when passing a viewportTolerance to more closely align with the IntersectionObserver API.  ( would require major version bump )

or -

Add some code that looks for a % in the value, if so, it uses the value unmodified.

or -

Something more clever?

Happy to do the work, but I would like some consensus first.

Something simple like this works for me: https://github.com/teamanvyl/ember-in-viewport/commit/eb636c9352d130748241feed6f8d06ee47ad2dea


ESLint doesn't work with flat config

Describe the bug
ESLint introduced a new configuration format eslint.config.js (flat config). With the new format, an error is thrown when starting the application:
node:internal/event_target:1012
  process.nextTick(() => { throw err; });
                           ^
Error: No ESLint configuration found in \src\stories\_utils\docs.
    at CascadingConfigArrayFactory._finalizeConfigArray (\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:3977:19)
    at CascadingConfigArrayFactory.getConfigArrayForFile (\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:3768:21)
    at FileEnumerator._iterateFilesRecursive (\node_modules\eslint\lib\cli-engine\file-enumerator.js:473:52)
    at _iterateFilesRecursive.next (<anonymous>)
    at FileEnumerator._iterateFilesRecursive (\node_modules\eslint\lib\cli-engine\file-enumerator.js:495:33)
    at _iterateFilesRecursive.next (<anonymous>)
    at FileEnumerator._iterateFilesRecursive (\node_modules\eslint\lib\cli-engine\file-enumerator.js:495:33)
    at _iterateFilesRecursive.next (<anonymous>)
    at FileEnumerator._iterateFilesRecursive (\node_modules\eslint\lib\cli-engine\file-enumerator.js:495:33)
    at _iterateFilesRecursive.next (<anonymous>)
Emitted 'error' event on Worker instance at:
    at [kOnErrorMessage] (node:internal/worker:300:10)
    at [kOnMessage] (node:internal/worker:311:37)
    at MessagePort.<anonymous> (node:internal/worker:212:57)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:737:20)
    at exports.emitMessage (node:internal/per_context/messageport:23:28)
    at [kOnExit] (node:internal/worker:278:5)
    at Worker.<computed>.onexit (node:internal/worker:209:20) {
  messageTemplate: 'no-config-found',
  messageData: {
    directoryPath: 'src\\stories\\_utils\\docs'
  }

Running ESLint directly via CLI works with the new config. The checker plugin worked properly before migrating to the new ESLint config.
Expected behavior
ESLint should run without an error and the eslint.config.js file should be used.
The ESLint class used by this plugin doesn't support the new flat config. For the flat config the FlatESLint class must be used which is only exported via eslint/use-at-your-own-risk entrypoint: https://eslint.org/blog/2022/08/new-config-system-part-3/#using-flat-config-with-the-eslint-class

Sorry that I missed your issue because I have too many emails. 🙏
It will be nice to support the flat config! But I think it is kind of hard to determine which class to use. I think maybe a pre-scan will be nice. What do you think? @TiroZit

Sorry that I missed your issue because I have too many emails. 🙏
It will be nice to support the flat config! But I think it is kind of hard to determine which class to use. I think maybe a pre-scan will be nice. What do you think? @TiroZit

I honestly don't know the best way to implement this, but pre scan sounds nice. @ModyQyW

Hi @TiroZit .
After reading related blogs and docs(like https://eslint.org/blog/2022/08/new-config-system-part-3/#using-flat-config-with-the-eslint-class, https://eslint.org/blog/2023/10/flat-config-rollout-plans/#main, https://eslint.org/docs/latest/use/configure/configuration-files-new), I find it much more complex than I think.
I simply fine-tuned the plugin implementation to reduce complexity and avoid more black boxes to support the flat config system. Hope you can enjoy.
In<EMAIL_ADDRESS>and eslint@8 (which supports the flat config system, and the higher the better), set eslintPath to 'eslint/use-at-your-own-risk' and place an eslint.config.js file in the root of your project, then everything should work.
Tell me if something is wrong. Thanks.

Hi @TiroZit .
After reading related blogs and docs(like https://eslint.org/blog/2022/08/new-config-system-part-3/#using-flat-config-with-the-eslint-class, https://eslint.org/blog/2023/10/flat-config-rollout-plans/#main, https://eslint.org/docs/latest/use/configure/configuration-files-new), I find it much more complex than I think.
I simply fine-tuned the plugin implementation to reduce complexity and avoid more black boxes to support the flat config system. Hope you can enjoy.
In<EMAIL_ADDRESS>and eslint@8 (which supports the flat config system, and the higher the better), set eslintPath to 'eslint/use-at-your-own-risk' and place an eslint.config.js file in the root of your project, then everything should work.
Tell me if something is wrong. Thanks.

Hi @ModyQyW .
The solution is working, thank you for the prompt fix. However, I've discovered a bug. When ESLint identifies an error and you correct it, then save the file, the error in the development environment doesn't disappear. This happens despite the fact that the error has been resolved and no longer exists in the code.
I'm using eslint config by Antfu

Are you facing this problem? I am kind of not sure. Try to enable lintOnStart option if you are facing this problem.

Please open another issue and provide a repo if you are not facing this problem. Thanks! 🙏

Hi @TiroZit . Please let me know if it helps. Thanks.

Are you facing this problem? I am kind of not sure. Try to enable lintOnStart option if you are facing this problem.

Please open another issue and provide a repo if you are not facing this problem. Thanks! 🙏

I am closing this issue since there are no responses. Feel free to open a new one. Thank you.


Add configuration to allow automatic closing of terminal after task has run

Rather than displaying "Terminal will be reused by tasks, press any key to close it.", it would be great if we could configure to auto-close and go back to the command line in the terminal. Thanks.

That message is generated by VSCode, not the extension. The extension doesn't actually open the terminal window - that's controlled by your task definition.
See https://code.visualstudio.com/Docs/editor/tasks#_output-behavior

That message is generated by VSCode, not the extension. The extension doesn't actually open the terminal window - that's controlled by your task definition.
See https://code.visualstudio.com/Docs/editor/tasks#_output-behavior


Loop problems

Loop examples included in the README:
Tommy was a dancer
While Tommy ain't nothing
Shout it
Knock it down
And around we go

and
Modulus takes Number and Divisor
While Number is higher than Divisor
Take Divisor from Number
Give back Number

Couple of problems:

Around we go appears to be the "multi-line loop" statement, but that's not documented.
There's no indication about whether a while loop is multi-line or one block. So, the first example above just has two blocks, as the And around we go is one block with Knock it down but Shout it is also another block. OTOH the second example has no Around we go but seems to just implicitly treat the Take Divisor from Number as a single-block while loop?

Thoughts?

Give back Number seems to be the end of the function definition. This is great to force developers to return something. Some bugs come from ifs without else, so this would make those bugs very rare.
I guess Around we go is the end of a block like }, end or similar. This would mean that loops are block statements. This is great for the compatibility with python. I think it could be possible to write a performance-focussed tokeniser and lexer that uses python's AST module for fast interpreted rockstar execution.

There seems to be a lot of confusion around how blocks work, and different types of code blocks seem to have completely different syntaxes.

For functions:

A blank line denotes the end of a function body.
Functions in Rockstar always have a return value, indicated by the Give back keyword.

For loops, the docs don't say explicitly but around we go and end appear to end a block. However, the Modulus/Midnight function in the example doesn't have either, so I guess the give back/end of function terminate the loop?

Conditionals appear to require And before subsequent statements to keep them in the block. This isn't documented, but the TODO section says:

I'm not sold on the idea of continuation prefixes for block syntax - for starters it won't let you implement nested blocks.

From what I can tell it now looks like \n\n ends blocks and functions, and Around we go has been removed, so dies this resolve this issue?

I would agree. +1 to closing this.

Agreed


VisitsByDayOfWeek Component

Display number of visits occurred on each day of the week for a given time
Method signature includes:

visits: the ahoy visit data
time_window: the time window to count the visits over (i.e. 4 weeks would then report on the total visits by day of week for the past 4 weeks)
exclude_days: a list of days that are to be excluded for the report / calculation (i.e. skip ["Saturday","Sunday"])

Great component @JesseLuBass! One easy thing we'll want to refactor is the variable naming. The Ruby on Rails world loves snake case (i.e. visits_by_day_of_week vs visitsByDayOfWeek)
Otherwise only had one other comment regarding leveraging the DB. Good stuff!


no autocomplete suggestion

when i enable the ternjs,the snippets disappeared

Could you please be a bit more specific?

Which snippets?
Does autocomplete does not work at all?
What packages are installed and which snippets are not displayed?

I also have this problem. Autocomplete seems to work fine if the file is in the projects root directory, but no where else.

me too, and i find some errors in console

they were outputing when i was inputing.
When i disabled ternjs, snippets appears again

Same issue here.
Windows 10 10576.240
Atom 1.8.0-beta3
<EMAIL_ADDRESS>

I'm having the same issue, with Atom 1.7.3, atom-ternjs 0.14.1, and Windows 10 10586.318.
Also, it happens only in subdirectories. Given the same file, if it's at the root of the project, then completion works, without errors in the console, but if it's in any subdirectories, it doesn't work anymore and I have the same errors as @Icemic.

Same issue as above.
atom-ternjs : does not work on js files in sub-directory of the project.
Workaround : add your js folders as projects then configure each folder. MUST KEEP THEM LOADED.
atom v : 1.7.3
atom-ternjs : 0.14.1

same issue here,
Atom 1.7.3
Windows 10
atom-ternjs 0.14.1
snippets, js autocomplete is gone too.
autocomplete & snippets in html works fine.
if i disable atom-ternjs, everything works again.

I also meet this question.Hope it will fix soon

Same issue here.
Atom 1.7.0
<EMAIL_ADDRESS>

same here :(
atom 1.7.2
<EMAIL_ADDRESS>

Same here atom + windows 10. Linux works great.

it perhaps me find this issue,but now I realize that i am stupid, please get into the atom-ternjs setting and select the
"Use autocomplete-snippets" then restart the atom ,and aslo "they appeared" .... vv ,^^
----- 原始邮件 -----
发件人：Egor Voziyanov<EMAIL_ADDRESS>收件人：tststs/atom-ternjs<EMAIL_ADDRESS>抄送人：cuitl<EMAIL_ADDRESS> Author<EMAIL_ADDRESS>主题：Re: [tststs/atom-ternjs] no autocomplete suggestion  (#230)
日期：2016年05月26日 21点02分
Same here atom + windows 10. Linux works great.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@cuitl nope, still not working for me, as #233 wrote.
it doesnt work other than root path, since tern config file is there.

I know this isn't by any means a permanent solution, but downgrading fixed this for me.
apm rm atom-ternjs
apm install<EMAIL_ADDRESS>
Don't forget to restart Atom.

yeah, downgrade atom-ternjs fixed it.

Any update on the fix for this? Although downgrading solved the issue temporarily it'd be nice to take advantage of the features in 0.14 +

0.14.2 should fix the issue.
Everything is working as expected on my Windows 10 via virtual box.
The error may still occur the first time autocompletion is triggered in each file.
This is due to the file isn't registered at first call to the server - haven't had time to fix this issue yet.
In most cases just save the file and trigger autocomplete again.
There is no guarantee 0.14.2 fixes the issue so please report if the issue still occurs.

@tststs It fixed the issue for me right away.
Atom 1.9.0-beta0, Windows 10 (Version 10.0.10586 Build 10586)
Thanks.