🚧 wip: swap

#60
#61
#62

woohoo, not sa fast, w3f don't rewards retroactive things 😄
On Sun, Dec 24, 2023, 11:29 roiLeo @.***> wrote:

#60 https://github.com/kodadot/stick/issues/60
#61 https://github.com/kodadot/stick/issues/61
#62 https://github.com/kodadot/stick/issues/62

You can view, comment on, or merge this pull request online at:
https://github.com/kodadot/stick/pull/170
Commit Summary

446b46b
https://github.com/kodadot/stick/pull/170/commits/446b46b65b4f42e4ec0365ab52aa7dc9d5e96ad2
🚧 wip: swap

File Changes
(8 files https://github.com/kodadot/stick/pull/170/files)

A src/mappings/nfts/cancelSwap.ts
https://github.com/kodadot/stick/pull/170/files#diff-71f4779f39715c5d26549f527262cd84c40a36d7ef95a8f13966b3a1b6f3438b
(24)
A src/mappings/nfts/claimSwap.ts
https://github.com/kodadot/stick/pull/170/files#diff-0719b25a0ac8089b564f0fafc1bb755c05e1f1b8e8d590aca7e3907aa8028d8c
(26)
A src/mappings/nfts/createSwap.ts
https://github.com/kodadot/stick/pull/170/files#diff-101f8424de94c783fab4749ebce6d0c319276b3f2c944942be6f9854d9c16649
(24)
M src/mappings/nfts/getters/index.ts
https://github.com/kodadot/stick/pull/170/files#diff-0bf66a8353b4586547facf0805a6054ce0a1157ccc4acc9e976b0ea866e5a341
(12)
M src/mappings/nfts/getters/statemine.ts
https://github.com/kodadot/stick/pull/170/files#diff-c4c538c86c558b85bdb8b1331fdfa59e52e59b2e4f5b67c134ee90a305582d63
(100)
M src/mappings/nfts/getters/statemint.ts
https://github.com/kodadot/stick/pull/170/files#diff-909f367fed4d9cda5b13991020c745c92632a646df8813a730b7ce8e53b8771a
(111)
M src/mappings/nfts/index.ts
https://github.com/kodadot/stick/pull/170/files#diff-3a2851f98dfffe8fbcdc92935488b4a6c57f7655863c47bf6d996b8a34d48cd7
(3)
M src/processor.ts
https://github.com/kodadot/stick/pull/170/files#diff-7199f058b35aa392107dbd32106c45331e7f2fa9fc6de120e05e78d9db49f0fa
(9)

Patch Links:

https://github.com/kodadot/stick/pull/170.patch
https://github.com/kodadot/stick/pull/170.diff

—
Reply to this email directly, view it on GitHub
https://github.com/kodadot/stick/pull/170, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABM5POOIZYN5YWUYQSJX65TYK77ZLAVCNFSM6AAAAABBBN6HDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TKMBVGYYDCNA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

woohoo, not sa fast, w3f don't rewards retroactive things 😄

It's sad... number of projects that receive funds from the Treasury without launching anything is high.

Treasury do yes, I think next RAFG could be for swaps & offers.
On Sun, Dec 24, 2023, 14:42 roiLeo @.***> wrote:

woohoo, not sa fast, w3f don't rewards retroactive things 😄
It's sad... number of projects that receive funds from the Treasury
without launching anything is high.
—
Reply to this email directly, view it on GitHub
https://github.com/kodadot/stick/pull/170#issuecomment-1868520046, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABM5POOLUQKFLYGHTZYTXUDYLAWLXAVCNFSM6AAAAABBBN6HDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUZDAMBUGY
.
You are receiving this because you commented.Message ID:
@.***>

closed in favor of #294


TypeError: the JSON object must be str, not 'bytes'

Connected to pydev debugger (build 191.7479.30)
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1758, in
main()
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1752, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev\pydevd.py", line 1147, in run
pydev_imports.execfile(file, globals, locals)  # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/GITREP/PyUnitTest/VSTestDeployment.py", line 37, in
print(has_vstest())
File "C:/GITREP/PyUnitTest/VSTestDeployment.py", line 20, in has_vstest
result = vswhere.get_latest()
File "C:\GITREP\PyUnitTest\vswhere.py", line 132, in get_latest
return find_first(latest=True, legacy=True)
File "C:\GITREP\PyUnitTest\vswhere.py", line 125, in find_first
return next(iter(find(**kwargs)), None)
File "C:\GITREP\PyUnitTest\vswhere.py", line 116, in find
return execute(args)
File "C:\GITREP\PyUnitTest\vswhere.py", line 52, in execute
return json.loads(output, encoding='utf-8')
File "C:\Users\ingjuedt\AppData\Local\Programs\Python\Python35-32\lib\json_init_.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'
Process finished with exit code -1

Replacing "return json.loads(output, encoding='utf-8')" by "return json.loads(str(output, 'utf-8'), encoding='utf-8')" in line 52 does the fix.

Oh. I think I'd only tested this with Python 2.7, so there was probably a change in what subprocess.check_output returns from str to bytes.
Thanks for the potential fix. I'll check that it works on both Python 2 and 3.

Thanks for the report! I've updated the PyPI package to version 1.1.2. Let me know if you still have any problems with it.


fix(MutationOptions): improve the type of onMutate

Hey maintainers,
As I can see, Promise<A> | Promise<B> is stricter than Promise<A | B> and to the point that it won't work with async functions.

In the case of onMutate, because we currently define its type as
onMutate?: (variables: TVariables) => Promise<TContext> | Promise<undefined> | TContext | undefined;

,  when we set an async function to it we'll receive a type error but it's very obscure and appears at another place.

So in this PR, I set the return type of onMutate to Promise<TContext | undefined> instead of Promise<TContext> | Promise<undefined> to relax it to make it work with async functions.

:tada: This PR is included in version 3.19.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Determine a strategy for nightly reconcile/post/compress/etc

Is this written in Visual Basic for applications?  Is VBA supported on our target editing environment?
If not, I think we can swap in standard python reconcile/post/compress scripts but need to understand if anything is different about the taxmap code.
See for example:
https://github.com/mattyschell/geodatabase-buildings/blob/main/geodatabase-scripts/sample_maintain.bat

We have confirmed that this is written in VB.net and should continue to work.


Apple Privacy Manifest Info

#skip-changelog
:scroll: Description

Checked all dependencies if they include a PrivacyInfo.xcprivacy file and document the version if so.
Added more info to readme file.

Sentry Package
Dependency
Has PrivacyInfo file
Dependency Version
Sentry Supports Version

dart
http
No
--
--

dart
meta
No
--
--

dart
stack_trace
No
--
--

dart
uuid
No
--
--

flutter
package_info_plus
Yes
6.0.0
Yes >=1.0.0 <8.0.0

flutter
ffi
No
--
--

dio
dio
No
--
--

drift
drift
No
--
--

file
file
No
--
--

hive
hive
No
--
--

isar
isar
No
--
--

isar
isar_flutter_libs
No
--
--

isar
path
No
--
--

logging
logging
No
--
--

sqflite
sqflite
Yes
2.3.1
Yes ^2.0.0

logging
sqflite_common
No
--
--

:bulb: Motivation and Context

Closes #1946

I've been closely following Apple's recent announcement mandating the inclusion of PrivacyInfo.xcprivacy in third-party SDK packages for iOS integration. As part of my investigation, I have thoroughly reviewed the Sentry Flutter repository, particularly the iOS folder, but I couldn't locate the PrivacyInfo.xcprivacy file.
Could someone from the Sentry team kindly confirm whether PrivacyInfo.xcprivacy has been included in the Sentry Flutter package for iOS integration? If it's not currently included, are there plans to add it in future updates?
Your prompt response to this inquiry would be greatly appreciated.


"Function call stack: _dist_train_step" error on tensorflow2 object detection api

This template is for miscellaneous issues not covered by the other issue categories.
For questions on how to work with TensorFlow, or support for problems that are not verified bugs in TensorFlow, please go to StackOverflow.
If you are reporting a vulnerability, please use the dedicated reporting process.
For high-level discussions about TensorFlow, please post to<EMAIL_ADDRESS>for questions about the development or internal workings of TensorFlow, or if you would like to know how to contribute to TensorFlow, please post to<EMAIL_ADDRESS>Every time I try to train the object detection models (any model, I tried ssd, faster rcnn, efficientdet..) by tf2 model train script (which is model_main_tf2.py), I got this error message every 1500~2000 steps.

I ran the notebook in google colab, and I got the colab pro upgrade either. (I thought this issue might be the memory issue on GPU or TPU)
I just followed the object detection api todo ..
Anyone can help..?
I also put a link to my colab notebook too.
https://colab.research.google.com/drive/1Xg5NKpipLTUCCyTFDYYCC_xAkPRTUyCc?usp=sharing

@mobinity-yoom
Please close this ticket and open a new one at https://github.com/tensorflow/models/ directly.

I also had same issue, This error occurs when VRAM on Colab become full thus program halts, So either reduce your input image size or reduce batch size. I used to resolve this issue by reducing batch size to 1 in config file, located at TensorFlow/workspace/training_demo/models/ YOUR-MODEL-NAME/pipeline.config

I also had same issue, This error occurs when VRAM on Colab become full thus program halts, So either reduce your input image size or reduce batch size. I used to resolve this issue by reducing batch size to 1 in config file, located at TensorFlow/workspace/training_demo/models/ YOUR-MODEL-NAME/pipeline.config

I also have the same issue. I modified TensorFlow/workspace/training_demo/models/ YOUR-MODEL-NAME/pipeline.config to batch_size: 1 (on line 135). Im still getting this error. Please can anyone help

@Her0Mark I am getting the same error on google colab while I run tensorflow faster rcnn object detection api. I reduced batch size=1 but didn't passed through it. Have you solved your's?

I also had same issue, This error occurs when VRAM on Colab become full thus program halts, So either reduce your input image size or reduce batch size. I used to resolve this issue by reducing batch size to 1 in config file, located at TensorFlow/workspace/training_demo/models/ YOUR-MODEL-NAME/pipeline.config

I also have the same issue. I modified TensorFlow/workspace/training_demo/models/ YOUR-MODEL-NAME/pipeline.config to batch_size: 1 (on line 135). Im still getting this error. Please can anyone help
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\object_detection\model_lib_v2.py", line 169, in _ensure_model_is_built
    strategy.run(
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\distribute\distribute_lib.py", line 1259, in run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\distribute\distribute_lib.py", line 2730, in call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\distribute\mirrored_strategy.py", line 628, in _call_for_each_replica
    return mirrored_run.call_for_each_replica(
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\distribute\mirrored_run.py", line 75, in call_for_each_replica
    return wrapped(args, kwargs)
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\def_function.py", line 828, in __call__
    result = self._call(*args, **kwds)
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\def_function.py", line 888, in _call
    return self._stateless_fn(*args, **kwds)
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\function.py", line 2942, in __call__
    return graph_function._call_flat(
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\function.py", line 1918, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\function.py", line 555, in call
    outputs = execute.execute(
  File "C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\eager\execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.UnknownError:  Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
         [[node ssd_mobile_net_v2fpn_keras_feature_extractor/model/Conv1/Conv2D (defined at C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\object_detection\models\ssd_mobilenet_v2_fpn_keras_feature_extractor.py:219) ]] [Op:__inference__dummy_computation_fn_13690]

Errors may have originated from an input operation.
Input Source operations connected to node ssd_mobile_net_v2fpn_keras_feature_extractor/model/Conv1/Conv2D:
 args_1 (defined at C:\Users\preto\anaconda3\envs\tensorflow\lib\site-packages\object_detection\model_lib_v2.py:169)

Function call stack:
_dummy_computation_fn

(tensorflow) C:\TensorFlow\workspace\training_demo>```

Hi, did you manage to fix this? I'm having the same issue right now..

İ hade the same issue did you solv it?

I have the same issue did you solv it

just replace the batch size =1 and make sure you're use CPU/GPU at use_bfloat16 :


[mtl] support non-aligned copy_buffer offsets

Fixes copy_buffer calls when either of buffer offsets is not aligned to 4 bytes (affects vkQuake)
PR checklist:

[ ] make succeeds (on *nix)
[ ] make reftests succeeds
[ ] tested examples with the following backends:
[ ] rustfmt run on changed code

Thank you! Notes are addressed.
bors r=grovesNL


⚠ Turnos 24x7 has degraded performance

In 5599f3f, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 864 ms

Resolved: Turnos 24x7 performance has improved in 0ec1c38.


Module 2.2 Assignment

👋 Hi @cbchoi ! it is unclear whether or not you pulled or fetched the changes from GitHub. I am going to assume that information is above as I see the commit in your commit history. 😄


Improve custom node library loading

Custom node libraries can now be written as ESModules by providing your nodes in a module that exports a registerCustomNodes(register: (nodes: CustomNodeInfo[]) => void): Promise<void> | void; function. This allows VisualBlocks to know when all the nodes are done being registered.
For commonjs node libraries, there is a
new function visualblocks.registerCustomNodes that registers multiple nodes at a time. Calling this function will notify VisualBlocks that all your nodes are loaded.
The original custom node API that uses visualblocks.registerCustomNode to register nodes one at a time remains as it was, but there is now a second argument that can be passed to it. This argument is called isLastNode and it is true by default. Passing false will prevent VisualBlocks from assuming that all the nodes are registered. You must pass true on your last call to it.
cl/641320539

Thanks for the review! Let's wait until the changes in cl/641320539 are published externally before merging and publishing these changes to npm. I'll update this PR when that's done.


JSX with optional parsed incorrectly

These two should be equivalent:
<Foo className=?a />
Foo.createElement className::?a [][@JSX]

In reality, first AST:
[
  structure_item (asd.re[1,0+6]..[3,32+8])
    Pstr_eval
    expression (asd.re[1,0+6]..[3,32+8])
      attribute "JSX"
        []
      Pexp_apply
      expression ([0,0+-1]..[0,0+-1])
        Pexp_ident "Foo.createElement" (asd.re[1,0+6]..[3,32+8]) ghost
      [
        <label> "className"
          expression ([0,0+-1]..[0,0+-1])
            Pexp_construct "Some" (_none_[1,0+-1]..[1,0+-1]) ghost
            Some
              expression (asd.re[2,11+19]..[2,11+20])
                Pexp_ident "a" (asd.re[2,11+19]..[2,11+20])
        <label> ""
          expression (asd.re[1,0+6]..[3,32+8]) ghost
            Pexp_construct "[]" (asd.re[1,0+6]..[3,32+8]) ghost
            None
      ]
]

Second AST:
[
  structure_item (asd2.re[1,0+11]..[3,56+21])
    Pstr_eval
    expression (asd2.re[1,0+11]..[3,56+21])
      attribute "JSX"
        []
      Pexp_apply
      expression (asd2.re[1,0+11]..[1,0+28])
        Pexp_ident "Foo.createElement" (asd2.re[1,0+11]..[1,0+28])
      [
        <label> "?className"
          expression (asd2.re[2,29+25]..[2,29+26])
            Pexp_ident "a" (asd2.re[2,29+25]..[2,29+26])
        <label> ""
          expression (asd2.re[3,56+13]..[3,56+15])
            Pexp_construct "[]" (asd2.re[3,56+13]..[3,56+15])
            None
      ]
]

Which is correct?

The latter one, from the non-sugared version.

Fixed by ^


shared_paths() behavior

Expected behavior and actual behavior.
The ops.shared_paths function seems to have some issues. Three different cases are demonstrated below in which two polygon boundaries that should partially coincide are calculated erroneously.
See behavior example on nbviewer.
Steps to reproduce the problem.
see nbviewer link
Operating system
Windows 10
Shapely version and provenance
1.6.4 from Chris Gohlke's whl file page

@Ricyteach I think that much of the discrepancy between what we observe and expect comes down to the approximation of buffered geometries. Ideally: smooth buffers of the lines in your first example intersect only at two points, right? We can start to see this when we increase the density of points around the corners of the buffer from 16 (the default) to 128. At the other end of the spectrum, when we decrease the density to 1, the roughly approximated buffers do share short paths.

I believe that shared_paths is returning the correct result in the second case: the geometries only intersect at two points and there are no shared paths.
The shared_paths function isn't very useful for analyzing these particular geometries, I am sorry to say.
I'm unable to reproduce the topology exception. I think this may be specific to the version of GEOS in Gohlke's wheels.


VS Code Mode | Different Modes with specific extensions

I believe there should be an option when starting the IDE where the user could choose his mode needed. The mode is like the preferences for that time opening. I mean, I set some modes like 'Python Environment', 'Ruby Environment, 'JavaScript Environment', and I could set specific extensions to each mode.
This way I do not need to load all extensions (I have a bunch) when starting the app.
I hope to be clear about this request. Thank you in advance.

There is already a duplicate of this extension.

There is already a duplicate of this issue

What is the issue id number? I was looking through and I didn't see any.

https://github.com/microsoft/vscode/issues/57548


Add GitHub repository link and edit link

Add GitHub repository link and edit link on the top right corner.

https://rust-lang.github.io/mdBook/guide/reading.html#top-menu-bar

what does the build fail mean?

what does the build fail mean?

It fail to commit and push to gh-page branch since I'm forking the repo.
We need to update the CI. Making it only commit and push to gh-page branch when master branch updated.


[MXNET-600][Scala] NDArray auto-collector

For now user has to dispose all intermediate allocated NDArrays themselves. The NDArrayCollector introduced here is to provide a way for NDs to be disposed automatically.
In the test case & changes to NDArrayIter.scala one can find the example of how to use it.
And for Java users:
https://github.com/yzhliu/mxnet-java-example/blob/master/src/main/java/me/yzhi/mxnet/example/infer/RndImageInference.java#L28-L30
https://github.com/yzhliu/mxnet-java-example/blob/master/src/main/java/me/yzhi/mxnet/example/infer/Seq2SeqInference.java#L35-L37
In the cases above, NDArrays allocated within the scope will be disposed automatically after the code block finishes.

Hi @yzhliu , It's been so great to see this solution. I would recommend you to apply this new feature to the examples in the CI for testing and that include MNIST and GAN to see if there are any more memory leaks thrown.

@lanking520 Here you can find how we can fix the memory leak for MNIST training (using SGD): https://github.com/yzhliu/mxnet/pull/5
But I prefer to make the PR separate. You can try similar thing for GAN, and with other optimizer.

@yzhliu Thanks for elaborating with a detailed example and sorry for the delay in response.
While I understand WithScope is what manages the deallocation of the NDArrays and using it ThreadLocal is what makes managing it possible, nevertheless my concern about thread-safety still remains.
The use-case of producer/consumer is not very uncommon and
val q = new Queue[NDArray] //assume Queue  is thread-safe

val t1 = new Thread() {
@override def run() ={
withScope {
 val a = NDArray.load()
 q.enqueue(a)
}
}
val t2 = new Thread() {
@override def run() = {
b = q.dequeue()
b.reshape()
}
}

This use-case or similar is not hard imagine when you are creating data pipeline and I think we should cautious in introducing new patterns to users that aren't thread-safe.
We discussed offline about using reference-counts, any luck with that?

@nswamy unfortunately I don't think it is possible to implement within Java user code (unless we leverage finalize)  -  Users cannot access java heap (in our case,  reference number of one object) - the only way  is to dump from outside.
Moreover, not necessarily to be multi-threading, even single-thread can have problem:
var a: NDArray
collector.withScope {
a = new NDArray
}  // a is disposed here
a.toArray() // fail

As I stated, it is users' responsibility not to leak new NDArray outside of scope, otherwise they need to use manual(), and dispose it later.
Every tool has its own limitation, e.g., users are not supposed to use HashMap in multi-threads - otherwise they need to do synchronize themselves.
As you can see, this tool make disposing super easy: https://github.com/yzhliu/mxnet/pull/5/files#diff-19b434167a8c2d81db271f8c47975ff6R43

@yzhliu I understand what you are saying and I think it is given that it doesn't work outside of the scope.
agree every tool has its limitation, I already said that I like this :)
Do you think changing WithScope to WithThreadScope and make it explicit would be useful for users to communicate that it is not thread-safe?
Also, I did not intend my code to be a running version, it was more for illustration of my point.. i'll call it out next time :)

@nswamy Oh no no, I was not saying your code is wrong or cannot run, I was demonstrating how to change the code a bit to safely use the collector in such situation - my code was not a runnable version either :)
As I said, even single thread can have problem, don't think it is proper to have 'Thread' in the name.

you are right, changing to ThreadScope might again confuse people if the case you showed.
Thanks for the clarifying about the example code, appreciate your patience :)

Thanks all people helped to review here.


ProxyTransport should handle double instrumentation scenarios without re-using the current TestRecordingInstance

Library name
Azure.Core.TestFramework
Please describe the feature.
Currently, when it is detected that a client has "double instrumented" an instance of ClientOptions (this occurs when an instance of ClientOptions is reused across multiple test runs), the current instance of the ProxyTransport is reused rather than constructing a new instance. This results in the TestRecording instance set on the original ProxyTransport to be re-used (with stale information).
Code in question is here:
https://github.com/Azure/azure-sdk-for-net/blob/85ef148e6c1e0c566c2047d5fa59adff1b7d6463/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs#L257-L260

Rather than returning the current transport, we should throw an exception. We would need to fix any tests that are broken by this change.

This came up again recently. It would be good to throw here.


'ConnectionTimeout: Connection timed out' error while using elasticsearch vectorstore in ConversationalRetrievalChain chain.

Most of the times it works fine and gives answers to questions. But, sometimes it raises the following error.
File ~\Anaconda3\envs\nlp_env\lib\site-packages\elastic_transport_node_http_urllib3.py:199, in Urllib3HttpNode.perform_request(self, method, target, body, headers, request_timeout)
191         err = ConnectionError(str(e), errors=(e,))
192     self._log_request(
193         method=method,
194         target=target,
(...)
197         exception=err,
198     )
--> 199     raise err from None
201 meta = ApiResponseMeta(
202     node=self.config,
203     duration=duration,
(...)
206     headers=response_headers,
207 )
208 self._log_request(
209     method=method,
210     target=target,
(...)
214     response=data,
215 )
ConnectionTimeout: Connection timed out

Elastic has a default timeout of 30 seconds. I think we need to add **kwargs to calls to enable changing this input.

Is it possible to change this timeout value?


Modal is not displaying properly on Android

Hello there,
I built a webpage using Bootstrap 3.3.7 and I decided to use modals. It works fine on desktop browsers and on iOS but for some reason is not displaying properly on Android devices. Every time you click on the link, the modal comes partially down and you can't scroll up to see more. Can somebody help with that?
Thank you,
Bruno

I found the problem, it was getting in conflict with Animate CSS... Now I need to figure out how to end the conflict


Build error after update to Angular 14 with 'single-spa-angular' v7.0.0

As per below GitHub Link recommendation
https://github.com/single-spa/single-spa-angular/issues/440.
We upgraded single-spa-angular package to v7.0.0.  But the build is failing because of below issue.
Issue:
Error: node_modules/single-spa-angular/src/public_api.d.ts:2:34 - error TS2307: Cannot find module './single-spa-angular' or its corresponding type declarations.
2 export { singleSpaAngular } from './single-spa-angular';
Cause:
‘single-spa-angular.ts’ file is missing in the ‘src’ folder of the 'single-spa-angular' library installed via npm. However, when we checked in the GitHub link of the library
"https://github.com/single-spa/single-spa-angular/tree/master/libs/single-spa-angular/src"
this particular file is present. Not sure why this file is missing when we install with ‘npm’.
Please check on this issue and let us know the resolution.

I can't give any more advice without a reproduction. I'm closing the issue, feel free to re-open when the reproduction is provided.

I also have observed the same issue. when i did npm i single-spa-angular it downloaded single-spa-angular having src file only below 4 items
node_modules\single-spa-angular\src\extra-providers.d.ts,
node_modules\single-spa-angular\src\prod-mode.d.ts,
node_modules\single-spa-angular\src\public_api.d.ts,
node_modules\single-spa-angular\src\types.d.ts
but if we see the code of public.api.d.ts file it have reference for singleSpaAngular as below
export { enableProdMode } from './prod-mode';
export { singleSpaAngular } from './single-spa-angular';
export { getSingleSpaExtraProviders } from './extra-providers';
but there is no file downloaded with name singleSpaAngular in node_modules\single-spa-angular\src location.
When i check the GIT location https://github.com/single-spa/single-spa-angular/tree/master/libs/single-spa-angular/src i found the the file single-spa-angular.ts which didn't come with npm install.
I did the work around. Just copy pasted this file manually and Issue Fixed !!! Application started.
But definitely  there is some issue in npm install.

Hi @arturovt,
I think, I have added the reproduction steps in the previous comment. This is very simple.

In a clean/new Angular project, we need the hit the command npm i single-spa-angular.  It downloads single-spa-angular and make an entry into package.json "single-spa-angular": "^7.0.0",
It downloads the package but at location node_modules\single-spa-angular\src, we don't see the file single-spa-angular.ts downloaded. Ideally it should be there, otherwise application can't build.

I hope this will help, Let me know if you need any more info.

Hi @arturovt,
It looks like, I don't have access to re-open this issue as it is closed by collaborator.
Please help to re-open this, as this is one of the major blocker for us while upgrading the application to Angular 14 with single-spa-angular 7.0.0.

Hi @arturovt ,
Please find below steps to reproduce the issue:
Issue:
Error: node_modules/single-spa-angular/src/public_api.d.ts:2:34 - error TS2307: Cannot find module './single-spa-angular' or its corresponding type declarations.
2 export { singleSpaAngular } from './single-spa-angular';
Steps to reproduce:
Step1: Created a brand new Angular 14 application.
Step2: Installed single-spa into application of version '5.9.3' using command 'npm i<EMAIL_ADDRESS>Step2 : Installed single-spa-angular with version 7.0.0 using command 'npm i<EMAIL_ADDRESS>Step3: Tried to compile the application using 'ng serve'
Step4: compilation failed with below error:
Issue:
Error: node_modules/single-spa-angular/src/public_api.d.ts:2:34 - error TS2307: Cannot find module './single-spa-angular' or its corresponding type declarations.
2 export { singleSpaAngular } from './single-spa-angular';
Expected Behavior
Application should be build/compiled successfully
Actual Behavior
Build error in application
Cause:
‘single-spa-angular.ts’ file is missing in the ‘src’ folder of the 'single-spa-angular' library installed via npm. However, when we checked in the GitHub link of the library
"https://github.com/single-spa/single-spa-angular/tree/master/libs/single-spa-angular/src"
this particular file is present. Not sure why this file is missing when we install with ‘npm’.
Please check on this issue and let us know the resolution.

I have published 7.0.1. This has been a regression in ng-packagr itself. I closed the issue because I wasn't able to replicate this behavior in the current workspace. Sorry for the inconvenience.

Thanks for the fix @arturovt.


[P4_Symbolic] Adding p4_symbolic/symbolic/expected/conditional_nonlattice. [Remove disjointness check on set of tables that get evaluate in each branch of a conditional.]

Keyword Check:
~/sonic-buildimage/src/sonic-p4rt/sonic-pins$ ~/tools/keyword_checks.sh .
Keyword check Passed.
Build result:
/sonic/src/sonic-p4rt/sonic-pins$ bazel build $BAZEL_BUILD_OPTS ...
INFO: Analyzed 593 targets (0 packages loaded, 0 targets configured).
INFO: Found 593 targets...
INFO: Elapsed time: 0.743s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Test Result:
/sonic/src/sonic-p4rt/sonic-pins$ bazel test $BAZEL_BUILD_OPTS --cache_test_results=no ...
INFO: Analyzed 593 targets (0 packages loaded, 0 targets configured).
INFO: Found 397 targets and 196 test targets...
INFO: Elapsed time: 181.387s, Critical Path: 120.44s
INFO: 250 processes: 294 linux-sandbox, 18 local.
INFO: Build completed successfully, 250 total actions
//dvaas:port_id_map_test                                                 PASSED in 0.5s
//dvaas:test_vector_stats_diff_test                                      PASSED in 0.0s
//dvaas:test_vector_stats_test                                           PASSED in 0.0s
//dvaas:test_vector_test                                                 PASSED in 0.7s
//dvaas:user_provided_packet_test_vector_diff_test                       PASSED in 0.1s
//dvaas:user_provided_packet_test_vector_test                            PASSED in 0.0s
//gutil:collections_test                                                 PASSED in 0.5s
//gutil:io_test                                                          PASSED in 0.5s
//gutil:proto_matchers_test                                              PASSED in 0.7s
//gutil:proto_ordering_test                                              PASSED in 0.5s
//gutil:proto_test                                                       PASSED in 0.6s
//gutil:status_matchers_test                                             PASSED in 0.5s
//gutil:test_artifact_writer_test                                        PASSED in 0.6s
//gutil:testing_test                                                     PASSED in 0.6s
//sai_p4/instantiations/google:sai_nonstandard_platforms_cc_test         PASSED in 0.6s
//sai_p4/instantiations/google:sai_p4info_fetcher_test                   PASSED in 0.8s
//sai_p4/instantiations/google:sai_p4info_test                           PASSED in 1.2s
//sai_p4/instantiations/google:sai_pd_proto_test                         PASSED in 0.0s
//sai_p4/instantiations/google:sai_pd_util_test                          PASSED in 0.6s
//sai_p4/instantiations/google:tor_p4info_up_to_date_test                PASSED in 0.1s
//sai_p4/instantiations/google:union_p4info_up_to_date_test              PASSED in 0.1s
//sai_p4/instantiations/google:wbb_p4info_up_to_date_test                PASSED in 0.1s
//sai_p4/instantiations/google/test_tools:table_entry_generator_helper_test PASSED in 4.4s
//sai_p4/instantiations/google/test_tools:test_entries_test              PASSED in 1.0s
//sai_p4/instantiations/google/tests:p4_fuzzer_integration_test          PASSED in 3.6s
//sai_p4/tools:p4info_tools_test                                         PASSED in 0.6s
//sai_p4/tools:packetio_tools_test                                       PASSED in 0.8s
//tests:thinkit_gnmi_interface_util_tests                                PASSED in 1.0s
//tests/qos:gnmi_parsers_test                                            PASSED in 0.1s
//tests/qos:gnmi_parsers_test_runner                                     PASSED in 0.0s
//thinkit:bazel_test_environment_test                                    PASSED in 0.5s
//thinkit:generic_testbed_test                                           PASSED in 0.9s
//thinkit:mock_control_device_test                                       PASSED in 0.5s
//thinkit:mock_generic_testbed_test                                      PASSED in 0.7s
//thinkit:mock_mirror_testbed_test                                       PASSED in 0.6s
//thinkit:mock_ssh_client_test                                           PASSED in 0.1s
//thinkit:mock_switch_test                                               PASSED in 0.7s
//thinkit:mock_test_environment_test                                     PASSED in 0.1s
//thinkit:switch_test                                                    PASSED in 0.7s
//sai_p4/instantiations/google/tests:p4_constraints_integration_test     PASSED in 1.6s
Stats over 5 runs: max = 1.6s, min = 0.7s, avg = 0.9s, dev = 0.4s
//sai_p4/instantiations/google/test_tools:table_entry_generator_test     PASSED in 44.7s
Stats over 50 runs: max = 44.7s, min = 0.8s, avg = 3.0s, dev = 8.6s
Executed 196 out of 196 tests: 196 tests pass.
INFO: Build completed successfully, 250 total actions

Co-authored-by: kheradmandG<EMAIL_ADDRESS>


Format String error fix - SetChannelCommunitiesAsync

Change to format string as 3v stated in Discord

This indeed how to escape moustache brackets in a string.format call, and is a correct PR.
Could just use string interpolation though from C# 6.0
$"{{community_ids:[{string.Join(",", communityIds)}]}}"

prom3theu5 fixed this in the netcore branch and I merged his branch into master, so we should be good :)


The documentation for browser testing should not use react.

Description

The documentation on how to perform browser testing with Ava, starts off well by advising the use of jsdom but then the example uses React which is less than helpful for anyone not using React.
Environment

What do you propose it use instead?

I sort of agree—especially because if you're doing any serious React testing you'll use enzyme. I don't know much about browser testing, but it seems maybe we can just use a regular button with a click event handler?

@atomless Would you be interested in doing a pull request?

@sindresorhus @sotojuan - Another issue with the browser testing docs is that if you follow the jsdom usage - and add the browser setup to the required helpers in package.json - the globally declared document and window still do not appear to be available to tests. Just a simple example showing loading a url into jsdom and then getting an attribute of the body element would provide a much better start.

I ditched jsdom in the end in favour of zombie. @sindresorhus I'd be happy to make this into a pull request if you wished?

import test from 'ava';
import Browser from 'zombie';

const browser = new Browser({ site: 'http://example.com/' });

test.serial.cb('PAGE REQUEST', t => {

  browser.visit('/path', e => {

    t.end();
  });
});

test.serial('PAGE LOADED', t => {
  t.plan(2);

  let status = browser.statusCode;

  t.truthy(browser.success, 'Page Load Failed');
  t.truthy(status === 200, 'Page Returned Status: ' + status);
});

@atomless I think both should be covered then. jsdom is the lowest primitive. Zombie is a nicer API on top of it. Then users can choose which abstraction they like.

@sindresorhus here's a very basic test using jsdom...
import test from 'ava';

const jsdom = require('jsdom');

var window;

test.serial.cb('PAGE REQUEST', t => {

  jsdom.env({
    url: 'http://example.com/path',
    done: (error, win) => {
      window = win;
      t.end();
    }
  });
});

test.serial('PAGE LOADED', t => {
  t.plan(1);

  let attr = window.document.body.getAttribute('data-some-known-attr');

  t.truthy(attr.length > 0, 'The Body attribute "data-some-known-attr" is missing or invalid: ' + attr);
});

@atomless 👍 The jsdom init should be in a beforeEach hook and use t.context for passing and using the window. That way the tests will be atomic and doesn't have to be serial. Care to submit a pull request?

@sindresorhus I have now switched to nightmare.js for various reasons and it both fits my needs better and also seems a much better fit for ava. I'll get a simple test script for all 3 and make a pull request asap. WRT using beforeEach, I'm not so sure. I agree unit tests should be atomic but feel browser testing  is often more functional testing and for my use case I will want to perform various actions in serial and have the state maintained between tests.


Animations / Keyframes

How to add keyframes and animations?

For example, like this:
import { keyframes } from 'styled-components'
import css from '@styled-system/css'

const colorChange = keyframes({
  'from': {
  background: ’red'
}'

'to': {
background: 'white'
}
)

const Box = styled ('div')(css({
  animation: `${colorChange} 0.3s`
})

@dapetrov
In this case I receive following error
index.js:49 Error: It seems you are interpolating a keyframe declaration (cTNOic) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\`\` helper (see https://www.styled-components.com/docs/api#css), which ensures the styles are injected correctly.

@mydesireiscoma this looks like an issue with styled-components, you'd probably have better luck opening an issue on that repo, but that error message should hopefully point you in the right direction

Yeah, it's styled-components related issue: https://spectrum.chat/styled-components/help/how-can-i-use-a-custom-animation-with-the-style-object-syntax~91d624ea-a5a3-4d0e-9314-4da860059112

@jxnblk
@dapetrov
I don't thinks it's a styled-components issue
This was supported in styled-components v3, but is not longer supported in v4 as keyframes are
now injected on-demand

In styled-components everything works fine (as described in docs)
Example:
import styled, { keyframes, css } from 'styled-components'

// Create the keyframes
const rotate = keyframes`
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
`;

const styles = css`
  animation: ${rotate} 2s linear infinite;
`

// Here we create a component that will rotate everything we pass in over two seconds
export const Test = styled.div`
  display: inline-block;
  ${styles}
  padding: 2rem 1rem;
  font-size: 1.2rem;
`;

I found a way to solve this problem
https://github.com/styled-components/styled-components/issues/2561#issuecomment-500121743


Remove references to FMW

Including all references to JRF and JRF-restricted domains, as per WKO - Documentation Remove FMW Infra support in Model in Image pattern. This first pass is in the 4.0 docs; it will be duplicated in the 3.4 docs after incorporating technical review comments.
Acknowledged that these references must also be removed from the MII sample and sample docs.

@mriccell @rosemarymarano, what's the verdict on this PR? How or if are we going to save this content other than source control history?

@rjeberhard No verdict thus far. Up to @mriccell


Mocktail headers not parsed correctly?

Firstly, thanks so much for OHHTTPStubs.
I'm running into this error with loading stubs from Mocktail files:
Request failed: unacceptable content-type: content-type: application/json
From reading the code and this test project it looks like Line 4 of Mocktail files is always interpreted as the value of the Content-Type header.
The documentation and reference implementation here https://github.com/puls/objc-mocktail/blob/master/Mocktail/Mocktail.m#L247 (which was transferred from the square github account to puls) shows that Line 4 and every following line until a blank line are interpreted header keys and values.
Fixing this might be considered an breaking change. But since the Mocktail format is far from standardized we could accept both formats by checking for a colon : on Line 4.

PS: Is HTTPMessage similar to Mocktail? I tried to find some documentation of it on the web but kept coming up with Java and Ruby documention of classes with that name 😆.

Interesting. Maybe @JinlianWang, who is the one who implemented the Mocktail support in #108, has more information?
But indeed I'd agree on fixing that and support both formats by checking the presence of a : on line 4!

As for HTTPMessage that's the format generated by cur -isl; so it's a little bit different than Mocktail, but very similar anyway, containing headers then body in a text format. Not sure if it's documented/used widely outside of curl though.

I might just be misunderstanding Mocktail. This https://github.com/kif-framework/AMYServer framework has th content type on line 4 then header key values on the following lines...

Was not aware of the difference. I guess it is better to support both formats.


Fix quoting in letsencrypt

Some fixes for the recently merged pull request: https://github.com/geerlingguy/ansible-role-gitlab/pull/134
It's possible that I configure the role incorrectly, but it seems like there are issues in handling the boolean values.

Totally agree with
- letsencrypt['enable'] = "{{ gitlab_letsencrypt_enable }}"
+ letsencrypt['enable'] = {{ gitlab_letsencrypt_enable }}

Gentle ping?

I just ran into this as well, didn't realize there was already a pull request here.  I'll close mine, but this is breaking things and would be nice if it could be merged.

Also ran into this issue, please fix!

Same here. A new release including this PR would be great.

Great work @alexanderfast. Hope this gets implemented sooner than later. I'm unable to provision without this fix.

If needed, my workaround:

# SSL Configuration.
gitlab_nginx_listen_https: "true"
gitlab_redirect_http_to_https: "true"
gitlab_letsencrypt_enable: false
gitlab_create_self_signed_cert: "false"

gitlab_extra_settings:
# To remove when merge: https://github.com/geerlingguy/ansible-role-gitlab/pull/177
# letsencrypt['enable'] = false -> https://forum.gitlab.com/t/letsencrypt-certificates-fail-in-domain-validation/18112/6
  - letsencrypt:
    - key: "enable"
      type: "plain"
      value: "true"
    - key: "contact_emails"
      type: "plain"
      value<EMAIL_ADDRESS>    - key: "auto_renew"
      type: "plain"
      value: "true"
    - key: "auto_renew_hour"
      value: "1"
    - key: "auto_renew_minute"
      value: "30"
    - key: "auto_renew_day_of_month"
      value: "*/7"


Graphback CLI is not reporting a "command not found" error

If I use the graphback cli to run a command that doesn't exist the cli will just exit 0
$ graphback start random
$ echo $!
0

it would be useful to report an error message.

closing as it's resolved with 0.9.2 release


MinIO Gateway integration pipelines

Description
Changes proposed in this pull request:

Enable integration tests for minio on gateway mode and minio on gateway mode with buckets migration, on test-infra we have https://github.com/kyma-project/test-infra/pull/1755

Related issue(s)
See also #5

@magicmatatjahu can you rebase your PR with master branch? It will be easier to review 😄

/test pre-rafter-minio-az-gateway-migration

/test pre-rafter-integration-test

/test pre-rafter-integration-test

/test pre-rafter-minio-gcs-gateway-migration


DAT-7815: resolve Sonar security hotspot issue in H2 example class

Environment
Liquibase Version:
Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>
Liquibase Extension(s) & Version:
Database Vendor & Version:
Operating System Type & Version:
Pull Request Type

[x] Bug fix (non-breaking change which fixes an issue.)
[ ] Enhancement/New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description
Sonar scan identifying security hotspot issue in class for starting H2 example database.
Steps To Reproduce
N/A
Actual Behavior
N/A
Expected/Desired Behavior
Sonar scan does not identify line as a security hotspot
Screenshots (if appropriate)
Additional Context
Fast Track PR Acceptance Checklist:

[x] Build is successful and all new and existing tests pass
[ ] Added Unit Test(s)
[ ] Added Integration Test(s)
[ ] Added Test Harness Test(s)
[ ] Documentation Updated

Need Help?
Come chat with us on our discord channel

This is example code -- is the stack trace line useful for debugging purposes? If so, we could consider keeping it and hushing Sonar. If not, or if as an example it exemplifies bad practice, then we should remove it....

I personally do not think it is useful for debugging purposes, because it appears it would only be thrown in the event that someone is shutting down the server (which makes sense). However, if you prefer we leave it, I can switch it around (especially since there is another printStackTrace call on line 60)


inconsistent media path slash across the code

Expected Behavior
All 'src' media path should just be consistent.
Actual Behavior
inconsistent in current code
Steps to Reproduce
Open source code "blocks_vertical/control.js" and "blocks_vertical/motion.js" and check below code:
"args2": [
        {
          "type": "field_image",
          "src": Blockly.mainWorkspace.options.pathToMedia + "/repeat.svg",
          "width": 24,
          "height": 24,
          "alt": "*",
          "flip_rtl": true
        }
      ],

"args0": [
        {
          "type": "field_image",
          "src": Blockly.mainWorkspace.options.pathToMedia + "rotate-right.svg",
          "width": 24,
          "height": 24
        },

Regarding the "src" option, one is using slash while one is not. There are lots of other places which are not consistent. This do work as of now in scratch-gui, but might cause issues in other environment like some webview context (as we'll have two slash for some paths). It is better to make it consistent. :)
Operating System and Browser
All OSes

I've checked and only 3 places (for the same image c_arrow.svg) are inconsistent in control.js. Submitted the PR for your reference.
Thanks,
Shenghong

I'll close it as it is already fixed by my PR (which is approved and merged).


Node object and label consistency

We should make sure all node objects have the same names as their labels.
For example:
Instead of
t1wmrg = pe.Node(IntraModalMerge(), name='MergeT1s')

we should do:
t1wmrg = pe.Node(IntraModalMerge(), name='t1wmrg')

It will make debugging easier.

I wish I could hit the thumbs up icon 100 times more. We should probably start a style guide in nipype for writing workflows. Not only for us.


Added ifal.edu.br

Official Website (English): https://www2.ifal.edu.br/en
URL of a page on the official website where a long-term (>1 year) IT related course is offered by the university: https://www2.ifal.edu.br/en/courses/graduation
URL of a page or some other proof (.pdf or a screenshot are OK) showing that the university recognizes the domain which you are submitting as an official email domain for the enrolled students: http://webmail.ifal.edu.br/

@elvyssoares Pull request merged. Thank you!


Fix or queries breaking object id validation for other columns

Fixes $or queries breaking transformed values later down the line.
This is caused because the $or query key in a dict goes to first/close to the first part of for loops do to the hashing, and this causes the op key to be validate everything as if it is in a $or query, which doesn't cast strings to object ids if needed.
I still do not know how to test this properly as I don't have my environment set up locally to run mongo engine (I might try modifying the code inside a container and trying it there) -- this is why this wasn't landed last time, but people keep on noticing it and it bugs me.

Confirmed the test is passing that I added, note that these unit tests are currently broken in other cases (before/after these changes).
Did the change for merchant dashboard and looked around briefly, seems fine -- I think the risk here is that a query is using this $or logic in order to not return something and if something were returned it would break -- I don't think that is worth blocking on.


feat: Inverse limits of modules, abelian groups, and rings

Why can't we use the category theory library instead? Is this more general in terms of universes?

@erdOne I'm not sure how to use the category theory stuff in a concrete setting (e.g. to define p-adic integers as an inverse limit and do some computations). There is also a corresponding file on concrete direct limits, so I thought this was the way to go. But if you know a way to just use the category theory library, I would appreciate some directions.

Something like this?
import Mathlib.Data.ZMod.Basic
import Mathlib.Algebra.Category.Ring.Limits

open CategoryTheory Opposite

def PadicInteger.Functor (p : ℕ) : ℕᵒᵖ ⥤ CommRingCat where
  obj i := CommRingCat.of (ZMod (p ^ i.unop))
  map f := CommRingCat.ofHom (ZMod.castHom (pow_dvd_pow p f.unop.le) _)
  map_id := by aesop
  map_comp f g :=
    RingHom.ext ((ZMod.ringHom_surjective (Int.castRingHom _)).forall.mpr fun x ↦ by simp)

noncomputable
def PadicInteger (p : ℕ) : CommRingCat := Limits.limit (PadicInteger.Functor p)

I think one of the reasons we had concrete direct limits was because cofiltered colimits behave better that arbitrary colimits in most algebraic categories.


Error while posting attachment

Hello guys,
I am continuously getting an error, so any kind of help will be highly appreciated.
I am sending file to PostAttachmentAsync end point but I receive an exception;
-- error code 404
-- error message Could not process request (Create File Error: C:\tmp) (Call failed. Error while copying content to a stream: POST https://xxxxxxxxxxxxxxxx:xxxx/b1s/v1/Attachments2)
Thanks You.

Hi. Could you please provide more details? If you could share the part of your code where the error occurs, that would be helpful. Also are you on SQL Server or HANA?

I issue was resolved. The issue was that I didn't had right permissions in source path or Temp folder.

That's good to hear. I'll be closing the issue but feel free to reopen it if you encounter any problem.


Fix broken link to Yara-Rules repo.

As the URL path for a file in a repository is case sensitive and the Yara-Rules repo has slightly modified its file paths, this link was broken.

Thanks!


Sparse input support

GeometricSMOTE currently does not support data conversion from sparse input to Compressed Sparse Rows representation. Please add as a feature.

The sparse input will be supported on next release.


Smooth updates for map display plugin

Map displays previously only updated when receiving a message. This means that
if your fixed frame was base_link, the costmaps would not move appropriately
around the robot unless a message was received in order to update the transform
that should be applied to the scene. For global costmaps, this is a slow
update and for static maps, this never happened.
This fixes that by hooking into rviz' periodic call to continuously update the
transform to be applied to the scene.

Thanks @stonier, this makes total sense to me. I'd like to run it myself though before merging. I'll try to do that asap.

Can easily test with turtlebot stage:
sudo apt-get install ros-indigo-turtlebot-stage
roslaunch turtlebot_stage  turtlebot_in_stage.launch --screen

You'll notice some other elements could use this kind of feature as well. Pose for example. There it is the move base goal pose which only gets published once, and doesn't update beyond that.

@stonier FYI, on a fresh system when I installed ros-indigo-turtlebot-stage and run that command I get this:
% roslaunch turtlebot_stage  turtlebot_in_stage.launch --screen
... logging to /home/william/.ros/log/7fded784-5b12-11e5-b6d0-001c42833f2f/roslaunch-ubuntu-6013.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 298, in main
    p.start()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 260, in start
    self._start_infrastructure()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 209, in _start_infrastructure
    self._load_config()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 124, in _load_config
    roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
    loader.load(f, config, verbose=verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 730, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 702, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 666, in _recurse_load
    val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
    return f(*args, **kwds)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 587, in _include_tag
    inc_filename = self.resolve_args(tag.attributes['file'].value, context)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
    return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 299, in resolve_args
    resolved = _resolve_args(resolved, context, resolve_anon, commands)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 312, in _resolve_args
    resolved = commands[command](resolved, a, args, context)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 137, in _find
    return _find_executable(resolve_without_path, a, [args[0], path], context)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 173, in _find_executable
    full_path = _get_executable_path(rp.get_path(args[0]), path)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 199, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: turtlebot_navigation
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/opt/ros/indigo/share
ROS path [2]=/opt/ros/indigo/stacks

Installing ros-indigo-turtlebot-navigation seems to resolve the issue, so you might have a missing dependency somewhere.

Ok, this works for me.
I'm not opposed to merging this, but as you said there are many other elements that don't support this correctly. The planner's cost cloud, the planner's path, and the goal pose do not update. In general I'd say that putting the fixed frame to be base_link isn't a good idea. Can you explain why you want to do this rather than using map as the fixed frame and setting the target frame to be base_link?

The turtlebot stage dependency error is already fixed, just been waiting a move from shadow to public.
On the second point, I'm feeling rather naive now - been using rviz for years but never found that target frame option! And it does explain why I couldn't work out why nobody else had brought this issue to light :neckbeard:
Thanks for the tip.

I think it's still a good idea to merge/fix them (as and when people do) . If only for the fact that it is a very broken look for a new user to discover when they change to a moving frame.

I agree.


InvalidIdentityPoolConfigurationException: Missing credentials in config

Hi Danilo,
Nice repo! :)
However, I can't seem to get it working on my AWS account.  I keep getting the following error even on the sigup page:
"InvalidIdentityPoolConfigurationException: Missing credentials in config"
http://lambdauth.lucas-canavan.net/signup.html
Any ideas???
Thanks,
Lucas

I noticed that the IAM roles associated with my Cognito identiy pool didn't look right so I updated the role associations to what I believe it's supposed to be be and it started working! :)

@lucascanavan could you tell me what the roles associated with my Cognito identiy pool are, and what were the updated you needed to do?

@lucascanavan I too would like to know how you were able to fix this as well, I am having the same issue

I ran into this recently, and for me (since this issue was at the top of my google search), the issue was that my assume role action was sts:AssumeRole when it needed to be sts:AssumeRoleWithWebIdentity. The error message was rather ambiguous.
I'm using AWS CDK, so what I ended up with looked like:
const authenticatedCognitoFederatedPrincipal = new iam.FederatedPrincipal("cognito-identity.amazonaws.com", {
    "StringEquals": {
        "cognito-identity.amazonaws.com:aud": identityPool.identityPoolId
    },
    "ForAnyValue:StringLike": {
        "cognito-identity.amazonaws.com:amr": "authenticated"
    }
}, "sts:AssumeRoleWithWebIdentity");

const unauthenticatedCognitoFederatedPrincipal = new iam.FederatedPrincipal("cognito-identity.amazonaws.com", {
    "StringEquals": {
        "cognito-identity.amazonaws.com:aud": identityPool.identityPoolId
    },
    "ForAnyValue:StringLike": {
        "cognito-identity.amazonaws.com:amr": "unauthenticated"
    }
}, "sts:AssumeRoleWithWebIdentity");


Unable to set a page relation during Page Create Request

Hi team!
Am creating a new page in a database, that includes a relation field ("User"). But am receiving this validation error message back from the API:
failure(NotionSwift.NotionClientError.apiError(status: 400, code: "validation_error", message: "body failed validation: body.properties.User.relation[0] should be an object, instead was \"a8073fb6-1fad-4aa8-93fc-31474eb77529\"."))
My original page request properties are set out as follows:
properties: [
                "Name": .init(
                    type: .title([
                        .init(string: "A new session was started")
                    ])
                ),
                "identifier": .init(
                    type: .richText([
                        .init(string: "\(self.user.id?.uuidString ?? "Unknown user")")
                    ])
                ),
                "User": .init(type: .relation([.init("a8073fb61fad4aa893fc31474eb77529")])),
                "Tags": .init(
                    type: .multiSelect([
                        .init(id: nil, name: "Hello", color: nil)
                    ])
                )
            ],

The original request output for the relation field shows as follows:
"User": NotionSwift.WritePageProperty(type: NotionSwift.PagePropertyType.relation([ID:a8073fb6-1fad-4aa8-93fc-31474eb77529]))
I've spent hours trying to resolve it, if the error is on my side, or you need more info to investigate. Do let me know.

let me check

It should be fixed in the latest release (0.7.1). Thanks for reporting the issue.


Getting timeouts and context deadline exceeded (Client.Timeout exceeded while awaiting headers)

This issue was originally reported on stream-go2
There I found a suggestion to add a "client" timeout
Is there a similar way to address the issue in the stream-chat-go library ?

The test here
https://github.com/GetStream/stream-chat-go/blob/86a4834eacdf23682b12fd59609658fbe020545f/http_test.go#L48
is using a context with timeout to handle something like a client timeout

Added new constructor and updated docs here: https://github.com/GetStream/stream-chat-go/pull/210


Node server crashed due to a failed search

dbmanager::get_hits found 0 docs ba.2
dbmanager::get_hits found 0 docs ba.2.
dbmanager::get_hits found 0 docs ba.2.8
dbmanager::get_hits found 0 docs ba.2.86
dbmanager::get_hits found 0 docs ba.2.86.
dbmanager::get_hits found 0 docs ba.2.86.1
dbmanager::get_lineage found no records for cindex=2657
/opt/app/dbmanager.js:120
            var rawLineage = doc["raw_lineage"];
                                ^

TypeError: Cannot read properties of null (reading 'raw_lineage')
    at /opt/app/dbmanager.js:120:33
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

We should add a try/catch to make sure it doesn't crash the node server

The issue was that there was a space added to the end/start of the string. I've modified the search to strip whitespaces at the beginning and end of the query string and I've added a check to ensure that the node instance does not crash when there isn't a record in the database


Add entity parsing

This will not work. Per hdlparse documentation: It will not process entity declarations or nested subprograms and types.

This will work if the build of hdlparse has a5cbf06ed63bfde39141a6ecfaed5da815496bf5

I do not want to pull this in until main version of hdlparse has this commit, or recommend everyone use a fork of hdlparse


Feature Request: Line Number with Checkstyle Format

I'd love if this tool could be used to flag errors for developers to fix, rather than fixing them automatically (in the interest of teaching junior devs to format code properly the first time, rather than rely on an automated tool to catch it for them). We can sort of do that now by executing php-cs-fixer fix ./ --dry-run --diff, but the given output is very large and doesn't actually identify what the error was, just the change that was made. In a perfect world I'd be able to write php-cs-fixer fix ./app --dry-run --diff > output.txt and see a much more truncated list with the filename, line number, and rule that is being violated.
I'm aware of one other such tool, CodeSniffer, that would offer me (sort of) this functionality, but in all honesty I far prefer this package's configuration method.
EDIT: on further review, the --format=checkstyle option almost gives me what I want -- my only issue is that I can't get the line number with each item.

when the formats were introduced one after another (last one - checkstyle indeed), there were no good differ available. Thanks to amazing job of SpacePossum, we can now generate diff in udiff format.
We are already prepare that checkstyle format could contain linenumber (vide https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.10/doc/checkstyle.xsd#L30), we were thinking about it even without having good differ.
Would you like to update https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.10/src/Report/CheckstyleReporter.php to expose line ? :)

Sure thing, I'll take a crack at it.

Currently the check style report contains entries for each fixer, this makes the line number not useful in some situations. For example one fixer may change a series of tokens on line 2 and than the next fixer moves the tokens to line 20 or removes all tokens leaving no "line 2" in the file. Not sure how to proceed here in a meaningful matter.

I think at least when --dry-run is used, the line number the error is on is all that matters since fixers are not run. When one issue is fixed, the line numbers the errors were on will obviously change.

If you run with just one rule, than yeah the line numbers will always map back to that one rule and you should be good :)
If you run multiple rules (fixers) you still run into the same issue, in dry-run or not, as the fixed result from the first rule is the input of the next, of which the fixed/changed output is the input of the 3rd etc.
So if the first rule shuffles all your code around the fix done by the second might look as being on line X while that line start out to be line number Y.

Right, I was specifically just talking about when doing --dry-run which doesn't modify code. Having the line numbers here at least would be useful for CI. We don't automatically fix code, just validate.
I'm not sure if doing it for --dry-run only for now, and then doing this for the default mode would be possible.

Right, I was specifically just talking about when doing --dry-run which doesn't modify code

And this is a misconception on your part: --dry-run does modify the code, it just doesn't save it to the file afterwards.
So, as SpacePossum said, the fixed result from the first rule is still the input of the next, etc. Because otherwise it would not be a representative dry run.

Ah ok. I had no idea --dry-run actually modified anything. I thought it just output what would have been changed. Is this what other linters do (eslint, prettier, etc.)?
I ask because I actually came to this ticket as I was having issues with https://github.com/haya14busa/reviewdog and I think it's due to the missing line numbers. It depends on having the line number in the error match up with the line number in the git diff. If --dry-run actually modifies anything this will break reviewdog I believe as it won't match up.

I thought it just output what would have been changed.

The only way to know this is to actually do the fixing (for all configured rules), and diff that with starting code. That is usually how dry runs work: do everything you'd normally do, just don't save (write, commit, publish, etc) the end-result.
However as I understand correctly (haven't used it that way myself), you can specify the diff format to output just regular diffs, and those should have line numbers etc. You then just can't speak as to what specific fixer caused which specific change (unless only 1 fixer actually made changes).

having the line number in the error match up with the line number in the git diff

PHP-CS-Fixer doesn't work on a line by line basis (luckily, otherwise a lot of fixers wouldn't be possible), so if this is necessary, it won't ever work. Take for example this code
/**
 * @param int $foo
 */
function bar($foo);

If your change (and thus git diff) would be
/**
 * @param int $foo
 */
-function bar($foo);
+function bar(int $foo);

And your fixer config includes no_superfluous_phpdoc_tags and no_empty_phpdoc, the result after running PHP-CS-Fixer would be just
function bar(int $foo);

Making the PHP-CS-Fixer diff
-/**
- * @param int $foo
- */
function bar(int $foo);

How could you map that?

I would like to add to the discussion to suggest an alternate approach to solving this problem. Since php-cs-fixer was built to fix code, it naturally does not make sense to try to wedge reporting into that command. I believe that this is essentially what both @SpacePossum and @dmvdbrugge are getting at in their comments. Instead, it would make more sense to add a new command with a sole purpose of generating checkstyle (and other) reports that need meta information like the line number.
While I am not an expert on the code base, it would stand to reason that the same logic that is used when running the fixers on rule violations could also be used to capture the file, line, and rule violation (minus running the fixers). If it's possible that some rule violations might be masked by other rule violations, then so be it -- the user/system can re-run php-cs-fixer after manually fixing the code until such a point where there are no more violations. After all, something is better than nothing.

I would like to add to the discussion to suggest an alternate approach to solving this problem.

running php-cs-fixer fix ... vs php-cs-fixer other-command ... does not solve the issue, it's just moving issue from one command to another

(...) the same logic that is used when running the fixers on rule violations could also be used to capture the file, line, and rule violation (minus running the fixers).

That's the thing, to know which line is violating the rule, the rule has to be executed on a file. executing the rule = fixing. Executing without store fixed output = dry-run mode.

running php-cs-fixer fix ... vs php-cs-fixer other-command ... does not solve the issue, it's just moving issue from one command to another

Yes, and the suggestion was intentional. The suggestion is two-fold:

Keep backward compatibility with the current fix command, and
Separation of concerns: fix is for fixing, and the new command is for reporting

Yes, --dry-run is currently being used as the reporting feature, but as pointed out, it modifies the code in memory and because of this, line numbers cannot be reliably captured.

That's the thing, to know which line is violating the rule, the rule has to be executed on a file. executing the rule = fixing. Executing without store fixed output = dry-run mode.

I took the liberty of forking the code earlier today and I poked around a little bit to see what it would take to add line numbers to the output. I do understand what you're saying about having to run the fixers to know the line numbers. I still believe this feature is trivial to implement; albeit, it will mean modifying each existing fixer, plus a handful of other files, to get it to work.
Here is what I was thinking:

Modify src/Fixer/FixerInterface.php and add a new method that would return an array of line numbers for each violation of said fixer

public function analyze(\SplFileInfo $file, Tokens $tokens)
-token_get_all() returns the line number as element 2 (not always true, would need to document examples of when it doesn't work)

Modify src/Runner/Runner.php and add a new method that would return the same array as Runner::fix(), except with line numbers

Runner::fix() currently returns the following data structure:

array(
    'relative/path/to/file.php' => array(
        'appliedFixers' => array(
            'fixer-1', 'fixer-2',...
        ),
        'diff' => '... diff content ...'
    )
);

Modify the data structure so that the appliedFixers uses the fixer name as the key, and the array of line numbers as the value

Update Runner::fixFile() so that the appliedFixers structure follows the same format, but with an empty array

Add new command src/Console/Command/SummaryCommand.php (or whatever you want to call it)

Start off by copying the FixCommand and remove the options that do not make sense (e.g., --dry-run, --diff, --diff-format, etc)
Instead of calling Runner::fix(), call Runner::summary() (or whatever)

Modify the reporters to handle the change in the ReportSummary::$changed data structure by adding the line number to the output

Granted, I am still new to this code base, so I could have missed something, or you might have a better/cleaner idea than what I've laid out. These are just cursory thoughts based on an afternoon digging around the code.

👎 for modifying FixerInterface, it should be an extended interface like DefinedFixerInterface so as to not break backwards compatibility.
Also, you're proposing to modify every single fixer to add a new method to report line number violations - which would be a hell of a lot of work, and that's without considering testing on top of that.
I haven't thought about this long and hard, but I was thinking possibly a decorator for Tokens, that when any tokens are attempted to be modified, it counts it as a "violation", but doesn't actually modify the tokens. I think that would work for a majority of the fixers, but obviously not for the ones that rely on previous tokens being modified.

Yes, --dry-run is currently being used as the reporting feature, but as pointed out, it modifies the code in memory and because of this, line numbers cannot be reliably captured.

You need to modify the code in memory, as if you won't, not all changes will be detected (there are changes that would be applied only if other fixer would be applied earlier)

public function analyze

I'm really eager to hear who gonna implement this method for built-in 200 fixers and more in the wild

I haven't thought about this long and hard, but I was thinking possibly a decorator for Tokens, that when any tokens are attempted to be modified, it counts it as a "violation", but doesn't actually modify the tokens.

Imagine single violation that private method should be moved after public methods. Now, we got 500 tokens moved around, but we shall  have it reported only as single violation

we already have a differ that can produce line numbers, why not simply use it ?

@ntzm

Also, you're proposing to modify every single fixer to add a new method to report line number violations

Yes, but who else in the codebase aside of the fixers has the knowledge to know when a token is also a violation? With a new interface or modifying an existing interface, there are going to be roughly 200 classes either added or modified due to the way the existing infrastructure works. In other words, the fixers are tightly coupled with the logic used to determine what's a violation.

which would be a hell of a lot of work, and that's without considering testing on top of that.

If it were easy, we probably wouldn't be having this discussion; as the line numbers would probably already be available in the summary reports. In other words, we shouldn't let that stop us. :)

but obviously not for the ones that rely on previous tokens being modified.

Are there already use cases that demonstrate violations that are hidden due to other violations? I'm hard-pressed to think of any good use case.
Let me counter your argument by using the analogy of the built-in PHP linter/lexer: it does not try to guess at every possible problem in the code -- it finds the first one and halts. If that problem happened to be hiding another problem, then the user is expected to re-run the code so it can be discovered.
Don't get me wrong; I'm not suggesting we halt on the first problem we uncover. I'm simply suggesting that, for the sake of complexity (and speed), we not spin our wheels trying to uncover every single possible problem that could be lurking in the depths of somebody's code.
Besides, there will come a point when doing so overshoots the goal of providing line numbers. For example, if a fixer would sort methods alphanumerically (irrespective of visibility), only to violate a rule about ordering by visibility, you wouldn't flag the violation on the new line numbers that happen after the original sorting. You would flag the violation at the original line numbers and move on - no modification needed.
@keradus

You need to modify the code in memory, as if you won't, not all changes will be detected (there are changes that would be applied only if other fixer would be applied earlier)

What I'm proposing is not about fixing the code. It's only about reporting violations that are found on the existing code as a report. Fixing code is complex, and as you and a lot of others allude to, there really is no good way to get around how complex and 3-dimensional fixing code can be. So instead, we simply report on what we can reasonably report on and leave the fixing up to the user.
I'll be honest: my goal is to allow php-cs-fixer to be used in a continuous integration platform to generate reports on the coding standards of each build we generate. We don't believe in automatically fixing the code for our developers for two main reasons:

It creates a lot of unnecessary noise in our commits/PRs that could be avoided if the developers didn't write non-standardized code to begin with (i.e., they code however they want, commit, get rejected at code review, fix the code they originally wrote, commit...)
Developers will not be incentivized to learn the coding standards if they have the code reformatted for them, which feeds back into the original point: more noise

I'm really eager to hear who gonna implement this method for built-in 200 fixers and more in the wild

I volunteer as tribute to help with php-cs-fixer. As for any fixers in the wild, this is why we have version semantics. This kind of change would be very significant, so therefore it should target a major release. Any fixers that are not up to snuff would avoid the new version until they become compatible. I would never suggest otherwise. :)

Imagine single violation that private method should be moved after public methods. Now, we got 500 tokens moved around, but we shall have it reported only as single violation

If a class has 500 methods that violate a rule, then yes, we should have 500 violations. I would argue that the number of violations is not what should concern us, it's the quality of the violations. For example, if your class has 2 private methods, followed by one public method then the violation(s) are either:

the private methods: they should appear after protected and public
the public method: it should appear before protected and private

Never should we suggest all three methods are in violation. It could be as simple as a hard-fast rule that public methods are never in violation, or it could be more dynamic as to suggest whichever visibility of method has the fewest violations is the visibility that is not in violation. So in our given example, the public method would be considered correct while the private methods are in violation.

we already have a differ that can produce line numbers, why not simply use it ?

Because the differ works on modified code, and that modified code could have any number of fixers applied to them. How would you know with any level of certainty which fixer was applied to any given line of code from the original source? All you would know is that line N in path/to/file.php has a violation. Now we're back to square one, but with a different problem: what was the violation?
I would argue that separating out the logic that detects the violations from the logic that fixes the violations would better serve this project going forward. I never said it would be easy, and I certainly don't expect it to happen over night. Though that would be nice. :)

What I'm proposing is not about fixing the code. It's only about reporting violations that are found on the existing code as a report. Fixing code is complex, and as you and a lot of others allude to, there really is no good way to get around how complex and 3-dimensional fixing code can be. So instead, we simply report on what we can reasonably report on and leave the fixing up to the user.

So, again. That's the whole point. PHP CS Fixer had been built as... FIXER. It does not look for violations. There is no code for that. We don't have the logic to find violation as standalone code - it's part of fixing functionality that cannot be easily extracted. And rewriting a 200 rules to do so is way we will not take.

I'll be honest: my goal is to allow php-cs-fixer to be used in a continuous integration platform to generate reports on the coding standards of each build we generate.

Awesome ! Then... do it ! PHP CS Fixer in dry-run mode does exactly that. Symfony, Zend, Yahoo are using it. Scrutinizer CI offers it out of the box, ppl are using it across Travis, CircleCI, Jenkins, Bamboo... your goal has been already achieved.

I volunteer as tribute to help with php-cs-fixer.

then let me help with that. separating logic of detecting vs fixing for existing codebase would take few months of full-time job for any of us. are you willing to commit that deep? if so - it's wrong, dev shall be lazy and think about simpler solution.

Imagine single violation that private method should be moved after public methods.
Now, we got 500 tokens moved around, but we shall have it reported only as single violation

If a class has 500 methods that violate a rule, then yes, we should have 500 violations.

500 tokens are not 500 methods. in my example we had a single method to be moved, and that method is defined by 500 tokens. That was killer point for ntzm's idea of wrapping Tokens.

we already have a differ that can produce line numbers, why not simply use it ?

Because the differ works on modified code, and that modified code could have any number of fixers applied to them.

Differ works on whatever one would run it against. You don't need to run differ after each of fixer has been applied.

I would argue that separating out the logic that detects the violations from the logic that fixes the violations would better serve this project going forward.

This one is way bigger topic than lines reporting. Please give the reasoning for that.
When we built the tool, we thought exactly opposite.
How would it serve the project in going forward, explicitly ?
I can see huge time consumption for that task (which can be spend better), and I don't see benefits of that action. Possibility of providing lines is not decent benefit that could be use as an excuse to go that way - as feature of gathering lines can be implemented in multiple ways.

So, from the very beginning.
We are for having the feature of reporting line numbers in checkstyle and so.
I was, personally, simply against your proposal of how to achieve it, due to change of whole idea behind how tool was written, thus huge time that has to be consumed for this task.

I've done it. And all of my reports say each violation happens at line 0 of each file. So now my team, as
well as anyone else who does this, has to spend the majority of their efforts skimming the code trying
to find each and every violation, no matter how subtle.

That's exactly what the tool was not designed to do. Why you ask your team to manually do it? let them run fix command and that's it. If they just want to see violations without applying them, they can use dry-run, eg --dry-run --diff --diff-format=udiff, so they would also see line numbers.

I'm 100% open to suggestions.

Already did, that's what we brought udiff alive in the first place.

I for one would also really like to know which lines has been altered by which fixer.
Knowing the file has been fixed by a certain fixer does not tell me it has fixed something.
I know I can diff afterwards, but if more fixers has fixed issues, it is no longer clear which fixer has done what.
Attaching the line number to a token during the tokenization would be sufficient in most cases, since you would be able spot it in the diff anyway.

With all due respect, and I'll be frank here, your response is cowardly and short-sighted.

I don't have the energy to work with this

Please re-open. What reason do you have for closing this ticket?

lock was accidental and Space already unlocked it 20 minutes before your request.
to fast finish the talk about "how" to achieve it.
with collaboration with PHPStorm, now PHPStorm supports PHP CS Fixer out of the box, including changed lines support (via provided by us udiffer)
https://blog.jetbrains.com/phpstorm/2018/09/phpstorm-2018-3-early-access-program-is-open/

lock was accidental and Space already unlocked it 20 minutes before your request.

I appreciate the lock being lifted. I was referring to resetting the ticket status from Closed to Open.

to fast finish the talk about "how" to achieve it.
with collaboration with PHPStorm, now PHPStorm supports PHP CS Fixer out of the box, including changed lines support (via provided by us udiffer)

That's really cool. I love seeing the cross-compatibility between projects such as this. However, that side-steps the original request: add line numbers to checkstyle report.

However, that side-steps the original request: add line numbers to checkstyle report.

thank you for pointing this out... https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3601#issuecomment-419066854

@keradus

So, from the very beginning.
We are for having the feature of reporting line numbers in checkstyle and so.

I somehow missed this. I will see what I can do about tracking line numbers, taking into account fixer modification concerns already discussed.
In the meantime, would you or @SpacePossum reopen this ticket? Or would a new ticket be preferred?
Thank you for talking this through with me. It has helped. :)

I'm pretty convinced this ticket should be kept open.
dry-run + checkstyle + line numbers represent a legitimate need.

Not sure what the current status is, but I'd also +1 the request for line numbers. I'm currently looking into integrating code style tools into our dev process, starting from the IDE (PHPStorm in our case), pre-commit hooks (via grumphp) to continous integration via jenkins.
Especially the PHPStorm integration brought me here, because the inspections are currently rather not useful, if there is more than one violation. I believe this is due to the way that php-cs-fixer reports violation. To make things more clear, here is a concrete example:
<?php
//hello

function foo_bar($baz=null, $bar)
{
    echo "foo"; echo "bar";
}

The file contains multiple violations and this is how PHPStorm reports those violations with php-cs-fixer configured:

The arrow-position of the bubble is "my cursor" and I get a list of all style violations. Unfortunately "I don't now" which of those actually applies to the given line. The command that PHPStorm runs behind the scenes is
vendor/bin/php-cs-fixer' 'fix' 'test.php' '--dry-run' '--diff' '--diff-format=udiff' '--format=xml' '-vv' '--allow-risky=yes'
Generating the following output:
<?xml version="1.0" encoding="UTF-8"?>
<report>
  <files>
    <file id="1" name="test.php">
      <applied_fixers>
        <applied_fixer name="blank_line_after_opening_tag"/>
        <applied_fixer name="no_unreachable_default_argument_value"/>
        <applied_fixer name="no_extra_blank_lines"/>
        <applied_fixer name="braces"/>
      </applied_fixers>
      <diff><![CDATA[--- Original
+++ New
@@ -1,14 +1,12 @@
 <?php
+
 //hello

-function foo_bar($baz=null, $bar)
+function foo_bar($baz, $bar)
 {
-    echo "foo"; echo "bar";
+    echo "foo";
+    echo "bar";
 }
-
-
]]></diff>
    </file>
  </files>
  <time unit="s">
    <total value="0.117"/>
  </time>
  <memory value="6" unit="MB"/>
</report>

As you can see, there is no information about "where which violation occured", but only "which fixers got applied". So I guess there's nothing that can be done from the PHPStorm side.
In comparison, this is the same file but with a PHPCodeSniffer inspection instead of php-cs-fixer

The error message is actually taylored to the style violation that affects the specific line in question.
Command run bv PhpStorm
vendor/bin/phpcs test.php --encoding=utf-8 --report=xml
Output
<?xml version="1.0" encoding="UTF-8"?>
<phpcs version="3.4.0">
<file name="/var/www/current/test.php" errors="5" warnings="0" fixable="3">
    <error line="4" column="22" source="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals" severity="5" fixable="1">Incorrect spacing between argument "$baz" and equals sign; expected 1 but found 0</error>
    <error line="4" column="22" source="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterDefault" severity="5" fixable="1">Incorrect spacing between default value and equals sign for argument "$baz"; expected 1 but found 0</error>
    <error line="4" column="29" source="PEAR.Functions.ValidDefaultValue.NotAtEnd" severity="5" fixable="0">Arguments with default values must be at the end of the argument list</error>
    <error line="6" column="27" source="Generic.Formatting.DisallowMultipleStatements.SameLine" severity="5" fixable="1">Each PHP statement must be on a line by itself</error>
</file>
</phpcs>

I've two concrete examples why this is useful:

Code reviews + learning effects for junior devs
During the inital setup of the rules

Nr. 1 has already been explained here. As for 2... well, that's my current pain point :) I'm trying to understand each rule/fixer by applying them to our existing codebase and getting (unsurprisingly) a lot of violations. Since I have no clue which violations refers to which line in the code, exploring those rules is very cumbersome, because I can't just "hover" over the violation in PHPStorm to understand what the actual issue is and look it up in the documentation.
I am aware that php-cs-fixer is.. well.. a fixer and not a style checker. However, from an end user prespective I would like to use one tool and define one ruleset instead of maitaining multiple (incompatible) ones. php-cs-fixer is already integrated in our favorite IDE and offers a ton of great options, so this would be a perfect fit.
PS: Thx for the discussions in here - especially @dohpaz42: Very well explained. i hope you didn't move on already (or if so... to what ;)).

Can we have this reopened?

Maybe some udiff-to-checkstyle.awk is possible to fill the gap. Still the udiff lacks most information checkstyle provides:

severity (eg: "warning")
source (eg: "PHP-CS-Fixer.braces")
message (eg: "Found violation(s) of type: braces")
(which udiff could(?) provide within diff hunks)

Closing as the PR has to many ideas that deserve each their own issue and something have already changed in the last 2 years.
As such, if anything left please create new on the point small request with up to date samples. Thanks all!


[Fix #6675] Avoid printing deprecation warnings about constants

This PR prevents deprecation warnings about constants to be shown (issue #6675).
It was needed to implement a method called silence_warnings, since Kernel::silence_warnings was hiding RuboCop's warnings.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Thanks for tackling this! The changes look good to me. Just add an entry in the changelog regarding them.

Thanks for the reply @bbatsov! I added an entry in the changelog. Could you check again? :D

Thanks!


[Event request] Passing TempSalesLine into CopyFromGLAccount() procedure and OnAfterAssignGLAccountValues() event

Hi Microsoft AL Development Team,
Could you please pass the TempSalesLine variable as a parameter into the call to CopyFromGLAccount() procedure in the "No." field's OnValidate() trigger in table 37 "Sales Line"?

Then in the CopyFromGLAccount() procedure, could you please pass TempSalesLine into the event OnAfterAssignGLAccountValues()

Which will require the following logic update in the OnAfterAssignGLAccountValues event:
    [IntegrationEvent(false, false)]
    local procedure OnAfterAssignGLAccountValues(var SalesLine: Record "Sales Line"; GLAccount: Record "G/L Account"; SalesHeader: Record "Sales Header";
    TempSalesLine: Record "Sales Line")
    begin
    end;

Thank you.
Kind regards,
Daniel Williams

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 11199.


Values persisting across app uninstall and install on Android?

Have you seen any issue where settings are being persisted across app uninstall and reinstall (which we don't want)?  We are testing on several Android devices and we have 1 that behaves this way.  All the others have the data wiped.  iOS seems to behave correctly as well.

This is documented in the readme, see F.A.Q.
This is the default behaviour of SharedPreferences in Android.
To tackle this issue, you could clear the NativeStorage stored values (NativeStorage.clear(<success-callback>, <error-callback>);) if your app has just been installed for the first time.
Thus:

NativeStorage.getItem("isFirstTime",...)
If it is the first time you access 'isFirstTime' reference NativeStorage will give an error code 2 (i.e. Item not Found)
If that is the case: clear nativestorage
Otherwise: NativeStorage.setItem IsFirstTime to false

Oh I missed that... thanks!

Seems this is not an issue. Closing :)


Add optional track interpolation and associated setting to enable and disable it

Enabling and disabling it during track creation is important (ideally on the top bar) because fish may be occluded or go out of frame for a number of frames before re-appearing

based on our discussion, this feature may require reworking on data structures for tracks and detection. We could probably learn some lessons from the desktop UI fyi @BryonLewis @subdavis @AlmightyYakob

This feature will probably require some discussion about how users will use this.

Could a user want interpolated AND non-interpolated tracks in the same video?  Why would they want that?
Could a user want to change the interpolation status of a track after creation?  Why would they want that?
Is toggling interpolation really the best way to signal occlusion? Other apps I've seen keep interpolation on and add a boolean detection attribute "occluded" that can be turned on and off.

Also, the UI/UX for creating interpolated frames will likely be very different from creating keyframe-only tracks.   Good UI for such a workflow has been outlined pretty extensively in vatic and cvat.
It's probably a good idea here to engage more directly with the design team.  We could also engage with our in-house annotation team.  I've done this before, getting their feedback on annotation tooling has historically been really beneficial.
Technical note: an interpolation-capable GeoJS annotation app already exists in Janitor and Refiner.  Worth seeing how we can learn from those.