Quick Fix: Rename Type with Filename replaces class name not related with error

Issue Description

Steps to Reproduce

create new csproj dotnet new nunit
create an arbitrary folder
copy UnitTest1.cs (auto-created) to folder
rename copied file with name (ex: UnitTest2.cs)
open Quick Fix, and select Rename Type with Filename (I don't know it's original name)

Expected Behavior
Only classname of copied file will change
Actual Behavior
Class name of original file changed
Logs
OmniSharp log
(no log available)
C# log
(no log available)
Environment information
VSCode version: 1.42.1
C# Extension: 1.21.11
Dotnet Information
.NET Core SDK(global.json �ݿ�):
 Version:   3.1.101
 Commit:    b377529961
��Ÿ�� ȯ��:
OS Name:     Windows
OS Version:  10.0.18362
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.101\
Host (useful for support):
Version: 3.1.1
Commit:  a1388f194c
.NET Core SDKs installed:
3.1.101 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

autodocstring
njpwerner
0.4.0

cloudcode
googlecloudtools
1.1.2

csharp
ms-vscode
1.21.11

csharpextensions
jchannon
1.3.1

docomment
k--kato
0.1.8

dotnet-test-explorer
formulahendry
0.7.1

ftp-simple
humy2833
0.7.5

increment-selection
albymor
0.2.0

java
redhat
0.56.0

jenkinsfile-support
ivory-lab
0.4.4

python
ms-python
2020.2.63072

remote-wsl
ms-vscode-remote
0.42.3

testfile-generator-for-junit
marcoLee
0.0.7

unity-code-snippets
kleber-swf
1.3.0

unity-snippets
YclepticStudios
0.1.2

vsc-mybatis
niko
1.2.0

vsc-travis-ci-status
felixrieseberg
1.1.0

vscode-docker
ms-azuretools
0.10.0

vscode-java-debug
vscjava
0.24.0

vscode-java-dependency
vscjava
0.8.0

vscode-java-pack
vscjava
0.8.1

vscode-java-test
vscjava
0.22.1

vscode-kubernetes-tools
ms-kubernetes-tools
1.0.9

vscode-lombok
GabrielBB
1.0.1

vscode-maven
vscjava
0.21.0

vscode-openapi
42Crunch
2.1.0

vscode-position
jtr
1.0.1

vscode-postman
eridem
1.0.2

vscode-yaml
redhat
0.7.2

vscodeintellicode
VisualStudioExptTeam
1.2.5

white
arthurwhite
1.3.6

xml
DotJoshJohnson
2.5.0

@seongwon-kang Sorry this is causing problems. The issue is that both classes have the same name and namespace. When a rename is performed the Project is searched for matching symbols that need to be updated. Roslyn says this behavior is by design https://github.com/dotnet/roslyn/issues/40779#issuecomment-575750899

@JoeRobich Well, There are no explaination that rename will processes in project-wide. I want to add another menu that changes class name only in that file, is it bad idea?

@seongwon-kang  adding another menu for "only that file" is wrong in most cases, and would result in undesired behavior for this feature. There's only so much the editor should do for you, and this is a case where I believe you're using the wrong tool for the job. Find+replace does exactly what you want, and would be about as accurate.

@ryzngard I expected that quick fix will refactor classname to match with filename. error message is, "the definition of {classname} is already in {namespace}", so changes all classname in project doesn't resolve error in this case.
if he/she renames filename that just copied class first, he/she may want add new class with that file template, not intent to replace existing class.
by the way, the recommendation of this quick fix(Rename class to {filename}) calls "Rename Symbol"? I didn't knew it.

Rename operations for VS and VS Code generally do symbol renames, so this aligns with that behavior. I understand what you're saying that you may want to rename only this "instance", but there are pretty valid reasons that's not the behavior.
Thanks for filing :) I agree that it may not be the easiest behavior to understand, but hopefully you understand why I believe it's still correct.

@ryzngard I can't get valid reasons to not fix this case.. can you give me an example that can occurs undesired behavior? simply applying rename symbol doesn't fix any case if there are two same class in same namespace, so quick fix should not recommend rename symbol (project-side).

Indeed, the fix just checks that the class and file are mismatched.
I think we can make improvements in this area, but adding another menu option is likely not the right path.
If you have more input, I would suggest taking the discussion to https://github.com/dotnet/roslyn/issues/40779#issuecomment-575750899 and we can talk about ways to improve the experience if needed. It's exposing the internals, but all of this behavior is controlled by roslyn directly and applies to VS Code, VS for Mac, and VS for Windows.


Update chain-list

Related issues:
https://github.com/Koniverse/SubWallet-ChainList/issues/4
https://github.com/Koniverse/SubWallet-ChainList/issues/48
https://github.com/Koniverse/SubWallet-ChainList/issues/56
https://github.com/Koniverse/SubWallet-ChainList/issues/62
https://github.com/Koniverse/SubWallet-ChainList/issues/61

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./master-pr-1520-build-1.0.8-2023-06-12T09-05-50UTC.zip
Validation passed.


Suggest new enhancements

Suggest new enhancements

This appears to no longer work, as it uses the v2 API, is that correct? If so, I might like working on some changes. For example:

Move to pwnd API v3

From my understanding this will require using a own API key to work.

Support Python 3
Maybe do some formatting with autopep8
Maybe set up some tests

Thanks @Ondkloss please go ahead with the changes it will be very helpful.

Please let me know incase of any help needed


install instructions incompletes

Hi,
Given  your main branch name is 'main'  instead of the legacy 'master', you should update your install instructions.
For example, with (my up-to-date) vim-plug, I had to do: Plug 'dstein64/nvim-scrollview', {'branch': 'main'}
Idk about other plugin managers though, but maybe there are similar updates to make.
Otherwise, very great plugin!

Thanks for reporting this @michaelb!
I've added the branch to the example (85e15471129af1d58f011199a3f41ffc0750e7a6).
I see that vim-plug Issue #1005 was opened to address this, and implemented in PR #1007. The issue was subsequently re-opened, and remains open, to support scenarios where an existing default branch has been renamed.


Fix Interface implementation

Non-Service interface implementations aren't checked. After that we should be able to run PHPSTAN on all files, not just on some.

Supersed by: https://github.com/EnAccess/micropowermanager/issues/248


Fix buildSrc direct invocation with tooling API

@bot-gradle test RFM

OK, I've already triggered ReadyForMerge build for you.


Website: Syntax highlighting for HTTP requests

The link for Schema Stitching is not available for V11 or from main docs: https://hotchocolate.io/docs/stitching


add to conversion to fixedsizebinary

This adds fn to conversion for FixedSizeBinary. This makes converting to another logical type consistent with primitive arrays.
I could add it to the other arrays as well.

Thanks! I think we need to check that the data_type is a valid one and panic if not, like we do in from_data.

Thanks! I think we need to check that the data_type is a valid one and panic if not, like we do in from_data.

I didn't fully understand what we mean by valid in this case? If we use an extension type, do we know what is valid or not?

The function get_size is the one that validates in the from_data, here.

(note that the .to_logical_type converts any extension type to its internal type, to take extension types into account ^_^)


Direct inclusion vs blackbox differs in simulation

Currently in the aes_cipher_core formulation we include the sub components as blackboxes:
https://github.com/project-oak/silveroak/blob/f8fc0677e19a60d0e7a36e6d6a75fc73605087d3/silveroak-opentitan/aes/Impl/CipherControlNetlist.v#L31-L38
Note that although these could call any Verilog module, they are setup to use our generated files. Changing to direct instantiation works for most of the sub modules but changing aes_mix_columns to directly be included causes aes_cipher_core to fail aes_test.c under Verilator. Blackbox instantiation and direct inclusion should be semantically equivalent. It could be that aes_mix_columns has an issue but this seems to be the same bug seen in #623

Noted! Perhaps a possible bug with black box instantiation.

Just to update; I'm still investigating, but it looks clearly an issue with the direct inclusion whereas blackbox is working as expected. Here is the blackbox version of mix_columns which is signalling as expected:

Here is the direct inclusion version, clearly showing buggy signals:

Note the odd periodic transitions before the input even transitions. Perhaps something to do with registering vectors.

Perhaps coincidental, but those erroneous transitions are 8 cycles which is the size of the inner most vector (a byte) in the input/output.

I've instrumented aes_mix_columns under both instantiations and observed correct signalling in both cases- e.g. although only changing how aes_mix_columns is included will trigger the bug, the signals inside aes_mix_columns are correct in both cases.

The designs should be able to pass LEC. If they do then this is likely an issue with Verilator.

For the record.
No LSB modules are available.
No LSB modules are available.
2021/03/18 12:56:23 System is not a supported distribution
2021/03/18 12:56:23 An error occurred. We don't recognize OS
2021/03/18 12:56:23 WARNING This OS does not appear to be a Cadence supported Linux configuration.
2021/03/18 12:56:23 For more info, please run CheckSysConf in <cdsRoot/tools.lnx86/bin/checkSysConf <productId>
// LEC version 20.20-p100 (17-Nov-2020)
// Check out Conformal_Ultra 20.2 license
// Check out Conformal_Asic 20.2 license
// Command: read design -golden -root aes_cipher_core -sv12 debug_blackbox/*.sv
// Parsing file debug_blackbox/aes_cipher_control.sv ...
// Parsing file debug_blackbox/aes_cipher_core.sv ...
// Parsing file debug_blackbox/aes_key_expand.sv ...
// Parsing file debug_blackbox/aes_sbox_lut.sv ...
// Parsing file debug_blackbox/aes_pkg.sv ...
// Parsing file debug_blackbox/aes_mix_columns.sv ...
// Parsing file debug_blackbox/aes_pkg.sv ...
// Parsing file debug_blackbox/aes_sbox_lut.sv ...
// Parsing file debug_blackbox/aes_shift_rows.sv ...
// Parsing file debug_blackbox/aes_sub_bytes.sv ...
// Golden root module is set to 'aes_cipher_core'
// Warning: (RTL1.3) Variable/signal is assigned by both blocking and non-blocking assignments (occurrence:172)
// Warning: (RTL7.3) Array index in RHS might be out of range (occurrence:40)
// Warning: (RTL14) Signal has input but it has no output (occurrence:260)
// Warning: (RTL14.1) Fanout load of the signal is removed (occurrence:290)
// Warning: (IGN3.2) Duplicate modules/entities are detected. Subsequent modules/entities are ignored (occurrence:1)
// Warning: (HRC3.10a) An input port is declared, but it is not completely used in the module (occurrence:128)
// Warning: (HRC3.16) A wire is declared, but not used in the module (occurrence:3)
// Note: Read VERILOG design successfully
CPU time     : 1.05    seconds
Elapse time  : 2       seconds
Memory usage : 214.96  M bytes
// Command: read design -revised -root aes_cipher_core -sv12 debug_direct/*.sv
// Parsing file debug_direct/aes_cipher_control.sv ...
// Parsing file debug_direct/aes_cipher_core.sv ...
// Parsing file debug_direct/aes_key_expand.sv ...
// Parsing file debug_direct/aes_sbox_lut.sv ...
// Parsing file debug_direct/aes_pkg.sv ...
// Parsing file debug_direct/aes_mix_columns.sv ...
// Parsing file debug_direct/aes_pkg.sv ...
// Parsing file debug_direct/aes_sbox_lut.sv ...
// Parsing file debug_direct/aes_shift_rows.sv ...
// Parsing file debug_direct/aes_sub_bytes.sv ...
// Revised root module is set to 'aes_cipher_core'
// Warning: (RTL1.3) Variable/signal is assigned by both blocking and non-blocking assignments (occurrence:172)
// Warning: (RTL7.3) Array index in RHS might be out of range (occurrence:40)
// Warning: (RTL14) Signal has input but it has no output (occurrence:260)
// Warning: (RTL14.1) Fanout load of the signal is removed (occurrence:290)
// Warning: (IGN3.2) Duplicate modules/entities are detected. Subsequent modules/entities are ignored (occurrence:1)
// Warning: (HRC3.10a) An input port is declared, but it is not completely used in the module (occurrence:128)
// Warning: (HRC3.16) A wire is declared, but not used in the module (occurrence:3)
// Note: Read VERILOG design successfully
CPU time     : 3.00    seconds
Elapse time  : 4       seconds
Memory usage : 381.41  M bytes
// Command: report design data
============================================
Summary           Golden         Revised
============================================
Design-modules        25               6
Library-cells      10442           10442
============================================
Primitives      Golden              Revised
============================================
INPUT              524                  524
OUTPUT             134                  134
--------------------------------------------
AND               5324                 5324
BUF                100                  100
DFF                535                  535
INV                130                  130
MUX              83324                83324
NOR                 49                   49
OR                1875                 1875
WIRE       *     98473                97953
XNOR                30                   30
XOR               2352                 2352
------ word-level --------------------------
ADD                  6                    6
GT                  15                   15
WMUX             10267                10267
WSEL               134                  134
WXOR                20                   20
------ don't care --------------------------
X-assignments       48                   48
--------------------------------------------
Total           192240               191720

// Command: report black box
// Command: report module
Golden:
   aes_cipher_core
      aes_mix_columns
      aes_shift_rows
      aes_sbox_lut
      aes_key_expand
         aes_sbox_lut
Revised:
   aes_cipher_core
      aes_key_expand
         aes_sbox_lut
// Command: set system mode lec
// Processing Golden ...
// Modeling Golden ...
// Warning: (F34) Converted 48 X assignment(s) as don't care(s)
// Processing Revised ...
// Modeling Revised ...
// Warning: (F34.3) Converted 48 X assignment(s) as E(s)
CPU time     : 5.59    seconds
Elapse time  : 7       seconds
Memory usage : 524.23  M bytes
// Warning: Golden and Revised have different numbers of key points:
// Golden  key points = 1193
// Revised key points = 1222
// Mapping key points ...
// Warning: Revised has 24 unmapped key points
================================================================================
Mapped points: SYSTEM class
--------------------------------------------------------------------------------
Mapped points     PI     PO     DFF       Total
--------------------------------------------------------------------------------
Golden            524    134    535       1193
--------------------------------------------------------------------------------
Revised           524    134    535       1193
================================================================================
Unmapped points:
================================================================================
Revised:
--------------------------------------------------------------------------------
Unmapped points   E         Total
--------------------------------------------------------------------------------
Unreachable       5         5
Not-mapped        24        24
================================================================================
// Warning: Key point mapping is incomplete
CPU time     : 10.06   seconds
Elapse time  : 11      seconds
Memory usage : 642.75  M bytes
// Command: map key points
// Mapping key points ...
// Warning: Revised has 24 unmapped key points
================================================================================
Mapped points: SYSTEM class
--------------------------------------------------------------------------------
Mapped points     PI     PO     DFF       Total
--------------------------------------------------------------------------------
Golden            524    134    535       1193
--------------------------------------------------------------------------------
Revised           524    134    535       1193
================================================================================
Unmapped points:
================================================================================
Revised:
--------------------------------------------------------------------------------
Unmapped points   E         Total
--------------------------------------------------------------------------------
Unreachable       5         5
Not-mapped        24        24
================================================================================
// Warning: Key point mapping is incomplete
CPU time     : 10.21   seconds
Elapse time  : 11      seconds
Memory usage : 642.75  M bytes
// Command: set parallel option -threads 4
// Number of threads is set to 4,4.
// Command: analyze datapath -merge -verbose -effort ultra
CPU time     : 11.84   seconds
Elapse time  : 13      seconds
Memory usage : 646.21  M bytes
// Command: add compare point -all
// 669 compared points added to compare list
// Command: set compare effort ultra
// Command: compare -threads 4
================================================================================
Compared points      PO     DFF       Total
--------------------------------------------------------------------------------
Equivalent           134    535       669
================================================================================
CPU time     : 4096.52 seconds
Elapse time  : 1017    seconds
Memory usage : 647.01  M bytes
// Command: analyze abort -compare
There is no abort/specified point to be analyzed.
// Command: report compare data -class nonequivalent -class abort -class notcompared
0 Non-equivalent point(s) reported
0 Abort point(s) reported
0 Not-compared point(s) reported
0 compared point(s) reported
================================================================================
Compared points      PO     DFF       Total
--------------------------------------------------------------------------------
Equivalent           134    535       669
================================================================================
// Command: report verification -verbose
================================================================================
                            Verification Report
--------------------------------------------------------------------------------
Category                                                                  Count
--------------------------------------------------------------------------------
1. Non-standard modeling options used:                                      0
     Tri-stated output:                                        checked
     Revised X signals set to E:                               yes
     Floating signals tied to Z:                               yes
     Command "add clock" for clock-gating:                     not used
--------------------------------------------------------------------------------
2. Incomplete verification:                                                 0
     All primary outputs are mapped:                           yes
     Not-mapped DFF/DLAT is detected:                          no
     All mapped points are added as compare points:            yes
     All compared points are compared:                         yes
     User added black box:                                     no
     Black box mapped with different module name:              no
     Empty module is not black boxed:                          no
     Command "add ignore outputs" used:                        no
     Always false constraints detected:                        no
--------------------------------------------------------------------------------
3. User modification to design:                                             0
     Change gate type:                                         no
     Change wire:                                              no
     Primary input added by user:                              no
--------------------------------------------------------------------------------
4. Conformal Constraint Designer clock domain crossing checks recommended:  0
     Multiple clocks in the design:                            no
--------------------------------------------------------------------------------
5. Design ambiguity:                                                        1
     Duplicate module definition:                              yes *
     Black box due to undefined cells:                         no
     Golden design has abnormal ratio of unreachable gates:    no
     Ratio of golden unreachable gates:                        3%
     Revised design has abnormal ratio of unreachable gates:   no
     Ratio of revised unreachable gates:                       3%
     All primary input bus ordering is consistent:             yes
     All primary output bus ordering is consistent:            yes
     DFF/DLAT not compared due to disabled clock port(s):        0
--------------------------------------------------------------------------------
6. Compare Results:                                                        PASS
     Number of EQ compare points:                              669
     Number of NON-EQ compare points:                          0
     Number of Aborted compare points:                         0
     Number of Uncompared compare points :                     0
================================================================================
// Command: report statistics
Mapping and compare statistics
================================================================================
                     Compare Result       Golden            Revised
--------------------------------------------------------------------------------
Root module name                          aes_cipher_core   aes_cipher_core

Primary inputs                               524                524
   Mapped                                    524                524

Undriven key points                            0                 29
   Unmapped                                    0                 29
      Extra                                    0                 24
      Unreachable                              0                  5

Primary outputs                              134                134
   Mapped                                    134                134
      Equivalent                134

State key points                             535                535
   Mapped                                    535                535
      Equivalent                535
================================================================================
// Command: usage
CPU time     : 4096.58 seconds
Memory usage : 647.01  M bytes
// Command: exit -force


Add function to allow user to search SQL database for existing records

will create branch off of dev when branch 32 has been successfully merged with dev


fix leakage in routerReportManager

the key  in _ Routeskey  may remove when value is empty #1854 and  #2480

It Will investigate why it is failing in tests


Normals not importing correctly?

Hi,
Original script:

Updated to 4.1:

Looks like you did not enable auto smooth

If it was autosmooth then all normals would be broken. And as you can on images, some of them are good.
New model format from dtzxporter: https://github.com/dtzxporter/cast This how normals are solved there:

You can create a pull request to fix it 👍


Using PerfView/perfcollect with Linux traces

I got a basic introduction to PerfView from @adamsitnik and I've been using it to look at ASP.NET Linux perfcollect traces.
I want to share some observations.

One thing that shows up is [unknown] (/ (deleted)) and [unknown] ([unknown]).
Something could not be resolved here. I'm not sure what is the root cause.

[unknown] also shows up for .NET assemblies, for example (from perf.data.txt):
7fb9cca7adff [unknown] (/tmp/benchmarks-agent/benchmarks-server-6/y2nugpcp.ex4/shared/Microsoft.NETCore.App/5.0.0-alpha.1.20103.10/System.Collections.Concurrent.dll

And the epoll_wait system call here doesn't show up under any managed code:

A lot of traces have spikes of kernel.kallsyms!ret_from_intr. I guess these are activities that are triggered by interrupts from the kernel that are unrelated to what I'm profiling. I've been adding it to ExcPats to get rid of the spikes.

I wonder if I can reduce the depth that is shown for systemcalls in the flamegraph. If I want to see kernel.kallsyms!__x64_sys_*, but not their children. Is there a way to do that?

cc @adamsitnik @brianrob @noahfalk
(Moved issue for @tmds)

@tmds, there are a few things here, so I'll try to make sure I get to all of them.
[unknown] (unknown) is perf reporting that it doesn't know how to resolve symbols for this frame because it can't resolve the module that it corresponds to.  This could be a number of issues, but most likely isn't managed code related.
[unknown] (../System.Collections.Concurrent.dll) is because System.Collections.Concurrent.dll is a ready to run image and perf doesn't know how to resolve symbols.  There are a couple of ways forward.  If this is a .NET 5 build, there is now support for JIT dumps, though I've not added the capability to perfcollect (yet).  Otherwise, it is possible to put crossgen in the same directory as libcoreclr.so and perfcollect will generate the necessary symbol files that PerfView can use to resolve these symbols when you stop collection.
To simplify the kernel stacks that you see, I'd recommend looking at the GroupPats field at the top left-hand corner of the stack viewer.  Group Modules Entries might do something similiar to what you want - it will limit you to seeing one frame per transition between modules.  You can then ungroup modules that you care about by right clicking on them and hitting Grouping->Ungroup Module or select the module and hit ALT-W.
Hope that helps.

@brianrob besides being unable to resolve symbol names, there are also cases where the stack traces are not as deep as expected. There are missing frames.
For example, for the epoll_wait, a stack that shows up in perf.data.txt looks like this:
dotnet  2773/2891  [002] 4455268.867156:    1001001 cpu-clock:
        ffffffff96b4052d tcp_poll ([kernel.kallsyms])
        ffffffff96aa8369 sock_poll ([kernel.kallsyms])
        ffffffff96507ba3 ep_item_poll.isra.16 ([kernel.kallsyms])
        ffffffff96507ddf ep_send_events_proc ([kernel.kallsyms])
        ffffffff96507a0a ep_scan_ready_list.constprop.19 ([kernel.kallsyms])
        ffffffff96508bf7 ep_poll ([kernel.kallsyms])
        ffffffff96509080 do_epoll_wait ([kernel.kallsyms])
        ffffffff965090ae __x64_sys_epoll_wait ([kernel.kallsyms])
        ffffffff962043ba do_syscall_64 ([kernel.kallsyms])
        ffffffff96e0008c entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
            7fba4584a7ef [unknown] (/ (deleted))
               500000000 [unknown] ([unknown])

When epoll_wait is called, one of it's parent frames should be the managed EPollAsyncEngine+EPollThread::EventLoop method. It doesn't show up here, but it is present in other frames.
Are you aware of these missing frames? Any idea what may be causing them? Since this is data from perf.data.txt, is this a bug in perf?
For my education: are the addresses that show up in perf.data.txt function addresses? Does perf obtain them by looking at 'frame pointers' in the call stack?

To simplify the kernel stacks that you see, I'd recommend looking at the GroupPats field at the top left-hand corner of the stack viewer. Group Modules Entries might do something similiar to what you want - it will limit you to seeing one frame per transition between modules. You can then ungroup modules that you care about by right clicking on them and hitting Grouping->Ungroup Module or select the module and hit ALT-W.

Thanks for the suggestion. I will try that out.

@tmds, the missing stack frames is a thing that happens sometimes.  It most often occurs when libraries are compiled without frame pointers.  In the case of perfcollect, we tell perf to collect stacks by walking frame pointers (this is the perf default).  Addresses that show up in perf.data.txt are most often virtual addresses within the process (think instruction pointer).  In older versions of perf, you'll see much smaller addresses for native code, and these are file offsets into the ELF image.  To solve the missing stack frames, I'd recommend looking at what libraries (probably libc in the case above) are breaking the stack and then see if you can re-compile them with -fno-omit-frame-pointer.


[core] Include TS modules in rollup import resolution

Fixes the problem discussed in https://github.com/mui-org/material-ui/pull/28074#issuecomment-909340177 by searching for index.ts in addition to index.js in rollup config.

All right, I'll take a look at it in another PR. I think we could even default to index.ts and avoid having .js and .d.ts with mostly the same content in each component's directory.


Create mechanism for building and releasing monitor components

Right now there is no automated way to build and release the images used in the monitoring stack.

So for now I am cutting v2-beta images by hand (just like logger) with _scripts/release.sh


New article: VecDeque::resize() optimization

lgtm

Hi, @scottmcm, would you mind reviewing my article? Thanks. ❤

Came over this and I'm curious, does repeat_n need an unsafe block at all?  Feeling that Option<(NonZeroUsize, T)> may be able to do the same.  I looked at the original PR briefly but it did not explain the rationales.

Came over this and I'm curious, does repeat_n need an unsafe block at all? Feeling that Option<(NonZeroUsize, T)> may be able to do the same. I looked at the original PR briefly but it did not explain the rationales.

HI, can you explain how Option<(NonZeroUnsize, T)> would avoid unnecessary cloning?

can you explain how Option<(NonZeroUnsize, T)> would avoid unnecessary cloning?

Created running example at https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fd82d81d0f485acd769c3b0aaeeb5a3b

Another version of that next() without unwrap():
    fn next(&mut self) -> Option<Self::Item> {
        let inner = self.0.as_mut()?;
        if let Some(next) = NonZeroUsize::new(inner.0.get() - 1) {
            inner.0 = next;
            Some(inner.1.clone())
        } else {
            Some(self.0.take()?.1)
        }
    }

Godbolt says this can be optimized to 2 branches, which I assume corresponds to 2 special cases for count == 0 and count == 1, i.e. second ? can be elided.

Feeling that Option<(NonZeroUsize, T)> may be able to do the same.

Good question!  I actually tried that first.  I wasn't able to get it to optimize as nicely, though.
I think it might be because that's essentially (usize, MaybeUninit<T>) -- because None doesn't have a valid value of T -- rather than the (usize, ManuallyDrop<T>) I ended up using.  That affects whether it can have a niche, for example (see https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5e8a9b728df0f55dec1975bfad1e4902) and might have some impact on when LLVM can treat the reads as the same, rather than worrying about potential undef.
Definitely give it a shot and see if you can make it work, though!  I'd love to get rid of all the unsafe, though thankfully ManuallyDrop's unsafety is one of the easier kinds to deal with.

@scottmcm your playground link tests for Option<Option(NonZeroUsize, String)>>, but we don't need 2 layers of Option.  Just Option<(NonZeroUsize, String)> and it will fill the niche: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=e3402f532fa99e63a2a951605e9b1c38

@XeCycle I did that on purpose to show the niche behaviour -- you'll notice the RepeatN I checked in doesn't have an Option either, but I did put it in that playground.
The goal is to show that Option<RepeatN<String>> will be the same size as RepeatN<String>.

@scottmcm Ahh sorry, missed your point.  Thanks a lot, now I get it that you want the RepeatN to have a usable niche if the inner T has one, for use with Option<RepeatN<T>>, but Option<(NonZeroUsize, T)> failed to propagate that.  Yes, your design is strictly superior.  Maybe worth mentioning in this article?

Yes, your design is strictly superior.

Rarely is anything strictly 🙂
One thing that the merged implementation doesn't allow is a RepeatN::empty() -- an implementation using the Option approach could do that via None, but there's no way to get a valid-but-unusable ManuallyDrop.
(AKA every niche is also a constraint.)

I added an alternative section.

One thing you might consider adding is a bit more about why not cloning is useful. Probably doesn't need to be a huge section, but it might be worth a mention, or an example in which you can tell between different rust versions that something different is happening.

I have no idea how to add something about why not cloning is useful. Can you give some suggestions? Thanks. @scottmcm

Hi, @scottmcm, do you mind giving another review? We plan to release the first issue end of January. 😄

I understood unneccessary cloning will just take up memory, especially if the cloned item is large - is that what @scottmcm meant @Folyd ?


It doesn't really work

I've tried a bunch of different configurations and made sure It's not something on my end and i continously get the same error.
line 214, in replay_actions
from_position = CLICK_STACKS[action[0][0]][action[0][1]]
TypeError: 'int' object is not subscriptable
I don't know what's causing the error, also It isn't able to hit the new game button with the coordinates , (1280, 1215) like the original code but someone suggested (1000, 1050) on 1080p monitors and that works fine.

Looks like something had changed in one of the dependencies, pyscreenshot, which caused this issue to occur. In essence, the script took a screenshot of the wrong area and could not parse the cards from that. Please check the readme again, I changed the instructions for installing the dependencies so make sure to update them before trying again

Looks like something had changed in one of the dependencies, pyscreenshot, which caused this issue to occur. In essence, the script took a screenshot of the wrong area and could not parse the cards from that. Please check the readme again, I changed the instructions for installing the dependencies so make sure to update them before trying again

Thanks so so much for looking into it and fixing it, It works like a charm now. The only thing I would suggest is to possibly add to the read.me to change the new game button coordinates to (1000, 1050) but other than that, happy new year and again thanks ^^

Thanks so so much for looking into it and fixing it, It works like a charm now. The only thing I would suggest is to possibly add to the read.me to change the new game button coordinates to (1000, 1050) but other than that, happy new year and again thanks ^^


Add test support for debian buster

This PR adds testing support for Debian Buster.

[x] Travis builds for debian buster tested successfully
[x] kitchen ci docker builds with debian buster tested successfully
[x] kitchen ci vagrant builds with debian buster tested successfully

Closes https://github.com/dev-sec/ansible-os-hardening/issues/233

@rndmh3ro This one is ready for review :smile:
I've tested it locally with docker and vagrant and everything works fine.
The failing travis build is unrelated to my changes. Seems that there is an issue with the fedora tests.

Great PR, thank you very much @123Haynes! Works like a charm.


UI freezes completely when opening a Jewel compose panel in a DialogWrapper on 2024.3.*

In my plugin there's a problem with running jewel with compose on Intellij 2024.3.+. When a dialog with compose content is shown, no content appears, the whole IDE UI completely freezes and the only option is to kill the process, no crashes in the console as well. The code. I'm using kotlin 2.1.0, compose 1.7.3 and jewel 0.27.0, however this happens on previous versions as well, and only on IJ 2024.3.+ and everything below works fine. Users of the plugin report it as well. What could cause this?

This is a Compose/IJP issue. We've reported it months ago as https://youtrack.jetbrains.com/issue/IJPL-166436/Freeze-in-AWTEventQueue-due-to-MainDispatcherChecker and are waiting for a resolution.
Our current hacky workaround is to invoke this before the window is created, just in case:
 /**
  * Initializes the MainDispatcherChecker in Compose; this must be called from the UI thread in
  * non-modal state. This is a workaround for a freeze in the UI thread that is triggered by using
  * Compose in a dialog before it has been used in a non-modal state.
  *
  * TODO: Delete this when the upstream bug is fixed.
  */
 fun initializeComposeMainDispatcherChecker() {
   object : LifecycleOwner {
     override val lifecycle = LifecycleRegistry(this)

     init {
       lifecycle.currentState = Lifecycle.State.STARTED
     }
   }
 }


Deleting an object tied to a rotation controller, then saving the level will crash fushig

Delete an object tied to a rotation controller then save the level and Fushigi will throw an "Object reference not set to an instance of an object" error, you can find plenty objects tied to rotation controllers in 1-1 to verify the issue. Deleting all objects tied to a rotation controller and then the rotation controller itself does not seem to help the case, however I cannot verify this with certainty as it's possible I'm forgetting to delete an object

fixed with 3688114


How to build / install on ubuntu (or any linux) ?

Can You provide steps to build and install it in Ubuntu please ?

Ah, good point, not everyone knows cmake!
Added some instructions here: https://github.com/wheybags/wcp/blob/master/readme.md#build-instructions


Integer values displayed as decimal

Superset version
0.20.3
Expected results
Pivot table column headline should display integer when the column in DB is BIGINT
Actual results
Column headlines in pivot table are displayed in decimal (1.0, 2.0, etc.)
Steps to reproduce
A table with
Name(VARCHAR);Days(BIGINT)
a;1
b;1
c;2
A Pivot table slice:
GroupBy: Name
Columns: Days
Metrics: count(*)
Columns should be 1 and 2 but are 1.0 and 2.0

What database is this? Is this a regression?

The database is a mysql (mariaDB). What do you mean by regression ?

Regression means it used to work in a version and on a later version it stopped working or behaves differently.

OK. First time I try this so i cannot say and I only have 0.20.3 actually

I tried in 0.20.5, and got the same problem.
DB:MySQL
there is a column count(1) as cnt and it displayed like 2.00

for bar chart Y axis, we can choose .1s format to show int instead of decimal. but i dont know how to solve it for a table view


Update stale bot

The Stale bot recently added a few new features. This PR updates the config to:

Ignore PRs/Issues that are assigned to a milestone
Give PRs a little more time before being marked stale (30 days)
Updates the comment left on issues when marked stale

Coverage increased (+13.3%) to 95.975% when pulling 603e7b9b0de47220b3e941eab568c8eee5f6eea4 on update-stale-bot into 111e476b15d967ef05c181a3550ccd594221ce46 on dev.


Camera never appearing

I am running Cordova 6.4 along with Sencha Touch. The plugin is installed successfully but when I call the scan() method the camera in iOS and Android is not popping up. I can see when I open up the object that it says scanning and camera showing is true, in yet I see not camera. Anyone know what could be going on here?

Hi, be sure to set every background transparent, as specified in docs, otherwise you will not be able to see camera preview. In my case i had to set the css property "background: none" to html, body and jQuery mobile page. Qhen it's done scanning, revert every background to what it was before.

There is no camera preview but can scan qrcode and  gain the text.I try to set every item background transparent but not work.Do I write the wrong code?
htmlfile
 <ion-content class="content" scroll="true" overflow-scroll="true">
  <button class="button" ion-button (click)="qrscanner()">qrscanner</button>
</ion-content>

scssfile
page-home {

}

.content {
    background: transparent
}

.buttuon {
    background: transparent
}

As far as i can tell ypur code is incomplete ( there is also a typo: .buttuon should be .button ): as I said before, you should set background:none also to <html> element and to <body> element.
This is the code used in my app to make Camera Preview work: I actually use jQuery to dinamically change these css properties:
html , body, #my_page {
    background: none;
}

Thanks for your reminder of my write error. I just set the ion-content background : none transparent and got a transparent view.
screenshot:

It is not similar to the the example image. There is no box in the middle

Yes, you have to add it yourself. Just create a transparent image with a box in the middle and set the image as background.
Below there's what i use in my app (it fits a 1080x1920 screen):
Scanner background

Got it, thank you very much.

You are welcome!

hi Story5 could you share your code as a starter template? Would be amazing!

@romanrast Hi, romanrast. here is my demo (qrscannerdemo), I just achieve showing a camera preview, but haven't code for a qrscanner view with a scanner background. Hope it can help!

Hi,
I have tried this code but for me it is not opening camera for android as well as iphone any tips.
Thanks

There is a bug in the browser version. (browser version has got memory leak if you call show after scan, on android version you need to call show())
I have tested Story5 approach, which i think nice, but unfortunately not working.
There is a nav-decor in the css which should be transparent, i'm not sure, what is doing.
I have tested only in browser because i have hacked previously, but i think it will work.
Instead of the push you need to use setRoot - the push means just add a new layer increasing the z-index, which does not solve any problem with the layer transparency.
Story5 solution anyway is good, if you have bunch of embedded content, just remove is from the root, and put back, when the camera is off, because now you have much less pain, just the simple page with some control button.

I resolved this issue by adding the following css. Hope this can help someone.
.nav-decor{
background-color: transparent !important;
}

Looks like this issue has been solved. Please feel free to open a new issue if you're still having trouble.

I'm not using Ionic, is there any solution? My camera didn't appear since I click my button to scan. Is there any best practice for this plugin?

@daksamedia try cloning this repo and running the tests for a working example. See the Readme for more details.

@bitjson I already tested it, but still didn't work. I'm using framework7 anyway. Is it possible?

What didn't work about it? Did the tests fail on your devices?
This plugin should work for all Cordova projects, javascript frameworks shouldn't matter.

@bitjson it's work in browser, but in my android device my camera didn't open.
on prepare action it gave a response, but camera didn't show up.

Trying to reproduce – when you ran the generated tests on Android, which buttons did you click/what order?


Added a few properties to make the field more flexible

The first thing that bothered me was that use24hFormat was hard-coded to false, even if DateFormat was 24-hour based. So that led to situations where time could be represented as 13:30 in the text field, but the date picker on iOS looked like 1:30 PM. So I exposed a use24hFormat property on the field itself so that the date picker can be adapted on iOS.
Another thing that bothered me was that I could not use the field as is in situations where the field value could be null, because if I set the initialValue to null, then it was replaced by DateTime.now().
So I changed that.
Now the default value for initialValue is null.
As a result, I added a nullText property to specify the text that appears in the text field when value is null.
And I also added a DateTime property called initialSelectionValue to specify which date the date picker or the date picker dialog should start with when the current value is null.
And last but not least I added a clearable property that, when true, adds a suffix button to the text field to reset the value to null.

@sarbogast Hi Sarbogast, thank you so much for your great work!
The code looks good. You only need to make minor changes.


Access denied errors with checkpoints

https://ibb.co/5r7KkCm
Hmm I guess I can't embed an image here?
Anyway, in the recent days I've been getting permission errors on the model directory, which is weird since I'm logged into my Drive.
That extra subdirectory is there just so I'm trying to differentiate between 1.5 and 2.1 models. The same problem happens even with the root directory of the models.

I deleted everything and ran from a clear slate, now things seem to work again :)

Oh, it worked once, but not anymore...
Trying to switch to my own trained model after a clean install and re-downloading the 768px model:
✔ Connected
changing setting sd_model_checkpoint to v2-768-avalon604x.ckpt [9db3f04b83]: KeyError
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 554, in set
    self.data_labels[key].onchange()
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 120, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 464, in reload_model_weights
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 229, in get_checkpoint_state_dict
    sd_model_hash = checkpoint_info.calculate_shorthash()
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 70, in calculate_shorthash
    checkpoints_list.pop(self.title)
KeyError: 'v2-768-avalon604x.ckpt [9db3f04b83]'

Ok, weird, after some error messages, it's now loaded and rendering:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 15, in f
    res = func(*args, **kwargs)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 277, in update_token_counter
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 277, in <listcomp>
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 207, in get_prompt_lengths
    _, token_count = self.clip.process_texts([text])
AttributeError: 'NoneType' object has no attribute 'process_texts'
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
Error completing request
Arguments: ('task(qn0pl877lcljtu0)', 'testing psychedelica', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', False, False, 'none', 'None', 1, None, False, 'Scale to Fit (Inner Fit)', False, False, 64, 64, 64, 0, 1, False, False, False, 'positive', 'comma', 0, False, False, '', 1, '', 0, '', 0, '', True, False, False, False, 0, None, 50) {}
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 486, in process_images
    res = process_images_inner(p)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 621, in process_images_inner
    uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps, cached_uc)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 570, in get_conds_with_caching
    cache[1] = function(shared.sd_model, required_prompts, steps)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/prompt_parser.py", line 140, in get_learned_conditioning
    conds = model.get_learned_conditioning(texts)
  File "/content/gdrive/MyDrive/sd/stablediffusion/ldm/models/diffusion/ddpm.py", line 665, in get_learned_conditioning
    c = self.cond_stage_model.encode(c)
  File "/content/gdrive/MyDrive/sd/stablediffusion/ldm/modules/encoders/modules.py", line 193, in encode
    return self(text)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/gdrive/MyDrive/sd/stablediffusion/ldm/modules/encoders/modules.py", line 170, in forward
    z = self.encode_with_transformer(tokens.to(self.device))
  File "/content/gdrive/MyDrive/sd/stablediffusion/ldm/modules/encoders/modules.py", line 174, in encode_with_transformer
    x = self.model.token_embedding(text)  # [batch_size, n_ctx, d_model]
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/sparse.py", line 160, in forward
    return F.embedding(
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/functional.py", line 2210, in embedding
    return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)

Calculating sha256 for /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/avalon604x_step_1000.ckpt: 1474916ced9e40d64e48a6b26cb5ee21646b6c59e868a98b5d216b17e0c86768
Loading weights [1474916ced] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/avalon604x_step_1000.ckpt
Applying xformers cross attention optimization.
Weights loaded in 75.6s (calculate hash: 47.3s, load weights from disk: 17.9s, find config: 7.1s, apply weights to model: 1.6s, move model to device: 1.7s).
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
100% 20/20 [00:10<00:00,  1.98it/s]

Hmm, it's also possible that the prompt wildcard extension was causing a problem recently...


Refactor namespaces and class names

Namespaces in unit test do not follow directory structure.  For example, what should be "Caf.Etl.UnitTests.Nodes.LoggerNet" is currently "Caf.Etl.Nodes.LoggerNet.Tests"

Also, Nodes.LoggerNet.Transform has two classes "DocuemntDbMeasurementV1Transformer" (and V2) that should be renamed to CosmosDBSqlApiV1Transformer, etc to be consistent with renaming of the models

Also, consolidate names "IMapper" with "IMap"

Also, consolidate naming of Mapper classes.  LoggerNet has "MapFromToa5DataTableToCafStandards" whlie Manual has MapFromTidyDataToSampleV2.  LoggerNet states "CafStandard" (whatever that means -- I think it's just Cosmos schema) but Manual has the output class type (which is cosmos schema).

Hello,
I can help with the namespace name change and the DocumentDbMeasurement* to CosmosDBSqlApi*. Can I do that with a pull request?

@benichka, that would be great!  Thank you so much!  Yes, please submit a pull request.  If you create a branch, the naming scheme is simply: {github issue number}-{short description based on issue name}.  In this case it'll be something like "2-refactor-namespaces".
Also, I should mention that all notes and comments have been for myself.  I didn't expect anyone to read any of this :)  So let me know if something in github (or my code) isn't clear or comes off as ramblings of a lunatic.
Thanks!

Super, I'll do that then :). No problem for the "personal comments", so far I didn't read something rude :D!
Quick question about the code: when using the method PhysicalQuantityV1.PhysicalQuantityV1(), the string "DocumentDbMeasurementTransformer" is used as the sourceID. Should it also be renamed to "CosmosDBSqlApiTransformer"? Right now it is used in the tests and in DocumentDbMeasurementV1Transformer.CreateMeasurementFromVariable(). Not sure if it will mess with existing data...

Good catch.  Yes, the string should be updated too.  Hopefully that function never gets used but it's good to be backwards compatible :)
Thanks!

Pull request is done. Please tell me if something is wrong/needs to be changed :).
Thank you for taking the time to discuss it with me!

@benichka All looks great!  I ran integration tests and all passed.
Thank you so much for your help!


Updated previous section and added new sections

Updated the previous section with csharp flavoring and added 2 new sections on implicit sorting and a version of explicit sorting.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 🎉


[XLA] xla seems to optimise fast loops poorly

Click to expand!
Issue Type
Performance
Source
source
Tensorflow Version
tf 2.9
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
11.6
GPU model and memory
Titan X
Current Behaviour?
When vectorizing over an inner loop, XLA lifts the loop to the top level and runs many sequential vector operations.
It would be much faster to sink the loop, with each thread running the full loop on a narrow slice of data.

Also, despite the body of the loop being very lightweight, XLA fails to perform effective fusion. It builds 4 fused kernels for the body of the loop, so the execution time is entirely dominated by kernel dispatch.

Also, despite the loop body being very light, XLA fails to fuse the loop, so there are a total of N * 4 kernels dispatched for N loop iterations.

Standalone code to reproduce the issue
# Colab is here:
#   https://colab.research.google.com/drive/1KJhitFonQB0hdwJ8Tted2KVyC5vTu9ZA
# That colab will generate and dump the XLA intermediate files.

import jax
import jax.numpy as jnp

def run_model(model, xs, hidden):
  u, vf, bf, vr, br = model
  seq_len = xs.shape[-1]
  u = jnp.einsum('n b d, o k d -> k n b o', xs, u)
  u0, u1, u2 = u[0], u[1], u[2]
  def do_step(c, l):
    (u0, u1, u2, xs) = l
    f = jax.nn.sigmoid(u1 + vf*c + bf)
    c = f * c + (1. - f) * u0
    r = jax.nn.sigmoid(u2 + vr*c + br)
    h = r * c + (1. - r) * xs
    return c, h

  return jax.lax.scan(do_step, hidden, (u0, u1, u2, xs), unroll=1) # Loops over the 'L' dimension.

B, D, L = 64, 512, 128
h = jnp.ones( (B, D))
x = jnp.ones( (L, B, D))

key = jax.random.PRNGKey(1)
ks = jax.random.split(key, 5)
shapes = [ (D,3,D), (D,), (D,), (D,), (D,) ]
model = [ jnp.ones(shape) for shape in shapes ]

f = jax.jit(run_model)
o = f(model, x, h) # <---- generates L*4 kernel dispatches.

Relevant log output
No response

@sachinprasadhs I was able to replicate the issue on colab, please find the gist here for your reference.
Thank you!

I was able to run the provided code in TensorFlow 2.12, Could you please confirm if the behavior you have reported is replicating in the Gist here. Thanks!


Use cyvcf2 to parse VCF:s

When there is a bgzipped vcf we should use cython for parsing, but still allow unzipped vcf files.

Ok to use cyvcf we need to rewrite some parts of the VCF adapter but it is not to much.
The thing that concerns me is that we have to use bgzipped files, if we decide to use cyvcf I think we should skip the old way of doing it otherwise there will be to much code to maintain.
So what do you think @robinandeer , @guillermo-carrasco , @brainstorm , @henrikstranneheim , @dnil , @vasiliosz , is it reasonable to require zipped files?

IMHO, if the changes are minimal, I think it is worth it:

Just a bgzip away from using a faster VCF reader (optimized with cython), also saving up disk space by requiring compression (useful when scaling up analysis, i.e ICGC/TCGA datasets or similar).
Avoid regression patches and maintenance such as the one that popped up a few days ago. Using community maintained software.

But perhaps I'm missing important bits @moonso... what are the ups/benefits in doing it the "old way of doing" you mentioned?

Fast seems prettier than overly general. Keeping files bgzipped must be better practice.
But, general is good for acceptance. Perhaps attempt to bgzip & index if fed a plain vcf?

On 6 mars 2016, at 16:06, Roman Valls Guimerà<EMAIL_ADDRESS>wrote:
IMHO, if the changes are minimal, I think it is worth it:
Just a bgzip away from using a faster VCF reader (optimized with cython), also saving up disk space by requiring compression (useful when scaling up analysis, i.e ICGC/TCGA datasets or similar).
Avoid regression patches and maintenance such as the one that popped up a few days ago https://github.com/moonso/vcftoolbox/pull/5. Using community maintained software.
But perhaps I'm missing important bits @moonso https://github.com/moonso... what are the ups/benefits in doing it the "old way of doing" you mentioned?
—
Reply to this email directly or view it on GitHub https://github.com/robinandeer/puzzle/issues/172#issuecomment-192905872.

Guess we don't want pytabix again for now. Do you have experience with e.g. [Bio.bgzf] (http://biopython.org/DIST/docs/api/Bio.bgzf-module.html)? No idea about the speed, but it would be a one-off per file.

@brainstorm I'm not sure if we will gain alot of speed, it is rather to use a correct vcf parser. But I agree with your second point.
The benefits of doing the old way is that we have full control when new things pop up, such as when we alowed vcf files that is called by Manta.
If we use a VCF-parser that is community based it could take longer time to get it to adapt to softare specific formats. But it is nice if we can contribute when things like that comes up :smile:

I bgzip my VCFs anyway. Generally, there is no reason why all genomic/variant data files shouldn't be zipped and indexed (even FASTQ files, for parallell alignment). So I say use whatever tools/formats is fastest internally. In Gemini they do what Daniel suggested, bgzip on load - but using the command-line version - altough there the load process is quite slow anyway, so its not an obvious delay. Because yes, it will take a long time to decompress and rezip with bgzip at first load. So I would probably prefer a warning with example code for the user to run it themselves.
Potential drawbacks: puzzle will not be able to handle "any" VCF-file anymore, and introduces a barrier to use that may prove too much for some users.

@dnil yes I have also thought about that, see https://github.com/brentp/cyvcf2/issues/7, if that would work there is no problems, then we will just try to compress it before loading/viewing.
I have no experience with Bio.bgzf...

@vasiliosz agree. But in the end I think bgzipped files if a small requirement compared to the benefits.

Make a small test with cyvcf and a range of sv variants to make sure it is handling them ok first?

I'm on it @dnil !

I misunderstod, we can use cyvcf2 without zipped files so it is straight forward :rocket:


[chore] rename LookupResponse

What needs to be done
Rename this to just NEO, as LookupResonse is too generic

closed with #37


[REQUEST] Publish JAR

Context on what is needed
Hi! As someone who got stuck with Conjure, our team is looking into using conjure-openapi to generate openapi spec. I've realised that it's not easy to use it from Gradle because there's no published Jar artefact or gradle plugin. Would it be possible to publish a Jar in addition to tarball? Thank you!
Desired end state
There's a published JAR for conjure-openapi.
Current work around if any
We're considering adding tarball contents to our repo but we'd rather not do it. The other alternative is forking conjure-openapi, but we'd rather contribute to this repo.
Proposed implementation
Publish Jar artefact including for the latest 0.7.0 version.
Additional context
n/a

We do publish an artifact, the readme fails to say as much, though: https://central.sonatype.com/artifact/com.theoremlp.conjure.openapi/conjure-openapi

We do publish an artifact, the readme fails to say as much, though: https://central.sonatype.com/artifact/com.theoremlp.conjure.openapi/conjure-openapi

Ah, my bad, I failed to see it in build.gradle. I wanted to submit a PR with the following change but I couldn't push my branch due to having insufficient permissions.
commit aa4d68be508a7a2e3b6b3da1be7c2a59644afb9b
Author: Dmytro Morozov<EMAIL_ADDRESS>Date:   Mon Aug 19 17:29:07 2024 +0300

    Update README to mention JAR artefact

    https://github.com/theoremlp/conjure-openapi/issues/20

diff --git a/readme.md b/readme.md
index 2cf542b..7bd030d 100644
--- a/readme.md
+++ b/readme.md
@@ -12,6 +12,13 @@ it implements the contract described
         <input>      Path to the input IR file
         <output>     Output directory for generated source

+### Using as JAR
+
+The `conjure-openapi` JAR is published to the [Sonatype Maven repository](https://central.sonatype.com/artifact/com.theoremlp.conjure.openapi/conjure-openapi). You can include it in your project by adding the following dependency to your build file:
+
+```groovy
+implementation 'com.theoremlp.conjure.openapi:conjure-openapi'
+
 ## Contributing

 To contribute to conjure-openapi:

@mark-thm I went to see the artefact on Maven Central Repo and it's there, but it's a tarball, not a JAR. This means that it's impossible to include this artefact as a dependency for a gradle task. Would it be possible to publish a regular JAR in addition to tarball?

@erasmas that's the correct way to distribute a conjure generator -- if you use the gradle-conjure Gradle plugin it'll happily run the conjure -> openapi generation for you.


Create Write Priority Queue Using Heap.java

Write Priority Queue Using Heap in java

You should add more comments.

I'm closing #239.


Link back to SetThreadInformation

@mikralj : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@Karl-Bridge-Microsoft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Could not attach file to an issue

I would like to be able to attach files like screenshots or log files to issues. I see no way to do it now.

L

L

If you want this to be implemented, you should report it to the original app https://github.com/jonan/ForkHub. This app is just a copy.
This issue is probably the same as https://github.com/jonan/ForkHub/issues/54


Add contact section

What does this PR do?
Create contact us section addressed in this issue
Description of Task to be completed?

Create branch
Create contact us section
Create input boxes for names, email and message

How should this be manually tested?

Clone this repository in your local directory https://github.com/Elevate-Lab/elevate-lab-website.git.
Open index.html with your browser.
Check above footer the contact section

Screenshots

Hey @Junior-Adadie Will have to close this since this issue was already assigned to @Ayush-Baranwal if you are interested please take up #40 or #7 which are open for everyone :v:


ffmpeg3: fix darwin build

Motivation for this change
Things done

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

[ ] NixOS
[x] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

What about applying the patch only on darwin? this way nothing changes on other platforms.

I don't think that's really necessary, unless there's a real reason why we don't want rebuilds.

I've already applied that condition. Also sent the patch upstream, so this can be reverted more or less soon anyways.


Remove Mega.nz

Many people use Mega for genuine file sharing purposes. Adding it to this list would be doing an injustice.

I agree - I suspect it originally came from my own listings. I've now removed it from my own and should be removed here also.

We will keep mega.nz and other file hosting services that can also be used to upload non-copyright infringing content, the piracy category is designed to quickly block websites that can be (and are mostly) used for piracy, it's not opinionated and is not a list of illegal websites.

We will keep mega.nz and other file hosting services that can also be used to upload non-copyright infringing content, the piracy category is designed to quickly block websites that can be (and are mostly) used for piracy, it's not opinionated and is not a list of illegal websites.


Refactor createAdvantage method of AdvantageDescription

The createAdvantage methode of AdvantageDescription now accepts a List<Map<String,String>>. This was introduced to resolve issue #7.
In my opinion this code smells. I detect the following smells

The type of the argument List<Map<String, String>> does not tell me what to do. It to generic for my taste.
The method has to many responsibilities. It is responsible for creating an Advantage, but it also is constructing the ModifierDescriptionPredicates necessary to associate the Modifiers with the Advantage.

I would like to have these smells resolved.

My proposal is to move the construction of the ModifierDescriptionPredicates out of the createAdvantage method and pass in the List<ModifierDescriptionPredicate> as an argument instead of the List<Map<String, String>>.
The place to construct the ModifierDescriptionPredicates is in the AddAdvantagesStep.


Add SetRowHeight function

Needed this function for one of my projects, but didn't find it in your lib, so I decided to contribute. Tell me if any change is needed.
Ps: Thanks for this great lib! It's helping me a lot

Codecov Report

Merging #18 into master will increase coverage by -1.06%.

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   94.65%   93.59%   -1.06%
==========================================
  Files           8        8
  Lines         973      984      +11
==========================================
  Hits          921      921
- Misses         29       40      +11
  Partials       23       23

Impacted Files
Coverage Δ

rows.go
69.76% <ø> (-23.99%)
:x:

Continue to review full report at Codecov.

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

A nice addition. Thanks Nikolas.


Update the number of nodes in the EKS cluster

This functionality allows changing the number of nodes in the EKS cluster.
Types of changes
New feature (non-breaking change which adds functionality)
Linked Issues
rancher/rancher#27847

As we are moving to the new EKS v2 support in Rancher v2.5, we encourage all users to upgrade and use the new provisioner which allows being able to change the number of nodes in EKS.


Replace CentOS with RHEL9

Hey,
CentOS7 is eol and Zscaler has recently released ova's and cloud images for most of their products. Can you share or update the SKUs for using RHEL 9 image for the PSE via tf in your examples as those are still pointing to the old CentOS.
Thanks Alex

Work is in progress.

Latest v1.1.0 version has been updated to RHEL9.
Zscaler DevRel


Customers can log into Dashboard

What I'm trying to achieve
If a customer tries to log into the Dashboard, deny access.
Steps to reproduce the problem

Create a customer on the storefront
Log into dashboard with new user

What I expected to happen
Access to be denied.
Screenshots

Still shows catalog information using search function in dashboard with testuser

System information
Operating system:

[ ] Windows
[x] Linux
[ ] MacOS
[ ] Other

Browser:

[ ] Safari
[x] Chrome
[ ] Edge
[x] Firefox
[ ] Other

@cyberdemic Thanks for reporting! We are aware of this issue. We will fix it as soon as we can.

Fixed on 3.0


start to use Perflint to improved performance

added option to ruff to guide developers to use more performant constructs in python

TL;DR: Partially useful changes
After looking at all your changes, I conclude that they don't affect performance much unless you're chasing nanoseconds. In general, of course, some changes should really be made to the code base. And some that might reduce execution time by n amount of time are not worth it, as they make the code heavier to read. I would consider to commit partial changes.
IMHO

like if else expression ? making it more difficult to read ?

Not only statements, complicated list/dict comprehension. I didn't say that all changes are useless or over complicated due to reduce execution time, I fully agree with you that some solutions in the current code have some flaws that you want to correct. Don't take it as disrespect 😁

python etos says readability counts and so just close this ...but i will get of those pesky gathers with nicer readable sintax from anyio


Get rid of polars extensions

At the moment used because of this bug in polars:
polars issue 7627

Closing since polars support is a lot better now and original issue is resolved


Officially drop 1.3 (but it still works for now)

It has been much more than 2 months since 1.5 came out so we can drop 1.3 now.
Also use more recent point releases of 1.4 and 1.5.
cc @wvanbergen

:+1:


Python extension should not activate all new terminals

Environment data

VS Code version: 1.32.3
Extension version (available under the Extensions sidebar): 2018.2.5558
OS and version: Any
Python version (& distribution if applicable, e.g. Anaconda): Any
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
Relevant/affected Python packages and their versions: N/A

Expected behavior
I have an extension that opens a terminal on a remote machine via SSH. The Python extension should be smart enough to know that this is not a regular terminal and leave it alone.
Actual behavior
When this terminal is opened in VS Code while a project with a venv is active, the Python extension attempts to activate the venv in this terminal. This just causes an error that the venv could not be found because there is no venv on the remote machine.

I dug around the source code a bit. It looks like the only properties you can get from a Terminal object are name and processId. I suppose we could use the pid to lookup the name of the executable and see if it matches the one from the VS Code settings. Then the Python extension could use that as a filter to only activate "regular" terminals.

You can disable the activation of the terminal by adding the following setting into your workspace settings.json file:
"python.terminal.activateEnvironment": false,


Moving wrapper top-level methods to the QuantumCircuit static API

Motivation and Context
It was intended that load_qasm_string and load_qasm_file call static constructors in the QuantumCircuit instead of being implemented at wrapper module-level.
How Has This Been Tested?
Passing the same test suite without alterations.
Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Per a discussion with @atilag we agreed on moving these methods again to wrapper but to a different submodule so QuantumCircuit class remains as lean as possible. Utilities and higher abstractions should live outside the core.

For the new files, can you adjust the license header so it follows the format recently introduced by #550 ?
# -*- coding: utf-8 -*-

# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.

# pylint: disable=something-only-if-there-is-no-other-way

"""
Description of the module ...
"""
from qiskit import ...

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@delapuente can you update CHANGELOG.rst accordingly? :)


userclk: Implement 10MHz to 600MHz range for iopll

Change the table of configuration data for the IOPLL to implement
a range of 10MHz to 600MHz. Our method of limiting the 2x clock
will be to use the same frequency as the 1x clock when the 1x
frequency is above 300MHz.
Also remove a check that allows the high freq to be passed in as
zero.
Signed-off-by: Russ Weight<EMAIL_ADDRESS>

Coverage increased (+0.007%) to 66.26% when pulling 8c128f25f27ae825519d78c388e7fa2971a6f2ce on rhweight/usrclk-limit-freq into 5f6ba21ddd6c1bf470725634e3b52191b7c17c77 on master.

Please do figure out how to encode some PLL signature in the driver so we can continue to have a single clock control module for all products.

@anandaravuri: Can you please let me know if there is more required for this patch to be integrated?

I just rebased my patch on the latest code and re-pushed the branch. There were no conflicts.

@rweight  - for future reference, if you just click the update branch button on the GitHub web page for the pull request it will rebase and will not require re-approval.

@michael-adler - I checked the master branch history and didn't see many merges, so I assumed that it was preferred to rebase the patch on the HEAD. I'm OK doing merges in the future.

@anandaravuri - can you approve again? I did a rebase instead of a merge, so the SHA changed and another approval is required. Note that there were no merge conflicts in the rebase.

@anandaravuri - can you please re-approve? I rebased the patch last week, and lost your approval in the process. There were not code conflicts.


Chore/146623145/convert grunt to gulp

#146623145 Convert grunt to gulp
What does this PR do?
Creates an alternate build system that serves as a task runner that automates otherwise repetitive tasks.
Description of Task to be completed?
Converts the task runner from grunt to gulp to automate task
How should this be manually tested?
Clone repository to your local machine
Go to the root directory
'npm install' to get the dependencies
Run 'gulp' from the root directory
Any background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
#146623145
Screenshots (if appropriate)
N/A
Questions:
N/A

This PR is to master. Please address.


PyCA harness, fix SAN

Fixes a malformed SAN; adds a PyCA Cryptography harness to catch things earlier.

Can we verify that the pyca harness is now failing on this test?

Can we verify that the pyca harness is now failing on this test?

Testing locally now.

Okay, confirmed that nc-dos-1 and nc-dos-2 "fail" as expected (they succeed since there's no budget yet), while nc-dos-2 "succeeds" as expected (for an unrelated reason, since it has subjects instead of SANs).

Great.
On Fri, Feb 23, 2024 at 4:33 PM William Woodruff @.***>
wrote:

Okay, confirmed that nc-dos-1 and nc-dos-2 "fail" as expected (they
succeed since there's no budget yet), while nc-dos-2 "succeeds" as
expected (for an unrelated reason, since it has subjects instead of SANs).
—
Reply to this email directly, view it on GitHub
https://github.com/C2SP/x509-limbo/pull/207#issuecomment-1962021668, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBCGHGSHDABIEDMHA5TYVEDKPAVCNFSM6AAAAABDXLE35CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGAZDCNRWHA
.


Remove pgBouncer

pgBouncer is a lightweight connection poooler and state manager that provides an efficient gateway to metering connections to PostgreSQL. We connect to postgres via hoh-primary service. We do not use hoh-primary so far.

/retest

/retest

/retest

/lgtm


feat: improve induction code action

The code action now works even on induction e using rec custom eliminators
It also respects custom eliminators via the @[custom_eliminator] attribute
It also works even if the induction already has branches, it will only add branches that are uncovered to the end of the match
If the induction has a |_ => tac arm, it will delete this arm and use tac instead of sorry to fill in all the missing branches

I'm thinking there is no meaningful way to write tests for this. Correct?

At least currently, yes that's correct. Ideally we would get UI tests similar to those in lean core at some point, but we'll have to use make again or write a custom harness for that.


Add specific values to generator.

In release 0.15, you could do something like
integers().between(1, 100).andAlwaysTheValues(2560)
if you have implemented the interface WithQuickTheories
How do you do something similar in release 0.20? The method Gen<Integer>.andAlwaysTheValues(Integer) seem to have disapeared in release 0.20, and using integers().between(1, 100).mix(arbitrary().constant(2560)) does not give the same result.

At the moment there isn't a way to do this in 0.20 - the way values are now generated makes this hard - it would require a way to convert from a given type to a long array that matches the precursor the generator would produce for that value.
This would be possible to do for some simple types such as integer, longs etc, but not generally possible.
I think the general solution would be something similar to what you tried with mix - it could perhaps be extended to allow the mixed generators to be weighted by differing amounts.
Allowing some deterministic behaviour (such as always generating certain values) caused unexpected issues in 0.15 (such as shrinking getting stuck in loops), so unless there is a strong use case I'd prefer to support mixing with a high probability of including a value rather than a guarantee.


feat: implement localstack executor

Implement localstack cdk executor. Use this executor in cdk to prepare infrastructure for local mode. Implement cdk targets inference by cdk.json file presence.

Codecov Report

Merging #36 (0a9c7f0) into develop (403e06e) will decrease coverage by 0.16%.
The diff coverage is 98.23%.

:exclamation: Current head 0a9c7f0 differs from pull request most recent head 9723674. Consider uploading reports for the commit 9723674 to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@             Coverage Diff             @@
##           develop      #36      +/-   ##
===========================================
- Coverage    98.61%   98.45%   -0.16%
===========================================
  Files           12       15       +3
  Lines          434      519      +85
  Branches        77       90      +13
===========================================
+ Hits           428      511      +83
- Misses           3        5       +2
  Partials         3        3

Flag
Coverage Δ

cdk
98.45% <98.23%> (-0.16%)
:arrow_down:

create-aws-cdk-app
98.45% <98.23%> (-0.16%)
:arrow_down:

nx-aws-cdk
98.45% <98.23%> (-0.16%)
:arrow_down:

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

Files
Coverage Δ

packages/nx-aws-cdk/src/executors/cdk/executors.ts
100.00% <ø> (ø)

packages/nx-aws-cdk/src/executors/cdk/index.ts
100.00% <100.00%> (ø)

...kages/nx-aws-cdk/src/executors/localstack/index.ts
100.00% <100.00%> (ø)

...nx-aws-cdk/src/generators/cdk-application/index.ts
96.25% <ø> (-0.05%)
:arrow_down:

packages/nx-aws-cdk/src/index.ts
100.00% <100.00%> (ø)

packages/nx-aws-cdk/src/utils/executors.ts
100.00% <100.00%> (ø)

packages/nx-aws-cdk/src/generators/preset/index.ts
96.10% <71.42%> (-2.47%)
:arrow_down:

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!


Figure out the minimum browser requirements

This project is using a lot of bleeding edge WebAssembly stuff so it does not have good compatibility with old browsers.
I am mostly interested in supporting evergreen browsers (the latest versions) but I would like to support older ones if it's possible without too much pain.
Current situation:

Safari: needs 15 for Uint64Array
Firefox: needs 78 for uint64 support

I would also like to use top-level await which pushes Firefox to 89, but I am not sure which tooling that might break so I'll hold off on it for now. With top-level await, we can remove the necessity for the load() function and let people call new Prolog() as soon as the import resolves.

Also worth mentioning, we use FinalizationRegistry if we can. This is from Firefox 79. If we start using top-level await we can remove the compatibility check here.
This functionality isn't strictly necessary but it can help clean up memory from leaked queries.


Fix for #2438

Before solving a flex-flex constraint in the unifier, check if one of them has a tactic associated with it, if so, run that and then solve the resulting flex-rigid problem. Also a tweak to the tcresolve tactic to solve when the goal is an arrow. Fixes #2438.

Hi Aseem,
This looks great ... thanks!
Just confirming: The reason we don't also handle Ctx_uvar_meta_attr the same way is that any constraint involving those variables should already be in the deferred_to_tactic bucket and so we shouldn't be trying to solve a flex-flex with it anyway.

Thanks for the review Nik! Yes, those are already deferred to a separate bucket.


Tool specific background data

Since certain tools make use of specific information that cause errors when read by other tools it is necessary to keep tool- and learning task-specific data. This holds in particular for mode declarations that e.g. should be included for Aleph but cannot be read by Golem.
For now I added tool specific directories under learningtasks/<task>/prolog/data/<tool>/. E.g. specific mode declarations for Aleph in the trains example could be put into the file learningtasks/trains/prolog/data/aleph/mode.pl.

There will be tool-specific directories at learningtasks/<task>/prolog/data/<tool>/.


Add a special '*' filter to 'dump' command

I added the support of ./resymc dump ./ntdll.pdb * dump.txt which allows to dump every type from the PDB.
The implementation is probably not the best one but it helped me once, feel free to improve or close the PR.

Hi! Thanks for your contribution. I'll do a proper review when I have the time and come back to you 🙌

After reviewing the PR, I think I'd rather go with a new dedicated back-end command as it would allow for specific optimizations and would avoid making the current command's API less intuitive. I hope you don't mind, thanks again for contributing to the project! 😊👍
I'll close this PR and create a new issue to track that feature.


Too many certificates already issued for exact set of domains

Error
ACME server returned an error: urn:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new cert :: too many certificates already issued for exact set of domains: example.com
Issue
I have deploying a lot recently to my site and I ran into an issue today there Let's encrypt has stop validating my requests.
After researching I discovered that there is a limit on the let's encrypt beta to 5 certs request a week.
Possible Solution
Can the docker image be change to the public version? Or could there be a build in system to tell let's encrypt to delete the old records when restarting the container?
Docker compose
https://github.com/Steven-Harris/site/blob/master/docker-compose.yml

There is no "beta" or "public" version of letsencrypt (well letsencrypt was in beta at some point but that's irrelevant to your issue).
The duplicate certificate limit of 5 certs a week is the same for everyone and is enforced to ensure "fair usage by as many people as possible" : https://letsencrypt.org/docs/rate-limits/

@buchdag  So, the certs should be persisting and they are not? Do you see anything that I am missing in my docker-compose?

yep : you don't use named volumes or host directories as volume so every time you go through a cycle of docker-compose down and docker-compose up or change your docker-compose.yml, docker-compose will re-create new randomly named volumes instead of using the previous ones.
That can be easily verified with docker volume ls, you should see a huge number of randomly named volumes.
So one way to fix this is to use named volumes in your docker-compose.yml :
version: '2'

services:

[...]

  nginx-proxy:
    image: jwilder/nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "vhost:/etc/nginx/vhost.d"
      - "html:/usr/share/nginx/html"
      - "certs:/etc/nginx/certs"
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
    networks:
      - "proxy-tier"

  letsencrypt-nginx-proxy-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    volumes_from:
      - "nginx-proxy"

volumes:
  vhost:
  html:
  certs:

networks:
  proxy-tier:
    external:
      name: nginx-proxy

Those will be correctly reused across restarts or docker-compose.yml modifications.
You can also use host directories as you did for the commented out ghost container.
Also, following this container documentation, you should add
      labels:
        - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"

to the nginx-proxy service definition.

Awesome! Thanks for the help. That makes sense and I will make those changes.

Had a question on this - if i'm explicitly importing volumes from my host, is using named volumes still required?
Like if I did
    volumes:
      - "/config/nginx/vhost.d:/etc/nginx/vhost.d"

Would this still results in random volumes being created?

Nope, if you use a bind mount Docker won't create a Docker volume.

Even using named container this is returning the error to me.
nginx-proxy-letsencrypt | [Mon Feb  1 12:30:50 UTC 2021] Create new order error. Le_OrderFinalize not found. {
nginx-proxy-letsencrypt |   "type": "urn:ietf:params:acme:error:rateLimited",
nginx-proxy-letsencrypt |   "detail": "Error creating new order :: too many certificates already issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/",
nginx-proxy-letsencrypt |   "status": 429
nginx-proxy-letsencrypt | }
nginx-proxy-letsencrypt | [Mon Feb  1 12:30:50 UTC 2021] Please check log file for more details: /dev/null
nginx-proxy-letsencrypt | Sleep for 3600s

My docker-compose:
version: '3'
services:

  app:
    build:
        dockerfile: ./app-java.dockerfile
        context: .
    image: robertomassoni/java-app-test
    restart: always
    expose:
      - "8080"
    ports:
      - "8080:8080"
    environment:
      - VIRTUAL_HOST=mydomain.com
      - VIRTUAL_PORT=8080
      - LETSENCRYPT_HOST=mydomain.com
      -<EMAIL_ADDRESS>    networks:
      - web

  nginx-proxy:
    container_name: 'nginx-proxy'
    image: jwilder/nginx-proxy
    restart: always
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs:ro
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx-proxy"
    networks:
      - web
    ports:
      - "80:80"
      - "443:443"

  nginx-letsencrypt:
    container_name: 'nginx-proxy-letsencrypt'
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    depends_on:
      - nginx-proxy
    environment:
      - NGINX_PROXY_CONTAINER=nginx-proxy
    volumes:
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - web

networks:
  web:
    external: true

volumes:
  certs:
  html:
  vhost:

Required read if you use the latest version : the recent v2.0.0 release of this project mark the switch of the ACME client used by the Docker image from simp.le to acme.sh. This switch result in some backward incompatible changes, so please read this issue and the updated docs for more details before updating your image. The single most important change is that the container now requires a volume mounted to /etc/acme.sh in order to persist ACME account keys and SSL certificates. The last tagged version that uses simp_le is v1.13.1.

Thank you @buchdag!!
Could you give an example? I tested the code below on a new host but the same error appeared. Should I wait a week?
version: '3'
services:

   [...]

  nginx-proxy:
    container_name: 'nginx-proxy'
    image: jwilder/nginx-proxy
    restart: always
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs:ro
      - acme:/etc/acme.sh
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx-proxy"
    networks:
      - web
    ports:
      - "80:80"
      - "443:443"

  nginx-letsencrypt:
    container_name: 'nginx-proxy-letsencrypt'
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    depends_on:
      - nginx-proxy
    environment:
      - NGINX_PROXY_CONTAINER=nginx-proxy
    volumes:
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs:rw
      - acme:/etc/acme.sh
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - web

networks:
  web:
    external: true

volumes:
  certs:
  html:
  vhost:
  acme:

Same issue is experienced
nginx-proxy-letsencrypt | [Mon Feb  1 12:30:50 UTC 2021] Create new order error. Le_OrderFinalize not found. {
nginx-proxy-letsencrypt |   "type": "urn:ietf:params:acme:error:rateLimited",
nginx-proxy-letsencrypt |   "detail": "Error creating new order :: too many certificates already issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/",
nginx-proxy-letsencrypt |   "status": 429
nginx-proxy-letsencrypt | }
nginx-proxy-letsencrypt | [Mon Feb  1 12:30:50 UTC 2021] Please check log file for more details: /dev/null
nginx-proxy-letsencrypt | Sleep for 3600s


Tests?

https://github.com/mikedeboer/node-github has really great tests :D

I just get 404 when trying to run this atm. Maybe GitHub has changed something?

Hm... Sorry, I don't remember if I have run it. But I read through the test files. Basically in the before hook you can just create some forks programmatically and test if you can still get the fork repos after you run your own module.

Yeah, I have tests ready, but it seems like something in the API is broken.


Big refactoring

This PR introduces a few major changes to the internal structures of AppImageUpdate, fixing some older design flaws and overall improving the codebase, as well as some minor changes to the public API.
The key improvements:

introducing a class for AppImages AppImageUpdate works with that implements all the AppImage-related functionality
introducing an abstraction for "update information" using an abstract class as a standardized interface and a set of concrete implementations for actually supported types
allowing the use of custom update information for users of libappimageupdate by implementing a setter (see here for the rationale and use cases), a feature wished by people who want to embed AppImageUpdate but cannot/do not want to embed (or solely rely on embedded) update information (e.g., to implement update channels like "stable" and "testing" by using different zsync URLs)

@probonopd I removed the Bintray support altogether, since that project just vanished (seems like this is much more common than you'd expect). You might want to update the spec.
@azubieta please test the Pling stuff. I spent more than 15 minutes searching for an AppImage on appimagehub.com that uses that format, then gave up. It doesn't seem to be too common.
I'd like this to be merged ASAP, ideally by the weekend. I tested both the GitHub and classic zsync types thoroughly already. Pling isn't that mission critical at this point, so I'd just fix potentially new bugs retrospectively if necessary.
Things I did not have time for yet:

split declaration and definition of code for update information classes to speed up compilation (one should then also use an OBJECT library in CMake)
replace the current status message system with either a small logging library that allows for capturing messages for non-CLI use (e.g., UI) the same way it is possible now, or perhaps a callback system (push instead of current pull system)
switch current mostly boolean return value based API to a fully exception-based one, making sure that only public exceptions will be seen by API users
replace CPR with a dependency easily available in distros (ideally not plain cURL, because that is annoying to use and would require a custom C++ wrapper written by ourselves then, I guess)

The library (and thus the tool) should be versioned in the future to help people who want to embed libappimageupdate into their applications (especially professional/commercial software is very reluctant to use unversioned software).

Working AppImages can be found in the artifacts archived by the actions build: https://github.com/AppImage/AppImageUpdate/actions/runs/1669901043

Wow, a massive overhaul.

@probonopd I removed the Bintray support altogether, since that project just vanished (seems like this is much more common than you'd expect). You might want to update the spec.

Excellent point. Actually https://github.com/AppImage/AppImageSpec/blob/master/draft.md#bintray-zsync already says

The bintray-zsync transport was there to support Bintray. It is deprecated.

I'd leave this in for now in case someone encounters an old AppImage (generation scrript) with Bintray and wonders what the heck this is. Do you see other places where Bintray should be removed?

Running this AppImage on helloSystem FreeBSD with a Debian Runtime starts out very promising but then fails in the last second:

Do you have an idea which directory might need to be made writable?


Add an "away" identifier to end validation at a certain level.

This might be interesting if #6 is implemented to allow providing only an interface module that is incomplete, because internals should be hidden.
gsn2x -e internal -c my.yml others.yml

Maybe it is also sensible to specify that only certain modules shall be validated.

-e exclude module from validation

Resolved with v2.0.0 and the -x option.


Where is  the code of SS-former

22/5000
Where exactly is the code of SS-former embodied

I think it should be in unet.py

It is not there. Did you find it?

didn't find this module either. Did anyone find it？


unspecific backend detection

Hi and thanks for micro: it is an awesome tool. (only waiting for tree-sitter syntax coloration)
Now to the topic:
my clipboard was acting weird under wayland... and works flawlessly now that I removed xclip.
Problem seems clipper/micro will use xclip if installed... even though presently running under a pure (no xwayland) wayland session.
https://github.com/zyedidia/clipper/blob/146cd955be6fe357066e83feac4d4604ad6b8d6c/xclip.go#L11
I think many clipboard bugs might® be related.

Hmm, what do you think you be the best solution? Should the priority be different, or is there a way to detect pure wayland vs xwayland? Maybe some environment variables may be set?

Yep, I carefully avoided saying what I'd do...
This should do the trick: https://stackoverflow.com/a/45537237

Thanks, it looks like it already checks that environment variable (I had forgotten), but Wayland should be checked before Xclip because xclip may still be available but not useful in a Wayland environment. Should be fixed now.