Tidy up some inline asm and add compiler fences where appropriate

This PR updates the inline asm:

Use compiler-assigned registers instead of specifying r0/r1/r2
Write multi-line asm as multiple string literals, with normal Rust comments outside the strings
Add ISB after writing to CONTROL as per ARM architectural requirements (see eg app note 321). As far as I can see no other requirements from AN321 apply here.
Add compiler fences around enabling and disabling interrupts

No runtime barriers are required, but the compiler fences ensure the compiler won't reorder instructions around these operations, which would break critical section soundness.

Add compiler fences around DMB, DSB, ISB to align compiler behaviour with the barrier runtime behaviour.
Add compiler fences after the cache enable routines and writing to CONTROL since those routines include an ISB instruction.

Open to feedback on whether more or fewer fences are necessary; I've thought about these a bit but I think it's a tricky subject. I think in general the FFI-esque treatment of the new asm! block probably does most of what we need, but I'm told LLVM may still reorder instructions around FFI calls, which we really don't want to happen here.

r? @therealprof
(rust_highfive has picked a reviewer for you, use r? to override)

Nice one. Looks good on first glance but I want to give people some time to look it over.

Hm, superweird that some archives are shrinking massively in size. These functions are always compiled with optimisation? Otherwise the compiler_fences are going to be really bad...

I don't understand the GitHub percentages (I think it's "number of lines" somehow?); the files are all around 14k-25kB; the changes are all less than 1kB. I don't understand why they're changing this much still though, the ones I inspected manually had some different debug strings in the ELF but otherwise no obvious clues.

The xtask build generates the staticlib and LTO libs with optimisations enabled. If you're using the inline-asm feature you directly use this code, in which case optimisation depends on your own build.

The xtask build generates the staticlib and LTO libs with optimisations enabled. If you're using the inline-asm feature you directly use this code, in which case optimisation depends on your own build.

I wonder whether that's the right play here or whether we should place the fences ourselves, rather than using compiler_fence. It doesn't sound great to get additional panicking paths in dev mode by using those primitives.

Without the fences the functions are potentially unsound but they are marked unsafe, so we could just document the fence requirement in each relevant method's safety requirements. It's a bit of a chore though and it means users must put those fences in themselves, where they're subject to the exact same issues. At least having them here means that for most users not using inline-asm, they get the optimised build of these methods even when they're in debug mode themselves.
Having said that, it's not clear to me how the fence here makes a difference to a caller of either the staticlib or LTO lib, which presumably only sees the FFI call, which also suggests to me that LLVM really shouldn't dare reorder instructions around an FFI call.

Oh, and as usual, this is missing a CHANGELOG entry. ;)

There's no CHANGELOG entry for the new asm stuff at all, and it doesn't change the user-facing API (in other words it's an implementation detail). I've added a very brief description to the CHANGELOG about it.

There's no CHANGELOG entry for the new asm stuff at all,

I agree, but that doesn't make it any better.

and it doesn't change the user-facing API (in other words it's an implementation detail).

Not quite. It can now be linked with via the LTO linker plugin.

Not quite. It can now be linked with via the LTO linker plugin.

Good point, I've added a specific note about that to the CHANGELOG too.

Hm, weird. Why is it complaining about the blobs not being up-to-date?
bors try

Because 5d5e15181f4d4eeacb9876a514f7359527f9b361 didn't update the blobs

bors r=therealprof


Multidownloader class not working. Here is the hotfix https://github.com/akurtovic/InstaRaider/pull/57

Traceback (most recent call last):
File "instaRaider.py", line 484, in
main()
File "instaRaider.py", line 479, in main
raider.download_photos()
File "instaRaider.py", line 254, in download_photos
downloader = MultiDownloader(photo_url, self.headers, photo_name)
File "instaRaider.py", line 53, in init
super().init()
TypeError: super() takes at least 1 argument (0 given)
This version 63505fb2fdbb459a7e468fa00360aafd8aa71a6f is working though.

I only encountered this issue with python 2. Upgrading to 3 resolved it for me.

I think this issue is caused by python 3.

I've applied the fix. https://github.com/akurtovic/InstaRaider/pull/57

It works on python 2.7.6 now, should I try this fix on python 3 too?

It works on python 3!

I've created a pull request  here #58.


Update installing-device-metadata-packages-through-an-application.md

Learn Build status updates of commit 8835588:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

windows-driver-docs-pr/install/installing-device-metadata-packages-through-an-application.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Thanks Dimitriy!


Update Jenkinsfile

Added s390x (z Systems) architecture.

[ ] All tests passed. If this feature is not already covered by the tests, I added new tests.
[ ] This pull request is on the dev branch.
[ ] I used gofmt for formatting the code before submitting the pull request.

recheckcla


[TACHYON-1354] Remove "public" keywords from DataBuffer interface

https://tachyon.atlassian.net/browse/TACHYON-1354
All "public" keywords of methods in DataBuffer interface have been removed

Can one of the admins verify this patch?

Jenkins, test this please.

Jenkins, ok to test.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/7767/
Test PASSed.

LGTM

+1 LGTM


WIP: add spoke cluster admission hook

/assign @pmorie

/assign @deads2k

solid start.  I'd like to see permissions and manifest versions clean before merge.

/lgtm
/approve


Child test behaviour when Parent before method is private

TestNG Version
6.11
First Case -  The BasicTest throws SkipException in his private before method.
User selects two tests for execution. First is the BasicTest, second is the ChildTest.
Second case - The BasicTest does not throw SkipException in his private before method.
User selects two tests for execution. First is the BasicTest, second is the ChildTest.

Expected behavior
First case expected behaviour:
The ChildTest should be executed, not skipped. As the BasicTest before method is private and his result should be ignored.
Second case expected behaviour:
Second parent test method, which is private, should not be executed for ChildTest. From my point of view, as far as parent private before method is ignored for a child test, parent private test method should be also ignored.
Actual behavior
First case actual behaviour:
The BasicTest starts running. It is skipped, as the SkipException is thrown in a before method. Then the ChildTest starts running, but it also is skipped.
Second case actual behaviour:
Test execution flow: Parent before method  -> parent tests -> child before method -> parent test methods. In the Child tests part Parent Before method is not executed as far as it's private.
Console output:
init
@Test - runTest1
init
@Test - runTest2
setup
@Test - runTest1
setup
@Test - runTest2

Is the issue reproductible on runner?

[ ] Shell
[x] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse
[x] IntelliJ
[ ] NetBeans

Test case sample
public class BasicTest {

    @BeforeMethod
    private void init(){
        System.out.println("init");
        throw new SkipException("Slip test");
    }

    @Test
    public void runTest1() {
        System.out.println("@Test - runTest1");
    }

    @Test
    private void runTest2() {
        System.out.println("@Test - runTest2");
    }
}
______________________________________________
public class ChildTest extends BasicTest{

    @BeforeMethod
    public void setup(){
        System.out.println("setup");
    }

}

It makes sense but TestNG never cares about the visibility (private or package) before.
To avoid regression, it could be an extra param to enable this behavior (and change its default value in a next major version, a day).
@cbeust WDYT?

@juherr - But I would like to understand a typical use case when a user would want to annotate a private method with a TestNG annotation ? When do you think someone would do this.
@yarafed - Can you please help clarify your use case ? If its a private method, then it doesn't make any sense for the method to be annotated with a TestNG annotation [ Yes TestNG is agnostic of the visibility is a different story and we can get to it ]. But I would like to understand why would you do that.

@krmahadevan You mean we should skip private methods?
Visibility could be a way to configure the behavior of tests inheritance, but I've no real use case in mind.

@juherr

You mean we should skip private methods?

I am not sure if we should be making that decision. Personally I feel that its the test writer's responsibility to annotate methods properly. Not sure if TestNG should make those decisions. Personally I don't see it making any sense for one to add a TestNG annotation on top of a private method. Its counter intuitive when you look at it from just Java's perspective.
That is why I feel that it doesn't make much of a sense to fix this issue.

@krmahadevan Yes, it is an option too. In fact, I'm just wondering what behavior is the most natural and if can improve it. BTW, the current behavior must be kept by default for a historical reason.

@juherr - One of the option would be to add an optional configuration to TestNG CLI and also to the DTD with a default value which adheres to the current behavior and which can be flipped ( for e.g., the parallel attribute which has its default value set to false ). But personally I feel its just a bit of over engineering by TestNG do do this.

@krmahadevan I understand your point of view :)

@juherr - I am of the opinion that we can close off this issue. WDYT ?

@yarafed It is possible to something but without a real use case, it is difficult for us to determine if we need to support it or not.
BTW, thanks for the idea and feel free to reply if you want to debate about it.


can't upgrade to --php7

getting errors on upgrading a site to php7 - it seems there is a connection issue of root@localhost to the mysql DB
sudo ee site update example.dev --php7 PHP7.0 is experimental feature and it may not work with all plugins of your site. You can disable it by passing --php7=off later. Do you wish to enable PHP now for example.dev? Type "y" to continue [n]:y Running pre-update checks, please wait... Backup location : /var/www/example.dev/backup/06Sep2017163519 Backing up database 		[Fail] Check logs for reason tail /var/log/ee/ee.log & Try Again!!!
Here are the log delails:
$ sudo tail /var/log/ee/ee.log 2017-09-06 16:35:32,140 (INFO) ee : Backup location : /var/www/example.dev/backup/06Sep2017163519 2017-09-06 16:35:32,140 (DEBUG) ee : Copying file, Source:/etc/nginx/sites-available/example.dev, Dest:/var/www/example.dev/backup/06Sep2017163519 2017-09-06 16:35:32,141 (INFO) ee : Backing up database 2017-09-06 16:35:32,141 (DEBUG) ee : Running command: mysqldump example_dev > /var/www/example.dev/backup/06Sep2017163519/example_dev.sql 2017-09-06 16:35:32,226 (DEBUG) ee : Command Output: , Command Error: mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: YES)" when trying to connectlease attach the output of following command when open a new support request.

[ ] lsb_release -a
[x] ee -v   EasyEngine v3.7.4
[x] ee info

NGINX (1.10.3):
user                             www-data
worker_processes                 auto
worker_connections               4096
keepalive_timeout                30
fastcgi_read_timeout             300
client_max_body_size             100m
allow                            <IP_ADDRESS>
PHP (5.6.31-4):
user
expose_php                       Off
memory_limit                     128M
post_max_size                    100M
upload_max_filesize              100M
max_execution_time               300
Information about www.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   off
listen                           <IP_ADDRESS>:9000
Information about debug.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   on
listen                           <IP_ADDRESS>:9001
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MySQL (10.1.26-MariaDB) on localhost:
port
wait_timeout
interactive_timeout
max_used_connections
datadir
socket
my.cnf [PATH]                    /etc/mysql/conf.d/my.cnf

[ ] wp --allow-root --info

Hello, it seems the mysql credentials available in /etc/mysql/conf.d/my.cnf are not correct.

Sorry for a delayed reply. I hope your issue is fixed by now.
If you are still facing the issue, please use http://community.rtcamp.com/c/easyengine for further support.
We are cleaning up issue tracker and closing this issue because we won't be able to contribute to this discussion further.


Endless search loop when using complex _filter parameter

Search requests fail when using a sufficiently complex _filter parameter.
The following request terminates successfully and returns data:

http://hapi.fhir.org/baseDstu3/Appointment?_filter=actor eq Patient/2616593 or actor eq Patient/2616593

If one more condition is added to the _filter parameter, the request is aborted after a short while:

http://hapi.fhir.org/baseDstu3/Appointment?_filter=actor eq Patient/2616593 or actor eq Patient/2616593 or actor eq Patient/2616593

The same behaviour is observed on my local HAPI FHIR fork (4.1.0-SNAPSHOT), except that the timeout is after 1 minute and happens at SearchCoordinatorSvcImpl.java#L228
I believe that the problem occurs when a search is not marked as FINISHED at SearchCoordinatorSvcImpl.java#L791, but is instead marked as PASSCMPLET which causes it to get restarted at SearchCoordinatorSvcImpl.java#L233.
This repeats in an endless loop until the search times out.
The reason that the search is not marked as FINISHED in this case is due to the many left outer join in the generated SQL query which causes the same resource to be found many times in the result set, which increases the skippedCount to above the current search prefetch threshold.
For some reason the search is restarted with the exact same parameters that results in the exact same outcome, and thus loops indefinately.
Environment (please complete the following information):

HAPI FHIR Version: 4.1.0-SNAPSHOT (both on http://hapi.fhir.org and a 1 month old local snapshot)
OS: [e.g. iOS]: Windows
Browser [e.g. chrome, safari]: Chrome

Additional context
Example of SQL query with many left outer joins:
select resourceta0_.RES_ID as col_0_0_
from HFJ_RESOURCE resourceta0_
         left outer join HFJ_RES_LINK myresource1_ on resourceta0_.RES_ID = myresource1_.SRC_RESOURCE_ID
         left outer join HFJ_RES_LINK myresource2_ on resourceta0_.RES_ID = myresource2_.SRC_RESOURCE_ID
         left outer join HFJ_RES_LINK myresource3_ on resourceta0_.RES_ID = myresource3_.SRC_RESOURCE_ID
         left outer join HFJ_RES_LINK myresource4_ on resourceta0_.RES_ID = myresource4_.SRC_RESOURCE_ID
where (myresource1_.SRC_PATH in (?)) and (myresource1_.TARGET_RESOURCE_ID in (?))
   or (myresource2_.SRC_PATH in (?)) and (myresource2_.TARGET_RESOURCE_ID in (?))
   or (myresource3_.SRC_PATH in (?)) and (myresource3_.TARGET_RESOURCE_ID in (?))
   or (myresource4_.SRC_PATH in (?)) and (myresource4_.TARGET_RESOURCE_ID in (?))

@jamesagnew If you could find time to have a look at this we would be very grateful

@ttntrifork this seems fixed with release 5.0.0

Yes, can no longer reproduce


GetCharAt as Int?

I'm working through the Custom Syntax Highlighting wiki, translating it into vb.net, which is my preferred language. There is the line - var c = (char)scintilla.GetCharAt(startPos); which should translate, I think, to vb.net as Dim c = CChar(scintilla.GetCharAt(startPos)). However, the signature of the method is int, not char, which is what vb expects. Is there something I'm missing in how C# handles this?

I'm the last guy you want to ask about VB.NET, however, some quick Googling confirms your issue and the CChar function only accepts string and char input, not integer. A similar question on SO suggests using the Chr or ChrW functions. http://stackoverflow.com/a/4857882/2073621

Using this lib in VB.NET too, I can confirm that ChrW should indeed give you what you need: Dim chrAt As Char = ChrW(GetCharAt(i))
It surprises me that C# can just use plain char actually

Thanks, it didn't even click with me that what was being returned was the character code.

Wow, when I had this issue a long time ago, I simply created a C# library to interface between the two. Guess I can remove one dependency!


tinyxml2.cpp(675,25): error C2059:  syntax error: 'constant'

The XMLUtil::ToBool function does not compile on MSVC compilers (because TRUE and FALSE are already defined as 0 / 1.
So, fix the names to something like this:
bool XMLUtil::ToBool(const char * str, bool * value)
{
    int ival = 0;
    if (ToInt(str, &ival))
    {
        *value = (ival == 0) ? false : true;
        return true;
    }
    static const char * TRUE_VALS[]  = {"true", "True", "TRUE", 0};
    static const char * FALSE_VALS[] = {"false", "False", "FALSE", 0};

    for (int i = 0; TRUE_VALS[i]; ++i)
    {
        if (StringEqual(str, TRUE_VALS[i]))
        {
            *value = true;
            return true;
        }
    }
    for (int i = 0; FALSE_VALS[i]; ++i)
    {
        if (StringEqual(str, FALSE_VALS[i]))
        {
            *value = false;
            return true;
        }
    }
    return false;
}

Bug was introduced in this commit: https://github.com/leethomason/tinyxml2/commit/7fd646a8a2a4a9501c0797c207493f414644b51c

What about simply #undef them before preprocessor gets there?

Yeah, that could work if nothing else in your project uses the MS macros. And break spectacularly if something does.
Easier to just fix the names. Or just do a case-insensitive compare of true / false rather than looping through an array.

Oh, yes. But what scope of undef do you actually propose? I think you didn't understand me.
It's only preprocessor.

"P.S.2 what names will you propose? I will make PR when you decide, because I am not yet far familiar with naming conventions here. :^)"

I already proposed a fix:

So, fix the names to something like this:
...
...
   static const char * TRUE_VALS[]  = {"true", "True", "TRUE", 0};
   static const char * FALSE_VALS[] = {"false", "False", "FALSE", 0};
...

@wyattoday as this change is already in master, I would like to ask you if you could close that ticket?

Sure, we use pugixml for a variety of reasons so we no longer kept track of this project.


Handling duplicate entries in the VP Index

Raising this issue on behalf of the VP Portal development team:

The list of resources in the VP Index have duplicate entries, and there is no current tool to flag them.
The portal retrieves the information from the sparql endpoint (https://graphdb.ejprd.semlab-leiden.nl/repositories/vp-index )
See image for example

This is not related to FDP configuration.
Please re-post as an issue to the FAIR Data Point project:  https://github.com/FAIRDataTeam/FAIRDataPoint


HTTPError with StatusBadRequest return a response with 500 Internal Error

Hello,
In the API layer of my app, Every call can return HTTPError with various Status.
For exemple in case of a no found objet for a GET call I return :
return routing.NewHTTPError(http.StatusNotFound, err.Error())
The response head will be correctly set.
But when I use the http.StatusBadRequest in the exact same way (for example a POST with invalid validation):
return routing.NewHTTPError(http.StatusBadRequest)
The response header is set to 500 Internal Server Error instead of 400 Bad request.
Thanks,
Regards,
Arthur

I'm actually getting 500 Internal Server Error for every routing.NewHTTPError  I return. Did you figure out what was causing this?


get_global_mouse_position() reports previous position when there should be no position

Godot version
3.5.1 stable
System information
HTML5
Issue description
I use get_global_mouse_position() which works fine when using a mouse, cause it has a position all the time. When playing a html5 build on a touch device though, there should be no position when the screen is not touched I would think. Instead it gives me the position of the last touch. It would be nice if the function would return null instead.
Or is there another way to handle this? I need to do it in the process loop, so I need some global way to know if the screen is touched, and the get_global_mouse_position() can be trusted.
Steps to reproduce
if Rect2(Vector2.ZERO, rect_size).has_point(get_global_transform().affine_inverse().xform(get_global_mouse_position())):
            mouseOver = true
        else:
            mouseOver = false

Minimal reproduction project
if Rect2(Vector2.ZERO, button.rect_size).has_point(button.get_global_transform().affine_inverse().xform(get_global_mouse_position())):
            mouseOver = true
        else:
            mouseOver = false

Thanks, that does solve my problem. I track the position from InputEventScreenDrag as well, to keep it updated.


test: get schema type from folder example

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[x] N
[ ] Y

test: get schema type from folder example

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 32.363%

Totals

Change from base Build<PHONE_NUMBER>7:
0.0%

Covered Lines:
5612

Relevant Lines:
17341

💛  - Coveralls


[FR]: Provide a graph of the module structure

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the problem
Especially for someone newer to multi-modular apps, looking at all the modules on the top level of the project can be daunting.
Describe the solution
It would be awesome if an always up-to-date graph of how the modules depend on each other could be shown in the README of this repository.
Additional context
I was recently reading the article "Jetpack Compose — Before and after" from Chris Banes and in that post, the section "The app" with the figure named "Graph of Tivi’s module structure. Generated using Jake Wharton’s handy Gradle task" is exactly what I am talking about. I hope you can refer to it for some inspiration.
This would give a visualization of how everything is structured in an instant without having to look at the gradle files of all modules.
Code of Conduct

[X] I agree to follow this project's Code of Conduct

@mmoczkowski is this complete?


Renaming linked file results in error dialog

If you have a linked file in an F# project, you can attempt to rename the file in solution explorer:

However you get an error dialog when you try it:

FWIW C# prohibits rename on linked files entirely.  This seems reasonable, as it's not clear what "renaming" even means with respect to linked files (change the name of the link? or the file itself?).  So IMO fix would be to just mark this field a read-only.

Linked file are used more in f# than c#. We can help:

rename the physical file if file name = label
If different we rename the link label only

I know is more work but not too much.
But maybe two different behavior are too confusing.
Another approach, easier:
Rename label and show a dialog asking to rename the physical file too

I think disabling the broken rename scenario is the cheap and correct thing to do for now (i.e. for VS 2015 if someone sends a PR).
Personally I don't see this particular issue as worth spending time building out as a feature... It opens up a lot of corner cases and behaviors that need to be tested and supported for all eternity, for fairly small value.  There are more useful and impactful ways to contribute to the VS tools :-)

readonly is also the current behaviour (F2 or double click) for linked items


First game of Arena always detected as Ranked

As the title says.
This wouldn't be so bad if there was a way to easily change it from "ranked" to "arena", but right now the only option to fix this for me is to write down the game's info, delete it and then create a new game in the "continue arena run". This however doesn't let me input the opponent's name, round numbers and time, so that info  is lost.
Running Windows 8 and v0.22.3

For now you can change the information on popup window after match I guess.  I'm working on your problem right now, hope it can be solved soon.

Thanks for the answer :)
I tried setting the match  popup to "after every match", but it is completely ignoring that setting and only showing it when I am missing data (which was the setting by default).

Sorry, I realized that problem, I fixed that function, it will be enabled at next release I hope. Your problem seems never happened before, can you please send me your log file?


Feature/remove deprecated api

Coverage increased (+1.16%) to 80.37% when pulling df78c5f64024c0fd08821b7699b09d90003e4605 on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.

Coverage increased (+1.61%) to 80.82% when pulling 11615f72e3f4cb596661926d9dc079efeb500171 on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.

Coverage increased (+0.5%) to 79.72% when pulling 3b1bfeea4f347abecaf9b8f1c910ad0c6e56f6be on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.

Coverage increased (+0.2%) to 79.41% when pulling 8ac553a0ee4a6040f270857007aa54e608653ada on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.

Coverage decreased (-0.03%) to 79.18% when pulling 2684d0ceee925512b5226bc812fefc9a07671f2e on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.

Coverage increased (+1.67%) to 80.88% when pulling fb136d9d983973ee23c5183c43a90dd835c68002 on feature/remove-deprecated-api into db006c7e25ef5f44a41dafa9abac54a78ca28990 on develop.


D3D12: Remove dead experimental struct from d3d12.h

The struct D3D12_RESOURCE_STATE_BARRIER was an API thought experiment that was abandoned. Unfortunately, it was left in the header in error.
As this relates to a feature that is currently preview-only, it is safe to remove.

You could also remove it from the .idl here, but either way we'll prune it with the next push.


[LOTP] Add trivy

Description of the LOTP tool
trivy is SCA tool that can be configured we a config file.
Configuration files
trivy.yaml

There is a template option which could control the reporting and allow arbitrary Go text template which has a call function.

This is not confirmed.  Needs some research to validate behavior and impact.


DKN improve

Description

Related Issues

Checklist:

[ ] I have followed the contribution guidelines and code style for this project.
[ ] I have added tests covering my contributions.
[ ] I have updated the documentation accordingly.
[ ] This PR is being made to staging branch and not to main branch.

Codecov Report

Merging #1722 (f42c71a) into staging (3b38062) will increase coverage by 23.20%.
The diff coverage is n/a.

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

@@             Coverage Diff              @@
##           staging    #1722       +/-   ##
============================================
+ Coverage     0.00%   23.20%   +23.20%
============================================
  Files           87       88        +1
  Lines         9132     9142       +10
============================================
+ Hits             0     2121     +2121
- Misses           0     7021     +7021

Flag
Coverage Δ

nightly
?

pr-gate
23.20% <ø> (?)

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

Impacted Files
Coverage Δ

recommenders/datasets/mind.py
0.00% <0.00%> (ø)

recommenders/datasets/criteo.py
56.60% <0.00%> (+56.60%)
:arrow_up:

recommenders/datasets/movielens.py
66.37% <0.00%> (+66.37%)
:arrow_up:

recommenders/datasets/download_utils.py
90.00% <0.00%> (+90.00%)
:arrow_up:

recommenders/models/newsrec/io/mind_iterator.py
0.00% <0.00%> (ø)

recommenders/models/newsrec/models/base_model.py
0.00% <0.00%> (ø)

recommenders/__init__.py
100.00% <0.00%> (ø)

Continue to review full report at Codecov.

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


Establish Convention/Best-Practices for Constance & Plugin Settings

Proposed Changes
Define things like "should be all uppercase in top-level keys" and "all lowercase in nested dictionary keys" etc. (That is not a suggestion as to what the convention should be, but just an example as to what it could be).

Justification

Self-consistency for how setting can be provided and accessed
Address things like this https://github.com/nautobot/nautobot/pull/4470 and the comments within.

I would ask to re-consider, we can only do this per breaking change and the current version is:

Not usable for any existing plugins without being non-backwards compatible
Would not follow our unwritten, but clearly defined pattern for lower case on settings.

I think it makes sense to either:

Remove the get_app_settings_or_config function, as it is not solving the 80% use case, and will cause confusion. This would allow us to finish this issue before making the change.
Commit #4470 as at least following the standards that have been implied, though not reached.

It does not make sense to me to de-facto create another undocumented standard by leaving in get_app_settings_or_config as is.

Agreed that this should be discussed. When I implemented, I put it in with all UPPERCASE which was what was in the example_plugin and all Nautobot Config Items as well. But looking at the plugin I was planning on using this in, I see all the config is lowercase.

That said, I might be missing something, but I don't believe there is anything forcing the get_app_settings_or_config to use all UPPERCASE.


TW: Add test data

Add relevant test data for Taiwan(TW)

The standardized name may not contain dashes. Please change "MEI-HUA" to "MEI<HUA" and make sure that the issuers also follow that rule.
We suggest to add an automated schema verification to the issuing software.

Test data updated. Now the standardized name is applied to ICAO 9303 rule.

The python tests are passing but we're getting an error in the reference implementation on android for the TEST DCC.
(cryptographic signature invalid)
Need to analyze this, sorry for the delay

I did a check with verifier Android and the test DCC is validated correctly as limited validation.

Thanks for all. Happy Christmas!


require is not defined error when using cjs dependency in page server files

Reproduction Steps

Ensure using vite-plugin-ssr@version 0.1.0-beta.21 with<EMAIL_ADDRESS>import any cjs dependency using require statements into a *.page.server.js file. E.g.:

// my-page.page.server.js
import { foo } from './bar';

export async function addContextProps() {}
export function setPageProps() {}

// bar.js
const baz = require('./baz')
exports.foo = baz

// baz.js
module.exports = 'foo';

Run dev server and visit page
Observe that Vite throws an error:

[vite] Error when evaluating SSR module /pages/bar.js:
  ReferenceError: require is not defined

Expected Results:
Commonjs dependencies should be transpiled to ES per Vite documentation and supported without throwing errors.
Notes:

This may be entirely a Vite bug.
This appears to be a regression since<EMAIL_ADDRESS>and/or<EMAIL_ADDRESS>

I can confirm updating vite to 2.1.3 while leaving vite-plugin-ssr at 0.1.0-beta.19 also yields this error

See https://github.com/vitejs/vite/issues/2579.
Is using ES modules instead an option for you?

The exports is not defined error seems different. I was getting that one too and was able to work around by placing a exports = module.exports statement in my application. I was also getting that error with vite 2.1.2, which the author of the bug report was also using. This require is not defined error is more elusive and seems specific to vite 2.1.3. It doesn't have any workaround I can find, so for now I've reverted. I also can't find other people complaining about this on the vite issues, which is why I wondered if it might have something to do with the way page files are being loaded? I don't know if there is special handling in place that may have suffered from a Vite change in the last patch

Is using ES modules instead an option for you?

I mean, for this dependency, maybe, since it's one I control. But there are all kind of CJS packages on the npm registry that seem to be rendered unusable by this. If you're fairly confident it's not due to a problem with your plugin I can chase down a minimal repro to flag in the vite repo

packages on the npm registry that seem to be rendered unusable by this.

Not necessarily: Vite treats user-land code differently than node_modules code.

confident it's not due to a problem with your plugin

Yes I am; syntatic stuff is handled by Vite and vite-plugin-ssr doesn't do anything here.

chase down a minimal repro to flag in the vite repo

That would be great. You can start off https://github.com/vitejs/vite/tree/main/packages/playground/ssr-vue.

seems specific to vite 2.1.3

In case you want to dig deeper: https://github.com/vitejs/vite/compare/v2.1.2...v2.1.3.

As far as I can tell, this is resolved in<EMAIL_ADDRESS>


Add column with language information

It would be very valuable, if the table included information about language of the model/dataset.
While obviously many people are interested in English, some of the models support/were trained on languages different than English.

I get your point but I think that specifying all languages that the model is trained on is infeasible as:

table would be a mess
large text corpara can have a ton of different languages in it, without even realizing it

Yeah I agreee with you as well. It would be mess if you add more in there.

Hmm, I understand you point, but in that case, we could just put "multilingual" as the value for the column, without specifying all the languages. And usually there is a group of languages that dominates the dataset (say 90% is English or Python). Having that information still would be beneficial I suppose.

Ok, thanks for the clarification.
On Fri, 23 Jun 2023 at 1:14 am, Aleksander Smywiński-Pohl <
@.***> wrote:

Hmm, I understand you point, but in that case, we could just put
"multilingual" as the value for the column, without specifying all the
languages. And usually there is a group of languages that dominates the
dataset (say 90% is English or Python). Having that information still would
be beneficial I suppose.
—
Reply to this email directly, view it on GitHub
https://github.com/eugeneyan/open-llms/issues/43#issuecomment-1602819461,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BAFXXH4NRCI7BLOQB5T57N3XMROLRANCNFSM6AAAAAAYWW24SE
.
You are receiving this because you commented.Message ID:
@.***>


Inner Join and Dynamic Query on multiple tables

I want to do an inner join on four tables & be able to query on any of the 4 tables columns. For example, how can I do the following query in knex:
select *
from aps, switchs, wlcs, venues
where aps.switch_id = switchs.id
and aps.wlc_id = wlcs.id
and aps.venue_name = venues.name
and wlcs.name = 'w1'
and venues.name = 'v1'
and switchs.ip = '<IP_ADDRESS>';

I used the object syntax of .where() to store my where clauses in an object Qu.
Qu { 'wlcs.name': 'w1',
  'venues.name': 'v1',
  'switchs.ip': '<IP_ADDRESS>',
  'aps.wlc_id': 'wlcs.id',
  'aps.switch_id': 'switchs.id',
  'aps.venue_name': 'venues.name' }

I then ran the following query:
  Knex('aps')
        .select()
        .innerJoin('wlcs','aps.wlc_id','=','wlc.id')
        .innerJoin('switchs','aps.switch_id','=','switch.id')
        .innerJoin('venues','aps.venue_name','=','venue.name')
        .where(Qu)
        .debug(true)
        .then(function (resultCol){
             console.log("resultCol",resultCol);
        })
        .catch(function (err){
            console.log("Err",err);
        });

It gives me a

missing FROM-clause entry for table "wlc"

error.
What is the right way to do this?

You are joining wlsc, but you are referring it wlc.id instead of wlcs.id. Also there are some errors in your code something like this might work:
https://runkit.com/58d3c5b9ae69180014e717c3/58f1f724dd2700001236e4e4


Add tooltip to resource not needed warning

Move the warning sign next to the resource name and status. Add a tooltip when hovering over the warning icon that displays “This resource is not used by the module anymore and can be deleted.”
To get the warning sign, you can use the demo template:

deploy it with the service toggled on
Edit the module and toggle the service off
now you will have the warning sign on the service

Can I work

Move the warning sign next to the resource name and status.

and do i have to remove warning signs from here?

Hey @ArnavK-09, you currently already have two PRs open. Please finish those before starting new issues.

can you review em

@quest-bot embark

Hey @KaradzaJuraj,
I’m working on moving the warning sign next to the resource name and status, with a tooltip that displays “This resource is not used by the module anymore and can be deleted.” I’d appreciate a few clarifications to ensure it’s implemented accurately:

Positioning of Warning Sign: Could you specify the exact placement of the warning icon relative to the resource name and status? For example, should it appear on the left, right, or directly adjacent to the status text?

Tooltip Trigger: Should the tooltip appear when hovering over just the warning icon, or would you like it to also trigger when hovering over the resource name and status?

Warning Sign Activation: After deploying the demo template with the service toggled on and then toggling it off, should the warning icon only appear when the module recognizes that the resource is unused, or immediately upon toggling off?

Styling Preferences: Are there any specific styles or design elements for the warning icon that need to match other UI components, or should it follow the default warning icon style?

Thank you for the additional guidance!

Hey @AkashJana18

To the right of the name and status
Trigger only when hovering over the warning sign
When the module recognizes that the resource is unused (but shouldn't matter in this issue)
Use the same warning icon that is used now

I hope this clears things up; if you have any other questions - reach out!

@quest-bot embark


Add Support UMD

Thanks for submitting this PR @PhantomXCool. Can you describe the benefit of structuring the project this way?

Simplemde failed during initialization in projects where amd (http://requirejs.org/docs/whyamd.html) is responsive for js downloading. I have added UMD support (http://davidbcalhoun.com/2014/what-is-amd-commonjs-and-umd/) to download js library everywhere it is necessary (with amd modules and without it). Also I have clearly marked the dependence for this module in package.json.
I have delegate Browserify (http://browserify.org/) to compile UMD libraries.
PS. I recommend to upload the compiled library simplemde in bower (http://bower.io/) for more convenient using on client side in browser.

Questions/concerns:

Regarding .gitignore:

The /dist/ folder cannot be ignored, jsDelivr uses it for the CDN source
What are the *.iml, *.ipr, *.iws files?

The /dist/ folder probably doesn't need the debug file or the non-minified file
CodeMirror only releases updates every month or so. Instead of adding them as a NPM dependency, updates can occur much more frequently if gulp.js continues to download the latest source files as previously set up.

Regarding .gitignore:
In some projects, for example, in angular, there is a division on the source files and compiled ones. But it is also possible to leave the /dist/ folder and to commit it.
This file type is used in IDE Idea that I use for developing.
Debug file contains source map, but non-minified file contains only the source js.
You may use dependency on github example "codemirror": "codemirror/CodeMirror"

Can you make the following changes:

Do not ignore the /dist/ folder.
Do not ignore your IDE specific files. It's better to just untrack them locally since they don't relate to SimpleMDE specifically.
Place the source map file in a new /debug/ folder, along with the non-minified JS file. Also add the non-minified CSS file. Don't add these to the /dist/ folder.
Require tablist.js. This is a custom file created for SimpleMDE.
Incorporate spell checking. This feature cannot be removed.
Find a way to use the latest commits from CodeMirror's GitHub repository. Even changing it to "codemirror": "codemirror/CodeMirror" only uses the latest release on GitHub. Releases only happen once a month for CodeMirror, while commits to master occur every few days.

Many projects in the ".gitignore" has .idea, *.iml. (Example CodeMirror, angular)

A change it to codemirror": "codemirror/CodeMirror" use the latest commits from CodeMirror's GitHub repository

Almost everything looks good. Before I merge this, can you move the non-minified compiled JS file to the /debug/ directory from the /dist/ directory?

Also, the CSS files need to be compiled in this order:

CodeMirror
SimpleMDE
Spell Checker

And the JS files too, they need to be compiled in this order:
"./src/js/codemirror/codemirror.js",
"./src/js/codemirror/continuelist.js",
"./src/js/codemirror/tablist.js",
"./src/js/codemirror/fullscreen.js",
"./src/js/codemirror/markdown.js",
"./src/js/codemirror/overlay.js",
"./src/js/codemirror/gfm.js",
"./src/js/codemirror/xml.js",
"./src/js/typo.js",
"./src/js/spell-checker.js",
"./src/js/marked.js",
"./src/js/simplemde.js"

I fix it

Looks great! I think that's everything.


add hive-backend role

This role/ServiceAccount can be used while investigating issues by allowing viewing ClusterDeployments.
Also, the granting of access to Secrets allows access to the kubeconfig's for the managed clusters for investigating issues with the managed clusters.1
This is related to the request found in https://issues.redhat.com/browse/CO-1181

/assign @dgoodwin
/cc @akhil-rane

/hold
Who or what will have access to hive-backend? I know the ability to read secrets is restricted for compliance reasons.
Need to make sure this is ok with @jaybeeunix @jewzaam @wanghaoran1988 @jmelis

Via Jira is sounds like they no longer want this. :(
Sorry @joelddiaz. Closing for now.
/close


:bar_chart: igh: Upload homelessness data from the Institute of Global Homelessness

Main issue https://github.com/owid/owid-issues/issues/791

Within the IGH data we will focus in homeless definitions mostly and not the data itself, given that any cross-country comparison is straightforward.
I have modified the cookie cutter file in Wizard-garden, to add recently included metadata parameters. I also sorted them according to more typical use (variable.display).
Additionally, I created a separate chartbook dag file to not mix it with poverty_inequality.

Thank you, @spoonerf!


Need to migrate the three.js sample to ES6 Module

The old JavaScript style is deprecated from r117 of three.js, so it is necessary to change it to the ES6 module style.
https://threejs.org/docs/index.html#manual/en/introduction/Import-via-modules

https://github.com/cx20/webgl-test/pull/68


1.3.2 tarball contains build-time residue

t/.deps are files created at compile-time iff certain libtool options are enabled, and contain data highly specific to the local build machine. Therefore, they should not be included in a source release. I'm not sure if there is a 'make distclean' or similar target that has a bug, or some manual intervention was not documented or performed correctly, but libmaxminddb-1.3.2.tar.gz has t/.deps/*.Po that point to linux headers in /usr/include, which is definitely not correct for my darwin (OS X) machine.

Cross-reference: PR #126 at fink

Thank you for reporting this! I agree that we should exclude these from the tarballs. I'll leave this open until we fix it.


BUG: Submit button is not shown properly

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?

button have to give some margin and padding
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Hello @Its-Aman-Yadav Please assign this project to me under GSSoC'24


Overcast app doesn't display episode covers

Seems like it's happening with all podcasts from our website
Gotta check JPG encoding parameters from imagemagick (used with ruby binding rmagick)
Same bug with shows images.

bug probably introduced by https://github.com/yattoz/calvinball-website/commit/8c2a967e4b0f0c1b4baaaea6e8dbdb187df51f2f
Files moved to a full/ folder, but not set in the ruby scripts probably
reverted with https://github.com/yattoz/calvinball-website/commit/7acba1ee80b81b75c7b681ef5406651086aadcb7
Files back into the folder podcast_covers
waiting for confirmation

fixed


Input Focus Tap/Click Area

Simple issue:
For Input's, the area that you can tap/click to actually focus into the field is quite small compared with the size of the UI element. This can make a frustrating UX situation and requires more precision than feels should be necessary. It would be helpful make a tap anywhere on the UI element result in focus.

@m4ttheweric I have a temporary solution for you.
Add this custom mapping to input components:
{
  "components": {
    "Input": {
      "meta": {
        "parameters": {
          "minHeight": {
            "type": "number"
          },
          "paddingVertical": {
            "type": "number"
          },
          "textColor": {
            "type": "number"
          }
        },
        "states": {},
        "scope": "all"
      },
      "appearances": {
        "default": {
          "mapping": {
            "textColor": "text-basic-color",
            "paddingVertical": 0,
            "paddingHorizontal": 0,
            "minHeight": 0
          },
          "variantGroups": {
            "size": {
              "small": {
                "paddingVertical": 0,
                "paddingHorizontal": 0,
                "minHeight": 0
              },
              "medium": {
                "paddingVertical": 0,
                "paddingHorizontal": 0,
                "minHeight": 0
              },
              "large": {
                "paddingVertical": 0,
                "paddingHorizontal": 0,
                "minHeight": 0
              }
            }
          }
        }
      }
    },

And set this style as the input textStyle prop:
  input: {
    height: 48,
    paddingLeft: 21,
    paddingRight: 21,
    marginLeft: -7,
    marginRight: -7
  },

This replicates the large input size with the correct touch zone.

Hi, thanks for the workaround. Can you give me an example of what you mean by "add this custom mapping"?

+1 This behavior is quite problematic. The solution proposed works but it should be better fixed in the library.

e992b66 (#1165)
It is being fixed! Hopefully this will be merged soon.

@artyorsh any update on this issue? This is pretty poor UX for a key component.


temporarily re-enable stack checking, disable some modules to make firmware fit

This is a temporary fix for reported issues with usb.
I could not reproduce the usb issue myself, hence I suggest to not merge this for now
@hauptmech

Putting this on master as a temporary workaround.

Closing as on master.


"forge test --watch" get error: watchexec::watchexec: runtime error err=Native fs watcher error

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (28312e7 2022-10-13T00:10:05.477412592Z)
What command(s) is the bug in?
forge test --watch
Operating System
Linux
Describe the bug
when run forge test --watch, get error:
2022-10-13T07:09:18.631350Z ERROR watchexec::watchexec: runtime error err=Native fs watcher error
2022-10-13T07:09:18.682608Z ERROR watchexec::watchexec: runtime error err=Native fs watcher error
[⠆] Compiling...
No files changed, compilation skipped

Running 2 tests for test/Counter.t.sol:CounterTest
[PASS] testIncrement() (gas: 28312)
[PASS] testSetNumber(uint256) (runs: 256, μ: 27998, ~: 28387)
Test result: ok. 2 passed; 0 failed; finished in 15.80ms

And, changing the contract or test doesn't trigger re-run of the test.

do you get this consistently or only sporadically?

I tested again just now, it worked ...


[BUG]: RuntimeError: Failed to import transformers.models.llama.modeling_llama

V0.3.5报错
(venv) PS D:\DB-GPT-0.3.5\pilot\server> python llmserver.py
Loading vicuna-13b LLM ModelServer in cuda! Please Wait......
model_params:
ModelParams(device='cuda', model_name='vicuna-13b', model_path='D:\DB-GPT-0.3.5\models\vicuna-13b', model_type='huggingface', num_gpus=None, max_gpu_memory=None, cpu_offloading=False, load_8bit=True, load_4bit=False, quant_type='nf4', use_double_quant=True, compute_dtype=None, debug=False, trust_remote_code=True)
max_memory: {0: '20GiB'}
False
===================================BUG REPORT===================================
D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\cuda_setup\main.py:166: UserWarning: Welcome to bitsandbytes. For bug reports, please run
python -m bitsandbytes
warn(msg)
The following directories listed in your path were found to be non-existent: {WindowsPath('8000'), WindowsPath('http'), WindowsPath('/<IP_ADDRESS>')}
The following directories listed in your path were found to be non-existent: {WindowsPath('//api.openai.com/v1/chat/completions'), WindowsPath('https')}
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
DEBUG: Possible options found for libcudart.so: set()
CUDA SETUP: PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: 8.9.
CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md
CUDA SETUP: Loading binary D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable
CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null
CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a
CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc
CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA.
CUDA SETUP: Solution 2a): Download CUDA install script: wget https://github.com/TimDettmers/bitsandbytes/blob/main/cuda_install.sh
CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO.
CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local
Traceback (most recent call last):
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\utils\import_utils.py", line 1099, in get_module
return importlib.import_module("." + module_name, self.name)
File "C:\Program Files\Python310\lib\importlib_init.py", line 126, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "", line 1050, in gcd_import
File "", line 1027, in find_and_load
File "", line 1006, in find_and_load_unlocked
File "", line 688, in load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\models\llama\modeling_llama.py", line 32, in
from ...modeling_utils import PreTrainedModel
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\modeling_utils.py", line 86, in
from accelerate import dispatch_model, infer_auto_device_map, init_empty_weights
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\accelerate_init.py", line 3, in
from .accelerator import Accelerator
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\accelerate\accelerator.py", line 35, in
from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\accelerate\checkpointing.py", line 24, in
from .utils import (
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\accelerate\utils_init.py", line 131, in
from .bnb import has_4bit_bnb_layers, load_and_quantize_model
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\accelerate\utils\bnb.py", line 42, in
import bitsandbytes as bnb
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes_init.py", line 6, in
from . import cuda_setup, utils, research
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\research_init.py", line 1, in
from . import nn
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\research\nn_init.py", line 1, in
from .modules import LinearFP8Mixed, LinearFP8Global
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in
from bitsandbytes.optim import GlobalOptimManager
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\bitsandbytes\optim_init.py", line 6, in
model_class = _get_model_class(config, cls._model_mapping)
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\models\auto\auto_factory.py", line 376, in _get_model_class
supported_models = model_mapping[type(config)]
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\models\auto\auto_factory.py", line 666, in getitem
return self._load_attr_from_module(model_type, model_name)
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\models\auto\auto_factory.py", line 680, in _load_attr_from_module
return getattribute_from_module(self._modules[module_name], attr)
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\models\auto\auto_factory.py", line 625, in getattribute_from_module
if hasattr(module, attr):
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\utils\import_utils.py", line 1089, in getattr
module = self._get_module(self._class_to_module[name])
File "D:\DB-GPT-0.3.5\venv\lib\site-packages\transformers\utils\import_utils.py", line 1101, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.llama.modeling_llama because of the following error (look up to see its traceback):
    CUDA Setup failed despite GPU being available. Please run the following command to get more information:

    python -m bitsandbytes

    Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
    to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
    and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

(venv) PS D:\DB-GPT-0.3.5\pilot\server>

Quantization doesn't work in windows yet . You can turn quantization off using the configuration in your .env file.
QUANTIZE_8bit=False
QUANTIZE_4bit=False

I apologize for the late response. We have made a lot of updates recently;
Please try the latest v0.4.3 version， thanks.


openexr: 2.5.8 -> 2.5.10

Description of changes
Fixes #278713.

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Why do you think this fixes https://github.com/NixOS/nixpkgs/issues/278713 ?
For me the build of pkgsMusl.openexr still fails: https://termbin.com/e6yw

Must've built the wrong variant, should be fixed now.

Indeed now I can build pkgsMusl.openexr_2. Care to adjust the commit message to explain how you arrived at this patch? Ideally we would submit it upstream

I removed the old patch because it was included in the 2.5.9 release
I added the new patch based on my knowledge of headerfile changes in GCC 13 and reading the error to know what file was affected. It's also substantially similar to the existing patch. I admittedly didn't look at the filename in the error carefully the first time round, hence the build issue you encountered initially.
I'm not willing to contribute code upstream as they require a CLA


koa use swig template, how can I get session(I use koa-session) value

Hi, I am wondering I write my code in server side like this: this.session.user = 'xxx', but how can i write in my html file using swig template?
Thx

bind the ctx to your scope like this:
function renderFile(tpl, locals) {
return function (done) {
swig.renderFile(tpl, locals, done);
 }
}
module.exports = function * (next) {
  this.render = function *(tpl, locals) {
    locals = locals || this.body;
    locals.session = this.session;
    locals.request = this.request;
    locals.response = this.response;
   return this.body = yield renderFile(tpl, locals); // wrap with
  }
yield next;
}


Cycle demo

Added the ability to cycle through all the states in a custom view category

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Dave Beaumont seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


@conda-forge-admin, please add bot automerge

Additional comment:
@conda-forge-admin, please add bot automerge

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added bot automerge in conda-forge/pydatamail_ml-feedstock#2.


feat: allow inspectors to override block env

I'm not sure if this is the best way to go about it: we have some cheatcodes in Foundry that alter information about blocks (cheats.fee to set basefee, cheats.warp to set timestamp and cheats.roll to set number).
When we run tests in fork mode (i.e. using state from mainnet) we also set these things to reflect mainnet (basefee etc). Because the basefee is high in this scenario, and because the gas limit is always high for tests, we end up in a scenario where REVM will say we are out of funds, when in reality we do not care if we are out of funds for the main call.
This PR adds the ability to override the block environment, which fixes our problem. We can set all the gas prices etc. to 0 on our side, and in our inspector we can override the block environment with the actual information
Ref https://github.com/gakonst/foundry/pull/997/commits/37c2bbcade00fe32e63bfcb117e44e6a7b6f9764

You have access to those things in EVMData -> Env -> BlockEnv

You're right, I had a brainfart - I'll close this and adjust https://github.com/gakonst/foundry/pull/997 to just override env.block when initialize_interp is called :smile:


fix: relation load strategie version number

Looks like it should be the release version 5.10.0

Or maybe I am wrong and just couldn't find the preview feature flag in the release notes
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["relationJoins"]
}

Thank you very much for your contribution @marcjulian :)


New Article page

This is depended on by #42.

See the following commits:
0d75c68 04e7a5c 492b63d f42d298 f2ef86b e8380dd 27b2b8c


Replace DefaultMetricsClient with PromMetricsClient

In order to provide updates to the prom-client implementation for the DefaultMetricsClient we should remove it in v3 and replace it with the extracted solution graphql-prom-metrics as dependency. So the graphql-prom-metrics can be updated while the v3 branch stays as is.

Merged with #147


update useTransactor to handle contract write

Description :
It seems that we already solved #114 in SE-2 latest useTransactor just updated it here so that we show transaction notification when sending execute function
https://github.com/scaffold-eth/se-2-challenges/assets/80153681/44569896-b38e-4c96-a43c-066062a56b4a

Merging this!


corrects spelling in example config

There were the following issues with your Pull Request

Commit: 72d592ccd00fdd08fb751e2950ac5449d0528d8f
Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html

This message was auto-generated by https://gitcop.com


Numbers 2^31 < x < 2^31-1 should not raise BITWISE_OPERAND_OUT_OF_RANGE

Take this input:
function toUint32(x) {
  if (x < 0) {
    x += 0x100000000;  // 2^32
  }
  return x;
}

console.log(toUint32(~~0xe0000000).toString(16));

Closure Compiler returns the error:
hello.js:12: WARNING - Operand out of range, bitwise operation will lose information: NUMBER 3.758096384E9 12 [source_file: hello.js]
console.log(toUint32(~~0xe0000000).toString(16));

And yet the output of this code is e0000000, which illustrates that no information is in fact lost.
I think this warning should only fire for numbers > 2^32 - 1, not > 2^31 - 1.

Ping? This seems like a clear bug that has a simple solution.

Essentially it's an off-by-one error? Might make a good first bug for someone.

I tried to reproduce the error and couldn't.
Here's my attempt.
https://closure-compiler-debugger.appspot.com/#input0%3Dfunction%2520toUint32(x)%2520%257B%250A%2520%2520if%2520(x%2520%253C%25200)%2520%257B%250A%2520%2520%2520%2520x%2520%252B%253D%25200x100000000%253B%2520%2520%252F%252F%25202%255E32%250A%2520%2520%257D%250A%2520%2520return%2520x%253B%250A%257D%250A%250Aconsole.log(toUint32(~~0xe0000000).toString(16))%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES%3D1%26CLOSURE_PASS%3D1%26LANG_IN_IS_ES6%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26TRANSPILE%3D1
No warnings or errors generated.

Code that reports it is here: https://github.com/google/closure-compiler/blob/8759434583175dae0679013a6ea7f5f11a5d5b1d/src/com/google/javascript/jscomp/PeepholeFoldConstants.java#L426
Not sure how to trigger it in an open-source build, but I'm getting it every time with building with Blaze internally.

OK, this does it
https://closure-compiler-debugger.appspot.com/#input0%3Dfunction%2520toUint32(x)%2520%257B%250A%2520%2520if%2520(x%2520%253C%25200)%2520%257B%250A%2520%2520%2520%2520x%2520%252B%253D%25200x100000000%253B%2520%2520%252F%252F%25202%255E32%250A%2520%2520%257D%250A%2520%2520return%2520x%253B%250A%257D%250A%250Aconsole.log(toUint32(~~0xe0000000).toString(16))%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES%3D1%26CLOSURE_PASS%3D1%26FOLD_CONSTANTS%3D1%26LANG_IN_IS_ES6%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26TRANSPILE%3D1

@brad4d do you want to take this? Integer.MAX_VALUE is 2^32 - 1, so we'd need to multiply it by 2 before checking for warnings.
https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#MAX_VALUE

Integer.MAX_VALUE is 2^32 - 1

I think you mean 2^31 - 1?

so we'd need to multiply it by 2 before checking for warnings.

(2^31 - 1) * 2 is<PHONE_NUMBER>. The correct value to compare against is 2^32 - 1, which is<PHONE_NUMBER>. So please don't use Integer.MAX_VALUE * 2. It is probably better to specify the constant's full value directly (or write (1 << 32) - 1).

Oh right, I was a bit sloppy :) Thanks Joshua.

Although in Java, both Integer.MAX_VALUE * 2 and (1 << 32) - 1 are ints, and will wrap around. Probably need to force a long with something like (1L << 32) - 1

The relevant part of the spec is:
https://tc39.github.io/ecma262/#sec-bitwise-not-operator-runtime-semantics-evaluation
I think we should define these constants and use them for checking bounds on arguments to bitwise operators.
static final double BITWISE_SAFE_MIN = - (1L << 32);
static final double BITWISE_SAFE_MAX = (1L << 33) - 1;
No, the "33" above is not a typo.
It's to cover the fact that hex constants are always positive, so
0xffffffff =><PHONE_NUMBER> (not -1)
Bit operations on this value will still behave as expected.
It doesn't seem worth attempting to guarantee the value was actually specified as a hex or octal constant, though.

I don't follow your reasoning. 2^33 - 1 is 0x1ffffffff. The following program illustrates that bitwise not will lose data with this constant:
function toUint32(x) {
  if (x < 0) {
    x += 0x100000000;  // 2^32
  }
  return x;
}

console.log(toUint32(~~0x1ffffffff).toString(16));

Prints: ffffffff (not the original value of 1ffffffff).
Likewise, -(2^32) is -4294967296. But this program illustrates that bitwise not on this constant will lose data:
console.log(~~(-4294967296))

This prints 0, not the original value of -4294967296.
I really think the correct bounds are:

-2^31 (Integer.MIN_VALUE)
2^32 - 1 ((1L << 32) - 1)

Sorry, off-by-one error.  sigh
very well then
static final double BITWISE_SAFE_MIN = - Math.pow(2, 31);
static final double BITWISE_SAFE_MAX = Math.pow(2, 32) - 1;

I think it depends on how the number is used.  If you're using a number as
signed then the safe max is 2^31-1, not 2^32-1, isn't it?
On Thu, Aug 4, 2016 at 2:16 PM, Bradford C. Smith<EMAIL_ADDRESS>wrote:

Sorry, off-by-one error. sigh
very well then
static final double BITWISE_SAFE_MIN = - Math.pow(2, 31);
static final double BITWISE_SAFE_MAX = Math.pow(2, 32) - 1;
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/closure-compiler/issues/1852#issuecomment-237686059,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIyG0O1nM4BsuhMVojLq872Fve3g63Sks5qcla2gaJpZM4I4tX_
.

If you're using a number as signed then the safe max is 2^31-1, not 2^32-1, isn't it?

That is the bound that the current code checks. It throws false alarms, because it is unaware that we will be treating the number as unsigned later.
If you can guarantee that it will never throw a false alarm, then great. :)
Otherwise I would suggest that 2^32 - 1 is a more reasonable bound to check.

A false positive, but suppressible warning is preferred to losing data in my book.

I actually prefer less configuration if possible. So, in this case, I'd rather check for the higher bound and miss warning in some cases.

I agree with Chad.  I believe the behavior is correct.

Consider that the surrounding context could be:
// The >>> operator will coerce its argument to uint32.
var x = ~0xe0000000 >>> 0;

It seems absurd to warn about this when some JavaScript operators (like >>>) implicitly convert their argument to Uint32.
If you apply this approach to other operators, you would also warn for -1 >>> 0, and certainly 0.1 + 0.2.
I think noisy warnings are harmful. If I lose faith that warnings are reasonable, I will just tune them out and suppress them on the slightest suspicion that they are noise.

FYI, I have a change in review for this.
When it is submitted the acceptable boundaries will be as follows.
// Maximum value - treat as unsigned 32 bits
4294967295 // 2^32 - 1 == 0xffffffff unsigned

// Minimum value - treat as signed 32 bits
-2147483648 // - 2^31 == 0x80000000 signed

These are OK because in 2's complement all bits above the 32nd are either all 0's (non-negative/unsigned) or all 1's (signed negative). Thus no information is lost by the conversion to 32bits.
This is not true for values beyond this range.
Bear in mind that these limits are only enforced when literal values are used.
The compiler won't notice if you assign a value outside of this range to a variable and then use that in a bitwise operation.

Just had a discussion with @concavelenz about this. I'll try to summarize our positions.

With the exception of >>>, JavaScript always treats the result of bitwise operations as signed numbers. This leads to surprising behavior for values >= 2^31. In particular apparent no-op bitwise operations actually re-interpret the values as signed 32-bit values, making them negative.
0x80000000 ==<PHONE_NUMBER> // 2^31
0x80000000 | 0 == -2147483648
0x80000000 & 0xffffffff == -2147483648
~~0x80000000 == -2147483648
0x80000000 << 0 == -2147483648
0x80000000 >> 0 == -2147483648
0x80000000 >>> 0 ==<PHONE_NUMBER> // unsigned shift preserves positive value

This frequently surprises developers, because:

The common way to represent bit values with hex literals always gives non-negative values.
JavaScript numbers can be much larger than 2^32 - 1, so it's reasonable to expect a 32-bit
value you've been operating on to be extended with 0's on the left, and thus be positive when
you do arithmetic on it.

concavelenz@ says:

If we're going to warn about literal values being out of range for bit operations, we should warn about any value that would end up changing unexpectedly to negative when an apparent no-op is applied to it. By this criteria, the current behavior is correct.

OTOH, the pass that is currently doing this checking is an optimization pass, and arguably shouldn't be throwing out warnings. By this criteria, it would be fine to just drop the checks here and possibly add them elsewhere.

@brad4d says:

We should warn about literal values used in bitwise operations that will actually lose information when converted to 32 bits. Re-interpretation as a signed value is not losing information.

However, a developer should be warned if they actually specify a value that is too large, e.g. 0x100000000 (extra zero typo?)

Perhaps this check should move to an error checking phase, but it's worth having it here until that's done.

Perhaps we should consider warning if the result of a bitwise operation is negative and is later used in an arithmetic operation. But that's outside the scope of this bug.

Josh, why isn't an suppression appropriate for your use case?  If you didn't have the call to toUint32, it would be incorrect.

The code I posted was just intended to be a repro. (btw in retrospect, just using >>> 0 would have better than writing ToUint32()).
The actual code is here: https://github.com/google/protobuf/blob/master/js/binary/utils_test.js#L186
I really don't like that the warning claims that information is lost, when the output has 32 full bits of precision. This code works fine (with no lost information), and yet this warning has been firing on the codebase for months. When I finally dug into it, I realized that the warning was just overzealous, which made me unhappy.

@haberman, as a corollary to @concavelenz's question, I'd be interested to know whether the warning actually led you discover the need for the toUint32() method.
Side note: While working on this I've found that x >>> 0 is probably the simplest way to force x to be interpreted as a 32-bit unsigned integer.

@brad4d: The warning didn't help me in any way. I inherited maintenance of a codebase where this warning was firing on some pre-existing code. For a while, the warning made me feel vague anxiety that the code might be broken, but I didn't have time to look into it. One day I decided to dig into the problem, and I discovered that the code was fine and it was the warning that was broken. The code did not require any changes whatsoever -- the warning was just noise. I feel unhappy about the unsettling feeling the warning gave me for months.

I would say that the unsettled feeling was completely appropriate. And a comment like so would have made it go away:
/**
 * @suppress {whateverClassThisIs} the toUInt32 call here protects
 *    us from this unsafe manipulation
 */

Next push to github should include a change removing the troublesome warnings.

Thank you!


Exposing DocumentFields on Envelope

Created GetDocumentFields function.
Added GetEnvelopeDocumentInfo with no parameters, since you're getting the document info from an instance of an envelope.
Created CreateJson with List to be added to the EnvelopeCreate instead of a List and startIndex.
Created Create with the List<Byte[]> of file data and List of documents.

Envelope.json.cs

Added DocumentFields class for json transmission of the document custom data.
Added DocumentField for json transmission of one set of document custom data.
Added a DocumentField array to the Document class so that its included in the outgoing json.

EnvelopeTest

Created a static variable in the test class that is initialized during the ClassInitialize.
Added EnvelopeCreateWithDocumentObjectsAndGetDocumentFieldsTest to test creating an envelope using document objects and getting the document fields from the documents.

@InbarGazit If this doesn't work, I give up, and, if you would, please make my changes in the official branch.

merged

@Patman0021  this one is just fine. We'll get a new nuget released soon...


[Driver, Incremental] Add enable- and disable- only-one-dependency-file flags on-by-default

Only enabled if the driver is passed -enable-only-one-dependency-file
Since every make-style dependency file has the same contents, it wastes time to output one for each source file. Only write one real one, and create empty dummy files (to keep the build system happy) for the rest.
Latest version of this facility. Intervenes earlier in the driver in order to work well with batch mode.

Explanation: Remedies an incremental performance issue, can be disabled with a flag.
Scope of issue: Significant for incremental Swift compilations that involve hundreds of files
Origination: At some point compiler started including system headers in dependency files.
Risk: Rests on the assumption that all make-style dependency files contain the same info and that the build system reads them all.
Reviewed by: Robert Widman
Testing: Normal regression tests.
Radar: rdar://57882772
Note: This version includes the Windows fix.

@swift-ci please nominate

@swift-ci please test

@swift-ci please test source compatibility

Build failed
Swift Test OS X Platform
Git Sha - a1aeff97eb6e5eb3110ee4a9f91f555b7ef9e7a5

Build failed
Swift Test Linux Platform
Git Sha - a1aeff97eb6e5eb3110ee4a9f91f555b7ef9e7a5

@swift-ci please test

@swift-ci please test windows platform

@swift-ci please test source compatibility

Build failed
Swift Test Linux Platform
Git Sha - a1aeff97eb6e5eb3110ee4a9f91f555b7ef9e7a5

Build failed
Swift Test OS X Platform
Git Sha - a1aeff97eb6e5eb3110ee4a9f91f555b7ef9e7a5

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - a549f42e745ee75f2b046285db3dc348c4c4f521

Build failed
Swift Test Linux Platform
Git Sha - a549f42e745ee75f2b046285db3dc348c4c4f521

@swift-ci please test windows platform

@swift-ci please test source compatibility

@swift-ci please nominate


CloudShell documentation

Document azd on CloudShell limitations

azd auth login uses CloudShell authentication transparently (no need to log in but can log in with service principal or --use-device-token if desired)
The aca templates will not deploy because CloudShell does not support building Docker containers in the CloudShell session. Use a non-ACA image
CloudShell may timeout during long deployments, make sure the session does not become idle (this is a CloudShell limitation)
Update SUPPORT.md to direct to GitHub issues

https://github.com/MicrosoftDocs/azure-dev-docs-pr/pull/4646


Is there a way to invalidate/expire/delete a cache manually?

I have some cached data that is no longer relevant in certain scenarios. I want to therefore be able to invalidate cache before its ttl expires so that next time data is requested, it would be refetched and recached. Is there presently an api to drop particular cached data by its "id"?

What about cache.del(id) ?

Yes, assuming the id is the same as the cache key, you can call cache.del(id).


Create logo and icon for side menu

DEX is Decentralized Exchange

Icon is here https://www.figma.com/file/qR8QwA3xewh2zeHX7OjAv4/Beam-DEX?node-id=5%3A1144
Logo is here https://www.figma.com/file/qR8QwA3xewh2zeHX7OjAv4/Beam-DEX?node-id=6%3A148


Create estimate for Enexis POC

Estimate how much time is needed to deploy an R3 environment for a Proof of Concept by Enexis.

Should not be on this list...


Remove outer border of syntax highlighting

How can i remove the outer border when using syntax highlighting ?
Pic:

I've been trying to do the same. I modified the style in chrome dev tools, but now I can't figure out how to add a custom css file without wiping out the main theme styles :/


bbox.txt is missing

bbox.txt is missing. Can you please upload it?

Done I just uploded it, thanks.

Thanks man!
Really appreciate your fast response
Cheers,
Dhruv
On Tue, Sep 29, 2020 at 5:35 PM visitor9999th<EMAIL_ADDRESS>wrote:

Done I just uploded it, thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/visitor9999th/Tensorflow_GP-GAN/issues/1#issuecomment-700657734,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIMQ4ARYBKSQM4UHRMF5AKLSIHEPLANCNFSM4R5VBI3A
.


[PE-D][Tester D] Date does not mention what numeric characters can be used for YYYY-MM-DD

By following the instruction format of YYYY-MM-DD, 0000-00-00 should be allowed but it is not

Labels: severity.Low type.FunctionalityBug
original: fungusta/ped#2

close with PR #229


[3 pts] Recipe details

If the recipe is public or the user is the owner of the recipe, should display the recipe details as in the wireframe.
If the user is the owner of the recipe, should lead to the form that allows the user to add new food.


Handoff in materializer_vnode

After handoff, the operations may be applied twice. This is because, logging_vnode does the handoff and gets the operations to the log. materializer_vnode does the handoff independently, and caches the operations. Then (for some executions) the load_from_log in the materilizer_vnode re-loads the operation that is already cached by the handoff, thus duplicating them.
The test is in the branch handoff_materiliazer riak_test/log_handoff_test.erl.

Ok, it looks like I introduced this when add the recovery from the log, so I will fix it.  The test you mention will fail on master?  Can I use it to test if the fix I will make works?

Yes. It fails on master. It is the same test that is in the master, but with op-crdts. The bug is hidden with state based crdts.


Move IInitialData call to new IHostedService

I analyzed Marten code base and found  the only usage of IInitialData is inside the DocumentStore constructor. There two options possible to fix it:

Move calls to IInitialData out of constructor to an async builder method. Will require relatively large changes to Marten code and is going to be a breaking change. Another issues is that most of initialization code related to ASP.NET CORE (and other frameworks/libraries, I guess)  is synchronous and isn't  going to change in the foreseeable future.
Make  IInitialData synchronous. It's a breaking change also but a lesser one. Initialization code won't be changed.

As it's a breaking change so I guess the PR should wait until Marten 5.0 release.
Thoughts?

It was made async as npgsql's multiplexing support requires all database calls to be async, however production-ready multiplexing has been pushed off to npgsql 7 so support for it could be reintroduced in a future release.

Another issues is that most of initialization code related to ASP.NET CORE (and other frameworks/libraries, I guess) is synchronous and isn't going to change in the foreseeable future.

If Marten v5 goes down the purist .NET 6 path, then the assumption could be made that everyone is going to be using the new ASP.NET Core templates where async initialization is implicitly available via top-level statements.

Since we're about to do a V5 anyway to accommodate other breaking changes from Npgsql 6, I say that the initial data gets somewhat excised. Make it be async all the way, but push it's execution to an IHostedService. This'll make the usage be reliant on using AddMarten(), but I think I want to encourage that anyway. If we do that, IInitialData can be async all the way down.

@solyutor Thank you so much for everything you've done for threading and async code on Marten, but I'd like to take this a bit different way and move the IInitialData into a new IHostedService for Marten v5. And keep it async all the way down.
I think the general direction is moving in the direction of everything being async and changing the Marten internals to reflect that.


fix(README): Adding links to videos

:tada: This PR is included in version 1.1.3 :tada:
Your semantic-release bot :package::rocket:


Added PEP 442 implementation and test case

This should adress #3612. I added a simple test case to ensure that the __del__ methods is called when the cdef class is released.

It seems there's a reasonable amount of (potential) complexity here that isn't being tested:

class with a __dealloc__ method and a __del__ method.
Various combinations of inheritance.
Does a scheme where an object resurrects itself in __del__ work correctly?
Does __del__ swallow exceptions like it's supposed to?

Sorry, first time contributor...
I added some simple tests, finding that __dealloc__ is not called when __del__ is present. I guess that necessitates some edits at ModuleNode.generate_dealloc_function?

I added some simple tests, finding that __dealloc__ is not called when __del__ is present.

It's just that your tests accidentally call the wrong class.

OK, I fixed the error and added more tests. There is one failing test, namely an object resurrecting itself, based on this example. The __del__ method is called only once as expected, but apparently the object is never __dealloc__ated, which seems like an error?!

OK, I fixed the error and added more tests. There is one failing test, namely an object resurrecting itself, based on this example. The __del__ method is called only once as expected, but apparently the object is never __dealloc__ated, which seems like an error?!

In test_zombie_object I don't think __dealloc__ should be called while a reference is still held as the global c (at least within the timeline of the function). Maybe something like
global c
print("start")
i = immortal()
i = None
import gc
gc.collect()
print("del c")
del c  # __dealloc__ should be called here
gc.collect()  # or possibly here
print("finish")

I think most of this should just work right (because it's handled by the Python interpreter) but it's good to make sure.

I added a test case test_del_with_exception which throws an exception in __del__. It seems like this exception is indeed swallowed.
@da-woods: I adapted the resurrection test as you suggested, but there is still no __dealloc__ called even as the global reference is deleted...

Hmmmm... My understanding is that __del__ is only ever supposed to be called once (so it should be resurrected the first time, but not the second). It's possible that I'm misunderstanding it though...

Right - got it I think:
If the object isn't a "GC class" (i.e. cython.no_gc is set, or it just doesn't have an object members like your immortal class) then __del__ can be called multiple times. In this case the object keeps getting resurrected so it's never possible to deallocate it (as is happening here).
If the object is a "GC class" (e.g. if it has a cdef object x member) then __del__ can only be called once. And so __dealloc__ is called after del c.
It looks like this is all working correctly

OK, I added the test with the predicted results...

There's definitely an issue with exceptions:
cdef class C:
    def __dealloc__(self):
        print("".join(["a", "b", "c"])) # some python code

def f():
    c = C()
    raise RuntimeError()

cdef class D:
    def __del__(self):
        print("".join(["a", "b", "c"])) # some python code

def g():
    c = D()
    raise RuntimeError()

In both cases (for classes C and D) the __dealloc__/__del__ method is called while an exception is set. We handle this with PyErr_Fetch and PyErr_Restore for the __dealloc__ case:
static void __pyx_tp_dealloc_11testdealloc_C(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_11testdealloc_1C_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

However for the __del__ case we don't handle it resulting in
>>> testdealloc.g()
Traceback (most recent call last):
  File "testdealloc.pyx", line 15, in testdealloc.g
    raise RuntimeError()
RuntimeError
Exception ignored in: 'testdealloc.D.__del__'
Traceback (most recent call last):
  File "testdealloc.pyx", line 15, in testdealloc.g
    raise RuntimeError()
RuntimeError:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: <cyfunction g at 0x7f0a0a331930> returned NULL without setting an error

I think the solution is to create a small wrapper as like for __dealloc__ which essentially only does the fetch and restore. However, I'm not immediately sure where that's generated.

I suspect this could also do with a documentation change - probably noting the version dependent behaviour.

Regarding the tests: Since the PEP was only added into python 3.4, I believe the tests should only run for CI configurations with python >= 3.4. Is there a way to disable the tests for older versions?

Disabling the tests is in https://github.com/cython/cython/blob/4aec02117deb1d9279a81920f21459fc015d1a77/runtests.py#L406

@da-woods: I added the documentation change and disabled the test for older python versions.
I also took a stab at adapting the code generator to restore the exception state.
Unfortunately, I as unable to find any documentation on PyObject_CallFinalizerFromDealloc, specifically, its return value. I presume that the function returns whether or not the object has been resurrected. As it stands now, the exception state is not restored if the object is resurrected (assuming I presume correctly). Is this correct?

Another bug (although this is actually in the existing Cython code):
cdef class C:
    def __del__(self):
        print("del C")

cdef class D(C):
    def __del__(self):
        print("del D")
    def __dealloc__(self):
        print("dealloc D")

This prints:
del D
dealloc D
del D

(i.e. __del__ is called twice). It's not a GC tracked class so there's no inbuilt mechanism for stopping __del__ being called twice. It gets called first from __pyx_tp_dealloc_11testdealloc_D. Then __pyx_tp_dealloc_11testdealloc_C and __del__ gets called again.
It isn't obvious to me right now how to avoid that.

It gets called first from __pyx_tp_dealloc_11testdealloc_D. Then __pyx_tp_dealloc_11testdealloc_C and __del__ gets called again.

Shouldn't the FINALIZED flag set by PyObject_CallFinalizerFromDealloc() prevent exactly that?

I'm not completely sure that putting the code to restore the exception state there is right. I think it should probably happen inside the finalizer (i.e. create a function like generate_dealloc_function for generate_finalizer_function - it only needs to handle the exception state and nothing else).

Still don't think this is right. I'm suggesting that generating a function like
void __pyx_tp_finalizer_classname(PyObject*) {
    // fetch state
    // call "actual" finalizer
    // restore state
}

and assigning that function to tp_finalizer
The reason I'm suggesting doing it this way is that the PEP says that the exception state should be restored on exit from the finalizer. Doing it outside the finalizer in __dealloc__ breaks that assumption. Some of this is just about trying to follow the PEP as closely as possible. However I think this breaks with inheritance from non-Cython classes.
Example of a bug that I think is linked
cdef class E:
    def __del__(self):
        print("del E")

class F(E):
    def __del__(self):
        print("del F")
        super().__del__()

class G(E):
    pass

# here I just inherit using "true python" rather than Cython
globs = { 'E': E }
exec("""
class H(E):
   pass
""", globs)
H = globs['H']

def func(tp):
    inst = tp()
    raise RuntimeError()

func(F) works ok, but func(G) or func(H) report
Traceback (most recent call last):
  File "testdealloc.pyx", line 51, in testdealloc.func
    raise RuntimeError()
RuntimeError
Exception ignored in: 'testdealloc.E.__del__'
Traceback (most recent call last):
  File "testdealloc.pyx", line 51, in testdealloc.func
    raise RuntimeError()
RuntimeError:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: <cyfunction func at 0x7f96ef7ccad0> returned NULL without setting an error

I started on generating the function, but I do not yet understand how to tell the writer to add the function to the PyMethodDef block. Could you give me a hand?

Ah, I see. The guard isn't hit because it's not a GC type. Yeah, that's tricky. We'd need to somehow signal to the superclass tp_dealloc calls that the finaliser has already run. Maybe we could just set the FINALIZED flag ourselves? Because, after all, the object was finalised. Something like that.

I wonder if we could fix this by doing:
// in tp_dealloc, around PyObject_CallFinalizerFromDealloc call
if (Py_TYPE(o)->tp_dealloc = cname_of_current_dealloc_function) {
    // consider calling finalizer
}

That's basically saying "only call the finalizer from the dealloc of the most derived class". It'd obviously need tests to make sure that it does what I think it should.

@da-woods: I added a corresponding check to the generator. The test cases already contain an example with a cdef class child of a cdef class parent, I added another one with nontrivial __del__ and __dealloc__ methods for both parent and child class.

That's looking good to me currently thanks. Hopefully the "most derived finalizer" does the right thing.
It'd be good to extend the tests in test_nontrivial_del_with_exception to include cases similar to F and G in https://github.com/cython/cython/pull/3804#issuecomment-686974653 (i.e. inheritance from non-cdef classes. I don't think H adds a lot to the test). I believe that they should work correctly, but it's always nice to have tests that prove it.
After that I can't think of too many other corner-cases.

To make it work in Python <3.8 you need to add
if scope.lookup("__del__"):
            value += "|Py_TPFLAGS_HAVE_FINALIZE"

to TypeFlagsSlot.slot_code in Cython/Compiler/TypeSlots.py

Apparently, some checks are running into a time limit, everything else looks fine. Anything to be done about that?

It's an existing issue on MacOS (it's failing to notice that a test has failed so is waiting for it for ever). So nothing to be done here.

@da-woods: Is there anything else that needs to be done or can we merge this as it is now?

I suspect @scoder will want to have a good look at it before merging. It's the sort of change that it's worth making sure that the behaviour is right, because it's hard to fix later if people end up relying on something unintended. For now I think be patient...

No problem, I very much appreciate you help in this.

@ax487, I left a couple of suggestions back in September. Would be great if you could try to apply them.

I added a guard directly to the slot definition, is that what you meant?

@da-woods : You're right, I used your approach instead.

Would it be possible to backport this PR to the 0.29 series? 🙂

Would it be possible to backport this PR to the 0.29 series? slightly_smiling_face

No new features for 0.29.x any more.