Union of compatible types does not simplify if parameters are set

Consider
a = ak.Array(ak.layout.NumpyArray(np.arange(6, dtype=np.float32), parameters={"asdf": "something"}))

Then a common operation might be to mask certain values and replace them, e.g.
In [51]: ak.fill_none(a.mask[a%2==0], -1)
Out[51]: <Array [0, -1, 2, -1, 4, -1] type='6 * union[float32[parameters={"asdf": "someth...'>

In [52]: ak.type(_51)
Out[52]: 6 * union[float32[parameters={"asdf": "something"}], int64]

but the union type is unnecessary and can be troublesome. It's not clear if we should throw away or propagate the parameters, but either way it would be nice to be able to simplify this type.

Types are different if their parameters are different—this is what makes a list of numbers different from a string.
But perhaps that definition could be reduced to "types are different if their __array__ or __record__ parameter is different."

Good point about __array__ or __record__. Since those are the two (well, also __doc__ but we know that is ignorable) parameters that awkward1 itself readds to decide how to treat the array, they should not disappear.
I think probably the most sensible output in the case where the union doesn't have any of the above is to have no parameters. Users can always add their favorite parameters back.

So the rules would be,

if arrays have different __array__ or __record__ parameters, they are not equal;
if they otherwise have different parameters, the types can be equal, but merging (concatenation, option-simplify, or union-simplify) removes parameters other than __array__ and __record__.

I think that makes sense, would welcome other opinions though

I'll do this one. I'm scheduling it for November, but it might slip.


[Feature] External Integrations

Would be a great and cool idea to have Watcharr be the boilerplate of watch history sync then the ability to integrare Trakt/SIMKL so if you have a preference or want to use both as a "backup" server to one another, it means your watch history isn't just on your local server.
Would be great for tools that also depends on SIMKL/Trakt integration, so you're able to use other tools within the community without having to worry about compatibility.

Hey @JamsRepos, cool idea, I like it.
Hopefully we can get to this soon, there's quite a bit of tasks I have to get to first.
Thanks for opening this issue!


Cleanup Android Howto doc

Apply Erika's comments and wordsmithing to the doc.

CI gfxreconstruct build # 3097 running.

CI gfxreconstruct build queued with queue ID 27479.

CI gfxreconstruct build queued with queue ID 27480.

CI gfxreconstruct build queued with queue ID 27481.

CI gfxreconstruct build queued with queue ID 27621.

CI gfxreconstruct build queued with queue ID 27626.

CI gfxreconstruct build # 3103 running.

CI gfxreconstruct build # 3103 passed.


MariaDB error with increments and integer

Hello!
I have issues with mariaDB, default set increments int length = 10, but integer set default is 11. When I make foreign key show error.

Could you post your migration, please?

I'm sorry, I just check migrate file in core of Laravel and I see Increments using unsigned integer. With foregin key should using unsignedInteger :)


Reusable async client

Description
Clears out the session attribute of AsyncHttpConnection and AIOHttpConnection when calling close(), which allow re-using a previously closed AsyncOpensearch instance.
Issues Resolved
Closes #637
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Turns out the issue affects clients using Urllib3HttpConnection which discard the pool, but RequestsHttpConnection works fine with my local testing.
I discovered this by adding test for the synchronous client, which apparently uses Urllib3HttpConnection. I'm not too sure where to put a test that would use RequestsHttpConnection.

Turns out the issue affects clients using Urllib3HttpConnection which discard the pool, but RequestsHttpConnection works fine with my local testing.
I discovered this by adding test for the synchronous client, which apparently uses Urllib3HttpConnection. I'm not too sure where to put a test that would use RequestsHttpConnection.

Hello @odelmarcelle , please put your test here for RequestsHttpConnection. And also DCO is failing. Please fix it. Thank you.

Resolved the DCO.
@saimedhi AFAIK, the test won't work there as there's not connection established to an opensearch instance. It should be somewhere under /test_server/, right? I didn't manage to work it out by myself.
One last comment though: Why are there two async connection classes defined? I'm not too sure to understand why AsyncHttpConnection and AIOHttpConnection co-exist. Especially as the former is the one recommended in the guides while most tests are based on the latter.

LMK if you prefer to merge as is, or if you think adding that assert is a good idea.


3.1.3 Cannot get resource with only dir (3.0.15 last known working version for me)

resource(dir:'js')
AssetProcessorService.groovy
String url = getResolvedAssetPath(attrs.file ?: attrs.src)
then trimLeadingSlash(path)
and Null Exception

what exactly are you expecting as the output from this since you are not specifying a target file

https://grails.github.io/grails-doc/latest/ref/Tags/resource.html
As you can see all params is optional. So resource(dir:'js') must be acceptable, and is was, in version 3.0.15

More details on this. The assumed issue has nothing to do with trimLeadingSlash it has to do with a manifest.getProperty(). before diagnosing make sure you compare the stack trace against the source file from the appropriate version tag not master or grails3 branch. This has been resolved for 3.1.4 release which should happen either tonight or tomorrow morning


Add lit-analyzer to linting

Set up linting in Travis as well
Fixes #359

Can you please split up bootstrap so it only sets up the workspace and does not build or lint?


images not showing

I am trying to show my uploaded images, they dont show up and when I try to open the URL I get this error:

Error in method "/cfs/files/:value/:value/:value/", Error: Error: start must be <= end
    at new ReadStream (fs.js:1489:13)
    at Object.fs.createReadStream (fs.js:1450:10)
    at Object.FS.StorageAdapter.createReadStream (packages/cfs:filesystem/filesystem.server.js:59:1)
    at Object.self.adapter.createReadStreamForFileKey (packages/cfs:storage-adapter/storageAdapter.server.js:75:1)
    at [object Object].FS.Transform.createReadStream (packages/cfs:storage-adapter/transform.server.js:97:1)
    at Object.self.adapter.createReadStream (packages/cfs:storage-adapter/storageAdapter.server.js:85:1)
    at Object.httpGetHandler (packages/cfs:access-point/access-point-handlers.js:208:1)
    at Object.accessPoint.get (packages/cfs:access-point/access-point-server.js:175:1)
    at packages/cfs:http-methods/http.methods.server.api.js:575:1

PLease define why this error is coming

@tom12e Did you find a solution for this error?

Hello @tom12e , Did you find a solution to this issue? if yes, please share. Thanks

+1


(bug) Prediction with window size slightly too small

I just encountered an error doing a prediction on a test image.
It seems to be a result of the test image shape being just barley bigger than a multiple of the window size. In my case the raster data shape was (201, 200) and I was using a window size of 100.  The error is occurring in SingleSensorNetwork and I believe it is occurring because the last piece shape is (100,1).
This results in a call to range(0, negative_value) and I suspect cython might be taking the largest int value it can and looping over that. the offending code is in n _build_network.pyx on line 344
I will investigate further.

Well, at one point it resulted in a memory leak (which is why I thought it might be looping over large values) but I can't recreate that behavior, so now it is just exiting.

Good find -- we typically enforce the image dimensions in the generation of the time series data. Are you saying here that your input image has a dimension of (201 x 200)?

For training the model I have also been enforcing dimensions (always 100x100).  I did notice that your prediction function will make mosaics from larger data by iterating through the image, and so I had been playing with that to set up an inference script. I can absolutely enforce dimensions there too, that will be easy, this was just something I ran into.
On another note, the very left column and very bottom row of my predictions are often weird, have you run into this at all? I suspect I have everything off by a pixel somewhere in my code, but I can't find it. I can open a different issue for this if desired.

@MatthewPierson90 please add details if you are still using (I know my response was very delayed) and encountering issues with this.


CI workflow for Gateway validation

Resolves #4018.
This PR does two things (please review commit by commit):

refactors the integration tests reusable workflow (_integration_tests.yaml) so that the caller can override the "non-enterprise tests" and the "enterprise tests" container images. This is intended to be a non-breaking interface-compatible change.
adds a workflow that runs the reusable E2E and integration tests workflows. It is intentionally opinionated so as to leave no ambiguity about the desired level of validation.

As I was writing this, it became fairly evident that the path of least confusion was by creating a targeted opinionated workflow rather than trying to add a workflow_dispatch to any existing workflows and maintaining a checklist to work through whenever a test run for Gateway would be necessary.


Whisper Turbo model run on a CPU

Hello！
How fast does the Whisper Turbo model run on a CPU?
thanks!

Should be a bit slower than medium I think.

just a bit slower？
Previous large model ran much slower on CPUs compared to GPUs, by a factor of 5-10 or so.

just a bit slower？

That's what I wrote.

Previous large model ran much slower on CPUs compared to GPUs, by a factor of 5-10 or so.

That's expected.


2.5.5: test suite is failing

Python 3.8.8 and pytest 6.2.2
+ /usr/bin/python3 -B -m pytest
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --flake8
  inifile: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.5/pytest.ini
  rootdir: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.5

and just tested 2.5.6 and it fails the same way

The tests have a list of requirements to succeed: https://github.com/WoLpH/python-utils/blob/develop/_python_utils_tests/requirements.txt
Specifically you're missing pytest-flake8. I'll add it as an extra install for ease of use :)
Additionally, another easy method of running the tests is by using tox:
pip install tox
tox

For the future, you can now install everything like this: pip install -e .[tests]

No I cannot do that because my build system intentionally is completly cut off from public network and I must install all necessary components with build and test suite dependecies in build env before actual build is started.
Just started tox based test suite and looks passed correctly however it waste time on --skip-missing-interpreters.
And tox performs flake tests which about formatting pythin code and actually do not changes to much about actual code functionalities.
Really it is not possible to fix pytest based test suite to make testing on package stuff shorter?? :P

Still something is wrong.
Just found that flake8 tests are freezing ..
+ /usr/bin/python3 -B -m tox --skip-missing-interpreters
GLOB sdist-make: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/setup.py
py27 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py27
SKIPPED: InterpreterNotFound: python2.7
py35 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py35
SKIPPED: InterpreterNotFound: python3.5
py36 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py36
SKIPPED: InterpreterNotFound: python3.6
py37 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py37
SKIPPED: InterpreterNotFound: python3.7
py38 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py38
py38 installdeps: -r/home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/_python_utils_tests/requirements.txt
py38 inst: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/.tmp/package/1/python-utils-2.5.6.zip
py38 installed: alabaster==0.7.12,attrs==20.3.0,Babel==2.9.0,certifi==2020.12.5,chardet==4.0.0,coverage==5.4,docutils==0.16,flake8==3.8.4,idna==2.10,imagesize==1.2.0,iniconfig==1.1.1,Jinja2==2.11.3,MarkupSafe==1.1.1,mccabe==0.6.1,packaging==20.9,pluggy==0.13.1,py==1.10.0,pycodestyle==2.6.0,pyflakes==2.2.0,Pygments==2.8.0,pyparsing==2.4.7,pytest==6.2.2,pytest-cov==2.11.1,pytest-flake8==1.0.7,python-utils==2.5.6,pytz==2021.1,requests==2.25.1,six==1.15.0,snowballstemmer==2.1.0,Sphinx==3.5.1,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==1.0.3,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.4,toml==0.10.2,urllib3==1.26.3
py38 run-test-pre: PYTHONHASHSEED='1458102171'
py38 run-test: commands[0] | py.test --basetemp=/home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py38/tmp --confcutdir=.. python_utils _python_utils_tests
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.8, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38/.pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6, configfile: pytest.ini
plugins: cov-2.11.1, flake8-1.0.7
collected 32 items

python_utils/__init__.py .                                                                                [  3%]
python_utils/__about__.py .                                                                                [  6%]
python_utils/compat.py .                                                                                [  9%]
python_utils/converters.py .......                                                                                [ 31%]
python_utils/decorators.py ..                                                                                [ 37%]
python_utils/formatters.py ...                                                                                [ 46%]
python_utils/import_.py .                                                                                [ 50%]
python_utils/logger.py ..                                                                                [ 56%]
python_utils/terminal.py .                                                                                [ 59%]
python_utils/time.py ...                                                                                [ 68%]
_python_utils_tests/__init__.py .                                                                                [ 71%]
_python_utils_tests/test_import.py .......                                                                                [ 93%]
_python_utils_tests/test_python_utils.py ..                                                                                [100%]

----------- coverage: platform linux, python 3.8.8-final-0 -----------
Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
python_utils/__about__.py        6      0      0      0   100%
python_utils/__init__.py         0      0      0      0   100%
python_utils/compat.py           0      0      0      0   100%
python_utils/converters.py      69      0     38      0   100%
python_utils/decorators.py       6      0      2      0   100%
python_utils/formatters.py      29      0     20      0   100%
python_utils/import_.py         32      0     20      0   100%
python_utils/logger.py          34      0      2      0   100%
python_utils/terminal.py         1      0      0      0   100%
python_utils/time.py            25      0      8      0   100%
------------------------------------------------------------------------
TOTAL                          202      0     90      0   100%
Coverage HTML written to dir htmlcov

Required test coverage of 100.0% reached. Total coverage: 100.00%

============================================================================ 32 passed in 1.12s ============================================================================
py39 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/py39
SKIPPED: InterpreterNotFound: python3.9
pypy create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/pypy
SKIPPED: InterpreterNotFound: pypy
flake8 create: /home/tkloczko/rpmbuild/BUILD/python-utils-2.5.6/.tox/flake8

tkloczko 3015592  0.0  0.0<PHONE_NUMBER>8 pts/1    S+   10:42   0:00                  \_ rpmbuild -ba --with check python-utils.spec
tkloczko 3015745  0.0  0.0 222196  3376 pts/1    S+   10:42   0:00                      \_ /bin/sh -e /var/tmp/rpm-tmp.PbcdS3
tkloczko 3015746  0.0  0.0<PHONE_NUMBER>2 pts/1    S+   10:42   0:00                          \_ /usr/bin/python3 -B -m tox --skip-missing-interpreters

[tkloczko@barrel SPECS]$ strace -p 3015746
strace: Process 3015746 attached
write(1, "\33[1mflake8 installdeps: flake8\n\33"..., 35

No I cannot do that because my build system intentionally is completly cut off from public network and I must install all necessary components with build and test suite dependecies in build env before actual build is started.

Ah, I see. To make things easier you could also consider using devpi as a local pypi server :)
That way you can still keep everything air-gapped but can install packages easily.

Just started tox based test suite and looks passed correctly however it waste time on --skip-missing-interpreters.

That is correct. Because the tox tests should run on many different platforms I cannot make assumptions about what interpreters are available.

And tox performs flake tests which about formatting pythin code and actually do not changes to much about actual code functionalities.
Really it is not possible to fix pytest based test suite to make testing on package stuff shorter?? :P

Of course it is, but is there really a point? Perhaps I have a ludicrously fast machine but the entire test suite including flake8 finishes well within a second for me:
# time py.test
=============================== test session starts ===============================
platform linux -- Python 3.9.0+, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /home/rick/workspace/python-utils, configfile: pytest.ini
plugins: cov-2.11.1, flake8-1.0.7
collected 33 items

setup.py s                                                                  [  3%]
_python_utils_tests/__init__.py s                                           [  6%]
_python_utils_tests/test_import.py s......                                  [ 27%]
_python_utils_tests/test_python_utils.py s.                                 [ 33%]
python_utils/__init__.py s                                                  [ 36%]
python_utils/__about__.py s                                                 [ 39%]
python_utils/compat.py s                                                    [ 42%]
python_utils/converters.py s......                                          [ 63%]
python_utils/decorators.py s.                                               [ 69%]
python_utils/formatters.py s..                                              [ 78%]
python_utils/import_.py s                                                   [ 81%]
python_utils/logger.py s.                                                   [ 87%]
python_utils/terminal.py s                                                  [ 90%]
python_utils/time.py s..                                                    [100%]

----------- coverage: platform linux, python 3.9.0-final-0 -----------
Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
python_utils/__about__.py        6      0      0      0   100%
python_utils/__init__.py         0      0      0      0   100%
python_utils/compat.py           0      0      0      0   100%
python_utils/converters.py      69      0     38      0   100%
python_utils/decorators.py       6      0      2      0   100%
python_utils/formatters.py      29      0     20      0   100%
python_utils/import_.py         32      0     20      0   100%
python_utils/logger.py          34      0      2      0   100%
python_utils/terminal.py         1      0      0      0   100%
python_utils/time.py            25      0      8      0   100%
------------------------------------------------------------------------
TOTAL                          202      0     90      0   100%
Coverage HTML written to dir htmlcov

Required test coverage of 100.0% reached. Total coverage: 100.00%

========================= 19 passed, 14 skipped in 0.18s ==========================
py.test  0.32s user 0.03s system 99% cpu 0.349 total

Perhaps your issue is related to this bug? https://src.fedoraproject.org/rpms/python-utils/pull-request/2

To make things easier you could also consider using devpi as a local pypi server :)

Nope. Everything needs to be delivered in form of packahges :)
Only system which is archiving src.rpm packages (rpmbuild -bs <package>.spec) has access to public network :)

Because the tox tests should run on many different platforms I cannot make assumptions about what interpreters are available. You can easily make your own assumptions using the -e flag to tox however. You can list the options using tox -l. If I run tox -e py39 it only runs Python 3.9.

I'm more and more convinced that tox has missing one commandline switch to exlude some targets :/
-e actually only selects targets to fire :/
I think that I'll try to change my %tox rpm macro from:
[tkloczko@barrel SRPMS]$ rpm -E %tox
/usr/bin/python3 -B -m tox --skip-missing-interpreters

to something like list available tox targets (to log that in build log) and by default run py39.
However I would be much happier to be able use just pytest :P

I have a ludicrously fast machine but the entire test suite including flake8 finishes well within a second for me:

Of course I have (I have even few fast systems) but if you would be making thousands of builds per day (mosto of them only to test something) even second build time less counts :)
So in your case there is no issue with freezing flake8?

I just found what have been causing reported issues.
After uninstall pytest-randomly pytest is OK.
It means that there are some dependencies between units.

Nore I was wrong because I've been looking on wrong output. Seems like using pytest-randomly shows sometimes some new errors :(
Example
========================================================================= short test summary info ==========================================================================
SKIPPED [8] ../../../../../usr/lib/python3.8/site-packages/pytest_flake8.py:116: file(s) previously passed FLAKE8 checks
FAILED _python_utils_tests/test_import.py::test_import_locals_missing_module - AssertionError: assert 'camel_to_underscore' in {'@py_builtins': <module 'builtins' (built...
FAILED setup.py::FLAKE8
FAILED python_utils/formatters.py::FLAKE8
FAILED python_utils/converters.py::FLAKE8
FAILED python_utils/time.py::FLAKE8
FAILED python_utils/terminal.py::FLAKE8
FAILED python_utils/logger.py::FLAKE8
================================================================= 7 failed, 19 passed, 8 skipped in 10.50s =================================================================

I've done a bunch more tests in different environments and I'm not seeing any of these issues... My guess is still that it's some weird kind of environmental issue but I'm at a loss as to what is actually causing it.
Is tox an option perhaps? That gives you a sandboxed environment so it should be far more reliable.

On scale ~600 modules which I have now packaged as rpm packages I don't see anywhere else simillar issue so I think that this is not test env related issue and tox may only swipe that kind of issues under the carpet.
No rush .. for now I have deselected those units in my build procedure so it is not very big deal :)
%check
%pytest %{!?with_failing_tests: \
        --deselect python_utils/converters.py::FLAKE8 \
        --deselect python_utils/formatters.py::FLAKE8 \
        --deselect python_utils/logger.py::FLAKE8 \
        --deselect python_utils/terminal.py::FLAKE8 \
        --deselect python_utils/time.py::FLAKE8 \
        --deselect setup.py::FLAKE8}

As you see I can quickly test without those failing units as well :)


(python2) move to manual folder

AFAIK python2 wont have updates any more.

python 2 is still in active support (most likely will be until this year is over).
version 2.7.18 is planned to be released mid april or something around that.
https://www.python.org/dev/peps/pep-0373/

Being the last of the 2.x series, 2.7 will receive bugfix support until 2020.
Support officially stops January 1 2020, but the final release will occur after that date.


My server is hacked with this method

When your server was hacked, what you should do is nothing:)
Because no code, no bugs.

I have the same issue, instead of telling you how to do it, here is a link to a post that has the link to a blog that has a video in german with the solution.

good idea.


Channels & Roles and Members Tab not affected by the Theme

Bug description
The Members Page such as the Channels & Roles Page, is not affected by the Theme's Background.
Screenshots
If applicable, add screenshots to help explain your problem.

Solution
Here is a temporary fix for this issue until @TakosThings fixes it.
.chat_a7d72e,
.header_d20375,
.mainTableContainer_e23072,
.container_f1fd9c,
.header_f1fd9c {
    background: transparent !important;
}

.mainTableContainer_e23072 {
    border-radius: 0;
}


Sending entire Tezos balance to a new address fails and waists 0.26 XTZ burn cap

My friend just tried to send his entire Tezos balance to a new tezos address and it failed with error
Empty implicit delegated contract
Emptying an implicit delegated account is not allowed.
So the transaction failed and also burned the account-creation fee.
Describe the solution you'd like
For the entire balance to be sent and for it not to fail.
Describe alternatives you've considered
Don't automatically send the whole balance when max is used. Instead deduct 0.01 to leave the account with some dust so the transaction doesn't fail.

Hi @songproducer sorry about this.
Are you still having this error?

Hi @songproducer, could you clarify which app you use to broadcast the transaction?

Trust wallet on iOS

Hi @songproducer sorry about this.
Are you still having this error?

It was a Tezos protocol error code so I can only assume that the way the trust wallet max send implementation works it is a reproducible issue.

This issue is not related to the wallet core repository, please create a ticket here if u believe there is a bug in the application: https://support.trustwallet.com/en/support/tickets/new


notebooks.ai is shutting down - Remove demo link from README file

@Julian https://notebooks.ai/ service will no longer be available. We should remove the demo link from the README file because it will stop working in October 2020.

I didn't remove the DEMO.ipynb file because it contains useful code samples. But, let me know if you want to remove that as well. Thank you.

Sorry to hear, but appreciate the PR / notice.
All the best.


Investigate moving Room from KAPT to KSP

Describe the Issue
This should improve build times

@yigit @stevenckngaa FYI

ideally this should just work :)
Aside from possible bugs, the only big difference in KSP is that, it is more strict about nullability (which also makes the generated code better).
Also, please make sure we use the latest room (2.4.x) as we had some bug fixes in patch releases.


[Bug] Wrongly filtering out some tables with mysql_sync_database when using Flink CDC from MySQL

Search before asking

[X] I searched in the issues and found nothing similar.

Paimon version
0.7.0
Compute Engine
Flink 1.17.2
Minimal reproduce step
Not sure. The problem is inconsistent, on some MySQL server it won't happen, on some it will filter out most of the tables
What doesn't meet your expectations?
To load all the tables mentioned in the argument 'including_tables'
Anything else?
Some details:
I have checked and tried most of the results online, check for database permission, table permission, etc.
I have also tried loading all tables, but it will also says it 'filtered out of table capturing'. I have looked into Flink, Ververica, and Paimon's code but I still have no idea. And I don't seem to be able to find anyone else with this problem.
Below I am trying to access some tables from the database 'littlemall', those tables are:

order
order_detail
payment_record
store
user
order_detail_product_item
order_detail_delivery_fee_item
order_audit_log
order_detail_promotion_item
sku_list
payment_refund_record
mall_category
store_category

But the end result is that Flink was only able to capture two tables, namely sku_list and user

I have cropped some logs and screenshots to provide more information, please let me know if you need anything additional or if you have any idea at all!
Args:
2024-05-08 08:44:25,714 INFO  org.apache.paimon.flink.action.ActionFactory                 [] - mysql_sync_database job args: --warehouse hdfs://hktv-cluster/core/data-stream/flink/data/paimon/warehouse --database littlemall --ignore_incompatible true --mysql_conf hostname=<hostname> --mysql_conf port=3306 --mysql_conf username=flink-cdc --mysql_conf password=**** --mysql_conf database-name=littlemall --mysql_conf start-server-id=7400 --mysql_conf server-time-zone=Asia/Hong_Kong --including_tables order|order_detail|payment_record|store|user|order_detail_product_item|order_detail_delivery_fee_item|order_audit_log|order_detail_promotion_item|sku_list|payment_refund_record|mall_category|store_category --catalog_conf metastore=filesystem --catalog_conf case-sensitive=false --table_conf bucket=4 --table_conf changelog-producer=input
MySQL CLI to confirm user have permission to read and are base table:

Tables being filtered out:
2024-05-08 08:44:32,440 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - Read list of available tables in each database
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.TASK_EXECUTION' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.TASK_EXECUTION_PARAMS' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.TASK_LOCK' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.TASK_SEQ' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.TASK_TASK_BATCH' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_area' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_district' is filtered out of table capturing
2024-05-08 08:44:32,443 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_estate' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_estate_flat' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_estate_floor' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_street' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_street_number' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.address_street_number_2_estate' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.delivery_provider' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.delivery_provider_store_delivery' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.delivery_provider_store_pickup_point' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.delivery_provider_third_party' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.mall_category' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.mall_landing_component' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.oauth2_authorization' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.oauth2_authorization_consent' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.oauth2_registered_client' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order_audit_log' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  org.apache.flink.runtime.jobmaster.JobMaster                 [] - Resolved ResourceManager address, beginning registration
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order_detail' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order_detail_delivery_fee_item' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order_detail_product_item' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.order_detail_promotion_item' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.payment_record' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.payment_refund_record' is filtered out of table capturing
2024-05-08 08:44:32,444 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.pending_refund_and_refill_stock' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.shipment' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.shipment_status_log' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.shipment_third_party' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 including table 'littlemall.sku_list' for further processing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store_category' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store_delivery_integration' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store_landing_component' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store_mall_category_mapping' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.store_static_page' is filtered out of table capturing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 including table 'littlemall.user' for further processing
2024-05-08 08:44:32,445 INFO  com.ververica.cdc.connectors.mysql.source.utils.TableDiscoveryUtils [] - 	 'littlemall.user_membership' is filtered out of table capturing
2024-05-08 08:44:32,512 INFO  io.debezium.jdbc.JdbcConnection                              [] - Connection gracefully closed

Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

I have also tried paimon-flink-action-0.8, specifically paimon-flink-action-0.8-20240507.002037-81.jar from https://repository.apache.org/content/groups/snapshots/org/apache/paimon/paimon-flink-action/0.8-SNAPSHOT/paimon-flink-action-0.8-20240507.002037-81.jar but it just have the same effects. Maybe its something to do with table's metadata? Just guessing at this point

Does the ignored table have a schema change? You can set --ignore-incompatible false to check whether the table has schema changes, or check the log for "This table will be ignored". @CodyPin

@MOBIN-F Thanks for the reply, this is my first try loading this database, so I guess it wouldn't matter if any of the tables has a schema change? I am not sure, in any case those table's schema haven't been touched since they were created. But I set the --ignore-incompatible for testing just to see if there would be any difference, but no, removing --ignore-incompatible or setting it to true doesn't have any difference.
And just to give more background, initially I was doing this with Flink and sinking into Iceberg, which would be able to get all the tables required, thus leading me to think it might be a Paimon issue either than Flink

On futher investigation, using the query
show KEYS from <tablename> where Key_name = 'PRIMARY';
on the tables that got included, namely user and sku_list shows this

But on those who got filtered out, for example store and payment_record, it reutrns nothing:

Even tho when we query describe store shows that the table does indeed have a primary key:

Turns out, when the tables were created, it didn't specify the primary key, but was instead later added using the query
ALTER TABLE store ADD PRIMARY KEY (id); . This leads to the problem that it might appears that the table does not have a primary key, like when using the query show create table store; will show this:

showing that it does not have a primary key.
With that said, althought the tables clearly have a primary key, it might appares as it does not depending on how we are checking for its existence, and of course Paimon only synchronizes tables with primary keys. So I think this is a bug in the wording of the documents, but would be a really nice feature if it would include tables that have a primary no matter if its created with or altered later on.
@MOBIN-F what do you think?

I reproduced the problem, and the reason is as stated in the official documentation: If you do not have a PRIMARY KEY and an application asks for the PRIMARY KEY in your tables, MySQL returns the first UNIQUE index that has no NULL columns as the PRIMARY KEY.
CREATE TABLE test_implicit_pk (
id bigint(20) NOT null,
name varchar(255) NOT NULL,
school varchar(50) DEFAULT NULL,
UNIQUE key uk_sta_id (id,name),
UNIQUE KEY uk_sta (school)
) ENGINE=InnoDB

desc test_implicit_pk

Field |Type |Null|Key|Default|Extra|
------+------------+----+---+-------+-----+
id |bigint(20) |NO |PRI| | |
name |varchar(255)|NO |PRI| | |
school|varchar(50) |YES |UNI| | |

actual primary key information exists

show create table test_implicit_pk

CREATE TABLE `test_implicit_pk` (
   `id` bigint(20) NOT NULL,
   `name` varchar(255) NOT NULL,
   `school` varchar(50) DEFAULT NULL,
   UNIQUE KEY `uk_sta_id` (`id`,`name`),
   UNIQUE KEY `uk_sta` (`school`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

No primary key information is displayed

In this case, the primary key information cannot be obtained using metaData.getPrimaryKeys. Instead, we need to use metaData.getIndexInfo and metaData.getColumns to determine the primary key
what do you think? @JingsongLi @yuzelin

I have notice another issue, it is with composite primary key, I am guessing Paimon doesn't know what to do when a table contains 2 or more pkeys, and resulting in the table being filtered out.
You can test it out with:
CREATE TABLE `test_composite_pk` (
   `id` bigint(20) NOT NULL,
   `id_2` bigint(20) NOT NULL,
   `school` varchar(50) DEFAULT NULL,
   PRIMARY KEY(`id`, `id_2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

In this case, the primary key information cannot be obtained using metaData.getPrimaryKeys. Instead, we need to use metaData.getIndexInfo and metaData.getColumns to determine the primary key

Thanks for your suggestion, I will check it later.

flink-cdc paimon pipeline connector does not have this problem


[Discussion] Migration to Java 11

Any plans to migrate the bot from Java 8 to Java 11?
https://www.oracle.com/technetwork/java/java-se-support-roadmap.html

There is no need to specifically target Java 11.
The bot already works with Java 11 out of the box.
As long as it runs there without any issues, there is no need to change anything about that.

There is no need to specifically target Java 11.
The bot already works with Java 11 out of the box.
As long as it runs there without any issues, there is no need to change anything about that.

Didn't know that was the case, thank you for clarifying.
If this works with fine with Java 11, this can be closed. @jagrosh

Newer Java Versions should be backwards compatible until Java 1.5 (afaik).
Also you can close the issue yourself.

Newer Java Versions should be backwards compatible until Java 1.5 (afaik).
Also you can close the issue yourself.

Never knew that, thanks for sharing.


test_nm failing with nasm 2.16.03

Hi!
Debian recently upgraded to NASM version 2.16.03, and unfortunately this broke xbyak's test_nm.sh test. I'm not sure what broke exactly, so I'll just leave the error log here:
cxx=g++ ./test_nm.sh
nasm(32bit)
compile make_nm.cpp with -wall -i../ -dxbyak32
asm
xbyak
compile nm_frame.cpp
1045,1046c1045,1046
< 86d1
< 86c5
---
> 86ca
> 86e8
1048c1048
< 86f0
---
> 86c6
1053c1053
< 6687ce
---
> 6687f1
1061c1061
< 87f1
---
> 87ce

You may find some more information in the downstream bug report: https://bugs.debian.org/1080144.
What is the cause of this failure?
Thanks!

It is because NASM has changed the bytecode output of xchg (bytecode execution is not affected).
Xbyak 7.07.1 follows the new behavior of NASM to pass the tests.
https://github.com/herumi/xbyak/blob/master/doc/changelog.md

Thanks for the quick reply! This is indeed fixed when upgrading to the new release. Sorry for the noise!


Make coverage, like, really fast

Description
Applies changes described in go/better-dart-coverage
Related Issues
Fixes https://github.com/flutter/flutter/issues/23157
Tests
I added the following tests:
Replace this with a list of the tests that you added as part of this PR. A change in behaviour with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] I signed the CLA.
[ ] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] All existing and new tests are passing.
[ ] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[ ] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
[ ] No, this is not a breaking change.

Build is currently green - the dashboard may be unable to update older PRs


$qb->expr()->countDistinct() fails with multiple values

I have $qb (QueryBuilder), and i call this:
$qb->expr()->countDistinct('e.name', 'e.value')
Generated SQL / DQL is valid, but Parser complains about syntax error:
Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got ','
In tests, there is a test for multiple arguments in countDistinct(), but no test for Parser accepting multiple arguments for COUNT(DISTINCT

I found a major hack of a workaround.  If you combine the two fields and then select distinct of the two it works.
COUNT(DISTINCT CONCAT(ps.date, s.id))

It would be amazing if someone could send us a failing test case that reproduces that behaviour. It would help us a lot to identify and fix the issue you're describing.
You can find examples on https://github.com/doctrine/doctrine2/tree/388afb46d0cb3ed0c51332e8df0de9e942c2690b/tests/Doctrine/Tests/ORM/Functional/Ticket


UndefVarError: transforms not defined for geom_vline

In geom_hline, the first line is
aes_dict, args_dict, transforms = extract_aes(args, kwargs)

whereas in geom_vline it is missing the transforms variable.
Are all geoms suppoised to have the transforms argument since it is returned by extract_aes? Or perhaps geom_hline and geom_vline should use the geom_template method? Let me know what direction to take and I'll be happy to submit a pull request fixing this issue.

I don't know the answer to your question and will let @rdboyes weigh in. I just wanted to write to thank you for contributing, both an issue and a PR!

You're correct - I changed the extract_aes function to return transforms as well recently so that applying functions inside of aes would work. I just missed geom_vline when I updated the geom functions to support that! Thanks for the pull request, it looks great - I merged it


Error: Popup associated with topmate has got trailing icons below it

Describe the Error
On selecting 'Learn' from navbar and scrolling to end, a popup comes up with multiple similar looking logos one below the other
Expected behavior
Only the popup should be shown to the user, with no trailing large icons
Additional context
I would greatly appreciate any further information on this and what was trying to be achieved.
Kindly assign this issue to me @sanjay-kv

@re-sha Is the PR done for this.

The issue no longer exists when checking now, I have the current and old screenshots if needed


Gmail Spam Detection

Description 📜
Audio contribution for Gmail Spam Detection
Fixes #4168

Type of change 📝

[x] Audio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)

Domain of Contribution 📊

[x] Datascience with Python

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Comments
Please add the hacktober-accepted label if it gets approved

@prathimacode-hub I made the required changes!

All the images in "images" folder
updated the readme file
renamed the file to "README.md"
Please review it once more


"None available" and no contribution values are displayed for a short period upon launch - especially on low ends

Checklist

[X] I have used the search function to see if someone else has already submitted the same bug report.
[X] I will describe the problem with as much detail as possible.

App
Thunderbird for Android
App version
8.0b3
Where did you get the app from?
Google Play
Android version
14
Device model
Galaxy Tab A9+
Steps to reproduce
Preconditions:
Have at least one account added.
Make sure the application is closed
Steps:

Launch TB.
Go to Hamburger Menu
Tap Show accounts
Tap the Settings cogwheel.
Tap Support Thunderbird Beta

Expected behavior
The page is loaded and all information and values are displayed.
Actual behavior
Page is accessed and "None available" is displayed as payment type while no contribution values are displayed.
This issue occurs an all of our available devices, but it is especially visible on lower end devices where the waiting period is above 1 second(s)
Logs
https://github.com/user-attachments/assets/92180d23-a6aa-445e-a260-f22816f65351

Here are my makeshift design suggestions. This would be good to look into given the billing library is so fragile.
The link to thunderbird.net should contain an utm campaign noting there was an error loading the amounts. It doesn't matter which error, but just the fact that this happened might give us a bit data there is an issue.

Design provided a much better version of the right screen. It doesn't look like we have the left screen yet, where we'd instead show the typical loading indicator. Would be good to work this out until the release.

This is fixed by #8375, please reopen if it still doesn't work.


Update SB

Just a PR to check @mwestphal fix, will update to the official master if it works and when merged.

Yay :)


Change python interpreter to locally compiled version instead of conda environment

For some reason, some users are having issues accessing the conda environment that I created for a custom Python interpreter. Because of this, I have decided to compile my own version of Python from source that will act as the custom interpreter.
The following two tasks will need to be accomplished in order for this issue to be considered resolved:

Update module file to include paths to the Python interpreter
Update documentation including instructions for how to compile and use the new python interpreter.

Compiling version Python 3.9.4 - the most recent release of Python

Python interpreter has been updated. Now I just need to update the README to reflect the new install process. Will probably do this on Monday.


Move capture_aes_random_batch function to capture.py.

Rename simple_capture_traces.py to capture.py. Delete
simple_capture_traces_batch.py.
Signed-off-by: Abdullah Varici<EMAIL_ADDRESS>

I have started with the aes_random_batch function. Instead of using scared library I've used crypto.cipher for AES encryption. Waverunner is not supported but if it should be supported, I think we can change the code to support for all capture functions in a generic way. I also have added trace range check.

Thanks @alphan for the review. I have already applied and saw that different capture functions works with different parameters. I have made changes according to your review and forced-pushed them.

Thanks a lot @abdullahvarici for implementing the remaining feedback! Maybe we wait for a couple more hours before merging in case @alphan want to take another look. But from my side, this looks definitely good!

Apologies for the delay, LGTM, thanks @abdullahvarici!


Stateful VM deployment: CDI image upload fails when CMK is enabled

Hi,
I think the example script in "CDI image upload fails when CMK is enabled" part have some invalid cmd.
For example: kubectl get pod cdi-upload-centos-dv -o yaml --export > cdiUploadCentosDv.yaml
May i ask for the correct cmd? I have to use the stateful deployment for my project, but i stuck in the time out problem.
Thank you very much.

BRs
Oneal Lee

Hi,
I solved the above issue and had follow the workaround steps to edit the taint toleration, but still got the timeout problem.
Can someone tell me if i miss something?  Thanks!!

kubectl get pod cdi-upload-centos-dv -o yaml

get pv/pvc/dv

BRs,
Oneal Lee


redisio_configure fails during installation

         * cookbook_file[/etc/pam.d/sudo] action create
           - update content in file /etc/pam.d/sudo from b473b9 to ae6ee3
           --- /etc/pam.d/sudo	2013-03-01 05:20:20.000000000 +0000
           +++ /etc/pam.d/.sudo20160122-2961-1v9y230	2016-01-22 20:20:53.649564311 +0000
           @@ -1,6 +1,10 @@
            #%PAM-1.0

           +auth       required   pam_env.so readenv=1 user_readenv=0
           +auth       required   pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0
           +session    required   pam_limits.so
            @include common-auth
            @include common-account
            @include common-session-noninteractive

       Recipe: redisio::configure
         * redisio_configure[redis-servers] action run[2016-01-22T20:20:53+00:00] WARN: Cloning resource attributes for file[] from prior resource (CHEF-3694)
       [2016-01-22T20:20:53+00:00] WARN: Previous file[]: /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:153:in `block (2 levels) in configure'
       [2016-01-22T20:20:53+00:00] WARN: Current  file[]: /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:160:in `block (2 levels) in configure'

           * user[redis] action create

             ================================================================================
             Error executing action `create` on resource 'user[redis]'
             ================================================================================

             NoMethodError
             -------------
             undefined method `[]' for nil:NilClass

             Cookbook Trace:
             ---------------
             /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:103:in `block (4 levels) in configure'
             /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:89:in `block in configure'
             /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:38:in `each'
       /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:38:in `configure'

             Resource Declaration:
             ---------------------
             # In /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb

       96:       user current['user'] do
        97:         comment 'Redis service account'
       98:         supports :manage_home => true
       99:         home current['homedir']
             100:         shell current['shell']
             101:         system current['systemuser']
             102:         uid current['uid'] unless current['uid'].nil?
             103:         not_if { node['etc']['passwd']["#{current['user']}"] }
             104:       end
             105:       #Create the redis configuration directory

             Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:96:in `block (2 levels) in configure'

             user("redis") do
        action [:create]
        supports {:manage_home=>true}
        retries 0
        retry_delay 2
        default_guard_interpreter :default
        username "redis"
        comment "Redis service account"
        home "/var/lib/redis"
        shell "/bin/false"
        system true
        iterations 27855
        declared_type :user
        cookbook_name "redisio"
        not_if { #code block }
             end

           ================================================================================
           Error executing action `run` on resource 'redisio_configure[redis-servers]'
           ================================================================================

           NoMethodError
           -------------
           user[redis] (/tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb line 96) had an error: NoMethodError: undefined method `[]' for nil:NilClass

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:103:in `block (4 levels) in configure'
           /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:89:in `block in configure'
           /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:38:in `each'
           /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:38:in `configure'
           /tmp/kitchen/cache/cookbooks/redisio/providers/configure.rb:22:in `block in class_from_file'

       Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/redisio/recipes/configure.rb

            30: redisio_configure "redis-servers" do
            31:   version redis['version'] if redis['version']
            32:   default_settings redis['default_settings']
            33:   servers redis_instances
            34:   base_piddir redis['base_piddir']
            35: end
            36:

           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/redisio/recipes/configure.rb:30:in `from_file'

           redisio_configure("redis-servers") do
             action :run
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             declared_type :redisio_configure
             cookbook_name "redisio"
             recipe_name "configure"
             version "2.8.20"
             default_settings {"user"=>"redis", "group"=>"redis", "homedir"=>"/var/lib/redis", "shell"=>"/bin/false", "systemuser"=>true, "uid"=>nil, "ulimit"=>0, "configdir"=>"/etc/redis", "name"=>nil, "tcpbacklog"=>"511", "address"=>nil, "databases"=>"16", "backuptype"=>"rdb", "datadir"=>"/var/lib/redis", "unixsocket"=>nil, "unixsocketperm"=>nil, "timeout"=>"0", "keepalive"=>"0", "loglevel"=>"notice", "logfile"=>nil, "syslogenabled"=>"yes", "syslogfacility"=>"local0", "shutdown_save"=>false, "save"=>nil, "stopwritesonbgsaveerror"=>"yes", "rdbcompression"=>"yes", "rdbchecksum"=>"yes", "dbfilename"=>nil, "slaveof"=>nil, "masterauth"=>nil, "slaveservestaledata"=>"yes", "slavereadonly"=>"yes", "replpingslaveperiod"=>"10", "repltimeout"=>"60", "repldisabletcpnodelay"=>"no", "slavepriority"=>"100", "requirepass"=>nil, "rename_commands"=>nil, "maxclients"=>10000, "maxmemory"=>nil, "maxmemorypolicy"=>nil, "maxmemorysamples"=>nil, "appendfilename"=>nil, "appendfsync"=>"everysec", "noappendfsynconrewrite"=>"no", "aofrewritepercentage"=>"100", "aofrewriteminsize"=>"64mb", "luatimelimit"=>"5000", "slowloglogslowerthan"=>"10000", "slowlogmaxlen"=>"1024", "notifykeyspaceevents"=>"", "hashmaxziplistentries"=>"512", "hashmaxziplistvalue"=>"64", "listmaxziplistentries"=>"512", "listmaxziplistvalue"=>"64", "setmaxintsetentries"=>"512", "zsetmaxziplistentries"=>"128", "zsetmaxziplistvalue"=>"64", "hllsparsemaxbytes"=>"3000", "activerehasing"=>"yes", "clientoutputbufferlimit"=>[["normal", "0", "0", "0"], ["slave", "256mb", "64mb", "60"], ["pubsub", "32mb", "8mb", "60"]], "hz"=>"10", "aofrewriteincrementalfsync"=>"yes", "clusterenabled"=>"no", "clusterconfigfile"=>nil, "clusternodetimeout"=>5000, "includes"=>nil}
             servers [{"port"=>6379}]
             base_piddir "/var/run/redis"
           end

its bailing on this not_if { node['etc']['passwd']["#{current['user']}"] }

IMO, this not_if should be removed.  It is not the job of the redisio cookbook to make the user resource idempotent and it is causing errors.

That is probably true. This is probably from a recent merge. I'll review it and try to fix it. Is it possible you could try a SHA a couple commits earlier? It may solve your problem in the meantime.

On Jan 22, 2016, at 16:24, Jake Plimack<EMAIL_ADDRESS>wrote:
IMO, this not_if should be removed. It is not the job of the redisio cookbook to make the user resource idempotent and it is causing errors.
—
Reply to this email directly or view it on GitHub.

my problem was solved by simply removing the line containing the guard.
On Fri, Jan 22, 2016 at 1:48 PM, Brian Bianco<EMAIL_ADDRESS>wrote:

That is probably true. This is probably from a recent merge. I'll review
it and try to fix it. Is it possible you could try a SHA a couple commits
earlier? It may solve your problem in the meantime.

On Jan 22, 2016, at 16:24, Jake Plimack<EMAIL_ADDRESS>wrote:
IMO, this not_if should be removed. It is not the job of the redisio
cookbook to make the user resource idempotent and it is causing errors.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/brianbianco/redisio/issues/252#issuecomment-174062986
.

Thanks for updating with your fix.

Hi, any idea on when this will be pushed to master? Thanks

I would not like this check removed but have fixed this in a different way. Please see #303.


Compiler error when extending a typealias of a partially specialized generic type

Description
When creating a typealias that partially specializes a generic type, the compiler generates an error when attempting to extend that type via the typealias.
Steps to reproduce
Create a Generic type with two type parameters.
struct Field<Tag,Value> {
  let tag: Tag
  let value: Value
}

Define a typealias which specializes one of the type parameters as such :
typealias IntField<Tag> = Field<Tag,Int>
Define an extension based on the typealias:
extension IntField {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

Expected behavior
I would expect this code to compile.
Instead the compiler complained: "Binary operator '+' cannot be applied to operands of type 'Value' and 'Int'"
If instead of extending the typealias, I extend the type directly it compiles fine as such:
extension Field where Value == Int {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

Environment

Swift compiler version info swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-<IP_ADDRESS>.5 clang-14<IP_ADDRESS>.100)
Xcode version info: Xcode 14.3.1 Build version 14E300c
Deployment target: macOS Playground

I would like to solve this problem, It will be my first open source contribution. Do you mind if I start?

Sounds good. Thanks.

@dochoi-bot are you still working on this issue?

If you want to, you can take this issue.

yes please, I would like to work on it
@AnthonyLatsis could you assign me to this issue? I was looking into this issue and am kind of stumped on where to begin. I was able to reproduce the issue and make updates to the ERROR message just to see how it all connects. Do updates need to be made in the Sema directory? One of the TypeChecker files?

@AnthonyLatsis spending a good amount of time on this issue and I am pretty lost with how to tackle this.
Any hints/good starting points to start understanding what needs to be done? I feel I need to make some sort of change in this file here

I read the blog by Slava wrote and it was really helpful!!! Understanding how the compiler builds the AST makes a lot more sense.
I just wanted to walk through a piece of code to better familiarize myself with what is happening.
// Check if you can take the extended type and get it as the the generic type Field<Tag, Value>
if (auto *unboundGeneric = extendedType->getAs<UnboundGenericType>()) {
  // Check if the typealias IntField is allowed with the generic that was declared
  if (auto *aliasDecl = dyn_cast<TypeAliasDecl>(unboundGeneric->getDecl())) {
    // get the underlying type of the typealias, which would be Field<Value, Int>
    auto underlyingType = aliasDecl->getUnderlyingType();
}

The next piece is a little tricky but I think I understand it (correct me if I am wrong).
if (auto extendedNominal = underlyingType->getAnyNominal()) {
  return TypeChecker::isPassThroughTypealias(
    aliasDecl, extendedNominal)
    ? extendedType
    : extendedNominal->getDeclaredType();
}

We are setting the extendedNominal variable to the NominalType.  Is the NominalType check what you mean by

just as Element == Int is inferred for extension Array

The blog I read talked about what it means to be a NominalType and I think that is why the code snippet compiles below.
extension Field where Value == Int {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

Do we now have to add a check for the BoundGenericType , or is it another type?

// Check if you can take the extended type and get it as the the generic type Field<Tag, Value>
if (auto *unboundGeneric = extendedType->getAs<UnboundGenericType>()) {
  // Check if the typealias IntField is allowed with the generic that was declared
  if (auto *aliasDecl = dyn_cast<TypeAliasDecl>(unboundGeneric->getDecl())) {
    // get the underlying type of the typealias, which would be Field<Value, Int>
    auto underlyingType = aliasDecl->getUnderlyingType();
}

getAs and dyn_cast are dynamic casts (think of as?). UnboundGenericType is exactly that, a generic type that is not bound as in Array vs. Array<Int>.

We are setting the extendedNominal variable to the NominalType.  Is the NominalType check what you mean by

just as Element == Int is inferred for extension Array

getAnyNominal does not return a NominalType. Have you looked at the function definition?
extension Array<Int> is syntactic sugar for extension Array where Element == Int. When building the generic signature of the former extension, the generic requirement Element == Int is inferred. This is how (not directly from the extended type) the compiler knows that the Element type parameter is Int inside the extension. Similarly, the requirement Value == Int must be inferred from extension IntField if we are to resolve this issue. Note that a valid extension of a type alias is an extension of the underlying nominal type declaration, not the type alias declaration itself.
If you’ve dealt with generic parameters and generic where clauses in Swift before, wrapping your head around a GenericSignature by inspecting debug output and looking around the codebase should be pretty straightforward. However, if you want some theory and an in-depth explanation of their role in the generics model, Slava has plenty of this goodness too.

The use of the syntactic sugar extension FieldInt is in fact an extension of the nominal type declaration, which in this case is Field<Tag,Int> ?
That is why this piece of code compiles. We are simply not using the syntactic sugar of the typealias and straight up defining the type the extension is using? It is pretty much making DIRECT reference for Value == Int,  but we want this to be INFERRED with the usage of the typealias.
extension Field where Value == Int {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

I am able to wrap my head around these concepts but it just goes back to where in the code I actually need to start thinking about logic. I would think understanding what needs to be achieved would help me find where changes need to be made but it is a very large codebase.

Reading the doc you linked I see the command to get the debug output to inspect the generic signatures and canonical generic signature. I ran it with the code above and got an interesting output. I can now see how the generic signature is being used to infer for Element == Int.
ExtensionDecl line=15 base=Field
Generic signature: <Tag, Value where Value == Int>
Canonical generic signature: <τ_0_0, τ_0_1 where τ_0_1 == Int>

This is the ouput with the buggy code. Should it not still be an ExtensionDecl?
ProtocolDecl name=Sendable
Generic signature: <Self where Self : Sendable>
Canonical generic signature: <τ_0_0 where τ_0_0 : Sendable>

@AnthonyLatsis still stumped on this. I feel I am getting closer while reading the doc you sent me, but I still don't really understand where to look in the codebase even with all of this new context. I have been trying to piece together everything while looking at the files from the 6.5 Source Code Reference section of the doc you sent.

The use of the syntactic sugar extension FieldInt is in fact an extension of the nominal type declaration,...

That was just a side note about extending type aliases in general. What I meant is if you extend a type alias that points to a struct, enum, class, etc., whatever you extend it with becomes a member of the underlying nominal declaration, not the type alias declaration itself. The type alias can’t have members, it’s just an alias for another type.

...which in this case is Field<Tag,Int>

Let’s get the nomenclature straight. The nominal type declaration (Decl) is the structure Field. Field<Tag,Int> is a type (Type, specifically BoundGenericStructType). In order for fix this, we want the extended type to be the TypeAliasType IntField, as with other compilable instances of extending a type alias. The current behavior is due to the resolved IntField type failing a check and triggering a fallback somewhere inside the request.

So to solve this issue, we also need to update how the GenericSignature is being built? We want it to be something the line above but that is not ocurring.

Rather, how generic requirements for building the generic signature are collected/inferred.

Sorry, I’m not intending to have you figure everything out yourself, I’m just slow to reply. Similar to ExtendedTypeRequest, there is a request called GenericSignatureRequest that handles requirement inference from the extended type. Getting Started has some basic debugging tips that may help you.

The current behavior is due to the resolved IntField type failing a check and triggering a fallback

From what I can gather with outputting variables, the request for gets all the way to the call isPassThroughTypealias. Seems like a check needs to be made in the TypeCheckDecl file (in that method).

@AnthonyLatsis ping. Is 5 days a good amount of time to wait before I ping you?

Is 5 days a good amount of time to wait before I ping you?

Totally fine, thank you.

Even with the removal of the size check, the comparison made here fails because they are clearly not the same.

This comparison exists to weed out cases like this:
struct Inner<T> {
  struct Outer<U> {}
}

typealias A<T, U> = Inner<T>.Outer<U>

The generic signatures of both A and Outer look like this: <T, U>. But A is not a pass-through type alias. The Ts would match because they both have index 0 and depth 0, but A’s U has index 1 and depth 0, whereas Outer’s U has index 0 and depth 1.

The check needs to be augmented to account for the reported case, yes. But the extended type request is not the only client of isPassThroughTypealias. Modifying this algorithm in ways that change the definition of a pass-through type alias is very likely to break something else.

So does the change need to be made in GenericSignatureRequest? I just don't see how it is similar to ExtendedTypeRequest. Sorry if I am lost, but with trying to understand what the issue is + debugging output + reading the doc you linked, I get more confused. I seem to keep looking in the wrong spot when trying to work through this issue.

I just don't see how it is similar to ExtendedTypeRequest.

Sorry if that lead you astray. I meant that just like we have a request that computes an extended type, we also have a request that computes a generic signature, and their names are similar in format. A lot of stuff gets computed via requests. Knowing about this pattern can help you find stuff in the future.

Let’s focus on ExtendedTypeRequest. We want the request to yield a type that is coherent with what we are actually wrote in code — IntField. Instead, IntField fails the isPassThroughTypealias check and the request yields the fallback type extendedNominal->getDeclaredType(), which is simply Field in this case. In short, the compiler interprets extension IntField as extension Field, hence the error you see in the original post.
isPassThroughTypealias is too strict to cover this case. We need a more lenient check, but modifying the isPassThroughTypealias function to accomplish this is risky because there are other places that might be relying on its current behavior. Guiding you toward a conclusion here.

reading the doc you linked, I get more confused

Try not to force it too far, or it will do more harm than good. That material goes into way more detail than needed to fix this issue.

I feel I should be comparing the extendedType with the aliasDecl.
//extendedType->getAnyGeneric()->dump()
(typealias range= "IntField" "<Tag>" access=internal unresolved_type)
//aliasDecl->dump()
(typealias range= "IntField" "<Tag>" access=internal type="Field<Tag, Int>")

I can then take the DeclaredInterfaceType of each which should in return the type_alias_type. Now I can use the isEqual and add a simple check. If the check passes, then I can simply return extendedType which will be IntField.

Adding this snippet here seems to fix the issue.
if(aliasDecl->getDeclaredInterfaceType()->isEqual(
   extendedType->getAnyGeneric()->getDeclaredInterfaceType())) {
      return extendedType;
}

Adding this piece of code in this if here fixes the issue.

Because it will always evaluate to true. getAnyGeneric() returns the generic type declaration that a type is bound to, so aliasDecl matches extendedType->getAnyGeneric().
Do you understand the current criteria for extending a generic type alias, i.e., what a generic pass-through type alias is (when isPassThroughTypealias return true for a generic type alias)?

a generic pass-through type alias is when the typealias refers to a nominal type?
I think my confusion is taking the extendedType, aliasDecl, and extendedNominal variables and figuring out what exactly I need to check. When I dump the output of each variable, I can clearly see how they are not equal. I feel I need to dive deeper into one variable to find commonalities between them and then do an equal comparison somehow.

The goal is to modify the criteria for extending a generic type alias, so until you have a good idea of the current criteria (or what a pass-through generic type alias is), we are very unlikely to make any progress. What a pass-through type alias is — in other words, when isPassThroughTypealias returns true — is described in that function’s doc comment.

a generic pass-through type alias is when the typealias refers to a nominal type?

The necessary condition for extending any type alias, generic or not, is that it refers to a nominal type declaration. The sufficient condition for extending a generic type alias is that it is pass-through. This implies that a pass-through type alias always refers to a nominal, yes, but this property alone is not enough to define it.

I understand that we don't want to modify the isPassThroughTypeAlias  function because that is used in other places. We just want to add another check before calling that function in the area where there is the type alias hack. It gets to far and ends up returning the wrong type, in this case Field instead of IntField.
I think I need to take a step back before I continue. Like I said I am all over the place trying to put pieces to a puzzle together that don't really fit. Any tips on where I should go back to doing more research for the generic type alias?

Any tips on where I should go back to doing more research for the generic type alias?

As mentioned earlier, try understanding what a pass-through generic type alias is, since that is the current condition for extending a generic type alias. Once you are able to hand-write a list of criteria that make up a pass-through generic type alias, you will have a basis for sorting out the adjustments to those criteria needed to allow for stuff like IntField.

Criteria for a pass-through-generic-type-alias. I added a list of criteria and a ✅ means that it passes with the issue.

[ ] typealias needs to refer to a nominal type.

if (!nominal) return false;

// typealias defined
typealias IntField<Tag> = Field<Tag,Int>
// it refers to the nominal type below
struct Field<Tag,Value> {
  let tag: Tag
  let value: Value
}

[ ]  The nominal type and the typealias are either both generic

if (nominal->isGeneric() != typealias->isGeneric())
   return false;

This is true for both the nominal and typealias in this case because they both have generic arguments

[ ] Both have generic signatures or neither do.

if (static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig))
   return false;

This is true because if they are both generic, then a generic signature exists

[ ] If neither is generic, we're done, it's a pass-through alias.

if (!nominalSig) return true;

Just checking one of the values to see it is not generic

[ ] Type parameters are the same the whole way through

auto nominalGenericParams = nominalSig.getGenericParams();
auto typealiasGenericParams = typealiasSig.getGenericParams();
if (nominalGenericParams.size() != typealiasGenericParams.size())
   return false;
..........

This is a check for GenericParams and making sure that they are same. This does not pass with the current issue but I see why it passes in other cases. I outputted the params and could see they were the same and that they were different with extending IntField.

[ ] Neither is generic at this level, we have a pass-through typealias.

if (!typealias->isGeneric()) return true;

Another simple check to see if the variable is generic

[ ] Check that the typeAlias->underlyingType and nominal->selfInterfaceType are the same

(bound_generic_struct_type decl="main.
  (generic_type_param_type depth=0 index=0 decl="main.(file).IntField.Tag
  (struct_type decl="Swift.(file).Int"))
(bound_generic_struct_type decl="main.(file).Field
  (generic_type_param_type depth=0 index=0 decl="main.(file).Field.Tag
  (generic_type_param_type depth=0 index=1 decl="main.(file).Field.Value

If the check ever gets this far, simply compare the two types if they are the same.

So should I be adding a new TypeChecker function like isPassThroughTypealias,  but only works for cases of extending a typealias that has a nominal type of struct? This one should be a more lenient check.
😰

Check if the UnboundGenericType of the typealias equals the extendedType. If it is the same, we want to simply return extendedType, which in this case is IntField.
if(aliasDecl->getUnboundGenericType()->isEqual(extendedType)) {
   return extendedType;
}

Make this check inside the lines of TypeCheckDecl.cpp.

So should I be adding a new TypeChecker function like isPassThroughTypealias,  but only works for cases of extending a typealias that has a nominal type of struct? This one should be a more lenient check.

That’s a more informed thought, which is good. A new function is a good idea in itself. Why only struct? The issue would be just as relevant if Field were an enum, or a class.

typealias needs to refer to a nominal type.

Not sure if this is a misconception or just colloquial language. There is a nominal type declaration (NominalTypeDecl), e.g. struct S {}, and then there is a nominal type (NominalType), e.g. S in let x: S`. These are different notions — one is a declaration and the other is a type. While you are still new to the compiler, I recommend articulating these differences in mind and prose to avoid confusing yourself in the first place. I’m going to assume you mean nominal type declaration.

This is true for both the nominal and typealias in this case because they both have generic arguments

Not arguments — parameters. Arguments are values that are substituted into parameters.

Both have generic signatures or neither do.

Do you understand how this differs from if (nominal->isGeneric() != typealias->isGeneric())? Would you be able to explain the difference with Swift examples?

Type parameters are the same the whole way through

This sounds rather ambiguous. Are you sure you understand what this means? Would you be able to explain it with Swift examples?

Check if the UnboundGenericType of the typealias equals the extendedType. If it is the same, we want to simply return extendedType, which in this case is IntField.

Have you tried reasoning about the scope of this condition? It works for this particular case, but what is a general example of Swift code that satisfies it the aforementioned context?

Swift Example
struct Field<Tag,Value> {
  let tag: Tag
  let value: Value
}

typealias IntField<Tag> = Field<Tag,Int>

Do you understand how this differs from if (nominal->isGeneric() != typealias->isGeneric())? Would you be able to explain the difference with Swift examples?

The isGeneric check simply calls the getGenericParams function in Decl.cpp to see if the genericParams actually exist.
The genericParams of Field are <Tag, Value>. The genericParams of this IntField are <Tag>.
In this Swift example, both have genericParams so this check passes.

if (static_cast(nominalSig) != static_cast(typealiasSig)) return false;

Using the Swift example above, there are two GenericSignatures that exist, <Tag> for IntField and <Tag, Value> for Field, so this check passes as well. The genericParams look the "same" as the GenericSignature, but one is of type GenericParamList and the other is of type GenericSignature.

This sounds rather ambiguous. Are you sure you understand what this means? Would you be able to explain it with Swift examples?

Going deeper, there is a check for each GenericParamType to compare them (if it the size check passes).
(generic_type_param_type depth=0 index=0 decl="main.(file).Field.Tag
(generic_type_param_type depth=0 index=0 decl="main.(file).IntField.Tag
(generic_type_param_type depth=0 index=1 decl="main.(file).Field.Value
(error_type)

This is what is being compared ^ at a deeper level.

Have you tried reasoning about the scope of this condition? It works for this particular case, but what is a general example of Swift code that satisfies it the aforementioned context?

The scope of this check does not seem right because the isPassThroughTypealias function is still being called.

The isGeneric check simply calls the getGenericParams function in Decl.cpp to see if the genericParams actually exist.
The genericParams of Field are <Tag, Value>. The genericParams of this IntField are <Tag>.
In this Swift example, both have genericParams so this check passes.
Using the Swift example above, there are two GenericSignatures that exist, <Tag> for IntField and <Tag, Value> for Field, so this check passes as well. The genericParams look the "same" as the GenericSignature, but one is of type GenericParamList and the other is of type GenericSignature.

This is correct, but the IntField example doesn’t show the difference between the two conditions because they are both false. What is a Swift example where the former is false and the latter is true?

This sounds rather ambiguous. Are you sure you understand what this means? Would you be able to explain it with Swift examples?

Going deeper, there is a check for each GenericParamType to compare them (if it the size check passes).

Again, that you understand what is happening here is good, but how does this map to source code? What is a Swift example where the size matches, but the element-wise comparison fails?

Check that the typeAlias->underlyingType and nominal->selfInterfaceType are the same

Ditto, what is a Swift example where this is true/false? Just reading these if conditions does not make you feel like you fully understand what a pass-through type alias is, right? See if you can to pair them with Swift examples for the true & false cases, one by one. If you guess right but don’t understand why, be honest.

Swift Example for nominal is not generic but typealias is
struct Field {
  let tag: Int
  let value: Int
}

typealias IntField<A, B> = Field

extension IntField {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

The nominal type of IntField is of type Field. But, Field is not generic in this case. However, the typealias IntField is generic. This would result in the former returning false and the latter check returning true.
Swift Example for genericSignatureCheck
This check is kind the same as the isGeneric check as above. If that check fails, the function will return false and it will never get to this check. If it does pass the generic check, then both of them will have a GenericSignature and continue through the function.
Swift Example for size matches but element wise comparison fails
struct Field<A, B> {
  let tag: Int
  let value: Int
}

typealias IntField<Tag, Value> = Field<Tag, Int>

extension IntField {
  func adding(_ value: Int) -> Self {
    Field(tag: tag, value: self.value + value)
  }
}

The GenericSignature of both the nominal type and typealias type are both the same size. But, comparing the actual GenericParams closely, they are in fact different. One is <Tag, Value> and the other is <A, B>.
These are the params being compared below and they are different.
Swift Example for comparing underlying type with self interface type

The nominal type of IntField is of type Field. But, Field is not generic in this case. However, the typealias IntField is generic. This would result in the former returning false and the latter check returning true.

This is not true. nominal->isGeneric() != typealias->isGeneric() will evaluate to true with this example, not false.

If it does pass the generic check, then both of them will have a GenericSignature and continue through the function.

This is also not true. nominal->isGeneric() != typealias->isGeneric() being false does not imply that both have a generic signature.

The GenericSignature of both the nominal type and typealias type are both the same size. But, comparing the actual GenericParams closely, they are in fact different. One is <Tag, Value> and the other is <A, B>.

Are you sure they are different? Then how come struct S<U> {}; typealias Alias<T> = S<T> is a pass-through type alias? Have you verified that the equality check actually evaluates to false?

Gonna be honest, I can't think of an example that gets to this final check and returns true.

Let’s get back to this one once we have a clear understanding of the rest.

This is not true. nominal->isGeneric() != typealias->isGeneric() will evaluate to true with this example, not false.

I worded this thought incorrectly.  I was speaking about the two checks made and what THOSE evalutate to. nominal->isGeneric() evaluates to false and typealias->isGeneric() evaluates to true. Because they are not equal to each other, the statement in the if is executed and false is returned.

This is also not true. nominal->isGeneric() != typealias->isGeneric() being false does not imply that both have a generic signature.

I can see now with the example, how one of them can have a generic signature and the other can't have one either.
if (static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig)) checks to make sure both have a generic signature or none of them do.

Are you sure they are different? Then how come struct S {}; typealias Alias = S is a pass-through type alias? Have you verified that the equality check actually evaluates to false?

Completely realized I posted an example of it passing. Even after taking some time thinking about it, I can't think of an example where the sizes are the same but they don't pass.

I worded this thought incorrectly.  I was speaking about the two checks made and what THOSE evalutate to. nominal->isGeneric() evaluates to false and typealias->isGeneric() evaluates to true. Because they are not equal to each other, the statement in the if is executed and false is returned.

Ah, I wasn’t clear enough. What I meant was a Swift example where nominal->isGeneric() != typealias->isGeneric() is false and static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) is true.

I can't think of an example where both nominal and typealias are generic BUT the one has a genericSignature and the other does not.
If they pass the first check, then we know that both are either generic or both are not generic. Now with the check for the genericSignature, we know that both will either have one or both will not have one.

I can't think of an example where both nominal and typealias are generic BUT the one has a genericSignature and the other does not.

If by generic you mean it has a generic parameter list, then indeed there is no such valid example. Hint: Calling isGeneric() is asking whether the declaration has a generic parameter list. Inner below doesn’t have a generic parameter list. What is its generic signature?
struct Outer<X> {
  struct Inner {}
}

Are the genericParams being built based off the genericSignature? I read about it somewhere in here

No, a generic parameter list is either parsed from source or derived from the generic parameter list of an associated declaration. Protocols are an exception: the generic parameter list of a protocol is derived from the protocol itself and has a fixed format — <Self: TheProtocol>.

What is its generic signature?

I believe it is <X>

I believe it is <X>

So, does this light a bulb in regards to a Swift example?

So, does this light a bulb in regards to a Swift example?

The example you showed above with a struct defined in generic struct, just made me see that a genericSignature always exists as long as a genericParamlist exists.
The example below does not pass the isGeneric check because Inner does not have a genericParamList, thus it does not have a genericSignature. The typealias Alias does have a genericParamList and the genericSignature is <T>. BUT, because nominal->isGeneric() != typealias->isGeneric() evaluates to true , the function just returns false.
TLDR, I still don't see how  nominal->isGeneric() != typealias->isGeneric() can be false and static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) can be true at the same time with any of these examples.

struct S<X> {
    struct Inner {};
};

typealias Alias<T> = S<T>.Inner

extension Alias {};

Sorry for the delay.

TLDR, I still don't see how  nominal->isGeneric() != typealias->isGeneric() can be false and static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) can be true at the same time with any of these examples.

That may be because the following two propositions contradict each other. Which one is right?

Inner does not have a genericParamList, thus it does not have a genericSignature.

Inner below doesn’t have a generic parameter list. What is its generic signature?

I believe it is <X>

Which one is right?

Inner does not have a genericParamList but it has a genericSignature of <X>.

That may be because the following two propositions contradict each other.

I think that the typealias always needs to be generic in all the examples, because that is the only way to get into the check for a pass through type alias.
That is why I don't see any other way to get past the isGeneric check without both the nominal and typealias being defined as generic.
struct S<X> {
    struct Inner {};
};

typealias Alias<T> = S<T>.Inner

extension Alias {};

In theory, the example above will cause both of the lines below to evaluate to true. But we never get to the second statement check because the check for pass through type alias exits after the isGeneric check.
nominal->isGeneric() != typealias->isGeneric()
static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig)

I think that the typealias always needs to be generic in all the examples, because that is the only way to get into the check for a pass through type alias.
That is why I don't see any other way to get past the isGeneric check without both the nominal and typealias being defined as generic.

Ah, sorry, I ought to have been more clear. The goal is just to come up with an example of a type alias that points to a nominal type declaration where these conditions evaluate to false and true respectively, not one that necessarily reaches both if statements in that function. We’re not touching pass-through type aliases yet.

In theory, the example above will cause both of the lines below to evaluate to true.

Why would static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) evaluate to true?

Why would static_cast(nominalSig) != static_cast(typealiasSig) evaluate to true?

It would not evaluate to true because nominalSig has a GenericSignature of X and typeAlias has a GenericSignature of T. It exists for both so the cast succeeds and they are both true thus the whole if evaluates to false.

Alright. You’ve argued that static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) will never be true if both are generic as in have a generic parameter list, which is true: having generic parameters means having a generic signature. But it can be true in the remaining case when nominal->isGeneric() != typealias->isGeneric() is false: if neither has a generic parameter list. Never mind isPassThroughTypealias, we’re talking about these predicates in isolation.

having generic parameters means having a generic signature

This makes sense to me.

But it can be true in the remaining case when nominal->isGeneric() != typealias->isGeneric() is false: if neither has a generic parameter list.

I see how if neither have a generic param list then they both are not generic, thus the check above evaluates to false. But would that make static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) evaluate to false as well?

But would that make static_cast<bool>(nominalSig) != static_cast<bool>(typealiasSig) evaluate to false as well?

It depends. As we found out earlier, a nominal type declaration without a generic parameter list is not necessarily bereft of a generic signature.

I am going to take a pause on this. If anyone else comes along and wants to work on this please unassign me and give it to them.

I would like to work on this if you don't mind. @saehejkang  @AnthonyLatsis
I was able to reproduce this issue and see the signature with the -debug-generic-signatures flag.
I commented the isPassThroughTypealias in order to get rid of the fall back Field:
https://github.com/apple/swift/pull/73169/commits/7025a0d231b2b47987c691afdff52f721071d2ee
Why is the check isPassThroughTypealias check needed here after all? After commenting the complete "Hack to allow extending a generic typealias", extending the generic typealias throws an error in the code as expected.
I believe when the hack is resolved to a reasonable check, we can also fix this issue with ease.
In order to tackle this better I am required to debug the code using LLDB. I have not yet figured out how to run my example swift file and start the LLDB. If you could refer me to any tuturial, would be appreciated.
This is how I ran my swift file:
../withDebugSwift/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/bin/swift-frontend -debug-generic-signa
tures issue.swift

Investigating further into the specialize.swift test, I figured there is the where clause.
Here is an example code where I explain the the compiler error due to my code changes:
https://pastebin.com/Py5bMUV5
The where clause sets which of the two arguments is to be inferred. I am wondering if this where clause resolution is made by the type through alias. I would like to extract/split the type through alias function in order to keep the where clause functionality working while also fixing this bug.
Am I still on track?