templates: update role funcs

This PR creates these functions: mentionRole, hasRole, targetHasRole, giveRole, addRole, takeRole, removeRole.
To maintain back comp, all the "original" functions call these new functions.
I find it odd that we have to use hasRoleName and hasRoleID for example. Why not a hasRole function?
This is the case for every role function.
Also, it was not possible to use the role functions with role mentions. So the new FindRole function takes all types of role input: Mentions, IDs and Names.
To find the role by name, I used strings.EqualFold. I don't know if I should maintain it or make it case sensitive. What do you think?
This PR also already adds #757 and #752. So, the function getRole is implemented amongst optional delay support for addrole/giverole templates similar to removerole/takerole templates.
The difference between this PR, #752 and the current implementation is that it takes multiple duration arguments and not only numbers. I also made this change to the already existing functions with an optional delay.
This should be back compatible because of the way the new func validateDurationDelay parses the duration.
Lastly, I moved all the role functions to the end of the file just for consistency/organization.

@phenpessoa  I have fixed the conflicts on this, whenever you have some time a review would be great!


Invalid asset codes do not round trip from JSON<>XDR

What version are you using?
3a001b1fbb20e4cfa2cef2c0cc450564e8528057
What did you do and what did you see?
Encode an invalid asset code that has more than four characters, where the additional characters beyond the fourth are zero:
$ echo -n '"ABCD\\\\x00"' | stellar-xdr e --type AssetCode
AAAAAkFCQ0QAAAAAAAAAAA==

$ echo -n 'AAAAAkFCQ0QAAAAAAAAAAA==' | stellar-xdr d --type AssetCode --output json
"ABCD"

$ echo -n '"ABCD"' | stellar-xdr e --type AssetCode
AAAAAUFCQ0Q=

What did you expect to see?
That the invalid asset code be preserved:
$ echo -n '"ABCD\\\\x00"' | stellar-xdr e --type AssetCode
AAAAAkFCQ0QAAAAAAAAAAA==

$ echo -n 'AAAAAkFCQ0QAAAAAAAAAAA==' | stellar-xdr d --type AssetCode --output json
"ABCD\\\\x00"

Alternatively, at least an error occur.

Fix is in:

https://github.com/stellar/rs-stellar-xdr/pull/358


Custom Template

How can a new template can be created and be accessible by orats?
$orats templates

   templates  Add `-t TEMPLATE` to the new command to use a template

        base  dockerized production ready application

You would add a template of your choosing to the "templates" directory in here:
https://github.com/nickjj/orats/tree/master/lib/orats/templates
Then you would call it with -t footemplate when you generate a new project.
Right now there's only 1, but internally it can support any number of templates.


Have successfully updated the intro text.

Checklist:

[x] I have read and followed the contribution guidelines.
[ ] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #56856

I have updated the intro text as desired.

Hey
Thank you for opening this pull request.
As there is different PR - #56904 - making all necessary changes for the linked issue, we are going to close this one.
Thank you and happy coding! 😊

If you have any questions, feel free to ask questions on the 'Contributors' category on our forum or the contributors chat room.


steering committee: add tencent as part of envoyproxy gateway members

Hi community:
From the very early stage of EG project, I started to participate and contribute to it. And I am one of maintainers of EG teams now. I am willing to contribute to EG for a long run. Meanwhile, I am working at @Tencent in China. I am applying Tencent to be one of members of Steering Committee : ) It would be great honor to be one of members of Steering Committee.
I list some infos about Tencent below:
Tencent is a world-leading internet and technology company that develops innovative products and services to improve the quality of life of people around the world.
Founded in 1998 with its headquarters in Shenzhen, China, Tencent's guiding principle is to use technology for good. Our communication and social services connect more than one billion people around the world, helping them to keep in touch with friends and family, access transportation, pay for daily necessities, and even be entertained.
Tencent also publishes some of the world's most popular video games and other high-quality digital content, enriching interactive entertainment experiences for people around the globe.
Tencent also offers a range of services such as cloud computing, advertising, FinTech, and other enterprise services to support our clients' digital transformation and business growth.
Tencent embraces Open Source and actively particapates into communities, and also builds many popular OSS projects. GitHub org is @Tencent.
Signed-off-by: bitliu<EMAIL_ADDRESS>

cc @mattklein123

Codecov Report

Merging #735 (4c1b789) into main (cede77e) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #735      +/-   ##
==========================================
- Coverage   63.89%   63.86%   -0.04%
==========================================
  Files          47       47
  Lines        5927     5927
==========================================
- Hits         3787     3785       -2
- Misses       1905     1907       +2
  Partials      235      235

Impacted Files
Coverage Δ

internal/provider/kubernetes/tlsroute.go
56.38% <0.00%> (-9.70%)
:arrow_down:

internal/provider/kubernetes/helpers.go
73.91% <0.00%> (-6.53%)
:arrow_down:

internal/provider/kubernetes/gatewayclass.go
75.36% <0.00%> (+2.17%)
:arrow_up:

internal/provider/kubernetes/httproute.go
67.48% <0.00%> (+8.23%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

LGTM. If the existing maintainers can also approve that would be great.

I am in favor of this change
looking at the existing language around any steering committee changes https://github.com/envoyproxy/gateway/blob/main/GOVERNANCE.md#steering-committee, any changes to the steering committee would require a review from existing steering committee members
@mattklein123 has already reviewed and approved
@zinuga @richarddli @skasisom6 @pydctw can you ptal ?

lgtm from me.

I think there are several separate components to this change, and I believe there is merit to discussing them independently.

The governance doc specifies a 5 member steering committee. So this is a proposal to expand the steering committee from 5 to 6, with different end dates for members. We discussed how we wanted to avoid multiple different start dates for the SC.
I also note that @pydctw seems to have a different start date than the original SC members, which implies a different term. As specified in the governance, the seat (and thus the term) belongs to an org, so if she is representing VMware, I believe her seat should still start at the same time as the others.
Finally, the last issue, which I don't think is contentious, is adding Tencent as an SC member. I'm fine with that, assuming we can get clarity and alignment on 1 and 2.

Hi @richarddli, thanks for the comments.
According to contents in GOVERNANCE.md:

During initial project bootstrap we will also explicitly reevaluate steering membership after each release; alpha; beta; GA. The existing steering committee will decide on any changes to the steering committee based on what is best for the project and community.

I think new members can be considered to be accepted. So yes, this PR also means expanding members to 6.
I think maybe we can focus on the ending time of one period (one year) of steering committees. We can have a different start time. But all members need to be reconsidered after one period ends. So we do not need to worry the differences of start time.

I also note that @pydctw seems to have a different start date than the original SC members, which implies a different term. As specified in the governance, the seat (and thus the term) belongs to an org, so if she is representing VMware, I believe her seat should still start at the same time as the others.

cc @danehans (ref. https://github.com/envoyproxy/gateway/pull/720#pullrequestreview-1176264698)

FYI, I'll circle with the SC members and get consensus on how to proceed!

Great. Thanks for taking the lead on this issue @richarddli.

@richarddli any updates to resolve this issue?

Apologies for the delay! There is consensus from the SC on the following:

Co-terminating everyone to 5/16/2023. So we should change the start dates in the doc to the end dates, so everyone has the same end dates.
Add Tencent, per the above, with an end date of 5/16/2023
Update VMware to 5/16/2023 as well

@richarddli thanks for the update.
@Xunzhuo can you update this PR to resolve all of the feedback from https://github.com/envoyproxy/gateway/pull/735#issuecomment-1353580035?

Sure! Thanks.


I2C clock stretching support

I use some STM32 micro controllers as slave and I need the I2C clock stretching functionality.
Is it possible to have it supported by this library with a FT232H?

I do not think it will work with the MPSSE.  It might be possible if you bitbang with the pins setup as ordinary GPIOs, unfortunately this will result in a low clock speed since the GPIO interface is not aa fast.
Do you know of other FTDI libraries that support this?

Apparently it is not supported directly, but pyftdi did it:
https://github.com/eblot/pyftdi/blob/b366832c5371b3b8849c3247d23116240c1b203f/pyftdi/doc/api/i2c.rst#clock-streching
Do you think we could implement something like this?


refactor: move scripts to root and use pnpm

This PR moves the script packages into the repo root and uses pnpm. In a later PR, we can consolidate some of these, like chat and chat-emails and, of course, anything else that is broken.
In theory, nothing should have because they were never interdependent.

Agreed. I will update this in the morning.

Given that it takes all of 3 seconds to install everything, I'd just go with workspaces. It seems simpler to me.

install 100s of unrelated root npm packages just because I wanted to run a single script with 2 root deps.

Even that shouldn't be a problem if https://github.com/pnpm/pnpm/issues/6300 is fixed.

Merging because I want to add a few scripts I have lying around.


Meldium import (and possibly generic CSV)

I am a former user of Meldium , which was acquired by LastPass, and closed its doors a few days ago.
I exported my data in the Meldium CSV format that appears to be different than LastPass format.
I would like to contribute this new importer feature, but I am not sure how to implement it, as I first intended to copy and modify the LastPass import PR, but the import format is extrapolated from the file extension, which does not make a lot of sense, since CSV format is not proprietary to LastPass.
Should I send a broader PR that also modifies importer's API to be more flexible in order to support current importers but not based on file extension?
Edit: the importer API I am talking about is in the main buttercup repo, but since it is an importer topic, I thought I'd better open an issue in this one

Hi @pandaiolo - Apologies for the long delay, I was on holidays.

I exported my data in the Meldium CSV format that appears to be different than LastPass format.

Yes, I imagine that there will be many different export formats across all password managers. CSV is definitely going to be a common export format.

the import format is extrapolated from the file extension

This isn't true for this library like you said, as the index file just exports the functions to handle each type of file. Unfortunately there is an issue in the desktop app that needs amending. I'll lodge an issue there.

I'll leave this issue as a placeholder, but the issue is not with this project.

Thinking that this could now be a separate importer altogether.


RTL Support

Hi, the package looks and works great! By any chance, it have right to left support?

@hussainhabib2  Thank you. Can you describe the effect you want?
What does it look like when going from right to left?


WIP: Update 1.8.0-rc2

Don't know why Drone does not find docker daemon. Have started a small build job on Jenkins https://jenkins.hypriot.com/job/arm-compose/1/console

closing in favor of #9


Fix broken layout in newer Kanboard versions

All credits go to @pittss that posted the solution here: https://github.com/greyaz/ThemeRevision/issues/23#issuecomment-1689608237
Fix bug #23

Thanks, it works!


Add support for Ember FastBoot

Ember FastBoot is still super beta, but wanted to get the conversation started about what it might take to add FastBoot support to this buildpack. Has anyone played around with FastBoot on Heroku? Beanstalk seems like the go-to deploy method right now.
Figured it's worth a convo after this (promising) update from the Ember 2.3 blog post:

Importantly, the addition of this API means FastBoot is now usable with Ember.js 2.3 stable. FastBoot itself remains experimental, however this is the first time you can use it with a release build of Ember.js. The README.md for ember-cli-fastboot is the best place to start if you want to try FastBoot.

Sounds like a good idea to me. Anyone want to investigate?

I likely won't get a chance for another few months - but if no-one's on it by then I'll definitely post progress.

Any update? Would love to see this happen!

@nahtnam fwiw there is another buildpack that provides this functionality out of the box here

Has anyone taken a stab at this? I'm having issues with the official heroku buildpack and would love to give this one a try, but I need Fastboot.

@tonycoco @wcurtis have either of you guys dug into this at all? Would really love to see this happen! I would be glad to attempt to help out, but don't know much about buildpacks.

+1


Different auto-compaction configs based on the age of the data segments

Description
It would be good  to have several auto compaction tasks for one datasource based on segment age.
Motivation
If for example I want to have  Hour granularity for last 30 days, Day granularity and less dimensions for 30-365 days, Year granularity and only several dimensions left for 365+ days. As usually for older data we only need to have some general overview and not detailed reports.

Sounds like a useful feature!
cc @paul-rogers for fyi: we can consider this when autocompaction is integrated into the catalog (#12546).

Not sure if this is what others had in mind, but supporting this workflow could be helpful:

operator defines zero or more compaction configs per data source (like retention rules)
(per existing behavior) coordinator lists segments for compaction
compaction tasks for an interval are created using the matching compaction config (if they haven't already been compacted with that compaction spec)

Other notes

it would help to also support a no-op compaction config so the operator can effectively exclude intervals

The assumption is that this could work with the existing mechanisms to mark the segments as "already compacted" so they can be skipped subsequently


Delete META-INF folder after remote cache pull

Fixes #5629

https://github.com/sbt/sbt/pull/5961 🤔


Double-click a tab to rename it

Summary of the Pull Request
When the user double clicks on a tab, show the tab rename box
as if they right clicked on the tab and clicked on "Rename".

References

PR Checklist

[x] Closes #6600
[x] CLA signed. If not, go over here and sign the CLA
[ ] Tests added/passed
[ ] Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
[ ] Schema updated.
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments
I added a handler for the DoubleTapped event on the tab view item
when we are constructing it for the tab (in Tab::_MakeTabViewItem).
The code for that handler was copied the "rename tab menu item" click
handler.
I did not extract the code into a member function because it is very
short (only 2 lines of code) and only used twice so it is not worth
it IMO.

Validation Steps Performed

@msftbot wait 1 minute before merge

Is there a way of disabling this?

No. Why?

Because setting accidentally would prevent someone from having the label from changing when doing cd

but why is somebody double-clicking a very specific part of the UI while typing cd? cancelling with Esc cancels the update

Either right-click change name (instead of clicking change color) or double clicking will trigger.  However, clicking outside to cancel the change (not pressing Esc because it wasn't obvious) will also lock the tab name.

Yes, but because it requires use action on the mouse or for them to switch input modality, it's not likely to trigger in the middle of typing a command. If it is for some reason triggering while the user's typing something else, that's a different problem that we need to address.


Link mapping with a dynamic subject fails

What Happens?
Link mapping with a dynamic subject fails with the following error: KeyError: 'subject'
To Reproduce
prefixes:
  kb-ingredientname: http://idea.rpi.edu/heals/kb/ingredientname/
  owl: http://www.w3.org/2002/07/owl#
  usda: http://idea.rpi.edu/heals/kb/usda#
  nutriment: http://idea.rpi.edu/heals/kb/nutriment/
  ex: http://example.com/
  grel: http://users.ugent.be/~bjdmeest/function/grel.ttl#
  idlab-fn: https://w3id.org/imec/idlab/function#
  morph-kgc: https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#
  rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#

sources:
  nutr_def_source:
    access: knowledge/usda-nutrition/NUTR_DEF.csv
    referenceFormulation: csv
  nutr_data_source:
    access: knowledge/usda-nutrition/NUT_DATA.csv
    referenceFormulation: csv

mappings:
  nutriment_amount:
    sources:
      - nutr_data_source
    s:
      - function: morph-kgc:uuid
    po:
      - p: rdf:type
        o:
          mapping: nutriment
          condition:
            function: equal
            parameters:
              - [str1, $(Nutr_No), s]
              - [str2, $(Nutr_No), o]

  nutriment:
    sources:
      - nutr_def_source
    s: usda:$(Nutr_No)
    po:
      - p: rdf:type
        o: nutriment:$(NutrDesc)

Environment (please complete the following information):

OS: Ubuntu 22.04 LTS
Python version: 3.10
Morph-KGC version: 2.7.0

Hi @mabounassif ,
I need more information, could you please provide the entire stack trace?
Also, could you please try if the mapping without the nutrient_amount triples map works?

Absolutely,
Exception has occurred: KeyError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
'subject'
  File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 375, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/__init__.py", line 49, in materialize_set
    triples = set().union(*pool.starmap(_materialize_mapping_group_to_set,
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/__init__.py", line 65, in materialize
    triples = materialize_set(config, python_source)
  File "/app/knowledge/knowledge.py", line 23, in generate_rdf_graph
    assertions = morph_kgc.materialize(config_path)
  File "/app/knowledge/knowledge.py", line 86, in <module>
    generate_rdf_graph(sha=sha)
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main (Current frame)
    return _run_code(code, main_globals, None,
KeyError: 'subject'

Something like the following works without any issues:
prefixes:
  kb-ingredientname: http://idea.rpi.edu/heals/kb/ingredientname/
  owl: http://www.w3.org/2002/07/owl#
  usda: http://idea.rpi.edu/heals/kb/usda#
  nutriment: http://idea.rpi.edu/heals/kb/nutriment/
  ex: http://example.com/
  grel: http://users.ugent.be/~bjdmeest/function/grel.ttl#
  idlab-fn: https://w3id.org/imec/idlab/function#
  morph-kgc: https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#
  rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#

sources:
  nutr_def_source:
    access: knowledge/usda-nutrition/NUTR_DEF.csv
    referenceFormulation: csv
  nutr_data_source:
    access: knowledge/usda-nutrition/NUT_DATA.csv
    referenceFormulation: csv

mappings:
  nutriment_amount:
    sources:
      - nutr_data_source
    s:
      - usda:$(NDB_No)
    po:
      - p: rdf:type
        o:
          mapping: nutriment
          condition:
            function: equal
            parameters:
              - [str1, $(Nutr_No), s]
              - [str2, $(Nutr_No), o]

  nutriment:
    sources:
      - nutr_def_source
    s: usda:$(Nutr_No)
    po:
      - p: rdf:type
        o: nutriment:$(NutrDesc)

Also removing nutriment_amount works as well.

Thanks for looking into this @arenas-guerrero-julian, I have attached samples of the data I'm using
NUTR_DEF-10.csv
NUT_DATA-10.csv

Disabling multiprocessing leads to the following error stack:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
    return self._engine.get_loc(casted_key)
  File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'subject'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/app/knowledge/knowledge.py", line 86, in <module>
    generate_rdf_graph(sha=sha)
  File "/app/knowledge/knowledge.py", line 23, in generate_rdf_graph
    assertions = morph_kgc.materialize(config_path)
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/__init__.py", line 65, in materialize
    triples = materialize_set(config, python_source)
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/__init__.py", line 57, in materialize_set
    triples.update(_materialize_mapping_group_to_set(mapping_group, rml_df, fnml_df, config, python_source))
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/materializer.py", line 418, in _materialize_mapping_group_to_set
    data = _materialize_rml_rule(rml_rule, rml_df, fnml_df, config, python_source=python_source)
  File "/usr/local/lib/python3.10/site-packages/morph_kgc/materializer.py", line 395, in _materialize_rml_rule
    data['triple'] = data['subject'] + ' ' + data['predicate'] + ' ' + data['object']
  File "/usr/local/lib/python3.10/site-packages/pandas/core/frame.py", line 4102, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
    raise KeyError(key) from err
KeyError: 'subject'

Thanks for looking into this @mabounassif .
You are right, and we should have it not only for subjects, but also for predicates and objects.

@arenas-guerrero-julian , I created 2 PRs.
On master, the test case that captures this issue is passing (PR #256).
For version 2.7.0, it's not and requires code change. If you plan on backporting the fix to 2.7.0 let me know and I will change the target of the PR #255 to the branch that you'd create.

Thanks for the PR @mabounassif ,
My question is that the test case is passing without any changes to the code, am I right?
I will create v2.8.0 as soon as we are done with this issue 🙂

Hello @arenas-guerrero-julian,
the master branch was working without any code chanage. PR #256 was just adding a test case to master.
I made another PR that branched out off the 2.7.0 tag PR #255 which wasn't supposed to be merged into master.
So I think right now there's redundancy in master and this is no longer needed: https://github.com/morph-kgc/morph-kgc/blob/main/src/morph_kgc/materializer.py#L302.
You can safely remove this line and luckily the tests all pass!

This makes sense because I refactored materializer.py after v2.7.0. I just published v2.8.0 🙂.


RuntimeWarning: coroutine 'LightRAG.ainsert' was never awaited   print(f"An error occurred: {e}")

运行lightrag_openai_compatible_demo.py报错

Please refer my PR #168 , I think you can run without error now.

Please refer my PR #168 , I think you can run the program smoothly without error now.

thank you，i get it


Update README

[x] Where do we store the datasets online - GDrive or can we use LSF ?
[x] Add instructions on how to download data / or add additional dependencies to render images

Data is saved in google drive
Updated readme


How to forward one client connection to another?

Hello!
I'm learning websocket-stream module not for a long time yet, so may be my question is a bit stupid - sorry for this.
I need to forward one client websocket connection with VNC stream (https://github.com/novnc/noVNC) to another client websocket connection on one websocket server. Now I'm doing such thing for JSON and Base64 encoded images "manually" - by resending messages with JSON and Base64 data between previosly binded with id's clients connections. But I need to do this for streams like VNC or webcams.
I need this to make possible to use webcam and VNC servers via simple 3G connection worldwide.
Could you please tell me - is it possible to convert one clients connection to stream and redirect it to another client connection with help of your module?
Best, Dan.

Hi Dan,
What you want to achieve is probably possible, but it is not simple to
achieve it in a scalable manner. How many connections are you planning to
support?
As for a technical pointer, if you are sending a stream of binary data,
converting them to JSON or base64 is probably slow.
Matteo
Il giorno dom 7 mag 2017 alle 12:19 danxn<EMAIL_ADDRESS>ha
scritto:

Hello!
I'm learning websocket-stream module not a long time yet, so may be my
question is a bit stupid - sorry for this.
I need to forward one client websocket connection with VNC stream (
https://github.com/novnc/noVNC) to another client websocket connection on
one websocket server. Now I'm doing such thing for JSON and Base64 encoded
images "manually" - by resending messages with JSON and Base64 data between
previosly binded with id's clients connections. But I need to do this for
streams like VNC or webcams.
I need this to make possible to use webcam and VNC servers via simple 3G
connection worldwide.
Could you please tell me - is it possible to convert one clients
connection to stream and redirect it to another client connection with help
of your module?
Best, Dan.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/maxogden/websocket-stream/issues/121, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AADL4_Duy9i4mTvGDYlPMtwUQPRC3jZAks5r3ZqogaJpZM4NTF2L
.

Hello, Matteo!
Understood, thank you very much for answer.
Well, for now I need this for few "tunnels": 1-4. I'm working on IoT/Embeddable network electronic systems for home/local area automation. It is very interesting possibility to use for this purpouse few webcams, connected to some kind of single-board mini-computer (RaspberryPI, OrangePI, BananaPI, NanoPI, Odroid, Cubieboard etc) - to use computer vision with help of this cameras and mini-PC's. And it is usefull to have stream access to this cameras via internet with very simple setup, like connecting this computers to internet via WiFi hotspot created with smartphone with 3G internet connection. But with stream data these are some problems. I can get photos with high enought frequency (1-0,3fps, ie 1 frame in 1-3 seconds), but it would be great to get videostream with help of this kind of connection like on YouTube. May be I should look in this direction. But I think it is possible to make "tunnel" for stream data between two users websocket connection. For JSON and Base64 this is not very difficult - I'm initialising binding between two users connection with special messages, by setting special binding id's to this connections objects and retranslating messages from one connection to another with help of this binding. So, I think it is possible for streams inside this connections, but I don't know how to do this yet.
Could you please tell me - how difficult to implement this? I think this is very usefull feature - no need difficult network setup for creating webcam application available via internet worldwide.
Best regards,
Dan

You can try http://npm.im/multiplex or http://npm.im/tentacoli.

Thank you very much.


Raise Python minimum to 3.7 for OIIO 3.0

### Tasks
- [ ] INSTALL.md -- document the change
- [ ] Any simplifications in python/*.{h,cpp}
- [ ] ci.yml -- eliminate test cases that use python 2.7 (or change them to use 3.x)
- [ ] Look through all our python scripts, simplify places where we have python2 specific things (such as still having `from __future__ import print_function`)

Was fixed by #4200


Fixed the name of the Mutagen equivalent for album artist.

There is no albumartist tag used by Mutagen.
Below is a list of tags used by Mutagen (source):
for frameid, key in iteritems({
	"TALB": "album",
	"TBPM": "bpm",
	"TCMP": "compilation",  # iTunes extension
	"TCOM": "composer",
	"TCOP": "copyright",
	"TENC": "encodedby",
	"TEXT": "lyricist",
	"TLEN": "length",
	"TMED": "media",
	"TMOO": "mood",
	"TIT2": "title",
	"TIT3": "version",
	"TPE1": "artist",
	"TPE2": "performer",
	"TPE3": "conductor",
	"TPE4": "arranger",
	"TPOS": "discnumber",
	"TPUB": "organization",
	"TRCK": "tracknumber",
	"TOLY": "author",
	"TSO2": "albumartistsort",  # iTunes extension
	"TSOA": "albumsort",
	"TSOC": "composersort",  # iTunes extension
	"TSOP": "artistsort",
	"TSOT": "titlesort",
	"TSRC": "isrc",
	"TSST": "discsubtitle",
	"TLAN": "language",
}):

FYI, Mutagen development was moved to Bitbucket. Also, you meant albumartist. And here's a relevent issue on Mutagen's tracker. Your change would break things right now, as albumartist is needed for other things created that use albumartist as a field name (e.g. most ripping software use it as a field name in FLAC tags). So something else would need to be done.

Yes, that's what I meant, I edited the first post.
Until that bug is fixed, I think it's fine to keep both "performer" and "albumartist" as equivalents for "album_artist". As soon as that bug is fixed, this can be reverted.

You really should just amend your previous commit instead of creating a new one and then force push to your repo. The pull request will update itself automatically, and it's much cleaner.

Now it should be ready to go.

I'm confused how this interacts with https://github.com/simon-weber/Unofficial-Google-Music-API/issues/246 -- I haven't touched the tagging code in a long time, but past Simon seemed pretty convinced in that change, haha.

The problem here is that it's both, depending on the tagging system. mutagen uses performer for ID3. But FLAC, for example, uses vorbis comments. While there is a performer field in the specification, vorbis comments are not highly structured and any field names can be used. albumartist is more commonly used by software and the like. These are just passed through in mutagen. There may be other fields necessary for other tagging systems of supported formats, to be honest.
Never really looked at the context of that linked commit before. If you check out the entire if/else structure of the current file, you'll see that ID3 tags are caught earlier and that performer is used there. albumartist is used in the else section as the generic catch-all for things like FLAC vorbis comments.

I found this pr when looking for a reason why my albumartist tags (mp3) didn't make it to google music. This issue is still valid? If I understand correctly, albumartist tagged with mutagen, or anything that uses mutagen for tagging (beets in my case) will not be transferred tot google music.

@derkens: Yes, it's still valid. mutagen has yet to provide a more consistent interface between all the media types, and a more robust solution is probably best to implement on gmusicapi's side until then.

@thebigmunch is this good to merge? I think you have a better understanding of what's going on here than I do.

I'll get a chance to look at it and test it tomorrow. Pretty sure there are other odd cases that need to be covered, but those can be dealt with another time if they prove to be common enough to matter.

Got the ok from @thebigmunch in irc. Thanks for the PR!


Rails 5 bootstrap-sass navbar mobile responsiveness not working

I am using Rails 5 with bootstrap-sass gem.
Why is it the responsiveness of the Navbar is not working.
Here is my app/assets/stylesheets/application.css.sccs
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *
 *
 */

@import "bootstrap-sprockets";
@import "bootstrap";

This is my html

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                Brand

Home

Profile

Messages

Any help ?

Having the same issue here, were you able to figure this one out?

I am having the same issue as well

You are coding with the documentation of Bootstrap 3, but your gem is Boostrap 4 Alpha version. Look at the new documentation: [http://v4-alpha.getbootstrap.com/components/navbar/].
A nice tutorial: [https://rubyplus.com/articles/3981-Integrating-Twitter-Bootstrap-4-with-Rails-5]
And the official gem link: [https://github.com/twbs/bootstrap-rubygem]

I am using Rails 5 en Bootstrpa, but has error in Sidebar....loook...nedd help.
Here is my app/assets/stylesheets/application.css.sccs
/*

This is a manifest file that'll be compiled into application.css, which will include all the files
listed below.

Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.

You're free to add application-wide styles to this file and they'll appear at the bottom of the
compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
files in this directory. Styles in this file should be added after the last require_* statement.
It is generally better to create a new file per style scope.

*= require bootstrap
*= require_tree .
*= require_self
My app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//= require bootstrap
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
//= require_tree .

My Gemfile
Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
gem "twitter-bootstrap-rails"
gem 'rails-assets-bootstrap', source: 'https://rails-assets.org'
Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
Use Puma as the app server
gem 'puma', '~> 3.0'
Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
Use jquery as the JavaScript library
gem 'jquery-rails'
Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
Use Redis adapter to run Action Cable in production
gem 'redis', '~> 3.0'
Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
Use Capistrano for deployment
gem 'capistrano-rails', group: :development

My HTML
This is my html

Toggle navigation

Brand

Home
Profile
Messages

_________________________
Result
![capturar](https://cloud.githubusercontent.com/assets/6577393/23308115/cec6dd4e-fa88-11e6-9563-496755bc0c8c.PNG)

First, you're not using the official gem for bootstrap, but a forked one: twitter-bootstrap-rails
There is a tutorial avaliable in: http://railscasts.com/episodes/328-twitter-bootstrap-basics
Follow the instruction and it will be nice!
Ps.: in 'application.css.scss' (the extension should be only .scss) you are importing the wrong way. The correct way if you still using twitter-bootstrap-rails gem:
@import "twitter/bootstrap/bootstrap";
If you change for the official one, only:
@import "bootstrap";
And delete all the following lines:
*= require bootstrap
*= require_tree .
*= require_self

Please check your application.html.erb file in the header section add this

Please check your application.html.erb file in the header section add this
  <meta charset="UTF-8">     <meta name=viewport content="width=device-width, initial-scale=1">

I added //= require bootstrap-sprockets like I saw at http://www.rubydoc.info/gems/bootstrap-sass/3.3.6#a-ruby-on-rails

@soumitcse que grande me solucionaste la vida :)


feature: Show duration of the videos in Show Content Sidebar

Is your feature request related to a problem? Please describe.
It would be great if we add video duration to the sidebar which helps to directly check the duration without opening the specific video.
Describe the solution you'd like
We can use existing params content.VideoMetadata.duration or content.videoProgress.VideoFullDuration to display the video duration
Additional context
Getting null for both the params. Please suggest something if we can get the video duration.

Can you assign this issue to me?

Can you assign this issue to me?

Working on it

Is anyone working on this issue

Is anyone working on this issue

Yes I'm on it

The issue can be resolved by converting the VideoMetaData.duration to the required format (x hr y min) and adding it to the sidebar.

The issue can be resolved by converting the VideoMetaData.duration to the required format (x hr y min) and adding it to the sidebar.

@devsargam Any suggestion on getting null values ??

by running the prisma migrations the VideoMetaData table has duration set to null. In the production db it would have the videos duration.
@devsargam guide me about this.

Got it, thank you. Will raise PR

Sorry I was not caught up but we don't have video duration on the prod db. Yeah we can do some hacks and get it but I don't think it's worth it to use something like ffmpeg and again populate duration in the db so closing as it seems out of scope


new: add performance in production guide

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind user-interface

/kind content

/kind translation

/kind event

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area blog

/area documentation

/area community

What this PR does / why we need it:
@LucaGuerra @leogr @nate-double-u this guide is useful and answers many questions we get from adopters. At the same time it goes beyond our primary graduation items, therefore please feel free to decide when the time is right to integrate this guide.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: incertum
Once this PR has been reviewed and has the lgtm label, please assign vjjmiras for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

content/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thank you @nate-double-u!

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: incertum, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content/OWNERS [leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 940e02cf581fd8af9eb9ba242fa1b2fea4c77a97


Roll up all the existing un-rebased spec fixes into one PR

So that we can get this through CI quicker.

Reviewed on slack


YAML schemas don't respect strict

When reading a schema via YAML, the strict flag does not work.
import pandas as pd
import pandera as pa
import numpy as np

df = pd.DataFrame([[1, 2, 3], [4, 5, 6], [7, 8, 9]], columns=['A', 'B', 'C'])
display(df)

schema_yaml = """
schema_type: dataframe
version: 0.4.2
columns:
  A:
    pandas_dtype: int64
    nullable: false
    checks: null
  B:
    pandas_dtype: int64
    nullable: false
    checks: null
index:
- pandas_dtype: int64
  nullable: false
  checks: null
coerce: false
"""

schema = pa.io.from_yaml(schema_yaml)
display(schema)

This will display: DataFrameSchema(columns={'A': <Schema Column: 'A' type=int64>, 'B': <Schema Column: 'B' type=int64>}, index=<Schema Index>, transformer=None, coerce=False)
#Passed because strict wasn't passed in, and assumed False?
schema.validate(df)

This will validate as expected, no 'strict' passed in.
schema_yaml = """
schema_type: dataframe
version: 0.4.2
columns:
  A:
    pandas_dtype: int64
    nullable: false
    checks: null
  B:
    pandas_dtype: int64
    nullable: false
    checks: null
index:
- pandas_dtype: int64
  nullable: false
  checks: null
coerce: false
strict: true
"""

Strict is set true now.

schema = pa.io.from_yaml(schema_yaml)
display(schema)

The object doesn't have strict in it: DataFrameSchema(columns={'A': <Schema Column: 'A' type=int64>, 'B': <Schema Column: 'B' type=int64>}, index=<Schema Index>, transformer=None, coerce=False)
#Passed but shouldn't have. We set strict = True
schema.validate(df)

This passes:
# Finally, try just setting it on the schema works and the validation fails
schema.strict = True
schema.validate(df)

This quite rightly doesn't validate. I'll take a run at the PR for this. Thanks!

fixed by #219


I think this got patched

re_gpt.errors.UnexpectedResponseError: An unexpected error occurred. Error message: 'NoneType' object is not subscriptable.

https://github.com/Zai-Kun/reverse-engineered-chatgpt/issues/27#issuecomment-1983161935

this issue is not fixed yet


Contribution Guide?

I was wondering if I should work on a contribution guide: setting up project, building, testing, etc.. I just wasn't quite sure what should all go into this. Maybe I could get some insight as well as things I need to make sure I take into account?

As for building you just download the project, install Visual Studio or Xamarin, open the solution and hit run and you should be good.
Testing is, well, nothing special.

Alright, I was thinking of going into helping people just starting out with contributing to this repo, it's a bit of a challenge and takes a bit of time to figure out. I was thinking of maybe creating a diagram or something along those lines.

I'd be in support of it. All good repos have Getting Started guides, and it would be a better fit for the README.

I have enabled the wiki on this project, feel free to add stuff to it

Awesome I'll get to work on this!

This was our temp project guide when we were getting ready, some of the info is already outdated even
https://docs.google.com/document/d/1qWvY3ix8RTnYcGGNnG0rxJjclub96dQBlBzjgNoBaFQ/edit

We seriously need a guide.
If you guys are serious about getting it done this time we're going to need a big set of guides and documents on what every modules does and what the actual plan for the game/engine is. I would love to help, but I cannot find enough information without digging through all the code.

Personally I think having a brief overview of all the modules and important services, then doc comments for the rest is good.
But yeah we need a guide.

The Getting Started page in the wiki now gives a decent idea on how to start contributing.
Make sure to join us in #documentation on Discord to help the documentation crew.


iid mnist data set accuracy does not increase

Hello, in the latest code, there is still an extremely slow increase in average test accuracy at this time the required learning rate is 0.2 but the AUC is increasing rapidly. This problem occurs in mnist of iID. I can't understand why, can you make a solution? The experimental parameters are extracted directly from your readme, and only the learning rate is modified to 0.2.
The final accuracy was 23%,AUC was 65%.

Hi, @lipei246
Which algorithm did you use?
The hyper-parameters have not been tuned in the auto_train.sh. You need to tune other hyper-parameters in addition to the learning rate.

FedAvg
I didn't adopt auto__train.sh. This is my execution statement python main.py -data mnist -m cnn -algo FedAvg -gr 1000 -did 1 -go cnn -lr 0.01 -ls 5 -lbs 32.
Looking for forgiveness and guidance, I'm a novice.

I really appreciate your patience with me

I changed the data set to a Dirichlet distribution, and the accuracy of the algorithm came up in line with the paper. I think there may be a problem with minist data set segmentation that should be iID.  I really appreciate the code you shared and your patient response

In addition to the Non-IID feature of the data, the number of data samples among clients is also unbalanced on this platform, which is different from the setting in FedAvg's paper. Other experimental details may also differ from the setting in FedAvg's paper.
Reproducing the same experimental results is not the goal of this platform, as the included algorithms have their own settings in their papers.
To reproduce the experimental results, please carefully check the experimental settings in their papers and modify the corresponding codes.

Hi, @Mangata1
I checked the code again, and address this issue by setting shuffle=True in ./dataset/utils/dataset_utils.py.
Besides, I also update other codes in ./dataset/. Please check it.
Since I shuffled the data when using Dirichlet distribution in the old code, the printed accuracy was correct.
Thank you for your help!
Here is an example for MNIST in the IID setting with cnn:
Data generation: python generate_mnist.py iid - -
Simulation: python -u main.py -lr 0.1 -lbs 16 -nc 20 -jr 1 -nb 10 -data mnist -m cnn -algo FedAvg -gr 2000 -did 0

Hope to get your sincere answer, how should I adjust, forgive my clumsiness.

What are your hyper-parameter settings?
You can add weight decay like
self.optimizer = torch.optim.SGD(self.model.parameters(), lr=self.learning_rate, weight_decay=self.lamda) in `clientfomo.py'


fix: make cur optional in aws_cc

Describe your changes
THIS IS A CLONE OF https://github.com/harness/terraform-provider-harness/pull/617
The AWS CC connector type has an optional field for the CUR. The current state of this resource makes this a required field.

https://apidocs.harness.io/tag/Connectors#operation/createConnector
https://harness.slack.com/archives/C02GHCDN2JV/p1689087248164719
Tested locally:
Terraform will perform the following actions:

  # harness_platform_connector_awscc.accounts will be created
  + resource "harness_platform_connector_awscc" "accounts" {
      + account_id       = "166719183214"
      + features_enabled = [
          + "GOVERNANCE",
          + "VISIBILITY",
        ]
      + id               = (known after apply)
      + identifier       = "aws166719183214"
      + name             = "lz-test-plat"

      + cross_account_access {
          + external_id = "harness:891928451355:pC_7h33wQTeZ_j-libvF4A"
          + role_arn    = "arn:aws:iam::166719183214:role/HarnessCERole"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

harness_platform_connector_awscc.accounts: Creating...
harness_platform_connector_awscc.accounts: Creation complete after 0s [id=aws166719183214]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

tf import harness_platform_connector_awscc.accounts aws166719183214
harness_platform_connector_awscc.accounts: Importing from ID "aws166719183214"...
harness_platform_connector_awscc.accounts: Import prepared!
  Prepared harness_platform_connector_awscc for import
harness_platform_connector_awscc.accounts: Refreshing state... [id=aws166719183214]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

➜  test tf apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - harness/harness in /Users/rileysnyder/git/terraform-provider-harness
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
harness_platform_connector_awscc.accounts: Refreshing state... [id=aws166719183214]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Comment Triggers

PR Check triggers

Build: trigger build
Sub Category Field Check: trigger subcategoryfieldcheck

trigger build

trigger subcategoryfieldcheck

trigger build

trigger subcategoryfieldcheck


Gathering: Ordering data in json file by leg

We will wait till we merge in the PR https://github.com/OpenFreeEnergy/IndustryBenchmarks2024/pull/179 into PR https://github.com/OpenFreeEnergy/IndustryBenchmarks2024/pull/156 and then address this issue in a separate PR.


fix issues in spark 1.6.1 config

Do we know when Spark 1.6.1 will be available as a Docker Image on https://hub.docker.com/r/sequenceiq/spark/ ?


[Bug] Wallet asking a device name even it's defined in conf.js

Hey, what's the difference between this:
https://github.com/byteball/headless-byteball/blob/a281a1593dfa545d56a17bbf1d47373d6643f8ad/start.js#L53
and conf.deviceName?
Why not merge it with exports.deviceName in conf.js of appRootDir?

conf.js is not meant to be edited, it's basically a default conf.
When you answer to this question then actual configuration file is saved to AppData folder and is named as conf.json.
So, proper suggestion would be that it should ask this question only if there is no deviceName in conf.json or no conf.json at all.
Maybe, to clear things up, conf.js should be renamed to default-conf.js

It should prompt only once and then it should write it to conf.json, which is in user AppData or .config folder.
Passphrase is another thing that needs user input, otherwise anybody who has access to the environment variables, will be able to decrypt your private key.
On platforms where this is not possible (like Heroku), you could also set the passphrase to empty and launch it like this https://github.com/byteball/headless-byteball/issues/10#issuecomment-400290889
I have BB Odds web interface running on Heroku and I deploy conf.json and keys.json in .config/[package-name]/ that I put into project folder.


扩展主机意外终止，清重新加载窗口以恢复

VSCode Version:1.12.2
OS Version: windows10 1703

Steps to Reproduce:
error message:
e.doShow @ messageService.ts:125
e.show @ messageService.ts:104
d.onExit @ extensionHost.ts:320
(anonymous) @ extensionHost.ts:147
emitTwo @ events.js:106
emit @ events.js:191
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215
error message:
d.onExit @ extensionHost.ts:324
(anonymous) @ extensionHost.ts:147
emitTwo @ events.js:106
emit @ events.js:191
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215

@liyongfa Not sure if I understand the issue here. Can you please provide

What is the issue?
How to reproduce the issue?
What is expected?
What is shown?

Please reopen it with above information in english would be preferrable.
Thanks


API docs generation fails when using Dart 3 features

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

Clone the Flutter repository to update a code sample (git clone git@github.com:flutter/flutter.git)
Navigate to flutter/examples/api and edit any code sample by adding a Dart 3 feature
Then go to flutter/dev/bots and execute sh doc.sh to generate documentation locally.

For instance, add this line from https://dart.dev/language/records in any code sample.
var record = ('first', a: 2, b: true, 'last');

Following packages are used in doc generation script
dartdoc version: 6.2.2
snippets version: 0.3.0
flutter version: 3.11.0-10.0.pre.44

While dartdoc and flutter version support Dart 3, the snippets package isn't updated to Dart 3.
There is no error when removing Dart 3 feature.
Expected results
Documentation generation doesn't fail with Dart 3 features in an API sample
Actual results
Documentation generation fails with Dart 3 features  in an API sample
Code sample
Code sample
var record = ('first', a: 2, b: true, 'last');

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
pub:stdout: Got dependencies!
Copied dev/docs/assets/overrides.css to dev/docs/doc/assets/overrides.css
Copied dev/docs/assets/snippets.css to dev/docs/doc/assets/snippets.css
Copied dev/docs/assets/api_survey.js to dev/docs/doc/assets/api_survey.js
Copied dev/docs/assets/snippets.js to dev/docs/doc/assets/snippets.js

dartdoc version: 6.2.2
snippets version: 0.3.0
flutter version: 3.11.0-10.0.pre.44

Executing: (cd dev/docs ; /Users/tahatesser/Code/flutter/bin/cache/dart-sdk/bin/dart global run dartdoc --allow-tools --no-validate-links --link-to-source-excludes ../../bin/cache --link-to-source-root ../.. --link-to-source-uri-template https://github.com/flutter/flutter/blob/master/%f%#L%l% --inject-html --use-base-href --header styles.html --header analytics.html --header survey.html --header snippets.html --header opensearch.html --footer-text lib/footer.html --allow-warnings-in-packages Flutter,platform_integration,flutter_web_plugins,integration_test,flutter_goldens,flutter,flutter_localizations,flutter_driver,flutter_test --exclude-packages analyzer,args,barback,csslib,flutter_goldens,flutter_goldens_client,front_end,fuchsia_remote_debug_protocol,glob,html,http_multi_server,io,isolate,js,kernel,logging,mime,mockito,node_preamble,plugin,shelf,shelf_packages_handler,shelf_static,shelf_web_socket,utf,watcher,yaml --exclude dart:io/network_policy.dart,package:Flutter/temp_doc.dart,package:http/browser_client.dart,package:intl/intl_browser.dart,package:matcher/mirror_matchers.dart,package:quiver/io.dart,package:quiver/mirrors.dart,package:vm_service_client/vm_service_client.dart,package:web_socket_channel/html.dart --favicon=favicon.ico --package-order flutter,Dart,platform_integration,flutter_test,flutter_driver --auto-include-dependencies)
dartdoc:stdout: Documenting Flutter...
dartdoc:stderr:   error: tool execution failed: Tool "dartpad" returned non-zero exit code (1) when run as "/Users/tahatesser/Code/flutter/bin/cache/dart-sdk/bin/dart pub global run snippets --output-directory=doc/snippets --type=dartpad" from /Users/tahatesser/Code/flutter/dev/docs
dartdoc:stderr: Input to dartpad was:
dartdoc:stderr: This sample produces an enabled and a disabled ElevatedButton.
dartdoc:stderr:
dartdoc:stderr: ** See code in examples/api/lib/material/elevated_button/elevated_button.0.dart **
dartdoc:stderr: Stderr output was:
dartdoc:stderr: Code to format:
dartdoc:stderr:     1: import 'package:flutter/material.dart';
dartdoc:stderr:     2:
dartdoc:stderr:     3: /// Flutter code sample for [ElevatedButton].
dartdoc:stderr:     4:
dartdoc:stderr:     5: void main() => runApp(const ElevatedButtonExampleApp());
dartdoc:stderr:     6:
dartdoc:stderr:     7: class ElevatedButtonExampleApp extends StatelessWidget {
dartdoc:stderr:     8:   const ElevatedButtonExampleApp({super.key});
dartdoc:stderr:     9:
dartdoc:stderr:    10:   @override
dartdoc:stderr:    11:   Widget build(BuildContext context) {
dartdoc:stderr:    12:     return MaterialApp(
dartdoc:stderr:    13:       home: Scaffold(
dartdoc:stderr:    14:         appBar: AppBar(title: const Text('ElevatedButton Sample')),
dartdoc:stderr:    15:         body: const ElevatedButtonExample(),
dartdoc:stderr:    16:       ),
dartdoc:stderr:    17:     );
dartdoc:stderr:    18:   }
dartdoc:stderr:    19: }
dartdoc:stderr:    20:
dartdoc:stderr:    21: class ElevatedButtonExample extends StatefulWidget {
dartdoc:stderr:    22:   const ElevatedButtonExample({super.key});
dartdoc:stderr:    23:
dartdoc:stderr:    24:   @override
dartdoc:stderr:    25:   State<ElevatedButtonExample> createState() => _ElevatedButtonExampleState();
dartdoc:stderr:    26: }
dartdoc:stderr:    27:
dartdoc:stderr:    28: class _ElevatedButtonExampleState extends State<ElevatedButtonExample> {
dartdoc:stderr:    29:
dartdoc:stderr:    30:   @override
dartdoc:stderr:    31:   Widget build(BuildContext context) {
dartdoc:stderr:    32:     final ButtonStyle style = ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20));
dartdoc:stderr:    33: var record = ('first', a: 2, b: true, 'last');
dartdoc:stderr:    34:
dartdoc:stderr:    35:     return Center(
dartdoc:stderr:    36:       child: Column(
dartdoc:stderr:    37:         mainAxisSize: MainAxisSize.min,
dartdoc:stderr:    38:         children: <Widget>[
dartdoc:stderr:    39:           ElevatedButton(
dartdoc:stderr:    40:             style: style,
dartdoc:stderr:    41:             onPressed: null,
dartdoc:stderr:    42:             child: const Text('Disabled'),
dartdoc:stderr:    43:           ),
dartdoc:stderr:    44:           const SizedBox(height: 30),
dartdoc:stderr:    45:           ElevatedButton(
dartdoc:stderr:    46:             style: style,
dartdoc:stderr:    47:             onPressed: () {},
dartdoc:stderr:    48:             child: const Text('Enabled'),
dartdoc:stderr:    49:           ),
dartdoc:stderr:    50:         ],
dartdoc:stderr:    51:       ),
dartdoc:stderr:    52:     );
dartdoc:stderr:    53:   }
dartdoc:stderr:    54: }
dartdoc:stderr:
dartdoc:stderr: Unable to format sample code: Could not format because the source could not be parsed:
dartdoc:stderr:
dartdoc:stderr: line 33, column 14 of .: This requires the 'records' language feature to be enabled.
dartdoc:stderr:    ╷
dartdoc:stderr: 33 │ var record = ('first', a: 2, b: true, 'last');
dartdoc:stderr:    │              ^
dartdoc:stderr:    ╵
dartdoc:stderr:
dartdoc:stderr:
dartdoc:stderr:     from material.ElevatedButton: (file:///Users/tahatesser/Code/flutter/packages/flutter/lib/src/material/elevated_button.dart:63:7)
dartdoc:stdout: Initialized dartdoc with 1207 libraries
dartdoc:stdout: Generating docs for library material from package:flutter/material.dart...
dartdoc:stdout: Generating docs for library foundation from package:flutter/foundation.dart...
dartdoc:stdout: Generating docs for library widgets from package:flutter/widgets.dart...
dartdoc:stdout: Generating docs for library gestures from package:flutter/gestures.dart...
dartdoc:stdout: Generating docs for library painting from package:flutter/painting.dart...
dartdoc:stdout: Generating docs for library physics from package:flutter/physics.dart...
dartdoc:stdout: Generating docs for library cupertino from package:flutter/cupertino.dart...
dartdoc:stdout: Generating docs for library semantics from package:flutter/semantics.dart...
dartdoc:stdout: Generating docs for library rendering from package:flutter/rendering.dart...
dartdoc:stdout: Generating docs for library scheduler from package:flutter/scheduler.dart...
dartdoc:stdout: Generating docs for library animation from package:flutter/animation.dart...
dartdoc:stdout: Generating docs for library services from package:flutter/services.dart...
dartdoc:stdout: Generating docs for library dart:ui from dart:ui...
dartdoc:stdout: Generating docs for library dart:developer from dart:developer...
dartdoc:stdout: Generating docs for library dart:collection from dart:collection...
dartdoc:stdout: Generating docs for library dart:ui_web from dart:ui_web...
dartdoc:stdout: Generating docs for library dart:core from dart:core...
dartdoc:stdout: Generating docs for library dart:isolate from dart:isolate...
dartdoc:stdout: Generating docs for library dart:js from dart:js...
dartdoc:stdout: Generating docs for library dart:js_interop from dart:js_interop...
dartdoc:stdout: Generating docs for library dart:js_interop_unsafe from dart:js_interop_unsafe...
dartdoc:stdout: Generating docs for library dart:async from dart:async...
dartdoc:stdout: Generating docs for library dart:io from dart:io...
dartdoc:stdout: Generating docs for library dart:html from dart:html...
dartdoc:stdout: Generating docs for library dart:math from dart:math...
dartdoc:stdout: Generating docs for library dart:js_util from dart:js_util...
dartdoc:stdout: Generating docs for library dart:ffi from dart:ffi...
dartdoc:stdout: Generating docs for library dart:typed_data from dart:typed_data...
dartdoc:stdout: Generating docs for library dart:convert from dart:convert...
dartdoc:stdout: Generating docs for library iOS from package:platform_integration/ios.dart...
dartdoc:stdout: Generating docs for library Android from package:platform_integration/android.dart...
dartdoc:stdout: Generating docs for library flutter_test from package:flutter_test/flutter_test.dart...
dartdoc:stdout: Generating docs for library flutter_driver from package:flutter_driver/flutter_driver.dart...
dartdoc:stdout: Generating docs for library flutter_driver_extension from package:flutter_driver/driver_extension.dart...
dartdoc:stdout: Generating docs for library flutter_localizations from package:flutter_localizations/flutter_localizations.dart...
dartdoc:stdout: Generating docs for library flutter_web_plugins from package:flutter_web_plugins/flutter_web_plugins.dart...
dartdoc:stdout: Generating docs for library url_strategy from package:flutter_web_plugins/url_strategy.dart...
dartdoc:stdout: Generating docs for library async from package:async/async.dart...
dartdoc:stdout: Generating docs for library boolean_selector from package:boolean_selector/boolean_selector.dart...
dartdoc:stdout: Generating docs for library characters from package:characters/characters.dart...
dartdoc:stdout: Generating docs for library clock from package:clock/clock.dart...
dartdoc:stdout: Generating docs for library collection from package:collection/collection.dart...
dartdoc:stdout: Generating docs for library dart.pkg.collection.iterable_zip from package:collection/iterable_zip.dart...
dartdoc:stdout: Generating docs for library dart.pkg.collection.priority_queue from package:collection/priority_queue.dart...
dartdoc:stdout: Generating docs for library dart.pkg.collection.equality from package:collection/equality.dart...
dartdoc:stdout: Generating docs for library dart.pkg.collection.algorithms from package:collection/algorithms.dart...
dartdoc:stdout: Generating docs for library dart.pkg.collection.wrappers from package:collection/wrappers.dart...
dartdoc:stdout: Generating docs for library crypto from package:crypto/crypto.dart...
dartdoc:stdout: Generating docs for library fake_async from package:fake_async/fake_async.dart...
dartdoc:stdout: Generating docs for library local from package:file/local.dart...
dartdoc:stdout: Generating docs for library chroot from package:file/chroot.dart...
dartdoc:stdout: Generating docs for library memory from package:file/memory.dart...
dartdoc:stdout: Generating docs for library file from package:file/file.dart...
dartdoc:stdout: Generating docs for library integration_test_driver from package:integration_test/integration_test_driver.dart...
dartdoc:stdout: Generating docs for library integration_test_driver_extended from package:integration_test/integration_test_driver_extended.dart...
dartdoc:stdout: Generating docs for library _extension_web from package:integration_test/_extension_web.dart...
dartdoc:stdout: Generating docs for library _extension_io from package:integration_test/_extension_io.dart...
dartdoc:stdout: Generating docs for library _callback_io from package:integration_test/_callback_io.dart...
dartdoc:stdout: Generating docs for library common from package:integration_test/common.dart...
dartdoc:stdout: Generating docs for library integration_test from package:integration_test/integration_test.dart...
dartdoc:stdout: Generating docs for library _callback_web from package:integration_test/_callback_web.dart...
dartdoc:stdout: Generating docs for library intl from package:intl/intl.dart...
dartdoc:stdout: Generating docs for library date_symbol_data_http_request from package:intl/date_symbol_data_http_request.dart...
dartdoc:stdout: Generating docs for library message_lookup_by_library from package:intl/message_lookup_by_library.dart...
dartdoc:stdout: Generating docs for library message_format from package:intl/message_format.dart...
dartdoc:stdout: Generating docs for library intl_standalone from package:intl/intl_standalone.dart...
dartdoc:stdout: Generating docs for library date_symbol_data_custom from package:intl/date_symbol_data_custom.dart...
dartdoc:stdout: Generating docs for library date_symbol_data_local from package:intl/date_symbol_data_local.dart...
dartdoc:stdout: Generating docs for library date_symbols from package:intl/date_symbols.dart...
dartdoc:stdout: Generating docs for library locale from package:intl/locale.dart...
dartdoc:stdout: Generating docs for library number_symbol_data from package:intl/number_symbols_data.dart...
dartdoc:stdout: Generating docs for library date_time_patterns from package:intl/date_time_patterns.dart...
dartdoc:stdout: Generating docs for library date_symbol_data_file from package:intl/date_symbol_data_file.dart...
dartdoc:stdout: Generating docs for library number_symbols from package:intl/number_symbols.dart...
dartdoc:stdout: Generating docs for library matcher from package:matcher/matcher.dart...
dartdoc:stdout: Generating docs for library expect from package:matcher/expect.dart...
dartdoc:stdout: Generating docs for library variant from package:material_color_utilities/scheme/variant.dart...
dartdoc:stdout: Generating docs for library scheme_content from package:material_color_utilities/scheme/scheme_content.dart...
dartdoc:stdout: Generating docs for library dynamic_scheme from package:material_color_utilities/scheme/dynamic_scheme.dart...
dartdoc:stdout: Generating docs for library scheme_expressive from package:material_color_utilities/scheme/scheme_expressive.dart...
dartdoc:stdout: Generating docs for library scheme_vibrant from package:material_color_utilities/scheme/scheme_vibrant.dart...
dartdoc:stdout: Generating docs for library scheme_monochrome from package:material_color_utilities/scheme/scheme_monochrome.dart...
dartdoc:stdout: Generating docs for library scheme_neutral from package:material_color_utilities/scheme/scheme_neutral.dart...
dartdoc:stdout: Generating docs for library scheme_fidelity from package:material_color_utilities/scheme/scheme_fidelity.dart...
dartdoc:stdout: Generating docs for library scheme_tonal_spot from package:material_color_utilities/scheme/scheme_tonal_spot.dart...
dartdoc:stdout: Generating docs for library scheme from package:material_color_utilities/scheme/scheme.dart...
dartdoc:stdout: Generating docs for library dislike_analyzer from package:material_color_utilities/dislike/dislike_analyzer.dart...
dartdoc:stdout: Generating docs for library quantizer_wu from package:material_color_utilities/quantize/quantizer_wu.dart...
dartdoc:stdout: Generating docs for library quantizer_wsmeans from package:material_color_utilities/quantize/quantizer_wsmeans.dart...
dartdoc:stdout: Generating docs for library quantizer_map from package:material_color_utilities/quantize/quantizer_map.dart...
dartdoc:stdout: Generating docs for library quantizer_celebi from package:material_color_utilities/quantize/quantizer_celebi.dart...
dartdoc:stdout: Generating docs for library quantizer from package:material_color_utilities/quantize/quantizer.dart...
dartdoc:stdout: Generating docs for library point_provider_lab from package:material_color_utilities/quantize/src/point_provider_lab.dart...
dartdoc:stdout: Generating docs for library point_provider from package:material_color_utilities/quantize/src/point_provider.dart...
dartdoc:stdout: Generating docs for library hct from package:material_color_utilities/hct/hct.dart...
dartdoc:stdout: Generating docs for library viewing_conditions from package:material_color_utilities/hct/viewing_conditions.dart...
dartdoc:stdout: Generating docs for library cam16 from package:material_color_utilities/hct/cam16.dart...
dartdoc:stdout: Generating docs for library hct_solver from package:material_color_utilities/hct/src/hct_solver.dart...
dartdoc:stdout: Generating docs for library color_utils from package:material_color_utilities/utils/color_utils.dart...
dartdoc:stdout: Generating docs for library math_utils from package:material_color_utilities/utils/math_utils.dart...
dartdoc:stdout: Generating docs for library string_utils from package:material_color_utilities/utils/string_utils.dart...
dartdoc:stdout: Generating docs for library blend from package:material_color_utilities/blend/blend.dart...
dartdoc:stdout: Generating docs for library score from package:material_color_utilities/score/score.dart...
dartdoc:stdout: Generating docs for library material_dynamic_colors from package:material_color_utilities/dynamiccolor/material_dynamic_colors.dart...
dartdoc:stdout: Generating docs for library dynamic_color from package:material_color_utilities/dynamiccolor/dynamic_color.dart...
dartdoc:stdout: Generating docs for library tone_delta_constraint from package:material_color_utilities/dynamiccolor/src/tone_delta_constraint.dart...
dartdoc:stdout: Generating docs for library contrast from package:material_color_utilities/contrast/contrast.dart...
dartdoc:stdout: Generating docs for library material_color_utilities from package:material_color_utilities/material_color_utilities.dart...
dartdoc:stdout: Generating docs for library temperature_cache from package:material_color_utilities/temperature/temperature_cache.dart...
dartdoc:stdout: Generating docs for library tonal_palette from package:material_color_utilities/palettes/tonal_palette.dart...
dartdoc:stdout: Generating docs for library core_palette from package:material_color_utilities/palettes/core_palette.dart...
dartdoc:stdout: Generating docs for library meta from package:meta/meta.dart...
dartdoc:stdout: Generating docs for library meta_dart2js from package:meta/dart2js.dart...
dartdoc:stdout: Generating docs for library meta_meta from package:meta/meta_meta.dart...
dartdoc:stdout: Generating docs for library path from package:path/path.dart...
dartdoc:stdout: Generating docs for library platform from package:platform/platform.dart...
dartdoc:stdout: Generating docs for library process from package:process/process.dart...
dartdoc:stdout: Generating docs for library source_span from package:source_span/source_span.dart...
dartdoc:stdout: Generating docs for library stack_trace from package:stack_trace/stack_trace.dart...
dartdoc:stdout: Generating docs for library stream_channel from package:stream_channel/stream_channel.dart...
dartdoc:stdout: Generating docs for library isolate_channel from package:stream_channel/isolate_channel.dart...
dartdoc:stdout: Generating docs for library string_scanner from package:string_scanner/string_scanner.dart...
dartdoc:stdout: Generating docs for library sync.http from package:sync_http/sync_http.dart...
dartdoc:stdout: Generating docs for library term_glyph from package:term_glyph/term_glyph.dart...
dartdoc:stdout: Generating docs for library backend from package:test_api/backend.dart...
dartdoc:stdout: Generating docs for library hooks_testing from package:test_api/hooks_testing.dart...
dartdoc:stdout: Generating docs for library hooks from package:test_api/hooks.dart...
dartdoc:stdout: Generating docs for library test_api from package:test_api/test_api.dart...
dartdoc:stdout: Generating docs for library expect from package:test_api/expect.dart...
dartdoc:stdout: Generating docs for library test_api.fake from package:test_api/fake.dart...
dartdoc:stdout: Generating docs for library test_api.scaffolding from package:test_api/scaffolding.dart...
dartdoc:stdout: Generating docs for library typed_data.typed_buffers from package:typed_data/typed_buffers.dart...
dartdoc:stdout: Generating docs for library typed_data from package:typed_data/typed_data.dart...
dartdoc:stdout: Generating docs for library vector_math_lists from package:vector_math/vector_math_lists.dart...
dartdoc:stdout: Generating docs for library hash from package:vector_math/hash.dart...
dartdoc:stdout: Generating docs for library vector_math_geometry from package:vector_math/vector_math_geometry.dart...
dartdoc:stdout: Generating docs for library vector_math from package:vector_math/vector_math.dart...
dartdoc:stdout: Generating docs for library vector_math_operations from package:vector_math/vector_math_operations.dart...
dartdoc:stdout: Generating docs for library vector_math_64 from package:vector_math/vector_math_64.dart...
dartdoc:stdout: Generating docs for library vm_service_io from package:vm_service/vm_service_io.dart...
dartdoc:stdout: Generating docs for library utils from package:vm_service/utils.dart...
dartdoc:stdout: Generating docs for library vm_service from package:vm_service/vm_service.dart...
dartdoc:stdout: Generating docs for library async_io from package:webdriver/async_io.dart...
dartdoc:stdout: Generating docs for library core from package:webdriver/core.dart...
dartdoc:stdout: Generating docs for library sync_io from package:webdriver/sync_io.dart...
dartdoc:stdout: Generating docs for library io from package:webdriver/io.dart...
dartdoc:stdout: Generating docs for library async from package:webdriver/support/async.dart...
dartdoc:stdout: Generating docs for library stdio_stepper from package:webdriver/support/stdio_stepper.dart...
dartdoc:stdout: Generating docs for library firefox_profile from package:webdriver/support/firefox_profile.dart...
dartdoc:stdout: Generating docs for library async_core from package:webdriver/async_core.dart...
dartdoc:stdout: Generating docs for library sync_core from package:webdriver/sync_core.dart...
dartdoc:stdout: Generating docs for library async_html from package:webdriver/async_html.dart...
dartdoc:stderr: Found 0 warnings and 1 error.
dartdoc:stdout: Documented 152 public libraries in 370.2 seconds
dartdoc:stderr:
dartdoc:stderr: dartdoc 6.2.2 (/Users/tahatesser/.pub-cache/global_packages/dartdoc/bin/dartdoc.dart-3.1.0-129.0.dev.snapshot) failed: encountered 1 errors.

Flutter Doctor output
Doctor output
[Paste your output here]

https://github.com/flutter/assets-for-api-docs/pull/216 updates the snippets dart version

Assigned this to me and Greg based on the work being done here

I'm currently working to get the master branch renamed to main.  Mostly done with that, but I need someone with permission to set the default branch to main. I've asked the infra team for help with that.

We have to rename the default branch so that CI will pass the flutter_plugin_tools check for that, because we need to update flutter_plugin_tools to the latest version in order to use an updated Dart version.

@gspencergoog
The new version of snippets might need publishing.
Here tried locally. This will need a PR to be updated in docs.sh.
➜  bots git:(update_toggle_buttons_doc_m3) ✗ sh docs.sh
Fri May 26 10:32:40 EEST 2023: Running docs.sh
Package dartdoc is currently active at version 6.2.2.
The package dartdoc is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate dartdoc`.
Installed executable dartdoc.
Activated dartdoc 6.2.2.
Package snippets is currently active at version 0.3.0.
Because pub global activate depends on snippets 0.3.1 which doesn't match any
  versions, version solving failed.
➜  bots git:(update_toggle_buttons_doc_m3) ✗

Okay, it's published.

There appear to be some other issues with the updated snippets package.  I'm looking into those.

(at least when I run it locally on my mac)

There appear to be some other issues with the updated snippets package. I'm looking into those.

Thank you!

Actually, I think it's fine: I just had a stale version in my pub cache.

Okay, I think this is fixed now. I was able to generate docs locally with Dart 3 features in a sample.


prettier-plugin-tailwindcss causing global error handling to dump prettier flow.mjs contents to the console

What version of prettier-plugin-tailwindcss are you using?
Latest - v0.6.8
What version of Tailwind CSS are you using?
Latest - v3.3.3
What version of Node.js are you using?
v20.17.0
What package manager are you using?
npm
What operating system are you using?
macOS
Reproduction URL
https://github.com/JamesHenry/prettier-tailwindcss-flow-repro
Describe your issue
Full explanation:
https://www.loom.com/share/8aa70b8bd4d54299a018d1f35f64fc6a
Steps per README
npm install
node script.cjs  # for the commonjs implementation
node script.mjs # for the ESM implementation

ESM vs CJS doesn't matter, both exhibit the same behavior.
The presence of prettier-plugin-tailwindcss is key, through its dependency on the flow parser, it is somehow causing all subsequent errors to be processed by prettier/plugins/flow.mjs, which then dumps contents from that minified file to the console.

This has to be one of the wildest things I've seen. I have no idea what would cause this 😱
I'll take a look today

Uring prettier/plugins/flow directly reproduces the issue:
import "prettier/plugins/flow";
throw new Error("test");

That plugin doesn't do anything weird but it does import (and subsequently bundle) flow-parser which also reproduces the issue:
import "flow-parser";
throw new Error("test");

The flow parser is written in OCaml so it's harder to track the source of the issue there.

I think this is because of the OCaml byte code -> JS compiler that flow uses (ocaml_of_js). I'll open an issue on the Flow repo about this.
I'm not sure if we can find a way to lazy load these plugins if they're not used. Prettier does but I think uses private API to do so. I'll look into it.


Occasionally hanging while reading jack voltage

In my app I periodically poll the battery and jack voltages. Very, very, occasionally my app will hanging while reading the jack voltage. This is the stack trace (sorry for the limited symbol information):
Thread 1 (Thread 0xb6c9d000 (LWP 5197)):
#0  0xb4c3c3d8 in mmap_adc_read_raw () from /usr/lib/libroboticscape.so
#1  0xb4c4126a in rc_adc_volt () from /usr/lib/libroboticscape.so
#2  0xb4c41304 in rc_dc_jack_voltage () from /usr/lib/libroboticscape.so
#3  0xb4c6dd68 in BBBluePower::JS_jackVoltage(v8::FunctionCallbackInfov8::Value const&)
()
from /root/borgcube-rov/hw/board/beagleboneblue/native/build/Release/beagleboneblue.node
#4  0x00403158 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfov8::Value const&)) ()
#5  0x0042e290 in ?? ()
I experimented with a few breakpoints and have determined that mmap_adc_read_raw never returns. I see a few while loops in the code which - obviously - should never fail, but it appears that occasionally they do.
Thanks
Tim

Could the problem be because 'rc_battery_monitor' is running in the background at the same time?

interesting. mmap_adc_read_raw is a very simple function that reads directly from the adc registers. I haven't observed this in the past. Does stopping rc_battery_monitor (systemctl stop rc_battery_monitor) alleviate the hangup?

Yeah, we "really" need to move that from mmap'ed to iio, then users can still dump the raw values from /sys/bus/iio/*
Regards,

Yes - once I stop it running rc_battery_monitor, the problem goes away. I'm assuming that very occasionally both the rc_battery_monitor code and my code are in those loops in parallel, both do the setup in parallel, but only one get the exit condition because it's shared.

I'm also seeing this -- I'm reading at 50Hz, and it consistently happens in less than a minute. Turning off rc_battery_monitor solves it. My stack trace:
#0  0xb6eb74f0 in mmap_adc_read_raw () from /usr/lib/libroboticscape.so
#1  0xb6ebc3c2 in rc_adc_volt () from /usr/lib/libroboticscape.so
#2  0xb6ebc45c in rc_dc_jack_voltage () from /usr/lib/libroboticscape.so
#3  0x00033622 in orca_driver::OrcaDriver::publishVoltage() ()
#4  0x0003376c in orca_driver::OrcaDriver::spinOnce() ()
#5  0x00033ac0 in orca_driver::OrcaDriver::run() ()
#6  0x00033e86 in main ()
Thanks.

new release v0.4.0 uses IIO to read adc and problem has gone away.


Enhance the user experience in the scenario of submitting duplicate keys

What's the purpose of this PR
增强重复键冲突场景下的用户体验
Enhance the user experience in the scenario of submitting duplicate keys
这个pr作用于文本编辑模式。我遇到过很多次，复制配置然后修改配置，最后提交的时候因为键值冲突，导致我之前所有的配置修改都没了，这个pr调整了一个键值冲突时的粗略，当发生键值冲突时，编辑窗口不关闭，同时，通过异常消息告诉用户，存在哪些重复的键值
This pr acts in text editing mode. I have encountered many times, copying the configuration and then modifying the configuration. When I submitted it, all my previous configuration changes were lost because of the key-value conflict. This pr adjusted a rough key-value conflict. When a key-value conflict occurs When the editing window is not closed, at the same time, an exception message is used to tell the user what duplicate key values exist
目前的：
current

修改后：
after edited

Codecov Report

Merging #3429 (7329fab) into master (f8683a2) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #3429      +/-   ##
============================================
- Coverage     51.40%   51.40%   -0.01%
- Complexity     2312     2313       +1
============================================
  Files           441      441
  Lines         13817    13819       +2
  Branches       1407     1408       +1
============================================
+ Hits           7102     7103       +1
- Misses         6227     6228       +1
  Partials        488      488

Impacted Files
Coverage Δ
Complexity Δ

...portal/component/txtresolver/PropertyResolver.java
89.77% <100.00%> (+0.23%)
45.00 <0.00> (+1.00)

.../apollo/internals/RemoteConfigLongPollService.java
77.10% <0.00%> (-1.21%)
28.00% <0.00%> (-1.00%)

...ervice/service/ReleaseMessageServiceWithCache.java
85.88% <0.00%> (+1.17%)
24.00% <0.00%> (+1.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 f8683a2...7329fab. Read the comment docs.


Issue 82 SSL support

changes
~* most config logic moved to server.New function instead of commands~
~* tile_buffer now property of webserver~
~* webserver config uses pointers to place default values~

ssl support in webserver config
test for ssl support

~todo~
~* tests for https~
~* push middleware~
~* remove globals~

Pull Request Test Coverage Report for Build 1281

10 of 52 (19.23%)  changed or added relevant lines in 4 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.04%) to 43.376%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

cmd/tegola/cmd/server.go
0
4
0.0%

server/server.go
7
45
15.56%

Files with Coverage Reduction
New Missed Lines
%

cmd/tegola/cmd/server.go
3
0.0%

Totals

Change from base Build 1277:
0.04%

Covered Lines:
5032

Relevant Lines:
11601

💛  - Coveralls

The new config params need to be add to the tegola.io documentation once v0.11.x is released.


Complex aggregation expressions in CriteriaBuilder sometimes produce a malformed query.

Description
Complex aggregation expressions in CriteriaBuilder sometimes produce a malformed query.
As part of a larger query I have the expression:
criteriaBuilder.select("AVG(CASE WHEN FUNCTION('date_part', 'hours', cgts.duration) > 0 " +
 "THEN cgls.teacherSalary * -1 / FUNCTION('date_part', 'hours', cgts.duration) " +
 "ELSE NULL END)", "averageTutorSalary")

This translates to the JPQL segment:
AVG(CASE
     WHEN FUNCTION('date_part','hours',cgts.duration) > 0 THEN (cgls.teacherSalary * -1 / FUNCTION('date_part','hours',cgts.duration))
    ELSE NULL
END) AS averageTeacherSalary,

Which translates to the SQL segment:
avg(CASE WHEN date_part('hours') AS col_8_0_,

Which is completely messed up. Surprising enough: the same aggregation with SUM works fine. I think this could very well be a bug in Hibernate itself (given that the JPQL query seems allright).

Expected behavior

Actual behavior

Steps to reproduce

Environment

Version:             1.2.0.Alpha3
JPA-Provider:       Hibernate 5.2.12
DBMS:               Postgresql
Application Server:  Wildfly 10

Worked around the issue by defining a function that returns an explicit type, like such:
        metadataBuilder.applySqlFunction("INTERVAL_TO_NUMERIC_HOURS",
            new SQLFunctionTemplate(BigDecimalType.INSTANCE, "EXTRACT(epoch FROM ?1) / 3600"));

So this is clearly a problem in Hibernate not being able to figure out the return type of the expression and messing up the query.

I'd be interested to know where the problem in Hibernate is exactly. You mentioned a problem with the AVG function for the second time and I think it's worth implementing an automatic workaround within Blaze-Persistence for this. Have you debugged it, is just the return type of the AVG function the problem? Or is the AVG function maybe handled somewhere specially which messes the query up?

I didn't fully debug this issue yet, but wanted to reproduce it to submit an issue to Hibernate nevertheless.  Just didn't get to it yet.
The final expression, using the new function, is:
.select("AVG(CASE WHEN FUNCTION('INTERVAL_TO_NUMERIC_HOURS', cgts.duration) >= 1 AND cgls.teacherSalary <> 0 THEN cgls.teacherSalary * -1 / FUNCTION('INTERVAL_TO_NUMERIC_HOURS', cgts.duration) ELSE NULL END)", "averageTeacherSalary")

It still calls a function in the case expression and the function still consumes my custom PGInterval type, so that can't be the problem. The only difference in the produced JPQL is that the function has 2 arguments instead of 3 and that the return type is known to be a BigDecimalType. So it must be something related to this. Might have to do something with the custom type for PGInterval anyways, the type determination of the aggregation and sum operator result seems to be relatively basic implementation, which differs across various aggregation types (SUM seems to be the most sophisticated) and in practise it probably differs per dialect.

Have you tried what happens when putting parenthesis around the case when expression and/or the conditions/expressions like AVG((CASE WHEN (FUNCTION('date_part', 'hours', cgts.duration) > 0) THEN (cgls.teacherSalary * -1 / FUNCTION('date_part', 'hours', cgts.duration)) ELSE NULL END)). Maybe the Hibernate parser messes this up somehow?
The date_part function doesn't seem to be registered in the dialect, so I'm not sure what kind of return type it would report.
Also, just wanted to mention you can use one of the built-in functions like e.g. epoch to extract the epoch of a timestamp/interval. In case of PostgreSQL it would render extract(epoch from ?). Here is a list of the functions: https://persistence.blazebit.com/documentation/core/manual/en_US/index.html#temporal-extract-functions

Also note I created an issue for the temporal extraction of full temporal units here: #493

I will try it with the extra parenthesis. If I remember correctly I initially tried parenthesis around the function invocation, but did not try them around the entire CASE WHEN expression.
I see that I missed the extract method in Blaze too. I assumed it would be Postgresql specific and wouldn't work. But these temporal extractions only work on Hibernate supported temporal fields right? Because in this case I am using an PGInterval  mapped to a java.time.Duration which is Java 8 and not the default / even possible in Hibernate 5 as far as I know.

The type of what is passed in to a function isn't checked currently and the java type of arguments aren't particularly relevant here since the output types for these functions are always the same. Most functions work with all types from the perspective blaze-persistence and Hibernate. In the end, the database is will return an SQL error if types are wrong.


Data driven table to be used on the where clause

Could alias the macro (where ( header | header a | header b) (row1 | a | b) (row2 | c | d))


Move bit_reverse function to backend/cpu

This change is

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

#929  👈 (View in Graphite)
#928
dev

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

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.52%. Comparing base (de223b0) to head (3a00ffe).

Additional details and impacted files
@@                                  Coverage Diff                                  @@
##           Gali_-_Delete_shifted_secure_combination_function     #929      +/-   ##
=====================================================================================
- Coverage                                              91.59%   91.52%   -0.08%
=====================================================================================
  Files                                                     94       94
  Lines                                                  13870    13703     -167
  Branches                                               13870    13703     -167
=====================================================================================
- Hits                                                   12704    12541     -163
+ Misses                                                  1050     1047       -3
+ Partials                                                 116      115       -1

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

Merge activity

Dec 10, 4:14 AM EST: A user started a stack merge that includes this pull request via Graphite.


[0.5.x] Bitbucket remote driver oAuth error

Booting up 0.5 using the Bitbucket remote receiving the following oAuth error response in my logs:
level=error msg="cannot authenticate user. oauth2: cannot fetch token: 400 BAD REQUEST\nResponse: {\"error_description\": \"Invalid OAuth client credentials\", \"error\": \"unauthorized_client\"}"
Steps attempting to resolve:

Have verified that the correct credentials are set
The callback URL is correct
Previously worked on 0.4 branch
Wiped the oAuth credentials and started again
Github remote works fine
Removing container between runs
Verified the ENV_VARS are present in the container

Settings are as follows:
(docker-compose)
drone:
    image: drone/drone:0.5
    ports:
        - 80:8000/tcp
    env_file: ./.dronerc
    volumes:
        - /var/lib/drone:/var/lib/drone

(.dronerc)

I_UNDERSTAND_I_AM_USING_AN_UNSTABLE_VERSION=true
I_AGREE_TO_FIX_BUGS_AND_NOT_FILE_BUGS=true
GIN_MODE=debug
DRONE_OPEN=true
DRONE_AGENT_SECRET=**REDACTED**
DRONE_ADMIN=**REDACTED**
DRONE_BITBUCKET=true
DRONE_BITBUCKET_CLIENT=**REDACTED**
DRONE_BITBUCKET_SECRET=**REDACTED**
DATABASE_DRIVER=mysql
DATABASE_CONFIG=**REDACTED**@tcp(**REDACTED**:3306)/continuous_integration?parseTime=true

[YES ] I have searched for existing issues
[YES] I have discussed the issue with the community at https://gitter.im/drone/drone
[YES] I have provided a sample .drone.yml file to help the team reproduce
[N/A] I have provided details from the build logs
[YES] I have provided details from the server logs by running docker logs drone
[YES] I am not using the issue tracker to ask why my build failed

Good catch ... looks like we were using the wrong flag name. Fixed with https://github.com/drone/drone/commit/82eb00a4d004e330ef5b405e84d3a155f98a23b9 and new image published

Was just cURLing to trace back through the stack.. thanks for that.

I will reopen this with the following:
It seems agents are having trouble cloning from Bitbucket, failing with the following error:
fatal: could not read Username for 'https://bitbucket.org': No such device or address
Without ...allot... of investigation or knowledge of how agents are to authenticate when cloning private repos I assume its related to the above Bitbucket issue in general?

Hi,
You can below curl URL
$ curl -X POST -u "client_id:secret"
https://bitbucket.org/site/oauth2/access_token -d grant_type=password
-d username={username} -d password={password} /// this is API exposed by bitbucket
where
client_id : your client id (eg: 75frt****)
secret : your secret key (eg:8uyrioooreu*****)
username :
password :
so above url will be updated as
$ curl -X POST -u "75frt****:8uyrioooreu****"
https://bitbucket.org/site/oauth2/access_token -d grant_type=password
-d<EMAIL_ADDRESS>-d password={******}
Note : Initially i was using alias username in 'username' field and i was facing error "Unauthorised client" error, later when i changed username to my registered email id<EMAIL_ADDRESS>it worked fine.
Hope this helps.

And how should that help on an issue closed a year ago?


Issue with "Slug" and errors with inscription.json

Good Afternoon,
Please see PR; https://github.com/ordinals-wallet/ordinals-collections/pull/1147
I am receiving 3 errors, one regarding the "slug" value and 2 regarding the inscriptions.json
Can someone let me know what I am doing incorrectly, ive changed the slug value to what is being asked for numerous times and still am confronted with an error.
As for the inscriptions.json error, any clarity as to what is triggering it would be awesome. Please let me know if our .json format needs to be adjusted and any scripting solutions the team reccomends.
Eagerly excited to get our collection listed, please do get back to me as soon as possible.
==============================FAILED TESTS==================================
FAILED tests/test_colllections.py::test_meta - AssertionError: Slug does not match directory name
assert 'bitcoin-orbs' == 'Bitcoin-Orbs'

Bitcoin-Orbs
? ^       ^

bitcoin-orbs
? ^       ^
FAILED tests/test_colllections.py::test_inscriptions - TypeError: object of type 'NoneType' has no len()
FAILED tests/test_colllections.py::test_uniqueness - assert 998 == 0
========================= 3 failed, 2 passed in 0.26s ==========================

Exited with code exit status 1
CircleCI received exit code 1

Resolved