[Usage]: Set pipeline-parallel-size to 8 but only 1 or 2 GPUs running at the same time.

Your current environment
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.2
Libc version: glibc-2.35

Python version: 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A800-SXM4-80GB
GPU 1: NVIDIA A800-SXM4-80GB
GPU 2: NVIDIA A800-SXM4-80GB
GPU 3: NVIDIA A800-SXM4-80GB
GPU 4: NVIDIA A800-SXM4-80GB
GPU 5: NVIDIA A800-SXM4-80GB
GPU 6: NVIDIA A800-SXM4-80GB
GPU 7: NVIDIA A800-SXM4-80GB

Nvidia driver version: 550.90.07
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

How would you like to use vllm
I want to run one LLM at 8 GPUs for supporting 8 concurrent requests at the same time. So I run vllm as below
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m vllm.entrypoints.openai.api_server \
    --model /data/models/Qwen2-7B-Instruct/ \
    --served-model-name aaa \
    --trust-remote-code \
    --tensor-parallel-size 1 \
    --pipeline-parallel-size 8 \
    --port 8000

But when I test the api by PostMan Runner for concurrent test. The test result is the same as tensor-parallel-size 1 and pipeline-parallel-size 1 . The 8 nodes time cost is ~5s for each request as 1 node.
When I look at the GPU running state, I see that there are not eight GPUs running at 100% at the same time, there are only 1~2 GPUs running at the same time

in this case you just need to use tensor parallel of 8. no pipeline parallel is necessary.

@youkaichao Thanks for the help. I think this case is "Multi-Node Multi-GPU", since we need 8 instances (8 models) to work concurrently. Am I right ?

Can multi-node do the load balance better ? @youkaichao

multi-node is not for load balance, it is use multi-node to serve one model, e.g. the llama 3.1 405B.
for load balancing, you might want to take a look at some community library on top of vllm, e.g. https://docs.litellm.ai/docs/simple_proxy#load-balancing---multiple-instances-of-1-model

Thanks a lot @youkaichao for the update.
So we need to set tensor parallel to 8 to use 8 GPU to load 8 models to work concurrently?

And when should we use multi-node mode ?

one GPU is enough to hold your 7B model. you don't need tensor-parallel.

one GPU is enough to hold your 7B model. you don't need tensor-parallel.

@youkaichao Sure. I just need better concurrency. And can vllm support better concurrency for multiple GPU?

multi-node is not for load balance, it is use multi-node to serve one model, e.g. the llama 3.1 405B.
for load balancing, you might want to take a look at some community library on top of vllm, e.g. https://docs.litellm.ai/docs/simple_proxy#load-balancing---multiple-instances-of-1-model

Finally form my test, the "litellm+vllm" has best concurrency than "vllm multi-GPU multi-node" and "vllm multi-GPU one-node".
Thanks a lot @youkaichao for the help.

I'm having the same issue. @ybdesire would you mind sharing a snippet of how you use litellm with vllm for 8 GPUs?
For example, do you run the vllm servers separately with for X in 0..8 CUDA_VISIBLE_DEVICES=X python -m vllm ... --port 800X and then you have a config that points to these deployments?
Does litellm check for /health of the servers itself to account for startup time?


Missing command from TeamsFx-CLI article

Type of issue
Missing information
Feedback
There is an "m365" command in the CLI. It is not mentioned in this article.

Page URL
https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/teams-toolkit-cli?pivots=version-three#teamsapp-uninstall
Content source URL
https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/toolkit/Teams-Toolkit-CLI.md
Author
@MuyangAmigo
Document Id
9821a370-031a-b977-6cbd-c575ea3ad21f

Thanks @Rick-Kirkham for raising your query.
Hi @surbhigupta12, could you please help here to update the document as suggested?

@v-ramyas5 I don't see how to sideload unless m365 is used.

Hi @Rick-Kirkham,
Thanks for sharing the observation. Analyzing the usage of m365 in the shared scenario. Will get back on this soon.

Hi @Rick-Kirkham,
We observed that the article is outdated and the sideloading command must be updated.

From:
npm install -g @microsoft/teamsfx-cli
teamsfx m365 sideloading --file-path
To:
npm install -g @microsoft/teamsapp-cli
teamsapp install --file-path
We confirmed the commands with the Toolkit team. Since we do not have access to the article in add-in repo, request your support in updating the commands.
Thank you.

Hi @Rick-Kirkham , could you please help creating a documentation issue in add-in repo and link to this issue?
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/convert-xml-to-json-manifest#sideload-with-the-teams-toolkit-cli-command-line-interface

Hi @Rick-Kirkham , could you please help creating a documentation issue in add-in repo and link to this issue? https://learn.microsoft.com/en-us/office/dev/add-ins/develop/convert-xml-to-json-manifest#sideload-with-the-teams-toolkit-cli-command-line-interface

I'm tracking this work in an ADO item.

This is fixed in the source and will publish today.


Fix master after search replacement

Removes tests to fix bibsort removal on d74e93 commit.
(addresses #3233)

Fixes BibRank removal on d74e93. (addresses #3233)

Fixes warning on module externalization in 174b09.

Adds elasticsearch and invenio_records in travis configuration.

Signed-off-by: Leonardo Rossi<EMAIL_ADDRESS>

Just want to mention that this PR does not recover master fully. There are still tests failing.

@crepererum now it works fine..
I'm waiting @tiborsimko reviews the code to merge into the master.

:clap:

LGTM, tested, merging...


[WIP] Reorganize code

Start by splitting into more files.
Also I will implement the ideas from this comment: https://github.com/mtfishman/ITensorTDVP.jl/pull/10#issuecomment-1090487156

This is done now, except for relying on https://github.com/ITensor/ITensors.jl/pull/895 to get merged and registered.
@b-kloss @emstoudenmire feel free to look this over, the changes are mostly aesthetic.


Gh 1167 add faq for authorised exporter

Codecov Report

Merging #1168 into develop will decrease coverage by 0.01%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #1168      +/-   ##
=============================================
- Coverage      65.09%   65.08%   -0.02%
  Complexity      1314     1314
=============================================
  Files            630      630
  Lines          19562    19562
  Branches        2456     2456
=============================================
- Hits           12733    12731       -2
- Misses          5794     5796       +2
  Partials        1035     1035

Impacted Files
Coverage Δ
Complexity Δ

...a/uk/gov/gchq/gaffer/cache/CacheServiceLoader.java
67.85% <0%> (-7.15%)
6% <0%> (ø)

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 d321fc5...829ce0e. Read the comment docs.


Load migrations from all bundles that are shipped with the plugin

1. Why is this change necessary?
When you add a bundle in the additional bundles, they shall be shopware bundles. Shopware bundles can have migrations. When I name dependent bundles, those should execute their migrations as well.
2. What does this change do, exactly?
I use the same strategy to load the additional bundles to get the additional migrations. As the migration source for a plugin is created at different places I could not change its content so it is not reliable to change.
3. Describe each step to reproduce the issue or behaviour.

Create a bundle with migrations
Refer to it in the additional bundles
Have code based on the migrations in the bundle
Your plugin bricked

4. Checklist

[ ] I have written tests and verified that they fail without my change
[ ] I have created a changelog file with all necessary information about my changes
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

I will close this pull request as its inactive. Feel free to create a new one updated

I did https://github.com/shopware/platform/pull/2583


make checkbox text clickable

see eg http://stackoverflow.com/questions/6293588/how-to-create-an-html-checkbox-with-a-clickable-label
arguably all the other labels should contain their inputs as well

Thanks!


Support for swarm manager

I attached dockerui to a swarm manager. All function works fine, but there isn't any feature related to the swarm cluster. Info on nodes and container location on the cluster nodes.

did you manage to configure swarm backend with tls support ?
I have weird logs messages
ui-for-docker_1    | 2016/06/03 12:16:22 http: proxy error: malformed HTTP response "\x15\x03\x01\x00\x02\x02"

The UI doesn't support TLS directly, there is an example that uses socat but it's insecure so I don't recommend it for real deployments.

@keneva, you confirm that your hack with socat it to use http but it point to the swarm or to the docker daemon (which may be the equivalent of mountint the docker socket right ?)

@sebmoule Our latest version of the fork has Swarm support: https://github.com/cloud-inovasi/cloudinovasi-ui

@deviantony Looks great, any interest in pulling upstream or collaborator access here?

@kevana collaborator access would be fine. I still have a lot of features to implement as we're using it in my company. Users of this UI could take advantage of it.
I've put some major changes in our UI so merging it upstream will be complicated but still doable if you want to.

Invite sent. A UI refresh would be nice but if it's a lot of work then don't worry about it. I haven't had much time lately due to other priorities at work

Thanks ! I'll see what I can do about merging the my changes about the UI in this repository, I could open a PR for you to review first. I do no have much time either :)

@matteoturra
Portainer has Docker Swarm and swarm-mode support: https://github.com/portainer/portainer


Adding hendrycksTest (https://arxiv.org/abs/2009.03300)

Issue #120

#162 (comment)
Under "training_docs" it might look something like:
docs = ()
for train_dir in ["auxiliary_train", "dev"]:
    for f in (self.DATASET_PATH / train_dir).iterdir():
        docs += self._load_docs(f)
return docs

Thank you!

Hey @andyzoujm! Just to clarify, it seems that the training_docs of a single subject task includes documents from outside subjects (e.g. if you instantiate an hendrycksTest-anatomy task its training docs will also include the dev sets of all other subjects). Is this intended?

#162 (comment)
Under "training_docs" it might look something like:
docs = ()
for train_dir in ["auxiliary_train", "dev"]:
    for f in (self.DATASET_PATH / train_dir).iterdir():
        docs += self._load_docs(f)
return docs

Thank you!

Hey @andyzoujm! Just to clarify, it seems that the training_docs of a single subject task includes documents from outside subjects (e.g. if you instantiate an hendrycksTest-anatomy task its training docs will also include the dev sets of all other subjects). Is this intended?

Yes. I don't think we'd want to fine-tune a new model for each subject. This would result in 57 models.

Oops sorry for the misunderstanding! I assumed training_docs() was tied to the subject type. Thanks for putting this together!

Yes. I don't think we'd want to fine-tune a new model for each subject. That would result in 57 models.

We're not training models on training_docs currently, rather, it's used for sampling the fewshot examples -- so, just to be clear, the fewshot examples for evaluating on any subject should be sampled from all subjects, right?

Yes. I don't think we'd want to fine-tune a new model for each subject. That would result in 57 models.

We're not training models on training_docs currently, rather, it's used for sampling the fewshot examples -- so, just to be clear, the fewshot examples for evaluating on any subject should be sampled from all subjects, right?

I'm sorry if I'm misunderstanding.
The dev set is intended for few-shot which has 5 examples per subject. I think this is achieved by overriding the "fewshot_examples" function. Note it's only sampling from the particular subject (hence max 5 examples).
The training_docs I thought were for fine-tuning which include everything in the dev set and some auxiliary multiple choice training data.

Very big models could do few-shot, but smaller models probably need fine-tuning to have better-than-random accuracy.


Do not swap wire names with node names

This resolves #627. Can we merge it to #626?

I think this is the right solution.
The plan is to ultimately remove all wires, replacing them with topologically sorted nodes which would allow us to do the name swapping without the bug in #627


Dispatch refresh does not include reading characters (question mark, dot)

Tool
Name: Dispatch
Version: 1.3.0
OS: Windows 10 build 17763
Describe the bug
Dispatch CLI does not export characters like ? and . in dispatch refresh. However it seems to have an impact on the dispatch intent matching when the user does use this question mark when there is a similar question in another app.
Example (translated into English):
question "With whom should I sign a contract?" --> question in qna maker
utterance "should I sign a contract?" --> in a luis app to start a decision making dialog
dispatch refresh translates this into these utterances (without question marks):

with whom should I sign a contract --> dispatch intent to qna maker
should I sign a contract --> dispatch intent to luis app

Testing "should I sign a contract?" triggers the dispatch intent to qna maker, unless I manually add the question mark in dispatch
[bug]

@hansmbakker , dispatch create command has the optional parameter "--dontReviseUtterance", which will keep the utterances from LUIS/QnA maker apps as is.  This behavior is added to make sure that that utterances with ? won't be heavily skewed toward QnA intent since most QnA questions end with ?.
Dispatch documentation:
https://github.com/Microsoft/botbuilder-tools/tree/master/packages/Dispatch
Try using the param and see if it works better for your Dispatch.  Thanks!

@hansmbakker, if don't mind sharing the source LUIS/QnA maker, that'll be great.  As Dispatch strips the character from both LUIS/QnA sources, the character '?' shouldn't have any weight in the prediction.

@tsuwandy thank you very much for getting back to me!
We do not have the utterances in QnA Maker anymore so unfortunately I cannot quickly re-test this - we use LUIS exclusively for utterance recognition now to improve the performance on Dutch sentences containing jargon.
After we moved to this architecture, the QnA Maker team released a custom Dutch ranker to us as a preview, which seems to significantly improve prediction at least for short utterances. As we already shifted our architecture, I have not yet been able to test this new ranker with sentence-length utterances.
Let's close this issue for now, and it can be reopened should I (or somebody else) run into it again.


ci: build and deploy on docker after tagging

There might be some overlap with #178

Codecov Report

Merging #190 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   75.96%   75.96%
=======================================
  Files          40       40
  Lines        3112     3112
=======================================
  Hits         2364     2364
  Misses        610      610
  Partials      138      138

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 d6f3b99...899b544. Read the comment docs.


Use documentation IPs for example IPs

See https://tools.ietf.org/html/rfc5737
Signed-off-by: Ask Bjørn Hansen<EMAIL_ADDRESS>

Codecov Report

Merging #10434 into master will decrease coverage by 0.06%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master   #10434      +/-   ##
==========================================
- Coverage   43.68%   43.62%   -0.07%
==========================================
  Files         586      586
  Lines       81389    81391       +2
==========================================
- Hits        35552    35504      -48
- Misses      41433    41487      +54
+ Partials     4404     4400       -4

Impacted Files
Coverage Δ

models/token.go
73.77% <0%> (-6.56%)
:arrow_down:

models/issue_watch.go
58.53% <50%> (-5.22%)
:arrow_down:

services/pull/check.go
32.92% <0%> (-17.69%)
:arrow_down:

modules/queue/workerpool.go
54.8% <0%> (-3.21%)
:arrow_down:

services/pull/temp_repo.go
29.05% <0%> (-2.57%)
:arrow_down:

services/pull/patch.go
60.37% <0%> (-2.52%)
:arrow_down:

models/pull.go
41.82% <0%> (-0.56%)
:arrow_down:

models/gpg_key.go
54.81% <0%> (-0.56%)
:arrow_down:

models/error.go
29.23% <0%> (+0.51%)
:arrow_up:

... and 2 more

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 3be89b9...9cebac4. Read the comment docs.


Camera convention for D-NeRF

Hello,
Thank you for the very cool work! I have a question about the camera convention that you use to load the D-NeRF dataset. Here it's converting Blender to COLMAP.
matrix = np.linalg.inv(np.array(frame["transform_matrix"]))
R = -np.transpose(matrix[:3,:3])
R[:,0] = -R[:,0]
T = -matrix[:3, 3]
I compared it with the one from 3dgs:
c2w = np.array(frame["transform_matrix"])
c2w[:3, 1:3] *= -1
w2c = np.linalg.inv(c2w)
R = np.transpose(w2c[:3,:3])
T = w2c[:3, 3]
I noticed that both formulations actually give the same rotation matrix R, but the translation vector T has the first element flipped. I was wondering if you could provide some explanations as to why that is?

Ah nvm, i got my answer here:
https://github.com/graphdeco-inria/gaussian-splatting/pull/111


Can't install, since the folder does not exist.

This happens:
➜  package  node install.js
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT: no such file or directory, open '/Users/sebinsua/.ipython/kernels/nodejs/kernel.json'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.writeFileSync (fs.js:1152:15)
    at Object.<anonymous> (/Users/sebinsua/package/install.js:15:4)
    at Module._compile (module.js:428:26)
    at Object.Module._extensions..js (module.js:446:10)
    at Module.load (module.js:353:32)
    at Function.Module._load (module.js:308:12)
    at Function.Module.runMain (module.js:469:10)
    at startup (node.js:124:18)

I will create the folder manually.

Just hit this, it needs to do whatever the equivilent of
mkdir -p ~/.ipython/kernels
before running that line

I am having the same problem.
It did get solved by mkdir -p ~/.ipython/kernels but it would be great if this could be handled automatically


[JOSS Review] Installation and packaging

Re: JOSS Review
The installation process is a little confusing and somewhat non-standard. (It seems to be primarily targeted towards developers.) Although you state that idpconfgen is required as a dependency at the outset, it is not installed alongside spycipdb. The installation instructions start by geting you to set up an environment for spycipdb, e.g.:
conda env create -f requirements.yml
conda activate spycipdb

You then install spycipdb into this environment in development mode:
python setup.py develop --no-deps

At this point you have an environment with a non-working spycipdb install, i.e:
spycipdb
Traceback (most recent call last):
  File "/home/lester/.conda/envs/spycipdb/bin/spycipdb", line 33, in <module>
    sys.exit(load_entry_point('spycipdb', 'console_scripts', 'spycipdb')())
  File "/home/lester/.conda/envs/spycipdb/bin/spycipdb", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/lester/.conda/envs/spycipdb/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/home/lester/.conda/envs/spycipdb/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/lester/Downloads/JOSS/SPyCi-PDB/src/spycipdb/clis/cli.py", line 18, in <module>
    from spycipdb.clis import (
  File "/home/lester/Downloads/JOSS/SPyCi-PDB/src/spycipdb/clis/cli_cs.py", line 52, in <module>
    from idpconfgen.libs.libmulticore import pool_function
ModuleNotFoundError: No module named 'idpconfgen'

It is only after this that you have instructions for installing the required idpconfgen, after which you need to reinstall spycipdb anyway.
I understand that you may wish to separate the two packages to allow them to be developed and updated independently, but if idpconfgen is strictly required by spycipdb, then perhaps it would be good to install it at the time that the spycipdb environment is resolved. This could be done as follows, which would still result in a development install of idpconfgen:
diff --git a/requirements.yml b/requirements.yml
index f7c96bb..bcb00a0 100644
--- a/requirements.yml
+++ b/requirements.yml
@@ -4,6 +4,7 @@ channels:
     - defaults
 dependencies:
     - python>=3.8,<4
+    - git
     - numpy>=1.22.4,<2
     - pandas>=1.2.4,<2
     - numba>=0.53.0,<1
@@ -11,4 +12,6 @@ dependencies:
     - scipy>=1.8.1,<2
     - matplotlib>=3.5.2,<4
     - pip
+    - pip:
+      - "--editable=git+https://github.com/julie-forman-kay-lab/IDPConformerGenerator.git#egg=idpconfgen"
     - tox>=3.25.0,<4

Another issue with your installation method is that you are re-solving the environment when adding additional (optional) dependencies, so the Python version for the resulting environment is ultimately determined by the last thing that is installed. For example, after installing only spycipdb and idpconfgen I end up with a Python 3.10 environment:
python --version
Python 3.10.8

However, after following the instructions to install UCBShift, this is downgraded to 3.8.15:
python --version
Python 3.8.15

This is why you then need to reinstall both idpconfgen and spycipdb, since they reside in the site-packages directory for the original Python variant, i.e.:
ls -l ~/.conda/envs/spycipdb/lib/python3.10/site-packages
total 16K
drwxr-sr-x 2 lester lester 4.0K Nov 29 12:39 idpconfgen-0.6.16.dist-info
-rw-r--r-- 1 lester lester   42 Nov 29 12:39 easy-install.pth
-rw-r--r-- 1 lester lester   57 Nov 29 12:39 __editable__.idpconfgen-0.6.16.pth
-rw-r--r-- 1 lester lester   45 Nov 29 12:39 spycipdb.egg-link

After re-installing, they are now in /.conda/envs/spycipdb/lib/python3.8/site-packages, as required.
Although your paper specifies support for Python >= 3.8, < 4.0, the user doesn't have control over the variant that they end up with, i.e. it would be dependent on the optional packages that they install (and potentially the OS too). This would make it hard for a user to install your package alongside other tools within a larger environment, where they might require a specific Python variant for other things (or their own scripts) to work. This might not be an issue if you only intend spycipdb to be used in a stand-alone fashion, but would make it harder to be used within broader ecosystem.
Since your packages have minimal and standard dependencies I would advise creating packages for them. These could easily be built during your CI and directly uploaded to appropriate package repositories through which they could be distributed, e.g.  PyPi and the Anaconda Cloud (via conda-forge). This would make spycipdb and idpconfgen accessible to a much wider range of users, greatly simplify the installation process, and make it easier to use within a larger ecosystem of packages.

Thanks for finding this bug Lester! It is also a good idea to see what I can do about package handling with PyPi but I will leave that improvement for a later date. I have solved this issue in #36

This definitely used to work, but I'm now seeing the following issue on environment creation:
Installing pip dependencies: - Ran pip subprocess with arguments:
['/home/lester/.conda/envs/spycipdb/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/lester/Downloads/JOSS/SPyCi-PDB/condaenv.6x3q1x15.requirements.txt', '--exists-action=b']
Pip subprocess output:
Obtaining idpconfgen from git+https://github.com/julie-forman-kay-lab/IDPConformerGenerator.git#egg=idpconfgen (from -r /home/lester/Downloads/JOSS/SPyCi-PDB/condaenv.6x3q1x15.requirements.txt (line 1))
  Updating ./src/idpconfgen clone
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'error'

Pip subprocess error:
  Running command git fetch -q --tags
  Running command git reset --hard -q eafa437c1f684d819e1bbcbc40313ffea18abdec
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in idpconfgen setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>=3.8.*'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

failed

CondaEnvException: Pip failed

(This occurs both using mamba and vanilla conda.)
I'll try to debug and let you know if I find a fix.

This error occurs if I just try to install IDPConformerGenerator directly, i.e.:
git clone https://github.com/julie-forman-kay-lab/IDPConformerGenerator
cd IDPConformerGenerator
python setup.py develop

Gives:
error in idpconfgen setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>=3.8.*'

Changing to the following works:
git diff
diff --git a/setup.py b/setup.py
index 919ffcd..57bff9d 100644
--- a/setup.py
+++ b/setup.py
@@ -83,7 +83,7 @@ setup(
     keywords=[
         # eg: 'keyword1', 'keyword2', 'keyword3',
         ],
-    python_requires='>=3.8.*,<4',
+    python_requires='>=3.8,<4',
     install_requires=[
         ],
     extras_require={

Strangely, this file hasn't been updated for four months, so I'm not sure why it's no longer working. However, assuming the change still resolves to the correct version pinning, then I'd suggest updating it. (I'm happy to raise an issue on the other repository if needed.)

Thank @lohedges, that is interesting. I noticed that when running tox -e test while developing for IDPConformerGenerator lately but I will raise an urgent bugfix there myself.

I have updated this in: https://github.com/julie-forman-kay-lab/IDPConformerGenerator/issues/239


Need a sample ipython notebook

Hello, @lucidrains,
Thank you for providing this.
For demo purposes, could you please provide a sample demo in Jupyter notebook?🫠
Best,
LITDataScience

Any update?


:EnRefactor only updates local file

The diff based refactor handling in the vim client only update the local file, while renaming a symbol should change all occurrences of it in the source.
Based on the (Scala Refactoring)[http://scala-refactoring.org/rename/] documentation, a Rename should trigger some sort of user interaction if the symbol is accessible beyond the current file. In the vim client, we simply update any occurrences of the symbol in that file & continue on as if everything is alright. This is incorrect and leads to compile failure for non-local renames.
I think we should either fix this or rename the command :EnRenameLocal

EnRefactor is expected to work once this issue is resolved: https://github.com/ensime/ensime-server/issues/1133. So we should wait until that. The EnRefactor behaviour is explained in the docs.


GnuTLS fails to build for non-default nix store: Several packages fails to build because of mismatched sha256 hash

Issue description
I am trying to build multiple packages form nix channels nixpkgs-unstable and nixos-17.09 to a non-default nix store. Some of the packages fails to build complaining sha256sum hash mismatch. However, when I see the binary available for the same packages in the nix channels. As long as the nix is built with a different storeDir and stateDir, it should be fine. Many common packages are building fine except few. I am wondering if there is a way to override these default if not specified as override option in the package definition itself. I have heard about overlay but haven't been able to get it working.
Steps to reproduce
nix-env -iA nixpkgs.slurm -j32
with storeDir=$HOME/opt/nix/store
with stateDir=$HOME/opt/nix/state
Technical details
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

system: "x86_64-linux"
host os: Linux 2.6.32-696.16.1.el6.x86_64

Some of the sources necessary to build the packages are no longer available or have changed, which results in hash mismatch errors. (The master branch must be better in this respect than the release-17.09 branch.) This does not affect /nix/store because the sources for /nix/store are cached on Hydra and at cache.nixos.org. Occasionally we discover such issues and fix them.

Many common packages are building fine except few. I am wondering if there is a way to override these default if not specified as override option in the package definition itself. I have heard about overlay but haven't been able to get it working.

Just clone this repo, build from it, and edit what is necessary to fix the build. Then please submit your fixes for the benefit of the others.
You may have better experience with Nix in chroot. I have not used it, but nix-user-chroot may work.

 You will have to stay with release-17.09 (and may find some fixes for the hash mismatch or dead source errors in master branch).

See this about nix-user-chroot: https://nixos.wiki/wiki/Nix_Installation_Guide#Installing_without_root_permissions

@orivej @vcunat Hydra supports repeated builds for checking reproducibility. We could create a job that does repeated builds of drv.src.

I can't see where to check that on Hydra, but repeated builds won't help by itself – we need to preferHashedMirrors = false as well.

I have done as suggested by orivej, copied the repo and changed the hash as required. However, this probably goes against the principle of immutable build system. The current caches does not get rebuilt even when the hash is changed is weird.

OK. Could you publish your fixes on GitHub, or list the packages whose hashes you had to change?

I had to change hash for pkgs/data/misc/dns-root-data/default.nix for branch 17.09
# old hash
#sha256 = "01n4bqf95kbvig1hahqzmmdkpn4v7mzfc1p944gq922i5j3fjr92";
# new hash
sha256 = "05nlfqvny1hy2kwaf03qb7bwcpxncfp6ds0b14symqgl9csziz1i";

The build continues but is stuck at PASS: dtls-rehandshake-cert-2. It has been in this state for past 9 hours.

I have not encountered such issue (see our CI). Could you terminate and restart the build? Only gnutls will be rebuilt.

I have tried to stop and rebuild multiple times, however, still it get stuck everytime at the same place PASS: dtls-rehandshake-cert-2. Does it need some randomness enabled etc?

You may compare the list of tests in the CI (ending with PASS: dtls-rehandshake-cert-2 ) with your list of tests to find out which is hanging. (Note that they are ordered differently in different runs.) To progress further without debugging the cause of the hang, you may disable gnutls tests by replacing inherit doCheck; with doCheck = false; in pkgs/development/libraries/gnutls/generic.nix.

The above did solve my issue and I am able to install packages. However, I am finding few more packages that are broken.

"fribidi"

src is not reachable.
Additionally I see the following error after fixing the default.nix for the above package:
./configure: line 13469: syntax error near unexpected token GLIB,$GLIB_PACKAGE' ./configure: line 13469: PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >=$GLIB_MINVERSION)'
I do not know how to fix this. Possibly directly editing the configure script but when I look at the configure file there is no line 13469.


systemd: build libudev.so "separately"

Motivation for this change

breaking a problematic dependency cycle: https://github.com/NixOS/nixpkgs/issues/96479
perhaps even closure savings

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

So far this is just a quick proof of concept, and in fact tests.installer.lvm.x86_64-linux won't work and I don't know why yet.

Note to self: libudev.so build is more tied to systemd than I expected (did I glimpse that it links statically against libsystemd?), so an approach like this might be more maintainable.  Of course, without too much work we could additionally reduce the build-time closure (partially) and build time (try instructing ninja to build just specific targets).

I think it would be easier to build libudev/libsystemd with ninja and than re-use this library when building systemd (replacing it with a symlink in postInstall?). Here is an example where I do it for systemd-networkd: https://github.com/Mic92/dotfiles/blob/711f8d5e20fb543267ed0620b9ee0c139675ef27/nixos/modules/networkd.nix#L11

I do plan that, but so far there are problems with something else apparently.

We'd have to split systemd and libsystemd first before we can do the systemd and udev split..

Can you explain why?

Libudev seems to not depend on libsystemd.

But having a separate libsystemd would be also helpful in longterm because it might be easier to patch for musl libc rather than the whole systemd code base.

To be clear, it does not depend on dynamic libsystemd.  I'm not sure why they link stuff this way ATM: https://github.com/systemd/systemd/blob/v246/src/udev/meson.build#L145

This is about splitting the libudev library, not the udev binary, right?
https://github.com/systemd/systemd/blob/v246/src/libudev/meson.build

Yes, this attempted to separate just the library.

Ignore my ramblings. I thought it was because of udev linking to libsystemd dynamically.
For an initial effort; I wouldn't do too much fancy things; and just keep libudev statically linked to libsystemd. Though I admit it's a bit strange. We could ask upstream why they do this.
If we're building just the libudev target; how large is the output size?     Is it significantly smaller than systemd as a whole?

Roughly 100x smaller.

But the cycle will be back If you set pkgs.udev to the libudev package.

To be clear, it does not depend on dynamic libsystemd. I'm not sure why they link stuff this way ATM: https://github.com/systemd/systemd/blob/v246/src/udev/meson.build#L145

It seems that libudev was built with a static libsystemd before anyway so this is not big regression size wise. And I still think it should be possible to bring back this libudev in the systemd package by putting a symlink in the package from "$lib/lib/libudev.*" to libudev.

While doing so, we should also remove the udev = systemd; "alias", which would exercise the derivation we built a bit (for example for libfido2)

You meant libudev = systemd alias, I expect.  I assume udev attribute users won't be satisfied by just libudev.

You meant libudev = systemd alias, I expect. I assume udev attribute users won't be satisfied by just libudev.

IMHO, this PR should provide the udev attribute, so it's not an alias anymore.
libudev.so and friends could be in the udev.lib output, the .pc file in the udev.dev output - Simply introducing libudev next to the already existing udev and systemd attributes will only cause more confusion.
Once that has proven to work, we could see how we can build systemd without udev (and instead pipe in our udev attribute, or replace the one built there with symlinks)

But libudev attribute is there already (in aliases), and udev itsefl isn't included in (the current) libudev so I assumed it would be confusing.
The only failure I knew about is fixed now :tada:  Any ideas on what else to test in particular?  (Then we can do polishing like the attribute names and reducing build-time deps.)

I suspect that splitting a libudev derivation from the udev+systemd derivation solves problems that splitting a libudev+udev derivation from the systemd derivation does not. The former split means the closure has two compatible versions of libudev.so.1 (and we can replace one with a symlink to the other), but the latter split means the closure has two incompatible versions of libsystemd-shared-246.so.

@vcunat libudev is in aliases.nix, because it was used at some point (and changed to an alias in April 2018) Nothing inside nixpkgs itself is using it at this point (it'd fail ofborg eval checks too).
I'm talking about the
udev = systemd; # TODO: move to aliases.nix

in all-packages.nix (at around L18299).
We currently use systemd and udev attributes pointing to the identical derivation, which is bad. We don't really know what really needs full systemd, and what only needs the udev bits.
Instead of moving this to aliases.nix (as suggested by the comment), and by this, having to replace udev with systemd everywhere, I'd rather like to see the udev attribute being a proper derivation providing a libudev.so in its udev.lib output (and *udev.pc and libudev.h in the udev.dev output) .
Of course we'd need to verify packages still build after that change (as things like lvm2 also want to see the *systemd.pc file, not the *udev.pc file - which might be an upstream bug).
In the longer run, having packages who only really need udev to declare udev as a build input seems much more desirable, both for closure sizes as well as cyclic dependency problems.
I don't think resurrecting libudev from aliases.nix, and using it inside nixpkgs as well as the systemd and udev attribute is desirable.
@andersk I don't really understand your comment. Why couldn't we (re-)symlink libudev.so.1 inside the systemd derivation to the udev.lib location? Why would we need this in first place? Other applications wanting to link against libudev.so could just ask pkgconfig, and get a location from the udev.lib output back?
If we need to still provide symlinks, why would they be incompatible?
On the other side, why do we need to provide libsystemd-shared-246.so in any udev output? Reading https://github.com/NixOS/nixpkgs/pull/97051#issuecomment-687133750, ninja might need to intermediately compile libsystemd_static to produce libudev.so.1, but the libsystemd.a file  shouldn't need to be in the udev output, should it?

This PR provides libudev.pc.  There's also udev.pc and I don't see why it should be provided here.  That's why pointing udev attribute to this derivation seems confusing to me.  The *.pc files are generally quite indicative of what makes sense to be split (during runtime), and having aliases based on those seem perfectly fine to me, so that packages can express what they need even for derivations that are not split (yet)... though it's perhaps better to avoid cases where we find it very unlikely to split them in the following couple of years.

We /can't/ use aliases.nix, as it'd fail grahamcofborg-eval-package-list-no-aliases - they're only meant for backwards compatibility for thing referring to it outside of nixpkgs (IMHO a questionable thing anyways, as semantics might change too).
Creating a udev = systemd; alias outside aliases.nix doesn't really provide a lot of value IMHO - we effectively don't know it's wrong, and whether packages really need systemd or udev.
Given the dependency cycle has been resolved for now with https://github.com/NixOS/nixpkgs/pull/97008, and we don't need to rush this, can we give this some more research?
I could envision udev.dev shipping both udev.pc and libudev.pc, with udev binaries in udev.bin/udev.out, and libudev in udev.lib.

I could see that... but as the derivations are written so far, to get udev.pc you basically need to build the systemd attribute, and you can't use that as a build-time dependency of lvm2 (for example).

I could see that... but as the derivations are written so far, to get udev.pc you basically need to build the systemd attribute, and you can't use that as a build-time dependency of lvm2 (for example).

Yeah, as written here, the udev and systemd derivations would need to be much more separated (and only share src and patches)

we don't need to rush this

For 20.09 I think it would be preferable to have some improvement in about one week.  (than the current solution with two systemds in most closures)

It's a 28MB closure size increase, yes. But it's probably fine to ship 20.09 even with that.
Splitting udev and systemd is something that probably takes more time than we have to properly fix it before the 20.09 release, and I don't think the current proposed approach improves matters from a maintainability factor. IMHO, we should just go with the closure size increase for now, work on a proper fix in unstable, and if the fix is not too invasive, it can probably be backported (but I think it does require quite some changes in many packages).

@andersk I don't really understand your comment. Why couldn't we (re-)symlink libudev.so.1 inside the systemd derivation to the udev.lib location? Why would we need this in first place? Other applications wanting to link against libudev.so could just ask pkgconfig, and get a location from the udev.lib output back?
If we need to still provide symlinks, why would they be incompatible?

Perhaps you are reading the opposite of what I wrote? I said exactly that we can make such a symlink because the two libudev.so.1s are compatible. This is why it does makes sense to split off a libudev derivation.

On the other side, why do we need to provide libsystemd-shared-246.so in any udev output? Reading #97051 (comment), ninja might need to intermediately compile libsystemd_static to produce libudev.so.1, but the libsystemd.a file shouldn't need to be in the udev output, should it?

The systemd-udevd and udevadm binaries link against libsystemd-shared-246.so—you can see this with ldd. AFAIK, the libsystemd-shared-246.so from a udev derivation would not be compatible with the libsystemd-shared-246.so from a systemd derivation. This is why it does not make sense to split off a udev derivation.
(Sorry if the emphasis and repetition comes across as patronizing…there are certainly things I could be wrong about here, but I want to make sure we’re communicating correctly so we can figure out where that might be.)

@andersk right - splitting systemd-udevd from systemd won't probably work, and not sure how udevadm interacts with systemd (and whether it's worth digging into it).
So after a second thought, calling this other derivation libudev would make sense - but it should really be its own derivation (only sharing src and patches with the systemd expression) - and we should check all current udev=systemd buildInputs in other packages, to see if those can be replaced with libudev.

As I wrote above, it would be nice for it to be "independent" derivation, but I can't see how to do that.  The configure phase isn't easy to satisfy, nor easy to cut down to just libudev.  Or at least I didn't find such a way.

:thinking: this PR actually seems very close to the currently merged workaround, only with the binaries "deduplicated" (i.e. anything but libudev deleted from the first result, and libudev replaced in the second result).

The Arch package has a relatively simple approach to this, in its split package for systemd/systemd-libs.
It boils down to these two lines, that copy the libraries that are then shipped in systemd-libs package:
https://github.com/archlinux/svntogit-packages/blob/packages/systemd/trunk/PKGBUILD#L177-L179

Well, yes... other distros don't have this strict automatic detection of references (cycle between systemd and some of its libs) and they can keep all output in the /usr/share tree, so it's easier for them to do such things.

@vcunat would a systemdMinimal, as proposed in https://github.com/NixOS/nixpkgs/pull/98299 solve this sufficiently, as in, is the closure size acceptable?
Given you apparently need dbus to build systemd, which needs systemd itself, a libudev.so only wouldn't get us that far in the longer run anyways…

Given you apparently need dbus to build systemd

Looking at the systemd source code, the libdbus dependency is optional and only used in the test suite. Given that we don't build the test-suite it seems we can just remove the dependency completely.

I think the systemdMinimal approach, which we already ship for some time is sufficient. Reopen if you disagree ;-)


modifying a zip with data descriptors results in invalid zip file

Currently, taking a .docx produced by libreoffice, and passing it through Zipc.of_binary_file and Zipc.to_binary_file results in a file that Word chokes on. Other tools seem happy, but I think Word is stricter but not wrong.
I'm not quite finished digging, but I know at least the following:

the file headers in the input have gp flag bit 3 set.
when that happens, all of https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT, https://en.wikipedia.org/wiki/ZIP_(file_format) and https://ecma-international.org/publications-and-standards/standards/ecma-376/ table B.5 say that the file should have a data descriptor
the files that are output by zipc keep the gp flag, but don't produce (or drop) the data descriptors. Concretely, there are 16 bytes after each file content of the initial zip that don't end up in the new file, and these 16 bytes contains things like "PK\007\b\152\173\197\n\221\000\000\000D\002\000\000", where ""PK\007\b" is the optional signature, the next four bytes are the crc32 and I'm not sure what the rest is.

Adding the 16 bytes of data descriptors from the original file makes Word accept the file.
What I'm confused about is why clearing the gp flag doesn't seem to solve the problem.

Clearing the gp flag probably doesn't help because the data in the local file header is bad without it (crc, compressed size and decompressed size are 0, which Word might be checking).

Thank you very much for tracking this down. Indeed zipc's encoding is clearly wrong here. However:

Clearing the gp flag probably doesn't help because the data in the local file header is bad without it (crc, compressed size and decompressed size are 0, which Word might be checking).

I don't think so. zipc is (re)writing the local file header based on the central directory data only (see first point here). So I rather simply make sure we clear the flag on write rather than what you propose in #7.
Commit 147c254 does this, could you please confirm that it solves the issue.

https://ecma-international.org/publications-and-standards/standards/ecma-376/ table B.5 say that the file should have a data descriptor

That looks a bit contradictory. Section B.2 mentions that data descriptors may not exist and table B.1 under "Data descriptor" has "Optional" for "Supported on production". I think (or hope) it should be fine to produce docx files that have no data descriptors.

I don't think so. zipc is (re)writing the local file header based on the central directory data only (see first point here). So I rather simply make sure we clear the flag on write rather than what you propose in https://github.com/dbuenzli/zipc/pull/7.
Commit https://github.com/dbuenzli/zipc/commit/147c2547063ded6d16076e56a187fc6ffad0b4d4 does this, could you please confirm that it solves the issue.

It works, thanks.
(which I'm confused about, because that's exactly what I tried first when I mentioned clearing the flag. I even have a commit showing pretty much the same code as you. But anyway, the problem is fixed and I've spent long enough debugging the problem, I'm not going to start debugging my debugging)

I've spent long enough debugging the problem

Thanks again for going to the bottom of these things.
If you feel that's not the case I'm happy to do a release whenever you request.

I think it's reasonable to make a release.
I don't expect more problems, because:

the first problem came from feeding a Word file into zipc into Word
the second from feeding a LibreOffice file into zipc into Word (neither unzip nor LibreOffice seem to ever complain)
I have no other program to make docx files ! (I actually just thought of google docs, so I fed a docx from it into zipc into Word, which worked, so that breaks the pattern thankfully)


docs: add edit this page link

What I did

Added an edit this page link that links to the github file.

Closes #1441
Testing Instructions

View the deploy preview.
Note that links target the main branch and this PR is based on staging/clefairy.  So some links such as docs/theming/index.md which do not exist on branch main will be broken.
I left the homepage of ux. out of having a edit this page link.  If we want to add it let me know.

Notes to Reviewers

I wasn't able to click the edit this page links, neither on foundations, tokens, nor elements pages, on my OnePlus nord ce2, chrome or Firefox

@zeroedin I was redirected when clicking the link using the latest Chrome, but like you said, sometimes it 404s. Styling looks fine to me too.
IMO, we should remove it from the sections below, the rational being we don't want just anyone editing content about the design system as a whole or how people should use it except for the team.

About
Get started

we don't want just anyone editing content

Any edits would have to be vetted by PR review, anyways
The only people who can make changes to any content are users with "Write" access to this repo. Everyone else has to make a PR and request a review

https://deploy-preview-1882--red-hat-design-system.netlify.app/patterns/ no link here

Missing on these pages too:

https://deploy-preview-1882--red-hat-design-system.netlify.app/patterns/card/
https://deploy-preview-1882--red-hat-design-system.netlify.app/patterns/logo-wall/ (all subpages)
https://deploy-preview-1882--red-hat-design-system.netlify.app/patterns/tile/


Feature/content filter error architecture

Creating this pull request to track the work to merge the new architecture for ContentFilter errors into develop.
This is a rather old feature branch, so the first thing I have to do is to merge develop into this feature branch, and solve any possible merge conflicts, so that this code is up to date.

Let me attach the conversation that was already going on about the changes in this feature branch:
Email from Daniel Weck:
I am a little concerned about the NoLicenseForDecryption type of ContentFilterError, which seems quite specific.
See whole code diff:
https://github.com/readium/readium-sdk/compare/develop...feature/contentFilterErrorArchitecture
For example, the LCP ContentModule integration handles license-related DRM "bootstrapping" (e.g. certificate + signature checks, user passphrase input) early on, outside of the ContentFilter chain.
See:
https://github.com/readium/readium-sdk/compare/develop...feature/content-module
https://github.com/readium/SDKLauncher-Android/compare/develop...feature/lcp
https://github.com/readium/SDKLauncher-iOS/compare/develop...feature/lcp
https://github.com/readium/SDKLauncher-OSX/compare/develop...feature/lcp
https://github.com/readium/readium-lcp-client/tree/android
Email from me:
First, about the enumeration value "NoLicenseForDecryption". Would you prefer something more generic like "InternalError"?
Second, about the error processing in ContentModule. That's absolutely correct, but that should happen in parallel to the error processing in the ContentFilter. It doesn't matter if you have a ContentModule set up or not, or even if you have any DRM going or not, you can always have a chain of ContentFilter objects, for whatever reasons, and those objects when filtering bytes can have an error. The idea here is how to report when those errors happen.
We should continue the discussion here on the pull request, from now on.

Reminder: we need to review this in depth, comparative analysis with LCP's own error handling additions.
e.g. throw ePub3::ContentModuleException in
https://github.com/readium/readium-lcp-client/blob/develop/src/lcp-content-filter/LcpContentModule.cpp
See: https://github.com/readium/readium-sdk/blob/feature/content-module/ePub3/ePub/content_module_exception.h
defined in feature/content-module branch of readium-sdk

CC @clebeaupin


tslint errors when creating SharePoint 2016 React Web Part

Category

[X] Question
[ ] Typo
[ ] Bug
[ ] Additional article idea

Expected or Desired Behavior
The @microsoft/sharepoint yoeman generator should install demo code that can be edited without lint errors. The file<EMAIL_ADDRESS>is missing.
Should the file<EMAIL_ADDRESS>exist when SharePoint 2016 is targeted?
Observed Behavior
When I run the @microsoft/sharepoint yeoman and make any edit to a TypeScript file, I get the following error:
Cannot read tslint configuration - 'Failed to load c:\Users\k\hello\tslint.json: Invalid "extends" configuration value - could not require<EMAIL_ADDRESS>Review the Node lookup algorithm (https://nodejs.org/api/modules.html#modules_all_together) for the approximate method TSLint uses to find the referenced configuration file.'
Steps to Reproduce

Run the yeoman generator

yo @microsoft/sharepoint

Let's create a new SharePoint solution.
? What is your solution name? hello
? Which baseline packages do you want to target for your component(s)? SharePoint 2016 onwards, including 2019 and SharePoint Online
? Where do you want to place the files? Use the current folder
Found npm version 6.9.0
? Which type of client-side component to create? WebPart
Add new Web part (on-prem) to solution hello.
? What is your Web part (on-prem) name? hello
? What is your Web part (on-prem) description? hello description
? Which framework would you like to use? React

Add a new line to src/webparts/hello.ts and save the change.

Open the problems panel in VS Code to view the error.

Environment
Windows 10
node 10.16.0
npm 6.9.0
yeoman 3.1.0
gulp 3.9.1
package.json
{
  "name": "hello",
  "version": "0.0.1",
  "private": true,
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "react": "15.4.2",
    "react-dom": "15.4.2",
    "@types/react": "0.14.46",
    "@types/react-dom": "0.14.18",
    "@types/react-addons-shallow-compare": "0.14.17",
    "@types/react-addons-update": "0.14.14",
    "@types/react-addons-test-utils": "0.14.15",
    "@microsoft/sp-core-library": "~1.1.0",
    "@microsoft/sp-webpart-base": "~1.1.0",
    "@microsoft/sp-lodash-subset": "~1.1.0",
    "@microsoft/sp-office-ui-fabric-core": "~1.4.0-0",
    "@types/webpack-env": "1.13.1",
    "@types/es6-promise": "0.0.33"
  },
  "resolutions": {
    "@types/react": "0.14.46"
  },
  "devDependencies": {
    "@microsoft/sp-build-web": "~1.1.0",
    "@microsoft/sp-module-interfaces": "~1.1.0",
    "@microsoft/sp-webpart-workbench": "~1.1.0",
    "gulp": "~3.9.1",
    "@types/chai": "3.4.34",
    "@types/mocha": "2.2.38",
    "ajv": "~5.2.2"
  }
}

Yes, it should be there. What version of SPFx are you running? I just verified it's working with SPFx v1.8.2

I also have version 1.8.2.
PS C:\Users\k\hello> npm list -g @microsoft/generator-sharepoint
C:\Users\k\AppData\Roaming\npm
`--<EMAIL_ADDRESS>
I reran the generator and had the same issue. I'll try uninstalling and reinstalling but I probably won't get to it until Monday. I'm not sure what else to do if you have the file and I don't.
Let me know if you have any other ideas.

After creating the project, did you let it run npm install to download all dependencies? It does this by default... you should see a node_modules folder within the project root with a ton of folders/files.

It the generator seems to run npm install (it installs 980 packages in the node_modules folder).
I reinstalled @microsoft/generator-sharepoint. It's still version 1.8.2. Re-running with the 2016 option and React still doesn't create the file<EMAIL_ADDRESS>PS C:\Users\k\hello> ls .\node_modules\@microsoft\sp-tslint-rules\
    Directory: C:\Users\k\hello\node_modules\@microsoft\sp-tslint-rules

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        7/15/2019   7:55 AM                EULA
d-----        7/15/2019   7:54 AM                lib
d-----        7/15/2019   7:59 AM                node_modules
-a----         6/6/2017   1:38 PM           1967 CHANGELOG.json
-a----         6/6/2017   1:38 PM            720 CHANGELOG.md
-a----        7/15/2019   7:58 AM           2903 package.json
-a----        5/26/2017  12:39 PM            555 README.md

When I try to repro, I don't have that file either, but I'm not getting an error when I build. Can you share the complete output when you run gulp build?

I'm not having any problem with gulp build either:
PS C:\Users\k\hello> gulp build
Build target: DEBUG
[10:03:49] Using gulpfile ~\hello\gulpfile.js
[10:03:49] Starting gulp
[10:03:49] Starting 'build'...
[10:03:49] Starting subtask 'pre-copy'...
[10:03:49] Finished subtask 'pre-copy' after 204 ms
[10:03:49] Starting subtask 'copy-static-assets'...
[10:03:49] Starting subtask 'sass'...
[10:04:09] Finished subtask 'sass' after 20 s
[10:04:09] Starting subtask 'tslint'...
[10:04:10] Starting subtask 'typescript'...
[10:04:10] [typescript] TypeScript version: 2.2.2
[10:04:13] Finished subtask 'copy-static-assets' after 24 s
[10:04:31] Finished subtask 'tslint' after 22 s
[10:04:31] Finished subtask 'typescript' after 20 s
[10:04:31] Starting subtask 'ts-npm-lint'...
[10:04:31] Finished subtask 'ts-npm-lint' after 127 ms
[10:04:31] Starting subtask 'api-extractor'...
[10:04:31] Finished subtask 'api-extractor' after 2.32 ms
[10:04:31] Starting subtask 'post-copy'...
[10:04:31] Finished subtask 'post-copy' after 1.09 ms
[10:04:31] Finished 'build' after 42 s
[10:04:31] ==================[ Finished ]==================
[10:04:32] Project hello version: 0.0.1
[10:04:32] Build tools version: 2.5.3
[10:04:32] Node version: v10.16.0
[10:04:32] Total duration: 1.77 min

I can also run gulp serve, gulp clean, gulp bundle --ship, and gulp package-solution --ship without any problem.
The only problem so far is the message in the problems panel in VS Code. I'm assuming that linting rules that I may want also aren't being applied.

That changes things... there's nothing wrong with SPFx then... so I'm going to close the issue.
Seems like you have something with VSCode that's the issue... but it's not related to SPFx. Maybe an old version of an extension in VS Code or something like that. This is the only tslint related extension I have installed in my VSCode and I don't see those issues: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin


Multi currency support in Playground

We are planning to implement the multi-currency proposal in the mockchain for the summit. This issue is for tracking the changes that need to be made to the Playground UI to make it (relatively) easy to work with multiple currencies.
Values of a user-defined currency will look like this:
type TokenId       = ByteString
type CurrencyValue = Map TokenId Int

CurrencyValue maps can have any number of entries. Their TokenIds are defined by the author of the currency.
Currencies themselves are identifed by their ScriptHash. Unlike TokenId, which can be any ByteString, ScriptHash has to be a validator script hash - the hash of the currency's monetary policy script (the script that controls how much of a currency can be forged).
type Currency = Map ScriptHash CurrencyValue

Examples
There are two examples we definitely want to support:
Example 1. Regular Currency
A new currency called MuellerCoin. There is an endpoint that forges an initial amount 1000 MuellerCoins. (This means there is a transaction whose txForge :: Map ScriptHash CurrencyValue field looks like Map.singleton <script hash> (Map.singleton "MuellerCoin" 1000). We would like to run the following trace:

Use the forge for wallet 1, resulting in the creation of 1000 MuellerCoins
Use the payToPubKey_ endpoint for wallet 1 to transfer 300 MuellerCoins to wallet 2. We currently have an argument of type Ada for payToPubKey_, this should be of type Currency and the user needs to enter the value Map.singleton <script hash> (Map.singleton "MuellerCoin" 300)
Use the payToPubKey_ endpoint for wallet 2 to transfer 100 MuellerCoins to wallet 3. Here we need to enter Map.singleton <script hash> (Map.singleton "MuellerCoin" 100)

Example 2. Tokens for Contract Roles
Smart contracts can have multiple roles, for example "Contributor" and "Owner" in the crowdfunding campaign, and "Long" (buyer) and "Short" (seller) in the swap contract. We would like to represent these roles using Non-Fungible Tokens (NFTs). We should be able to run the following trace for the swap contract. (This may be too ambitious given the constraints we have during the summit, but we can do a simpler version of this for the vesting contract):

Use the setupSwap endpoint for wallet 1. The outcome of this is a transaction whose txForge field looks like `Map.singleton

@j-mueller all this is optional, right? So a user only needs to mkCurrencies if they want to? And we will require them to do this if they want to use a currency in a trace. Is there any default currency that should always be available (Ada)?

You're right, mkCurrencies is optional and there will be a default currency that's always available.

Also, just to clarify, the endpoint in step 6 of the "Tokens for Contract Roles" example might end up being something other than initialiseShort. I haven't written the endpoints yet so I'm not completely certain that we can use the same endpoint after the contract has started (although it would be nice if we could!)

https://github.com/input-output-hk/plutus/pull/747


[Tabs] Type onChange as a generic react event

Closes #17454
Closes #20191
Tabs (or Tab) does not create a custom, react change event. It only passes whatever event triggered the change in value. I don't want to type it as exact as possible (FocusEvent | ClickEvent) because that restricts our implementation. We simply say that it's any react event at this point. You would have to narrow it later anyway which we can always do later if there are legitimate use cases.
About OverrideableComponent changes
Let's say we have a component that implements the component like
function Button({ component: Component, ...other }) {
  return <Component {...other} />;
}

Previously we assumed that any prop that is implemented by Button is also forwarded to the passed component.
However, this is almost never the case e.g. in Tab we expect that the given component either doesn't implement onChange or as the same type.
The reality is that Tab does not forward onChange and therefore component never "sees" onChange.
There are some exceptions e.g. ButtonBase intercepts href but also passes it along. We currently expect the href to be a string but this isn't required if a component is passed.
Instead of expecting the passed component to extend the props of Button we should expect component to implement a separate interface e.g. in
function Button({ component: Component, external, target, ...other }) {
  return <Component target={external ? '_blank' : target} {...other} />;
}

the passed component needs to implement the target prop. It doesn't need to implement external nor should it ever expect to receive an external prop if it is used in <Button />.
This change is a bit scary but safe in next. I'll follow-up in a later PR with more test and experimentation if it makes sense to require component to implement a certain interface.

don't we solve this issue too?

Yes! Thanks for linking it. It's the same underlying issue.
Will add the same test. I'm also checking out again why our docs were working fine


Question: When will the new version be released?

First of all thank you for this library. It's pretty useful.
Problem is I really need https://github.com/LiquidPlayer/LiquidCore/issues/117 fix in my android project. Could you please give an estimate date for the next version which includes this fix?
https://github.com/LiquidPlayer/LiquidCore/issues/117

@Apollo122 I wasn't planning on putting out a 0.6.3 release unless there was something major that needed to go in quickly.  I am focused on 0.7.0, which upgrades from node 8.9 -> 10.15 and is a lot of work and will take more time.
Is there a reason you need this released and not just build it yourself from source?
  You can tell it to use the version at master instead of a release tag.  See the section on snapshots.

Tried the jitpack solution but got error.
Added JitPack maven repository to the list of repositories like this
maven { url 'https://jitpack.io' }
Then added to dependency like this:
implementation 'com.github.LiquidPlayer:LiquidCore:master-SNAPSHOT'
But getting an error:
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.LiquidPlayer:LiquidCore:master-SNAPSHOT.
Any ideas?

Yes, I can see the error log that it failed.

Thanks it works now. And the solution fixed my problem.


APIView - doesn't accept .json files when uploading a review

Could we allow this again? If I attempt to do this apiview tells me it only takes .gosource files.
I got used to doing this when @praveenkuttappan showed me this forever and it's so much more convenient than creating a .zip file of all the go code over and over again since I (inevitably) also zip up all the other temporary junk like my .env file).

Check should be relaxed to allow JSON for the specified language type.

@richardpark-msft You can select json in the dropdown then upload your json file.

Oh, awesome. I didn't think to look for a different type!
Looking at it now though - do you even need the user to identify the type of upload? It seems like you always have enough info in the file extension/type of thing they upload (ie, .nupkg, .jar, etc..)


PowerToys shortcut bug

Microsoft PowerToys version
0.78.0
Installation method
GitHub
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce

✔ Expected Behavior
hold (left) Alt+tab to crouch and access inventory in game
❌ Actual Behavior
exits game, though not giving application options like the original alt+tab option did and was intended for
Other Software
PowerToys v0.78.0

Please fill in the Steps to reproduce field.


Prevent users from playing videos when pressing on a thumnail

Hello,
im trying to configure the new frigate card so that users can only see recent snapshots which is working however, when users click on the thumbnail, it starts playing the video clip as well. i want to be able to prevent users from playing video clips from the dashboard/lovelace.

This is the wrong repo, please post in the card repo


[19.09] chromium: 80.0.3987.87 -> 80.0.3987.106 (backport)

Motivation for this change
Backport of https://github.com/NixOS/nixpkgs/pull/79860 and https://github.com/NixOS/nixpkgs/pull/80074.
Testing status

platform
attribute
status
tester

x86_64
chromium
-
@Frostman

x86_64
nixosTests.chromium
-
@Frostman

x86_64
google-chrome
-
@primeos

Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

nixosTests.chromium passed (x86_64)


fix for weird behavior when switching accounts

Clubhouse Story
Submitter checklist

[ ] Test covering functionality added/fixed in
Check the linked story includes the following:

[ ] Steps to reproduce
[ ] Screenshot (If applicable)

Reviewer Checklist

[ ] Test/lint pass

@nuevoalex Yeah, can you make it not round up in all cases? 0.00034 and below should round down to 0.0003, while 0.00035 and up should round to 0.0004.
Also, I'm seeing the same balance before and after pulling the escape hatch. Retesting one more time to make sure.


Create Get Support section for the new homepage

Problem
Developers who come to Devhub currently do not find a clear outline of what support they can get and how they can get it. This makes it difficult for them to get help or to look for resources they need.
User Stories

As a developer visiting Devhub's homepage, I want to see what support can I get.
As a developer visting Devhub's homepage, I want more details(or links to more resources) on Individuals supports that Devhub provides.

Acceptance Criteria

[ ] Upon landing on Devhub's homepage, a developer should easily identify a section or feature dedicated to the support options available.
[ ] This support section should be prominently displayed or easily accessible to ensure developers don't overlook it.
[ ] For each support option listed, there should be a brief description that provides a clear understanding of what that support entails.
[ ] Each support option should be accompanied by relevant links or buttons directing developers to detailed resources or pages related to that specific support.
[ ] The section should strictly follow the provided Figma design(linked below) and adhere to the exact copy specifications. This ensures a consistent and cohesive user experience aligned with Devhub's brand and design standards.

Assets
Figma - Link
Copy - As mentioned in the Figma design.

Can you assign this to me?

Requested merge: https://github.com/near/neardevhub-widgets/pull/325

Resolved by #335, merged to main.


Refactor error handling to carry state explicitly (not globally).

This is something I discussed with @sylvanc at the beginning of the week.
This PR gets rid of static global state in the error handling code in libponyc.  It replaces it by explicitly passing around this state in an errors_t object (often embedded in pass_opt_t).  Obviously, this affects code in a lot of places, so that's why the diff is so extensive.
While I was at it, I made it more succinct to declare error + info units, and converted many cases that were incorrectly reported as multiple errors to be reported as error + info units.
I also cleaned up some tests that were failing for the wrong reason in bad_pony.cc by fixing the cause and making the expected errors explicit.
I filed this PR now because it will make it easier for me to work on auto-recovery, where we want to cleanly suppress some errors when we test out whether auto-recovery is feasible, but don't want to show the errors if it fails.

@sylvanc - I apologize for the merge conflicts :wink:.

This looks great! Well, what I can see of it (it's so big the github diff is curtailed). But... it does not build :(

Would this help with writing compiler tests that lock in error reports for invalid code? I was aware when writing the literal inference tests that some checked for an error, but not which error.
In my experience of developing compilers (ok, one compiler), it's all too easy for a change to cause the wrong error to be reported if tests don't lock them down. And that was with a dynamic language with far fewer compiler error messages.

it does not build

make test is succeeding locally on my machine - I'll take a look at the CI failures.

Would this help with writing compiler tests that lock in error reports for invalid code?

In my #730 PR, I added a test helpers for checking which error was raised.  This PR does make that helper a bit more general, and applies it to some more places.  But either way, yes, after this PR we have a more general way to lock in which error is expected in the tests that error.

Okay - I fixed up the lines that were causing issues on release builds, and the lines in tests that were breaking in Ubuntu (but not on my linux machine).  We'll see how the CI goes this time.

Okay, fixed the Windows-specific issues now too.  This should be good to go now.
Thanks, CI, for doing your job!


Error after installing OpenCV on M1 MacBook

Hi,
Although conda install -c conda-forge opencv===4.5.3 seems to run, on testing the package by importing, the following error is thrown:

(dlai) Indrayudds-MacBook-Air:~ indro$ python -c "import cv2; print(cv2.version)"
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen(/opt/anaconda3/envs/dlai/lib/python3.8/site-packages/cv2.cpython-38-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib
Referenced from:  /opt/anaconda3/envs/DLAI/lib/libopencv_core.4.5.3.dylib
Reason: tried: '/opt/anaconda3/envs/DLAI/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/bin/../lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/bin/../lib/liblapack.3.dylib' (no such file<EMAIL_ADDRESS>(no such file), '/opt/anaconda3/envs/DLAI/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/bin/../lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/envs/DLAI/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file, not in dyld cache)

My environment lib folder does have this liblapack.3.dylib file too. Help would be appreciated!

The CvLib library is poorly maintained. It has to been replaced with a better mainatained libraries like OpenCV or scikit-image for computer vision tasks.
The dependencies in the requirements.txt needs to be updated.


adapt motivation episode

the original motivation episode is now covered in https://enccs.github.io/julia-intro/. The motivation episode in this lesson should focus solely on HPC usage

done


dotter: init at 0.12.9

Motivation for this change
Add dotter
Things done

Add dotter

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

You are so fast! Thanks!

Happy to help, feel free to ping me on future PRs as well ☺


[Questions] Adding an image to the drop down and altering the output once a name is selected

Just curious if this is possible? I tried searching but didn't come up with anything in the issues area and didn't feel like manually browsing through all the closed tickets.
I just want to add a users profile image to the drop down as well as changing the @mention to a link once the name is selected.
Here's a working fiddle of the code and the editor I'm using: http://jsfiddle.net/2rh7vzg3/

[insertTpl](https://github.com/ichord/At.js/wiki/Base-Document#settings) is for inserting, you can alter the inserting content by it. I update the jsfiddle, check out if it's what you need:
http://jsfiddle.net/2rh7vzg3/1/

@ichord Thank you. That's what I needed in regards to inserting a link.
I actually found out how to insert the profile image into the mention here: https://github.com/ichord/At.js/wiki/Base-Document#custom-template
My question now becomes about how to use the data I'm returning via json? (sorry I'm a js novice).
For example, I'm using Django and returning the json data below with my current mentions plugin (not at.js):
'value': '%s' % (item.user.username),
'image': image,
'id': '%s:%s' % (item.user.username, item.id),

The above code returned in json format:
[{"image": "https://amazonaws.com/uploads/mugshots/d6ad2da421.jpg", "id": "deronsizemore:18", "value": "deronsizemore"}, {"image": "/assets/images/silhouette.png", "id": "deronfake:143", "value": "deronfake"}]

So I assume I'd have to map that data with this?
var names = $.map(datasource, function (value, i) {
    return {
        'id': i, 'name': value, 'email': value +<EMAIL_ADDRESS>    };
});

I guess my question is how to pass the image value into that? I see above you pass "value" and "i." So would I need to pass one more for my profile "image?"
Maybe?
var names = $.map(datasource, function (value, i, image) {
    return {
        'id': i, 'name': value, 'image': image
    };
});

Also, sorry I forgot to ask this initially, but what about only showing the drop down after the user starts typing a name instead of showing a dropdown of names as soon as the user types the @ sign? With the current mentions app that I use, the url is given a query parameter e.g.:
http://example.com/mentions?term=Foo

so then my code on the backend I just query users that start with "Foo" and return them as json. Is something like that possible with At.js?
Thanks again!

About the tpl:
Yes, you are right.
At.js will evaluate the key of the json data.
displayTpl: " ${name}", // =>  deronsizemore
insertTpl: "Google ${name}"

About the querying:
Don't pass anything to the data setting, and add a remoteFilter to the callbacks setting. It will be invoked every times if there is no data. Here is example

About the tpl:
Yes, you are right.
At.js will evaluate the key of the json data

I'm sorry, but I'm not sure I follow what I was right about regarding tpl in my above comment? Was it how to map the data, e.g.,
var names = $.map(datasource, function (value, i, image) {
   return {
        'id': i, 'name': value, 'image': image
    };
});

Is that what was correct?
so I can pass "image" into the .map function?
Regarding the data I'm passing via json:
[{"image": "https://amazonaws.com/uploads/mugshots/d6ad2da421.jpg", "id": "deronsizemore:18", "value": "deronsizemore"}, {"image": "/assets/images/silhouette.png", "id": "deronfake:143", "value": "deronfake"}]

I'm using "image," "value," and "id." So would I need:
var names = $.map(datasource, function (value, i, image) {

or would I need:
var names = $.map(datasource, function (value, id, image) {

Sorry, hope that makes sense? I'm sure it's easier than I'm making it out to be.

Don't pass anything to the data setting, and add a remoteFilter to the callbacks setting. It will be invoked every times if there is no data. Here is example

Thanks, I think that makes sense. I'll give it a try and see what happens.

Ok, sorry for all of my questions. I actually got this working today for the most part but still running into a  couple small problems.
Here's my current code which I was able to pull data from a remote datasource:
	var config = {
	    at: "@",
		callbacks: {
			remoteFilter: function(query, callback) {
			  $.getJSON("http://{{ request.get_host }}/mentions/", {q: query}, function(data) {
			    callback(data)
			    console.log(query)
			    console.log(data)
			  });
			}
		},
	    editableAtwhoQueryAttrs: {
	        "data-fr-verified": true
	    },
	    displayTpl: "
 ${value}
",
	    insertTpl: "@${value}",
	}

You can see where I have     console.log(query) and     console.log(data) to try to figure out what's going on behind the scenes. Here is a screenshot of what I'm seeing in console: http://i.imgur.com/pk0eM2e.png
The problems:

If I start typing "deronsizemore" once I get to the "r" the dropdown goes away. It's fine on "d" and "e" but after "r" the dropdown disappears. It works great with a local datasource, but with the remote datasource, what I outlined above happens.

Still, as soon as I type the "@" sign, I get a drop down (of remote data). I don't want any remote data to show until the user starts typing their query. Can you confirm if the code above should be working that way or if I'm doing something wrong?

Try this.
 That makes perfect sense now.
I was also able to get the drop down to ONLY show after someone typed a letter. I did all that with some python code (I use Django). I'll post it below for someone who may find this later and have interest:
def mentions(request):
mention_data = []

query = request.GET['q']
if query:
	data = MyProfile.objects.filter(user__username__istartswith=query)[:5]

	for item in data:
		if item.mugshot:
			image = item.mugshot.url.split('?')[0]
		else:
			image = settings.USERENA_MUGSHOT_DEFAULT
		mention_data.append({
			'name': '%s' % (item.user.username),
			'image': image,
		})

return HttpResponse(json.dumps(mention_data), content_type='application/json')

Thanks for all of your help on this.

hello, please how can i add a link using a normal textarea ?


Add attach and mask functions for joining errors in a different way

The Attach and Mask functions create a new error node that returns the error message from one node, but creates a structure where the additional errors are in the error chain and can be discovered with errors.Is and errors.As.

There's two usages I envision with the above functions.

An alternative to the current stack trace implementation. Stack can be built off of Attach instead of collapsible error and I think it would be easier to understand.
A way of integrating errdefs with applications that don't use errdefs natively. You can take an existing error and use errdefs.Mask(err, errdefs.ErrInvalidArgument) and that will add invalid argument to the error chain so errgrpc works appropriately, but won't change the underlying message. This isn't possible with errors.Join or fmt.Errorf.

If we add these functions in, we should make sure use of them in stack and errgrpc package to ensure the interface aligns with what we need there.

ping @jsternberg


field property is undefined

I got some error when the config change in code. The field property is undefined  for some reason. when getSortFunction() is called.
so I thought it is better to have the field check first before accessing sort or value property.

My guess is that you're calling the sort function before the fields have been declared so it's probably a good idea to find the source of that error. Calling sort before the fields have been declared could probably lead to unexpected results as it will try to sort without knowing how to sort. Adding a check for undefined fields won't make to sorting correct but adding a safeguard and warning might make sense, so I'm just going to propose a change before merging.

There isn't sort function being called in my code.
what I did was just re-constructing settings, fields, and data every time a user is selecting a CSV file to show the preview of the CSV.

Okay, well might be a bug somewhere else then, nevertheless, I made a small change to your code and merged it into the master branch so the change will be part of the next release:)

Cheers 👍  :)


Feat/47 dict

This PR fixes #47 - It adds a dictionary section to the website.
It will need some QA and will definitely need a lot of styling work, but this PR creates the basic functionality.

Merging this because we need the functionality quickly, but future branches will go through QA.


Add SBOM task

/azp run

Consider running this new task only in the release pipeline? - ${{ if eq(parameters.isReleaseBuild, true) }}:

Consider running this new task only in the release pipeline? - ${{ if eq(parameters.isReleaseBuild, true) }}:

Sure, moved the task to release pipeline.


Flow control tasks

[x] Solution for select!: AnyOf
[x] Implement join!
[x] How do we spawn: perhaps we no longer need to do a spawn and use just select/join-like.
[x] Cancel propagation for scope No scope - no problems.
Whenever the current task is cancelled and we are in spawn destructor, we should somehow propagate cancel to all other tasks.
[ ] AnyOf/join for a variable size of futures. For example if we would like to have 1000 futures to handle sockets. - split out as #33

Working on select/join

Completed, except the var size support, which is now as #33


Custom Template Does not seem to work for me

I feel like I am missing something simple, as I believe I have everything setup correctly.
I am doing the following, but i do not see the custom button:
<template>
  <div class="cb-upload">
    <vue-dropzone ref="myVueDropzone" id="cbDropzone" :include-styling="false" :options="dropzoneOptions">
    </vue-dropzone>
  </div>
</template>

<script>
import vue2Dropzone from 'vue2-dropzone';
import 'vue2-dropzone/dist/vue2Dropzone.css';

export default {
  name: 'file-upload',
  components: {
    vueDropzone: vue2Dropzone
  },
  methods: {
    template () {
      return `<button>upload something!</button>`
    }
  },
  data () {
    return {
      dropzoneOptions: {
          url: 'https://httpbin.org/post',
          createImageThumbnails: false,
          maxFilesize: 1,
          dictDefaultMessage: 'testing',
          previewTemplate: this.template()
      }
    }
  }
}
</script>

Any help is greatly appreciated.

I think you forgot to add the selector
	previewTemplate: this.template(),
	previewsContainer: this.previewSelector, //in my setup this is #previews-vue

Hi @jonnycraze
The previewTemplate only effects items that have been dropped into the dropzone area. So you wont see anything until you've added an item to your dropzone.
If you want a manual upload style button then you need to implement that outside of the dropzone and then use the manuallyAddFile method. Check out the example here
Hope that helps

Closing due to lack of activity


Cannot set cleaning mode while vacuum is running on L10 Pro

Sorry for the spam, but I have to say it, awesome integration! Thanks a lot!
Describe the bug
I cannot change the cleaning mode (sweeping + mopping / mopping only) while the vacuum is running. I get this error message:

Failed to call service select/select_option. Cannot set cleaning mode while vacuum is running

To Reproduce

Install the mopping pad/container
Start a cleaning with one mode (let's say sweeping + mopping for this example but it could be the other way around)
Try to change the cleaning mode (to mopping only) while the robot is still running

Expected behavior
The cleaning mode is changed while the vacuum is running, as I can do that without any issues in the official Xiaomi Home app.
Screenshots

Additional Information (please complete the following information)

Model Name: dreame.vacuum.p2029
Firmware Version: 1138 (side note, I don't get any more updates, I've read that many people with this model have a firmware 1158)
Home Assistant Version: 2024.1.6
Configuration Type: with map support
Errors or warnings shown in the HA logs

With INFO level, at around the time I attempt to change the cleaning mode:
Feb 04 23:25:35 rock64 sh[515687]: 2024-02-04 23:25:35.145 INFO (Thread-1082) [custom_components.dreame_vacuum.dreame.map] New object name received:<PHONE_NUMBER>/391946859/1
Feb 04 23:25:35 rock64 sh[515687]: 2024-02-04 23:25:35.193 INFO (Thread-1082) [custom_components.dreame_vacuum.dreame.map] Map ID Changed: 7 -> 8
Feb 04 23:25:35 rock64 sh[515687]: 2024-02-04 23:25:35.796 INFO (Thread-1084) [paramiko.transport] Connected (version 2.0, client dropbear_2020.81)
Feb 04 23:25:35 rock64 sh[515687]: 2024-02-04 23:25:35.802 INFO (Thread-1082) [custom_components.dreame_vacuum.dreame.map] Decode I map 8 0
Feb 04 23:25:35 rock64 sh[515687]: 2024-02-04 23:25:35.974 INFO (Thread-1082) [custom_components.dreame_vacuum.dreame.map] No new map data received, retrying
Feb 04 23:25:36 rock64 sh[515687]: 2024-02-04 23:25:36.101 INFO (Thread-1084) [paramiko.transport] Authentication (password) successful!
Feb 04 23:25:36 rock64 sh[515687]: 2024-02-04 23:25:36.919 INFO (Thread-1082) [custom_components.dreame_vacuum.dreame.map] Decode P map 8 1
Feb 04 23:25:38 rock64 sh[515687]: 2024-02-04 23:25:38.114 INFO (Thread-1086) [custom_components.dreame_vacuum.dreame.map] No new map data received, retrying
Feb 04 23:25:38 rock64 sh[515687]: 2024-02-04 23:25:38.887 INFO (Thread-1086) [custom_components.dreame_vacuum.dreame.map] No new map data received on second try
Feb 04 23:25:40 rock64 sh[515687]: 2024-02-04 23:25:40.144 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 8:1 took: 3.43
Feb 04 23:25:40 rock64 sh[515687]: 2024-02-04 23:25:40.519 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Skip render frame, map data not changed
Feb 04 23:25:40 rock64 sh[515687]: 2024-02-04 23:25:40.948 INFO (Thread-1088) [custom_components.dreame_vacuum.dreame.map] Decode P map 8 2
Feb 04 23:25:44 rock64 sh[515687]: 2024-02-04 23:25:44.329 INFO (Thread-1090) [custom_components.dreame_vacuum.dreame.map] Decode P map 8 3
Feb 04 23:25:44 rock64 sh[515687]: 2024-02-04 23:25:44.424 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 8:2 took: 2.21
Feb 04 23:25:44 rock64 sh[515687]: 2024-02-04 23:25:44.820 ERROR (MainThread) [custom_components.dreame_vacuum] Unable to call Cannot set cleaning mode while vacuum is running
Feb 04 23:25:44 rock64 sh[515687]: 2024-02-04 23:25:44.875 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472068049856] Cannot set cleaning mode while vacuum is running
Feb 04 23:25:44 rock64 sh[515687]: Traceback (most recent call last):
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
Feb 04 23:25:44 rock64 sh[515687]:     response = await hass.services.async_call(
Feb 04 23:25:44 rock64 sh[515687]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
Feb 04 23:25:44 rock64 sh[515687]:     response_data = await coro
Feb 04 23:25:44 rock64 sh[515687]:                     ^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
Feb 04 23:25:44 rock64 sh[515687]:     return await target(service_call)
Feb 04 23:25:44 rock64 sh[515687]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
Feb 04 23:25:44 rock64 sh[515687]:     return await service.entity_service_call(
Feb 04 23:25:44 rock64 sh[515687]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call
Feb 04 23:25:44 rock64 sh[515687]:     single_response = await _handle_entity_call(
Feb 04 23:25:44 rock64 sh[515687]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
Feb 04 23:25:44 rock64 sh[515687]:     result = await task
Feb 04 23:25:44 rock64 sh[515687]:              ^^^^^^^^^^
Feb 04 23:25:44 rock64 sh[515687]:   File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 195, in async_handle_select_option
Feb 04 23:25:44 rock64 sh[515687]:     await self.async_select_option(option)
Feb 04 23:25:44 rock64 sh[515687]:   File "/config/custom_components/dreame_vacuum/select.py", line 571, in async_select_option
Feb 04 23:25:44 rock64 sh[515687]:     await self._try_command(
Feb 04 23:25:44 rock64 sh[515687]:   File "/config/custom_components/dreame_vacuum/entity.py", line 123, in _try_command
Feb 04 23:25:44 rock64 sh[515687]:     raise ValueError(str(exc)) from None
Feb 04 23:25:44 rock64 sh[515687]: ValueError: Cannot set cleaning mode while vacuum is running

Awesome, thanks for the quick fix! I'm pretty new to HA, HACS and this integration, so I'm not sure how the release process work. Will you do a final release eventually (how long does it usually takes?) and I will be able to upgrade via HACS if I installed the integration via HACS?
Thanks again, it's awesome to see how well integrated the vacuum cleaner is into HA!


Using a common Catch main object for development.

This needed a few small changes from my hacked together test. Mostly I hit an issue where I couldn't create a catchlib object in every exercise during a full CMake build, so I had to switch how I did the individual exercise CMakeLists.txt files.
I added some comments into the students' CMakeLists files, but they may need to be phrased better to be clearer to them. I wanted to explain what it was instead of just confusing the student if they looked at it.
Closes #272

Ah, yes - you would need to name each library uniquely. Normally that's no issue, but in our case that is much harder to maintain.
I think that we're correct to omit special compiler flags or definitions from catchlib: -Wall -Wextra -Wpedantic -Werror or _SCL_SECURE_NO_WARNINGS. Those are useful in student code but not for this.
Looks pretty good at a read. Hope to try this in detail this evening.

I'm getting failures when I build individual exercises in isolation (using only the exercise-level CMakeLists.txt, not using the root-level CMakeLists.txt). Can you reproduce this:
CMake Error at CMakeLists.txt:26 (add_executable):
  Error evaluating generator expression:

    $<TARGET_OBJECTS:catchlib>

  Objects of target "catchlib" referenced but no such target exists.

I think it's a quirk of CMake conditionals. When building from the root level, EXERCISM_COMMON_CATCH exists and is Boolean. When building at the exercise level, EXERCISM_COMMON_CATCH does not exist at all.
Reading through CMake's if() documentation (no really, there's a big page), I see:
if(NOT <expression>)
  # True if the expression is not true.

This fails when the expression does not exist.
I think that variable references evaluate to an empty string if the value is unset.
A standard if() behaves differently:
if(<constant>)
  # [...]  False if the constant is [...] the empty string [...].

Short story - got off in the weeds above.
I think we need to reverse the order of the conditional for isolated exercises to build properly:
# Use the common Catch library?
if(${EXERCISM_COMMON_CATCH})
    # For Exercism track development only
    add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h $<TARGET_OBJECTS:catchlib>)
else()
    # Build executable from sources and headers
    add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)
endif()

because if (NOT <expr>) behaves differently that if (<expr>).

There are some CMake semantics here. I see this succeed:
if(NOT EXERCISM_COMMON_CATCH)

this fail:
if(NOT ${EXERCISM_COMMON_CATCH})

and this succeed:
if(NOT "${EXERCISM_COMMON_CATCH}")

Do you see something similar? This is when building as a student would - only one specific CMakeLists.txt file.

I alwyas like to work with CMake occasionally to remind me how much I hate it. That test is identical to the one elsewhere in the file that tests the run all tests option, except it has a NOT in it.
I think the problem is CMake for evaluates the branch in some instances, even if it's not taken? No idea.
Regardless, I added a test to CI to run it from an individual directory, and updated the exercise CMakeLists to what you suggested actually works.
Also changing the title to WIP, I need to test this on Visual Studio because I now don't trust this will work everywhere, I'll change it back after confirming.

Oh, I need to fix how I did the testing of an individual test anyways.

Works fine in Visual Studio too.
I added running the individual test in CI to #279, since it requires a compilable hello-world anyways.

I alwyas like to work with CMake occasionally to remind me how much I hate it.

There's always Autotools ;)

That test is identical to the one elsewhere in the file that tests the run all tests option, except it has a NOT in it.

I don't know for certain, but I think that if (NOT) has different variable expansion rules than if (). Counterintuitive, I agree.

I missed that this was actually all finished apparently. I've updated after #284 and am merging.

I alwyas like to work with CMake occasionally to remind me how much I hate it.

There's always Autotools ;)

Thankfully I've never had to touch Autotools, but it scares me anyways.