Issue 338: Deprecated mustNotBeMissing and mustNotBeNull constraints

Description
The mustNotBeMissing and mustNotBeNull constraints do not behave as expected since, when Sync Gateway encounters null values from a JSON document into an object to pass to the sync function, it removes the properties altogether. The document validation script (validate-document-definitions) now fails if it encounters either constraint in document definitions and prints a deprecation warning. Furthermore, the mustNotBeNull constraint now fails if the corresponding property value is missing/undefined (since null values become undefined when converted to the object that's passed to a sync function).
Testing

Create a document definition with mustNotBeMissing and mustNotBeNull constraints:

{
  testDoc: {
    typeFilter: simpleTypeFilter,
    channels: { write: 'write' },
    propertyValidators: {
      mustNotBeMissingProp: {
        type: 'string',
        mustNotBeMissing: true
      },
      mustNotBeNullProp: {
        type: 'integer',
        mustNotBeNull: true
      },
      requiredProp: {
        type: 'float',
        required: true
      }
    }
  }
}

Run the validation script on the test document definitions (it should produce two validation errors indicating that the mustNotBeMissing and mustNotBeNull constraints are deprecated):

./validate-document-definitions /path/to/test-doc-definitions.js

Generate a sync function from the test document definitions:

./make-sync-function -j build/test-doc-definitions.js build/test-sync-function.txt

Copy and paste the generated sync function into a Sync Gateway configuration file.
Attempt to create a document where mustNotBeMissingProp is null (it should be rejected):

PUT /test/required-doc-1 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": -12.5,
	"mustNotBeMissingProp": null,
	"mustNotBeNullProp": 579
}

Attempt to create a document where mustNotBeMissingProp is missing (it should be rejected):

PUT /test/required-doc-2 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": -12.5,
	"mustNotBeNullProp": 579
}

Attempt to create a document where mustNotBeNullProp is null (it should be rejected):

PUT /test/required-doc-3 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": -12.5,
	"mustNotBeMissingProp": "foobar",
	"mustNotBeNullProp": null
}

Attempt to create a document where mustNotBeNullProp is missing (it should be rejected):

PUT /test/required-doc-4 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": -12.5,
	"mustNotBeMissingProp": "foobar"
}

Attempt to create a document where requiredProp is null (it should be rejected):

PUT /test/required-doc-5 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": null,
	"mustNotBeMissingProp": "foobar",
	"mustNotBeNullProp": 579
}

Attempt to create a document where requiredProp is missing (it should be rejected):

PUT /test/required-doc-6 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"mustNotBeMissingProp": "foobar",
	"mustNotBeNullProp": 579
}

Create a document where all properties are supplied (it should be accepted):

PUT /test/required-doc-7 HTTP/1.1
Host: localhost:4985
Content-Type: application/json
{
	"type": "testDoc",
	"requiredProp": -12.5,
	"mustNotBeMissingProp": "foobar",
	"mustNotBeNullProp": 579
}

Related Issue

GitHub issue link: #338

Looks good! 👍


[Feature request] Image Editing Options

Platforms
Android, iOS, Web, macOS
Description
Need image editing options for Brightness, Contrast, Saturation, Clarity, Sharpness, etc.
Why
Standard photo editing features

Hi,
Currently, I don't have enough time to add this future, but I will put it on my roadmap.
However, for the case you want to create a PR or just create a solution for yourself, I prepared everything already. You can copy/paste the filter-editor and create a new subeditor which manages this stuff. Thereafter, you replace the part where it uses the prebuilt filters and just use the raw color matrix filter, which you can see here. The filter buttons you can replace with icons or images which stand for the function, like Brightness.
The color matrix effects which you currently can use are brightness, contrast, saturation, colorOverlay, rgbScale, addictiveColor, grayscale, sepia, invert, hue, opacity.
For the case you want to create a PR, please keep in mind to update the i18n, icons and configs with all new stuff.


Submit form on field change

Is it possible to submit the form on field change?
I am looking to automatically continue to the next step of a wizard when the user selects a radio option.  On the first page of my wizard the user picks 1 (and only 1) option that decides the next step. This would allow my users to progress through the wizard a lot more fluidly rather than selecting an option and then pressing submit / continue.

You could wrap the fileds' onChange with a function that call the original onChange and then dispatch the submit action using the handleSubmit in the props.

const onChangeSubmit = (onChange, handleSubmit) => e => {
   onChange(e);
   handleSubmit( );
};

class LoginForm extends Component {
   render() {
     const { user, pass, handleSubmit } = this.props;

     return (
       <form onSubmit={handleSubmit}>
         <input {...user} onChange={onChangeSubmit(user.onChange, handleSubmit)} />
         <input {...pass} onChange={onChangeSubmit(pass.onChange, handleSubmit)} />
         <button onClick={handleSubmit}>Login</button>
       </form>
     );
   }
}

// here redux form connect

I had used created a handleOnChange on the class but your suggestiob of a util is perfect, now I can use it on numerous classes
I did have to add a setTimeout on the handleSubmit
export default function onChangeSubmit(onChange, handleSubmit) {
  return (event) => {
    onChange(event);
    setTimeout(() => handleSubmit(), 0);
  };
}


Lures only last 2minutes.

Lures always expire after 2ish minutes, When they actually haven't expired, They come back and then have another 2 minutes to expire.
Until they actually expire then there gone making the entire point of showing the expire time useless I dunno if there is a quick fix for this?

This has been noted before. The issue is that what Niantic returns to us as lure_expiration is really just a suggestion of when to recheck to see if the lure has expired. If not, it will give us a new lure_expiration which will last another 2 minutes. Why they do it this way, I have no idea. I'm working with some guys ATM to come up with a potential "fix".

If you can't get the data for the correct time, You could possibly find when the first check was initiated and time it off then. Whatever the solution glad to hear it's been worked on because the 2min timer adds no value to the user apart from knowing there is a lure there.

@23ttfe3fa This is indeed what we were thinking. Niantic actually makes this insanely easy and provides us with a last_updated (or something, I forget exactly) parameter, which I can only assume means the last time a Lure was deployed. We could do something like:
30 mins - (current_time - last_updated) = remaining time

I'm going to add this to PokemonGo-Map tomorrow, and hopefully we can get it merged in here shortly after.

I dunno whats changed in 0.1.0 but lures still seem to be buggy
Sometimes the lures say over 30 minutes, Sometimes when i refresh the time left on lure increases
This is the main reason I have this program because no lures in my vicinity and I can't really just go out looking for lures 24/7 just trying to make sure the issues with it are known don't want this to go under the radar to spawn locations (plenty of other places to do that, what makes this special is lure markers)


Windows container support?

Is it possible to add Windows worker nodes to microk8s cluster? Haven't seen this topology mentioned anywhere.
So basically:
microk8s clusters in WSL2 and plain windows worker nodes with windows containers (without running the microk8s on the windows worker nodes, which would be linux containers).

Joining non microk8s nodes to a microk8s cluster you mean?

Yes, non-microk8s nodes (plain windows worker nodes) to microk8s clusters running on WSL2.
The goal is to have microk8s cluster running in WSL2, BUT run windows containers (on Windows Server 2019).

From what i can tell, not possible.

Hi @biiiipy, to get the Linux workers (i.e. MicroK8s) on Windows, we recommend using the Windows installer found here: https://microk8s.io/docs/install-alternatives#heading--windows.
Getting the Windows workers running would be a different challenge, but (I think), if you could get MicroK8s running  with the installer, you could enroll manually installed Windows Kubelets; in theory at least.

I've already deployed a native kubernetes cluster working with both linux and windows nodes, but its a real pain, lots of configuration and a huge mess with the windows nodes having to proxy the traffic via the linux nodes.
I recently discovered microk8s and really enjoyed installing a PoC cluster with it, its stable, fast and easy to use. But having windows containers running in the same k8s cluster is, unfortunately, also a need in the project.
From the microk8s side, we have no access to the kubeadm so we can't do kubeadm token list or kubeadm token create kubeadm token generate``. microk8s add-node will generate something like microk8s join <IP_ADDRESS>:25000/be0f5f9e286f7e81b1b62e45719048a2
From the native node side, we would generally run something like kubeadm join <IP_ADDRESS>:6443 --token 9a1qzb.ggdku08tuu2bzv8h --discovery-token-ca-cert-hash sha256:682dc1573fc3b6ca71f99f19979c99b07b7190248f2ff72a5b6865ad265489ad  to join the node to the cluster.
@joedborg how would you enroll a manual windows kubernetes? I tried to search in the documentation but couldn't find anything :'(
Any idea how we could get the needed values out of microk8s in order to try to join the native node with them ?

Hi @organom,
all certs are in /var/snap/microk8s/current/certs and credentials (eg tokens etc) are in /var/snap/microk8s/current/credentials.  In case you need to configure any services you will find the services arguments in /var/snap/microk8s/current/args .
Are you following any guide/doc I could look at? How do you install the windows node?

@organom , great to see someone else in similar situation :)
Also, did I understand correctly, that we don't need dedicated Linux nodes with microk8s on Windows, cause microk8s runs them in Hyper-V Ubuntu VMs (I only tried to go WSL2+Microk8s route)? So the missing peace is getting windows native nodes (for native windows containers) to join cluster running in microk8s?

@biiiipy yes, that is my understanding of it also. On a native kubernetes, you setup the master, Linux nodes and then the windows nodes. Linux nodes are still mandatory because the windows machines use them to proxy the traffic.
On microK8s, there is no need for master (each installation is master and node), so a single service would suffice. The windows, macos or linux installation in case of microk8s is always the same, a linux node/master running. Would be awesome if microk8s would add a flag to also boot a windows native node, but since this is probably not an easy feat, my thought was to keep the windows nodes as native kubernetes installations and try to somehow join them to the microk8s cluster
@ktsakalozos I followed the native kubernetes installation guide https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/ and https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/ .
As a first step I would be happy to at least be able to join the windows node into a microk8s cluster, after that there is still the question of the network proxying of kube-proxy and the flannel specific windows configurations (that in the case of microk8s would need to be calico), but one fight at a time ;)

+1 for this. We have legacy .NET Framework containers which can only be run on a native Windows worker, so it would be very helpful to be able to easily spin up such a worker using microk8s!

We've just finished the documentation for this:
https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782

We've just finished the documentation for this:
https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782

@joedborg The document looks awesome, but it misses (I believe) the part of the joining the windows node to the microk8s node. How do you do it?
Thanks for the help

@organom When you start the kubelet service (towards the end), it connects by reading the kubeconfig file you wrote to the Windows node.

@joedborg I see, didn't knew kubelet would accept it like that :) I will give it a try next week.
Thank you again for writing this up and letting us know ;)

@organom yeah, the kubeconfig contains all you need to reach and authenticate with the control plane.
No problem, I'll close this issue.  Please feel free to open a new one if you come across anything specific to the documentation.

Just a fast update from my side. Worked like a charm.
Following the tutorial I was able to have the windows node joined to the microk8s cluster and run a simple windows test pod (powershell curl of google.com).
Thank you again for making the tutorial available

Trying to work out if this can be done entirely from a Windows 10 (pro/ent) host. microk8s on WSL2 (ubuntu)
What are the options for the Windows Worker?

Hyper-V Server 2019 VM?
Can this work with the Win 10 host directly? I.E. it becomes the worker?

How are other people configuring this?

Trying to work out if this can be done entirely from a Windows 10 (pro/ent) host. microk8s on WSL2 (ubuntu)
What are the options for the Windows Worker?
* Hyper-V Server 2019 VM?

* Can this work with the Win 10 host directly? I.E. it becomes the worker?

How are other people configuring this?

There are 2 important concepts to separate here:

one thing is running microk8s in windows
other thing is windows nodes vs linux nodes

MicroK8s will run in windows correctly, having the linux node installed and running by default (https://microk8s.io/docs/install-alternatives).
If the intention is to use Windows nodes (in order to run windows pods inside) (https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/) then you need to use Windows Server 2019. Microk8s doesn't run windows nodes, but does accept windows nodes to be joined to an already existing microK8s cluster.
So, answering your question, you can have microk8s installed in the win10 host directly (running the linux node it automatically starts with), and then connect to a VM (hyper-v, virtualbox, vmware player, etc), install there Windows server 2019 and the node side of https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782 and join it to the cluster.
Just make sure both machines can "see" each other.
In my particular case, I use a 5 VMs setup inside virtualbox with 3 linux (for testing high availability) and 2 Windows Server 2019, this way i can easily pause the whole cluster and get back to it when needed.
Hope it helps :)

Thank you very much for such a detailed explanation.
I'm definitely focusing on the Windows nodes side of things and given similarities between Windows 10 and Server 2019, I wondered if enough of the components were available to bend that requirement somewhat.
Thanks again!

Has anyone ever seen this error while rolling out a deployment that uses Windows containers?
Failed to create pod sandbox: rpc error: code = Unknown desc = failed pulling image "kubeletwin/pause": Error response from daemon: pull access denied for kubeletwin/pause, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I searched all over and finally found this section from the Calico docs. I essentially ended up having to do:
docker pull mcr.microsoft.com/k8s/core/pause:1.2.0

and then:
docker tag mcr.microsoft.com/k8s/core/pause:1.2.0 kubeletwin/pause

After some more investigation, I think I found the likely cause of the issue. Either it was:

Installing Docker Desktop on Windows Server instead of Docker EE, or...
Not enabling Windows containers before the setup on Windows Server

Regardless, I think the documentation makes it implicit that Docker EE is required thanks to this link.

@joedborg follow the whole step, but can't join the cluster.
And in the file kubelet.out:
Running kubelet service. Using configured nodename: vm05 DNS: <IP_ADDRESS> Auto-detecting node IP, looking for interface named like 'vEthernet (Ethernet*' ... Waiting for interface named like 'vEthernet (Ethernet*' ... Waiting for interface named like 'vEthernet (Ethernet*' ...

there is a error msg about, hope it helps:
Error from server (NotFound): namespaces "calico-system" not found
Calico running in kube-system namespace

I have install microk8s cluster successfully on window hyper-V and now want to add window node into microk8s cluster which have by default linux master node. But how can I move config file from linux node to window node using terminal?

@hassanshamshir You first need to guarantee that both machines can reach each other, if they can't then no point on trying to make k8s work because it'll not.
If you're trying to test the connectivity by using ping, check if ping is enabled and allowed on the machines (I believe windows firewall may blocks it).
Then try to read/understand Hyper-V networking and virtual switches. Should be easy to make 2 VMs communicate to each other. VM to host communication could be more tricky to archive.
I don't have too much experience with Hyper-V, so I unfortunately can't help much on that side (on my side I generally run VirtualBox or Unraid)

@organom can you have an experience of creating cluster using VirtualBox?

@organom I have created a window VM which have window server2019.

@organom When I run ping google.com from both machine then they ping it fine.

I have successfully add window node in to my microk&8 using hyper-V in window.

@hassanshamshir  Thanks for the steps described, however using the microk8s 1.26 version the kubelet is constantly restarting on the Windows side.
calico-node.log
2023-01-31 04:33:18.117 [INFO][9048] startup/startup.go 427: Early log level set to info
2023-01-31 04:33:18.117 [INFO][9048] startup/utils.go 127: Using NODENAME environment for node name win-9snsgb4cp64
2023-01-31 04:33:18.117 [INFO][9048] startup/utils.go 139: Determined node name: win-9snsgb4cp64
2023-01-31 04:33:18.117 [INFO][9048] startup/startup.go 94: Starting node win-9snsgb4cp64 with version v3.25.0
2023-01-31 04:33:18.118 [INFO][9048] startup/startup.go 106: Skipping datastore connection test
2023-01-31 04:33:18.131 [INFO][9048] startup/startup.go 470: Building new node resource Name="win-9snsgb4cp64"
2023-01-31 04:33:18.131 [INFO][9048] startup/startup.go 485: Initialize BGP data
2023-01-31 04:33:18.140 [INFO][9048] startup/autodetection_methods.go 103: Using autodetected IPv4 address on interface vEthernet (Ethernet Instance 0): <IP_ADDRESS>/24
2023-01-31 04:33:18.140 [INFO][9048] startup/startup.go 561: Node IPv4 changed, will check for conflicts
2023-01-31 04:33:18.143 [INFO][9048] startup/startup.go 701: No AS number configured on node resource, using global value
2023-01-31 04:33:18.147 [WARNING][9048] startup/node.go 74: Operation Create is not supported on Node type
2023-01-31 04:33:18.147 [ERROR][9048] startup/startup.go 201: Unable to set node resource configuration error=operation Create is not supported on Node(win-9snsgb4cp64)
2023-01-31 04:33:18.147 [WARNING][9048] startup/utils.go 49: Terminating
Calico node initialisation failed, will retry...
Note: With version 1.19 everything worked.
I need to test other versions.


Initial jdk18 files

Signed-off-by: Shelley Lambert<EMAIL_ADDRESS>

@sophia-guo - can you give me guidance or point me at doc on what is needed for adding a new jdk version for the Linux installers (and how to test it)?

We might not have the doc on how to contribute it :-(. For testing in local the README should help. Jenkins job you can use https://ci.adoptopenjdk.net/view/work-in-progress/job/Sophia-adoptium-packages-linux-pipeline/

I think your change for Debian should be good. You will also need to add 18 to redhat and suse, similar to other version https://github.com/adoptium/installer/blob/master/linuxNew/jdk/redhat/src/main/packaging/temurin/17/temurin-17-jdk.spec .
https://github.com/adoptium/installer/blob/master/linuxNew/jdk/suse/src/main/packaging/temurin/17/temurin-17-jdk.spec

To support jdk18 in jenkins job jenkinsfile will also need to update.

I've pushed some of the changes, but leaving in draft, as we did not produce JREs, so presume will have to edit the spec files to reflect that.

@smlambert you'll also need to add JDK18 to the GitHub actions workflow here https://github.com/adoptium/installer/blob/master/.github/workflows/linux.yml


Jarvis is returning current time as Jan 1st 1970 00 hours

Description
So far the time module has been working fine for me, except for Brazil.
Whenever I ask the time in Brazil or a city within Brazil, it returns the default January 1st.
Steps to reproduce

Ask Jarvis on Messenger: "Time in Brazil"
Observe the answer:

Location: Brasil
Time: Thu Jan 01 1970 00:00:00

Remakrs
Running localy, I don't have this issue:
{"text": "Location: Brazil\nTime: Sun Nov 19 2017 09:42:35 -03"}

How can test time module correctly in local? I applied #319 and registered google api key and timezoneDB key(my own) but i can't receive responses like yours.
My problem is getting location data works fine but getting time data does not.
Seems like some exception is triggered while getting time data(any codes below request.get() are being skipped)
Also I'm curios about how the current query works correctly because sample queries in timezonedb.com
are quiet different compare to ours.

(https://timezonedb.com/references/get-time-zone)

(modules/src/time.py)

Hi @isbee, I did not have trouble with the current requests for time.
Try to debug again and see what exception is actually being thrown.
It may be just an http error response from timezonedb, which may indicate exactly what is wrong with your key or request.

thank you @gibertoni  :)
I solved the problem. as you said my request had been wrong. now query works fine.


Imgur issue ?

Hello,
We  are facing (again) an issue with Imgur.
Weserv is giving an error 429. Can you take a look at why it doesn't work ?
Example of picture: https://images.weserv.nl/?h=30&url=https://i.imgur.com/jSy8UOD.jpg
Thank you!

Imgur is rate-limiting requests nowadays, and our public service only runs on a handful of IP-adresses. There is not much we can do about this.
You could host the service yourself.

Ok thanks for the information !


Is it possible to monitor temperature too ?

Hey together,
is it possible to monitor the inverter temperature too with this node ?
I was looking for a solution but until now i dont find one.
Any ideas are welcome.
Very good work by the way ... saved my 2000 lines code :)
Regards,
Snot

Thanks a lot ... its working fine. Thousand thanks for saving me so much trouble :-*
Very good work this node will save a lot of people a lot of work !

You are welcome. :)


Development of MDoFDoubleTrolleyWithNonlinearSprings dynamic systems

New system is to implement is module trolleys.py. It should be inherited from similar class being implemented within scope of the module if possible.

zdublowane


Sugges New features and enhancements .

Suggest some new features .
Who doesn't love something new ?

get random suggestion on which tv series to watch next (could also limit to genre filters)


Where is it ?

Referenced in the new release documentation but not actually present. It would be nice to see an example. Thanks.

Hey @philhaywardlockwood, the repository has been updated and you can see now the sample app. Thank you.


Gas cost estimates wrong

Inflated everywhere, including places you wouldn't think they'd be like open reporting. UI says $15, MM says $10 for instance

566,620 gas for initial report (DR) What is the gas price is the UI set to?
378,444 gas for open reporting. on kovan reporting form looks correct, actually might be showing a little low.
More information is needed. what is MM?

metamask said 700k gas for initial report and $10, UI said $15 estimate for it, idk why, just try a few actions, UI always gives larger estimate than metamask and MM usually more correct

Handling gas estimates in simplified


Merge "Eric-Hoffer"

[x] This PR adds a new quote from Eric-Hoffer.

015aa2f0c4cf733c544503a14800e7e94c45de79988b97b695fb05acbbddec5c04acffe7daf0f31b04834a4ddd691048730e0e80a1ba60ffde603a447a363ad312992df0bbf225c226dcee7

There never was a good knife made of bad steel. - Benjamin Franklin


Per Execution Listener

I would like to fetch some data from database and pass into per rule. I noticed that there is RuleListener but it seems it is triggered per rule. I think that an API for per execution.

Hi,
Yes the rule listener is executed per rule.
What do you mean an API per execution? Could you please give an example?
Kr
Mahmoud

I am in the process of implementing coupon campaigns. I would like to query database coupons before evaluations starting. I will pass them to rules as a fact. Specifically I need some hooks in com.clovify.mm.core.jeasy.LifeCycleAwareRulesEngine#apply before LOGGER.info("Rules evaluation started");.

Thank you for the example, I see now. Basically you are looking for something like a RulesEngineListener which is executed per rule set, not per rule.
Is this correct? I want to make sure I correctly understand your request.

What is the best place to fetch some data for rules?

The best place would be in the RulesEngineListener#beforeFiringRules method 😄

Yeah exactly :) By the way I had added almost same class :)
public interface LifeCycleListener {
  void beforeEvaluates(Rules rules, Facts facts);
  void afterEvaluates(Rules rules, Facts facts);
}```

But `RulesEngineListener` reflects better need. :)

ok cool. But in hindsight, do we really need such a listener? What would be the added value compared to something like:
Data data = .. // fetch data before rule set execution
facts.put("data", data);

rulesEngine.fire(rules, facts);

// check facts after rule set execution

The RuleListener makes sense since we don't have access to facts before/after execution of each rule (unless there is only one registered rule of course). But in the case of RulesEngineListener, we have access to the facts before/after the whole execution. Why would I need to implement an listener, register it and make the engine call it for me instead of writing the code before/after calling the engine as in the example. Do you see the point?

I will have some modules which will encapsulated all logic. Such an interface will be a contract between modules and core logic.

That makes perfect sense. The interface actually has some benefits:

may serve as contract between different modules (as you said)
may encapsulate some logic that can be reused
is more elegant than putting logic before/after running the engine (as in my previous comment)
is consistent with the existing API: having a RuleListener per rule and a RulesEngineListener per rule set makes sense

So let me plan this for next release!
I'll let you know when a snapshot version with the addition is published to give it a try before the release.
Thank you for this suggestion!
Kr,
Mahmoud

@benas
This commit is nice. The code reside in https://github.com/j-easy/easy-rules/blob/42251de30ee585c221434ec8b1f1eb8555b7538b/easy-rules-core/src/main/java/org/jeasy/rules/core/DefaultRulesEngine.java#L101-L109 can be refactored into a listener.  This will be nice since we can delegate in this case to default implementation.

yes that was coming 😄 I was planning to add a DefaultRulesEngineListener (like the current DefaultRuleListener) to encapsulate the logging. This will remove the need for the apply method.
I will deploy v3.1 snapshot and keep you posted.
Thanks for the review!

This issue should be fixed now: methods were renamed to be able to use them in both fire and check methods. A default rules engine listener was added to encapsulate the logic.
Version 3.1.0-SNAPSHOT is deployed to maven central, @cemo can you give a try to the listener you requested?

tested. :shipit:

Great! thank you for your time!


A tool to identify inconsistent disk failures

Is your feature request related to a problem? Please describe.
Yeah, when one disk of one of the workers has inconsistent disk failures, client operations are likely to fail.
For example, in an Alluxio cluster with 5 workers, each worker is configured with 4 SSD. One of the SSD is flaky with error:
2020-04-29 18:00:38,584 ERROR AbstractReadHandler - Failed to close the request.
java.nio.file.NoSuchFileException: /ssd1/alluxioworker/.tmp_blocks/101/<block>
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:409)
    at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
    at java.nio.file.Files.move(Files.java:1395)
    at alluxio.util.io.FileUtils.move(FileUtils.java:207)
    at alluxio.worker.block.TieredBlockStore.commitBlockInternal(TieredBlockStore.java:547)
    at alluxio.worker.block.TieredBlockStore.commitBlock(TieredBlockStore.java:269)
    at alluxio.worker.block.DefaultBlockWorker.commitBlock(DefaultBlockWorker.java:327)
    at alluxio.worker.block.DefaultBlockWorker.closeUfsBlock(DefaultBlockWorker.java:605)
    at alluxio.worker.grpc.BlockReadHandler$BlockDataReader.completeRequest(BlockReadHandler.java:96)
    at alluxio.worker.grpc.BlockReadHandler$BlockDataReader.completeRequest(BlockReadHandler.java:70)
    at alluxio.worker.grpc.AbstractReadHandler$DataReader.runInternal(AbstractReadHandler.java:407)
    at alluxio.worker.grpc.AbstractReadHandler$DataReader.run(AbstractReadHandler.java:323)
    at alluxio.worker.grpc.BlockReadHandler$BlockDataReader.run(BlockReadHandler.java:70)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at alluxio.worker.grpc.GrpcExecutors$ImpersonateThreadPoolExecutor.lambda$execute$0(GrpcExecutors.java:82)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2020-04-29 18:00:38,589 WARN  UnderFileSystemBlockReader - Failed to update block writer for UFS block [blockId: <id>, ufsPath: <ufs_path>, offset: 0]: Failed to create block path  /ssd1/alluxioworker/.tmp_blocks/22/<block>
2020-04-29 18:00:38,650 WARN  AbstractReadHandler - Exception occurred while completing read request BlockReadRequest{chunkSize=..., end=...., id=..., openUfsBlockOptions=ufs_path: "<path>"
offset_in_file: ...
block_size:....
maxUfsReadConcurrency: ...
mountId: 1
no_cache: false
, promote=true, sessionId=...., start=0}.: /ssd1/alluxioworker/.tmp_blocks/13/<block>

When this happens, all the client operations may be affected. Any operations that go to this SSD will be stuck there. Some operations with a retry mechanism will eventually succeed but take a long time.
After removing this flaky SSD, all client operations work as expected.
Describe the solution you'd like
Solution 1: Better handle this kind of error and do not block client operations. (bigger scope and may be harder to implement
Solution 2: Have a tool to identify this kind of inconsistent disk failures and warn users at the very first beginning when it occurs.

How do you define a "flaky disk"? Maybe a broken disk can be told by alluxio runTests? A further question may be, is detecting the flakiness of physical device beyond our boundary?

Seems like it's not priority


Trust dialog: screen reader is not very helpful

At least on macOS when I start VSCode with screen reader enabled and the trust dialog opens right on startup, there is no mention of a dialog in the output.
Compared to e.g. a native dialog where I get this info read out.
I wonder how this makes it hard for users that require a screen reader to understand what is going on in VSCode when you open with trust enabled for the first time.
//cc @isidorn

I already provided some accessibillty feedback here https://github.com/microsoft/vscode/issues/121094
But yes the content of the custom dialog should be read out

@bpasero you are referring to the startup dialog right? (as opposed to the trust editor?) I made changes for this earlier in the milestone and I hear the dialog read on Windows with NVDA, is any part of the dialog read on macOS?

@sbatten yes, the trust dialog (not the editor). I hear the button being read that has keyboard focus, but nothing else.

fixed by https://github.com/microsoft/vscode/issues/127303

This doesn't work for me: https://memes.peet.io/img/7fa57564-248d-4e57-8e7c-31a882021263.mp4

After discussing with @connor4312, we found that this was due to live share stealing focus, will open a separate issue for them to investigate.

live share issue https://github.com/MicrosoftDocs/live-share/issues/4343


Qa/testing

Fix broken tests and do some linting.
Do you have a linter config for this package?

No, specific linter is configured. I just use the same Prettier as for diary. Looks like you are using a different linter config than me.


Microsoft Guidance integration/implementation

Do you plan to integrate your prompt template with the feature implemented in the mirosoft guidance project? https://github.com/microsoft/guidance
Both these project are under the microsoft organization, it would be a pity to waste what you can theoretically achieve with guidance, that's a python native library.
Any plan to do something like that?
I've to say in my project I've currently implemented my own integrations from scratch because C# ecosystem is lackluster in this regard, it has very few low level libraries, but I would be happy to use a library if it implements what I need, and one of these is a prompt template engine like guidance.
Actually I'm experimenting with Fluid/Liquid template but I don't want to reinvent the wheel if there is a chance to reuse something more established and battle tested
Thanks

@JTremb Just saw this! Thank you for the initial PR! We definitely would love to work well with Guidance and this can go a long way to making sure the projects complement one another!
@MithrilMan are you primarily using C#?

@MithrilMan Appreciate the desire to have more of these great features inside C#! There's a vibrant community there but they often have to sit on the sidelines for all the exciting things happening in ML. SK hopefully helps change that!
In terms of Guidance, I'm not sure where C# fits into their own roadmap. The project was started by a couple of researchers at Microsoft and to their credit, they've gotten some good adoption and interest! From our side, we want to unify as much as we can from these projects into SK so that there is a consistent developer story for those building with AI in their apps.
If there are specific features you'd like to see implemented, please let us know!

@alexchaomander Guidance allows more expression in prompt template. If I had to call out features after my first look, I would vote for more logic control flow.
For example at any point during execution the language model can be used to generate text (using the {{gen}} command) or make logical control flow decisions (the {{#select}}...{{or}}...{{/select}} command). In SK I can run multiple prompts to simulate {{gen}} in SK and I can maybe mix multiple plugins and C# to get logic control, but Guidance is more elegant in this regard for some use cases and it gives me the ability to better encapsulate my intent as a prompt engineer in a single prompt template.
Guidance's token healing is interesting. Also, the Guidance section on Agents that can await input was exciting to read about and it generated new ideas in my head.
Overall, Guidance is Python and I'm ride or die C#, Guidance is not intuitive to me and the syntax is distracting when I'm reading it, but it grew on me and the more I read it the more I wanted it in SK.
Don't get me wrong, I love SK, it's my jam, and I realize we are all on a new ride with much to learn, prioritize, and do but from a prompt template perspective Guidance is something I would love to see in SK. I'm a mere mortal amongst you LLM gods, but if I could provide some value in bringing a new prompt template experiences to SK, I would love to be a part of any discussion and work to make it happen.

Closing for now as the PR is closed.

@evchaki the PR was unrelated because I was talking about a C# implementation while the PR was for python


Frontend submit

@Nasser-Eddin-Nasser I have pushed some changes. Can you fetch the new changes and modify the eventEmitter handler name changes in html? Also comment the code. In the sideMenuList modify the id:3 instead of 2 as the contact information page will be 2nd one. I am planning to change this approach  in the near future.


Remove phantomjs

fixes the breaking change of django-querysetsequence v0.9 keeping backward compatibility #1050.
comments out a test case that needs some attention to be fixed.

I can create a separate PR with the changes advised.

No need to create a new PR.
You should be able even to push to my existing branch (#1052) as a member I guess.


Support linux/arm64 build

Now we are using go1.7 there are more architectures we could be building for.  linux/arm64 is quite an important one - there may be others I've missed.
To add a new build architecture it is a matter of editing cross-compile.sh and docs/content/downloads.md.in

Just compiled on my arm64 android devices.
Appears to have worked just fine :)

Excellent!  Arm64 Linux builds will be part of rclone's normal build now.


Fix 2D editor menu position

Fixes the position of right-click menu in the 2D editor. It now appears without offset.
Extracted from #58371 (the PR takes time to be merged and the issue bothered me in the meantime :/ )

Thanks!


Add support for conditionals

Does this warn about e.g. github?

Yes, I think the warning behavior is correct now.
Sent from mobile

On 27 Feb 2016, at 6:31 PM, Oleg Grenrus<EMAIL_ADDRESS>wrote:
Does this warn about e.g. github?
—
Reply to this email directly or view it on GitHub.

LGTM, I ported tests from my branch: https://github.com/phadej/hpack/commit/37cc2c9edff4134fd694445792ccab6d813b6542 if you want to include them.

@phadej Thanks for the review!  And yes, please open a PR with your two test cases.


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-main" workflow

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (ad9dc6d) 95.69% compared to head (0482657) 95.69%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #866   +/-   ##
=======================================
  Coverage   95.69%   95.69%
=======================================
  Files           1        1
  Lines         395      395
  Branches       53       53
=======================================
  Hits          378      378
  Misses         17       17

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Observables continue being evaluated after stream completes

When a stream (chain of observables) completes, subscribers will stop receiving events (as expected), but any observables higher up the chain that would have been evaluated if the stream was still active, are still evaluated after the stream completes.
See the following Lua snippet:
rx = require 'rx'

subject_1 = rx.Subject.create()

positive_cubes = subject_1:
  filter(function(v)
    print "--> PC 1"
    return v > 0
  end):
  map(function(v)
    print "--> PC 2"
    return v*v*v
  end):
  take(2)

positive_even_cubes_times_two = positive_cubes:
  filter(function(v)
    print "--> PEC 1"
    return (v % 2) == 0
  end):
  map(function(v)
    print "--> PEC 2"
    return v*2
  end):
  first()

negative_cubes = subject_1:
  filter(function(v)
    print "--> NC 1"
    return v < 0
  end):
  map(function(v)
    print "--> NC 2"
    return v*v*v
  end)

pc_sub = positive_cubes:dump("positiveCubes")
pec_sub = positive_even_cubes_times_two:dump("positiveEvenCubesTimesTwo")
nc_sub = negative_cubes:dump("negativeCubes")

subject_1:onNext(-1)
subject_1:onNext(4)
subject_1:onNext(3)
subject_1:onNext(5)
subject_1:onNext(2)
subject_1:onNext(4)
subject_1:onNext(-4)
subject_1:onNext(4)
subject_1:onNext(-4)

This creates three streams sharing the same subject. The positiveCubes stream completes after two values are pushed for which x^3 is positive. The positiveEvenCubesTimesTwo stream completes after one value is pushed for which x^3 is even. The negativeCubes stream never completes.
Each observable produces a side effect (the print statement). Execting the script produces the following output:
lua rx_test.lua
--> PC 1
--> PC 1
--> NC 1
--> NC 2
negativeCubes onNext: -1
--> PC 1
--> PC 2
positiveCubes onNext: 64
--> PC 1
--> PC 2
--> PEC 1
--> PEC 2
positiveEvenCubesTimesTwo onNext: 128
positiveEvenCubesTimesTwo onCompleted
--> NC 1
--> PC 1
--> PC 2
positiveCubes onNext: 27
positiveCubes onCompleted
--> PC 1
--> PC 2
--> PEC 1
--> NC 1
--> PC 1
--> PC 2
--> PC 1
--> PC 2
--> NC 1
--> PC 1
--> PC 2
--> PC 1
--> PC 2
--> NC 1
--> PC 1
--> PC 2
--> PC 1
--> PC 2
--> NC 1
--> PC 1
--> PC 1
--> NC 1
--> NC 2
negativeCubes onNext: -64
--> PC 1
--> PC 2
--> PC 1
--> PC 2
--> NC 1
--> PC 1
--> PC 1
--> NC 1
--> NC 2
negativeCubes onNext: -64

As can be seen from the output, the observables in the positiveCubes stream are still being called after the stream completes. Interestingly, the observables in the positiveEvenCubesTimesTwo streams are also called after the stream completes, but only once, after that they are not evaluated anymore (?).
Recreating the same example using rxJS:
rx = require('rxjs/Rx');

subject_1 = new rx.Subject()

positive_cubes = subject_1.
  filter(function(v) {
    console.log('--> PC 1');
    return (v > 0);
  }).
  map(function(v) {
    console.log('--> PC 2');
    return v*v*v
  }).
  take(2);

positive_even_cubes_times_two = positive_cubes.
  filter(function(v) {
    console.log('--> PEC 1');
    return ((v % 2) == 0);
  }).
  map(function(v) {
    console.log('--> PEC 2');
    return (v*2)
  }).
  first();

negative_cubes = subject_1.
  filter(function(v) {
    console.log('--> NC 1');
    return (v < 0);
  }).
  map(function(v) {
    console.log('--> NC 2');
    return (v*v*v)
  });

positive_cubes.
  subscribe(function(x) {
    console.log('positiveCubes: onNext: ' + x)
  },
  null,
  function() {
    console.log('postitiveCubes: onCompleted');
  });

positive_even_cubes_times_two.
  subscribe(function(x) {
    console.log('positiveEvenCubesTimesTwo: onNext: ' + x)
  },
  null,
  function() {
    console.log('postitiveEvenCubesTimesTwo: onCompleted');
  });

negative_cubes.
  subscribe(function(x) {
    console.log('negativeCubes: onNext: ' + x)
  },
  null,
  function() {
    console.log('negativeCubes: onCompleted');
  });

subject_1.next(-1)
subject_1.next(4)
subject_1.next(3)
subject_1.next(5)
subject_1.next(2)
subject_1.next(4)
subject_1.next(-4)
subject_1.next(4)
subject_1.next(-4)

The output looks as expected:
node rx_test.js
--> PC 1
--> PC 1
--> NC 1
--> NC 2
negativeCubes: onNext: -1
--> PC 1
--> PC 2
positiveCubes: onNext: 64
--> PC 1
--> PC 2
--> PEC 1
--> PEC 2
positiveEvenCubesTimesTwo: onNext: 128
postitiveEvenCubesTimesTwo: onCompleted
--> NC 1
--> PC 1
--> PC 2
positiveCubes: onNext: 27
postitiveCubes: onCompleted
--> NC 1
--> NC 1
--> NC 1
--> NC 1
--> NC 1
--> NC 2
negativeCubes: onNext: -64
--> NC 1
--> NC 1
--> NC 2
negativeCubes: onNext: -64

Observables not being disposed after the stream completes becomes a problem if the number of streams is large, or if temporary/transient streams are created. Over time, the number of observables that are being evaluated unnecessarily because they are part of a completed stream will start to add up.

Any news on this?
Maybe some help needed to close this issue?

Hello, for anyone who might be interested in this topic: I've decided to maintain my own fork (https://github.com/4O4/lua-reactivex) which includes a refactoring in order to fix all the underlying issues and introduce a proper automatic unsubscription mechanism inspired by RxJS internals.
This was a major redesign of some core parts of the code which would probably never be merged in this repo, that's why I decided to make a friendly fork under totally different name to indicate that these two projects are totally different, yet mostly still compatible (unless you rely on bugs like the one described in this issue). You can check out what was the scope of changes in the diff in this PR: https://github.com/4O4/lua-reactivex/pull/2
I'm planning to include in this fork some other patches which were sent to this repository but never merged. Also in the meantime I discovered that the tests don't cover the code very well and are leaking, so I started to improve them and also reconfigure coverage reports to better visualize the parts of code which were assumed to be tested, but actually are not (this effort is partially finished and can be found in this PR: https://github.com/4O4/lua-reactivex/pull/4). So I guess my focus will be on incrementally improving the tests too, not only a standard feature / bugfix development.
Contributions are welcome, if anyone wants to help me with development and bringing some important patches to this fork I would really appreaciate it. Currently I'm maintaining it for my own needs, but I'm sure there are lot of people who could benefit from an updated and actively maintained version of this library. Maybe we will even be able to merge back with this original repository some day if bjornbytes will be interested, who knows. But currently it is as it is, this repo is getting a bit stale and I can't wait for critical patches forever so that's why I'm choosing this alternative path and am willing to move the development forward myself under the separate "brand" :)

Here's the output of the code from the first post in this issue, while using the current version of my reactivex fork:
$ lua issue-22.lua
--> PC 1
--> PC 1
--> NC 1
--> NC 2
negativeCubes onNext: -1
--> PC 1
--> PC 2
positiveCubes onNext: 64
--> PC 1
--> PC 2
--> PEC 1
--> PEC 2
positiveEvenCubesTimesTwo onNext: 128
positiveEvenCubesTimesTwo onCompleted
--> NC 1
--> PC 1
--> PC 2
positiveCubes onNext: 27
positiveCubes onCompleted
--> NC 1
--> NC 1
--> NC 1
--> NC 1
--> NC 1
--> NC 2
negativeCubes onNext: -64
--> NC 1
--> NC 1
--> NC 2
negativeCubes onNext: -64

As you can see it is exactly the same output as expected and exactly the same as RxJS is giving. All of that is achieved without any hacky :unsubscribe()s added everywhere "just in case" ;)


Support for historical/alternative package names

Context
Every once in a while, a distro package's name changes. One reason for this is that we create a version stream for that package, such as in this PR when we renamed php to php-8.2.
Advisory documents reference packages by their name (in .package.name). So one problem that can arise is if a distro package Melange file changes the package name without updating the corresponding advisory document, the link is broken. In this case, no distro package can be found for the given advisory document.
A more user-visible problem with this scenario is that vulnerability scanners will no longer know to apply security data derived from our advisory document when analyzing the installed distro package. This can result in false positives and false negatives, depending on the scanner matching strategy being used.
One last consideration: it's also possible that simply updating the package name in both the Melange file and the advisory document causes a problem. Although we've updated the distro package name, the former package name has been used in published APKs and still exists "in the wild". If we update the package name in the advisory data, scans of installations of these former versions of the APK will can become less accurate, since relevant data is not being leveraged by the scanner.
Proposal
We could add a new field to the advisory document schema where we can list historical/alternative names for the package described in the given advisory document.
For example, in the above PHP example, we might have an advisory document that now looks like this:
schema-version: 2.0.1

package:
  name: php-8.2
  alternative-names:
    - php

advisories:
# ...

Intended benefits of this change

Downstream data artifacts avoid missing this data link. For example, the secdb could include copies of this advisory data listed under both "php-8.2" and "php", ensuring that scanners are never in a place to miss out on this data.
Our advisory tooling is able to link to additional related APKs or entries in the APKINDEX when needed.

Mmh interesting. This also has ramifications on "dumber" environments where automation may not have all the context expressed in the advisories. For example when relying on a purl string :/
Also, alternate names to me invoke an idea of bifurcation, where from that point on there may be more than one package name for the same thing. I'm wondering if something like "obsoletes" in rpm may fit better. While we're not really talking about obsolescence here, the sense is to always prefer the new name.


fix(core): addFormControl apply patchValue only for FormControl instance.

What kind of change does this PR introduce? Bug fix

This change is

Codecov Report

Merging #799 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #799      +/-   ##
==========================================
+ Coverage   91.73%   91.74%   +<.01%
==========================================
  Files          22       22
  Lines         920      921       +1
  Branches      256      257       +1
==========================================
+ Hits          844      845       +1
  Misses         76       76

Impacted Files
Coverage Δ

src/core/src/services/formly.form.builder.ts
96.11% <100%> (+0.02%)
:arrow_up:

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 222c3a0...0028c63. Read the comment docs.


Ledger Nano X no longer works as of 1.5.1 app

We're no longer seeing the device in enumerate:
./hwi.py --debug enumerate
DEBUG:hwilib.devices.trezorlib.transport:Enumerating UdpTransport: found 0 devices
DEBUG:hwilib.devices.trezorlib.transport:Enumerating HidTransport: found 0 devices
DEBUG:hwilib.devices.trezorlib.transport:Enumerating WebUsbTransport: found 0 devices
DEBUG:hwilib.devices.trezorlib.transport:Enumerating UdpTransport: found 0 devices
DEBUG:hwilib.devices.trezorlib.transport:Enumerating HidTransport: found 0 devices
DEBUG:hwilib.devices.trezorlib.transport:Enumerating WebUsbTransport: found 0 devices
[]

When the bitcoin app is closed on the device, it does throw an error as expected, so it seems there's at least some communication:
[{"type": "ledger", "model": "ledger_nano_x", "path": "0001:0006:00", "error": "Could not open client or get fingerprint information: get_pubkey_at_path canceled", "code": -14}]

It possible that this started happening in a slightly earlier version, since I haven't tested every release.
I also tried on a Nano S running 1.5.0: that still works.
Unforuntately the app doesn't have release notes, so it's difficult to triangulate where the issue might be: https://github.com/LedgerHQ/app-bitcoin/tags
cc @btchip @TamtamHero

This commit is the reason for this issue: https://github.com/LedgerHQ/app-bitcoin/commit/a486465d1242889e884046879016d3493940d449
USB PID have changed as described here, but we applied this change to bitcoin app just a few days ago: https://www.ledger.com/windows-10-update-sunsetting-u2f-tunnel-transport-for-ledger-devices

@TamtamHero Can you confirm this was the only relevant change in 1.5.1?
It seems to me now the device gives an error for pubkey requests when locked. Previously you could get an xpub from it even if locked.
A changelog would be nice.

Can you confirm this was the only relevant change in 1.5.1?

I do confirm

Previously you could get an xpub from it even if locked.

This behavior has been changed at least a few months ago, on the firmware side. It's not possible for an app to execute an operation that requires access to the seed when the device is locked.

A changelog would be nice.

Absolutely nothing user facing, expect indirectly this USB PID upgrade, and support for the latest Zcash hard fork.

All right, thanks.

This behavior has been changed at least a few months ago

that's why a changelog would be nice :)

Indeed, noted :+1:
Somehow we have changelogs on some repos (https://github.com/LedgerHQ/app-monero/blob/master/CHANGELOG.md), but not everywhere. We will harmonize this in the future, and we plan to display these logs in the manager of the Ledger Live as well :)


chore: add chromatic workflow and some stories

What does it do?

adds chromatic to the project (only runs on specified stories for now)

Why is it needed?

visual regression testing is very valuable

It gets better, but i need to install an app, i've requested it, but this should work for now... when we've merged this, i can share it with the chromatic team to get our project marked as OSS.


start of white paper

Start the white paper on the voluntary carbon offsets directory, covering:

Background of carbon offsets
Ecosystem mapping of the participants
Current issues and challenges based on research

White paper should be in academic research format with citations from existing literature.

I can help with this issue. Could we start discussing the format and content?

That'd be great.
The content is based on
https://wiki.hyperledger.org/display/CASIG/Voluntary+Carbon+Offsets+Directory+Research+Project
The format is a white paper or paper suitable for publication in a
peer-reviewed journal on the topic.
Si Chen
Open Source Strategies, Inc.
Video: Fighting Climate Change with Blockchain and Open Source
https://youtu.be/NgxNWXa_IjE
On Thu, Jun 3, 2021 at 9:55 AM Lam Duc Nguyen @.***>
wrote:

I can help with this issue. Could we start discussing the format and
content?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/hyperledger-labs/blockchain-carbon-accounting/issues/165#issuecomment-854028160,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANAS4L4BD2K6TSTA74GE63TQ6XYRANCNFSM46BCOEUQ
.

@ryjones could you please assign me to this issue?

Hi @sichen1234 @douniamarbouh,
I created a shared .doc file, we can start writing and adding the content to the whitepaper. Maybe it is more convenient to use google docs for everyone to join to contribute than using Latex.
https://docs.google.com/document/d/14J6LPLRUgzNIeY_Tz1lKZvcjhmftPe8lUrNq9naC4os/edit?usp=sharing

Hi @lamnd09, that's great. We have also another google doc in which we started the paper. I will add you to the list of editors, I just need your email address.

@lamnd09 Could you pls take a look at Dounia's version and merge in any additional comments there.  Also we have a weekly call scheduled for this project at 8 AM PST on Thursday.  Would you like to join us as well?  If so I will send you the invite.

@sichen1234 @douniamarbouh,
Sounds great!
My email is<EMAIL_ADDRESS>You can forward the link to the meeting to me, I would like to join, thanks.


png/zlib related error while running cmake on "Installing USD_FROM_GLTF" step

Hi all,
Thanks for the great program. I'm trying to install ufg on a fresh Ubuntu 14.04 machine on AWS EC2. (I was running into too many problems on Ubuntu 18.04 so I downgraded to the same OS that USD's Travis CI uses)
I'm getting the following error and I would appreciate any help!
ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ python tools/ufginstall/ufginstall.py ~/Downloads/ufg_build /usr/local/USD --force png
Install Settings:
  Source Directory:   /home/ubuntu/Downloads/usd_from_gltf
  Install Directory:  /home/ubuntu/Downloads/ufg_build
  USD Directory:      /usr/local/USD
  Download Directory: /home/ubuntu/Downloads/ufg_build/src
  Build Directory:    /home/ubuntu/Downloads/ufg_build/build
  Build Config:       Release
  CMake Generator:    Default
  Already Installed:  DRACO, GIF, JPG, JSON, STB_IMAGE, TCLAP
  Installing:         PNG, USD_FROM_GLTF

-------- Installing PNG --------
  PNG: Downloading https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz to /home/ubuntu/Downloads/ufg_build/src/png.zip
  PNG: Unpacking to: /home/ubuntu/Downloads/ufg_build/src/libpng-1.6.37
  PNG: CWD: /home/ubuntu/Downloads/ufg_build/build/libpng-1.6.37
  PNG: Run: cmake /home/ubuntu/Downloads/ufg_build/src/libpng-1.6.37 -DCMAKE_INSTALL_PREFIX=/home/ubuntu/Downloads/ufg_build -DCMAKE_PREFIX_PATH=/home/ubuntu/Downloads/ufg_build -DCMAKE_POSITION_INDEPENDENT_CODE=1
  PNG: CWD: /home/ubuntu/Downloads/ufg_build/build/libpng-1.6.37
  PNG: Run: cmake --build . --config Release --target install --

-------- Installing USD_FROM_GLTF --------
  USD_FROM_GLTF: CWD: /home/ubuntu/Downloads/ufg_build/build/usd_from_gltf
  USD_FROM_GLTF: Run: cmake /home/ubuntu/Downloads/usd_from_gltf -DCMAKE_INSTALL_PREFIX=/home/ubuntu/Downloads/ufg_build -DCMAKE_PREFIX_PATH=/home/ubuntu/Downloads/ufg_build -DUSD_DIR=/usr/local/USD
  USD_FROM_GLTF: CWD: /home/ubuntu/Downloads/ufg_build/build/usd_from_gltf
  USD_FROM_GLTF: Run: cmake --build . --config Release --target install --
[ 30%] Built target gltf
[ 40%] Built target common
Scanning dependencies of target process
[ 42%] Building CXX object process/CMakeFiles/process.dir/image_png.cc.o
[ 45%] Linking CXX static library libprocess.a
[ 71%] Built target process
[ 88%] Built target convert
[ 90%] Linking CXX executable usd_from_gltf
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_reset_crc':
png.c:(.text+0x1e2): undefined reference to `crc32'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_calculate_crc':
png.c:(.text+0x29f): undefined reference to `crc32'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_reset_zstream':
png.c:(.text+0x1779): undefined reference to `inflateReset'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_compare_ICC_profile_with_sRGB':
png.c:(.text+0x3c6d): undefined reference to `adler32'
png.c:(.text+0x3c87): undefined reference to `adler32'
png.c:(.text+0x3cc6): undefined reference to `crc32'
png.c:(.text+0x3ce0): undefined reference to `crc32'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngread.c.o): In function `png_read_destroy':
pngread.c:(.text+0x1794): undefined reference to `inflateEnd'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngrutil.c.o): In function `png_inflate_claim':
pngrutil.c:(.text+0x8db): undefined reference to `inflateReset2'
pngrutil.c:(.text+0x901): undefined reference to `inflateInit2_'
pngrutil.c:(.text+0x94f): undefined reference to `inflateValidate'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngrutil.c.o): In function `png_zlib_inflate':
pngrutil.c:(.text+0xa0e): undefined reference to `inflate'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngrutil.c.o): In function `png_decompress_chunk':
pngrutil.c:(.text+0xe2a): undefined reference to `inflateReset'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngwrite.c.o): In function `png_write_destroy':
pngwrite.c:(.text+0x18d8): undefined reference to `deflateEnd'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngwutil.c.o): In function `png_deflate_claim':
pngwutil.c:(.text+0x997): undefined reference to `deflateEnd'
pngwutil.c:(.text+0xa24): undefined reference to `deflateReset'
pngwutil.c:(.text+0xa56): undefined reference to `deflateInit2_'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngwutil.c.o): In function `png_text_compress':
pngwutil.c:(.text+0xd0b): undefined reference to `deflate'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(pngwutil.c.o): In function `png_compress_IDAT':
pngwutil.c:(.text+0x15d8): undefined reference to `deflate'
collect2: error: ld returned 1 exit status
make[2]: *** [usd_from_gltf/usd_from_gltf] Error 1
make[1]: *** [usd_from_gltf/CMakeFiles/usd_from_gltf.dir/all] Error 2
make: *** [all] Error 2

  USD_FROM_GLTF: ERROR: Command failed: cmake --build . --config Release --target install --
  USD_FROM_GLTF: See log at: /home/ubuntu/Downloads/ufg_build/build/usd_from_gltf/log.txt

As I understand it, it seems that the png library cannot find zlib.
So far I've tried installing zlib1g and zlib1g-dev via apt and installing from source (http://zlib.net/zlib-1.2.11.tar.gz).
I added the most obvious directories to PATH:
/bin
/sbin
/usr/bin
/usr/include
/usr/local/bin
/usr/local/games
/usr/local/lib/
/usr/local/sbin
/usr/local/USD/bin
/usr/sbin

Here are all the zlib/libz related files I could find:
ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ ls /usr/local/lib/
cmake/                         libboost_graph.so              libboost_locale.so.1           libboost_python34.so           libz.so
libboost_fiber.so              libboost_graph.so.1            libboost_locale.so.1.71        libboost_python34.so.1         libz.so.1
libboost_fiber.so.1            libboost_graph.so.1.71         libboost_locale.so.1.71.0      libboost_python34.so.1.71      libz.so.1.2.11
libboost_fiber.so.1.71         libboost_graph.so.1.71.0       libboost_log.so                libboost_python34.so.1.71.0    pkgconfig/
libboost_fiber.so.1.71.0       libboost_iostreams.so          libboost_log.so.1              libboost_regex.so              python2.7/
libboost_filesystem.so         libboost_iostreams.so.1        libboost_log.so.1.71           libboost_regex.so.1            python3.4/
libboost_filesystem.so.1       libboost_iostreams.so.1.71     libboost_log.so.1.71.0         libboost_regex.so.1.71
libboost_filesystem.so.1.71    libboost_iostreams.so.1.71.0   libboost_python.so             libboost_regex.so.1.71.0
libboost_filesystem.so.1.71.0  libboost_locale.so             libboost_python34.a            libz.a

ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ find /usr | grep zlib.h
/usr/src/linux-headers-3.13.0-170/include/linux/zlib.h
/usr/src/linux-headers-3.13.0-170-generic/include/config/jffs2/zlib.h
/usr/src/linux-headers-3.13.0-170-generic/include/config/squashfs/zlib.h
/usr/src/linux-headers-3.13.0-170-generic/include/config/crypto/zlib.h
/usr/src/linux-headers-3.13.0-170-generic/include/config/ubifs/fs/zlib.h
/usr/src/linux-headers-3.13.0-170-generic/include/linux/zlib.h
/usr/include/zlib.h
/usr/local/USD/src/tbb-4.4.6/examples/graph/fgbzip2/bzlib.h
/usr/local/USD/src/boost_1_55_0/boost/iostreams/filter/zlib.hpp
/usr/local/USD/src/boost_1_55_0/boost/iostreams/detail/config/zlib.hpp
/usr/local/USD/include/boost/iostreams/filter/zlib.hpp
/usr/local/USD/include/boost/iostreams/detail/config/zlib.hpp
/usr/local/include/zlib.h
/usr/local/include/boost/beast/zlib.hpp
/usr/local/include/boost/beast/zlib/zlib.hpp
/usr/local/include/boost/iostreams/filter/zlib.hpp
/usr/local/include/boost/iostreams/detail/config/zlib.hpp
/usr/share/doc/zlib1g-dev/examples/zlib_how.html

ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ /sbin/ldconfig -p| grep libz.so
	libz.so.1 (libc6,x86-64) => /usr/local/lib/libz.so.1
	libz.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libz.so.1
	libz.so (libc6,x86-64) => /usr/local/lib/libz.so

I'm not sure what LIBRARY_PATH and LD_LIBRARY_PATH variables do so I haven't really touched those.
Again, any pointers would be appreciated!
Thanks.

That is strange. We are using CMake, which is supposed to handle finding and linking in libraries appropriately.
If you look in:
usd_from_gltf/process/CMakeLists.txt
Before:
if (MSVC)
target_link_libraries(process
Can you add:
message("${ZLIB_LIBRARIES}")
That will at least tell you where CMake thinks your Zlib libraries are. Perhaps for some reason the install was incomplete since it appears to be finding the headers and a directory where it thinks zlib lives. (Otherwise it exists on the first line of that CMake file)
Thanks, and sorry for the trouble!

Thanks for the quick reply @C0DED00D,
so I made the following edit:
# usd_from_gltf/process/CMakeLists.txt
# ...
if (NOT TURBOJPEG_LIBRARY)
  message(FATAL_ERROR "Libturbojpeg not found.")
endif (NOT TURBOJPEG_LIBRARY)

message("${ZLIB_LIBRARIES}")

if (MSVC)
target_link_libraries(process
  common
  "${ZLIB_LIBRARIES}"
  "${draco_LIBRARY_DIR}/dracodec.lib"
# ...

This is the last bit of the log:
# /home/ubuntu/Downloads/ufg_build/build/usd_from_gltf/log.txt

cmake /home/ubuntu/Downloads/usd_from_gltf -DCMAKE_INSTALL_PREFIX=/home/ubuntu/Downloads/ufg_build -DCMAKE_PREFIX_PATH=/home/ubuntu/Downloads/ufg_build -DUSD_DIR=/usr/local/USD
/usr/local/lib/libz.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/Downloads/ufg_build/build/usd_from_gltf

cmake --build . --config Release --target install --
[ 30%] Built target gltf
[ 40%] Built target common
Scanning dependencies of target process
[ 42%] Building CXX object process/CMakeFiles/process.dir/image_png.cc.o
[ 45%] Linking CXX static library libprocess.a
[ 71%] Built target process
[ 88%] Built target convert
[ 90%] Linking CXX executable usd_from_gltf
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_reset_crc':
png.c:(.text+0x1e2): undefined reference to `crc32'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_calculate_crc':
png.c:(.text+0x29f): undefined reference to `crc32'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_reset_zstream':
png.c:(.text+0x1779): undefined reference to `inflateReset'
/home/ubuntu/Downloads/ufg_build/lib/libpng16.a(png.c.o): In function `png_compare_ICC_profile_with_sRGB':
png.c:(.text+0x3c6d): undefined reference to `adler32'
png.c:(.text+0x3c87): undefined reference to `adler32'
png.c:(.text+0x3cc6): undefined reference to `crc32'
png.c:(.text+0x3ce0): undefined reference to `crc32'
# ....

So from what I understood, /usr/local/lib/libz.so must be where CMake is looking for right?
It seems that that file already exists.
ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ ls -l /usr/local/lib/libz*
-rw-r--r-- 1 root root 166346 Oct 15 07:12 /usr/local/lib/libz.a
lrwxrwxrwx 1 root root     14 Oct 15 07:12 /usr/local/lib/libz.so -> libz.so.1.2.11
lrwxrwxrwx 1 root root     14 Oct 15 07:12 /usr/local/lib/libz.so.1 -> libz.so.1.2.11
-rwxr-xr-x 1 root root 129818 Oct 15 07:12 /usr/local/lib/libz.so.1.2.11

ubuntu@ip-172-31-36-22:~/Downloads/usd_from_gltf$ /usr/local/lib/libz.so
Segmentation fault (core dumped)

Which should CMake be looking for -- .so files or .h files?

I believe it should be looking for the .so files. The zlib header seems to be defined, but at the linking stage, it can't find the symbol, which means the compiler is not loading the so for some reason.
Are you using a 64 bit version of Ubuntu? This is a bit of a stretch, but is it possible that the .so is 64 bit and usd_from_gltf is 32 bit or something like that?

I'm on a 64 bit machine: Canonical, Ubuntu, 14.04 LTS, amd64 trusty.
Everything was either downloaded via apt or compiled from source so I'm not sure where 32-bit programs might have leaked in from.
On another note, some people suggest adding -lz at the end of gcc/g++ commands. Can this flag perhaps be passed down to gcc/g++ via CMake?
List of "some people"

https://github.com/madmonkey1907/hakchi/issues/48#issuecomment-376087430
https://stackoverflow.com/a/2395371
https://stackoverflow.com/a/30974901

I should note, I'm a complete newb to CMake so I don't even know what I'm talking about right now. Appreciate your patience!

I wasn't sure where to put the line so I tried putting it here and there but with no luck.
Any suggestions on where to put it?

Tried it and wasn't lucky this time either.
I'll pause using this project for a bit but will come back around!
Thanks for the help 🚀

Sorry for the slow response. Have you tried building zlib from scratch and then changing the Cmake file to point to the version you built directly?
To do that, I'd delete this:
find_package(ZLIB REQUIRED)
if (NOT ZLIB_FOUND)
message(FATAL_ERROR "Missing zlib libs.")
endif (NOT ZLIB_FOUND)
and then set ZLIB_LIBRARIES to the directory of the zlib you built:
set(ZLIB_LIBRARIES "path/to/zlib/you/built")

Good news! It worked!
For future reference if anyone stumbles upon this thread:
I compiled zlib from source and replaced the find_package and if statements with set(ZLIB_LIBRARIES "/path/to/libz.so")  as you told me to.
However, this wasn't enough to solve the issue. I also had to make the following change:
if (MSVC)
target_link_libraries(process
  common
-  "${ZLIB_LIBRARIES}"
   "${draco_LIBRARY_DIR}/dracodec.lib"
   "${giflib_LIBRARY_DIR}/giflib.lib"
   "${stb_image_LIBRARY_DIR}/stb_image.lib"
   "${PNG_LIBRARY}"
+  "${ZLIB_LIBRARIES}"
   "${TURBOJPEG_LIBRARY}"
 )
 else (MSVC)

 target_link_libraries(process
   common
-  "${ZLIB_LIBRARIES}"
   "${draco_LIBRARY_DIR}/libdracodec.a"
   "${giflib_LIBRARY_DIR}/libgiflib.a"
   "${stb_image_LIBRARY_DIR}/libstb_image.a"
   "${PNG_LIBRARY}"
+  "${ZLIB_LIBRARIES}"
  "${TURBOJPEG_LIBRARY}"
)
endif (MSVC)

I'm guessing it's because PNG library depends on zlib so zlib had to be placed after PNG. Not sure why it wasn't a problem on my macOS though.
I'll submit a PR that fixes the library order in process/CMakeLists.txt and downloads zlib as a dependency in ufginstall.py if you think that'll be helpful.

  It'd be worth trying to download zlib as  a dependency, but it seems strange that the CMake check for zlib was executing successfully in your case but it would fail to link.

Making these changes gives me the follow error still, assuming it can't find Zlib. Any help would be really appreciated @C0DED00D @simonseo!
PNG: Run: cmake /areo/areo-export-service/usd_from_gltf/ufg_build/src/libpng-1.6.37 -DCMAKE_INSTALL_PREFIX=/areo/areo-export-service/usd_from_gltf/ufg_build -DCMAKE_PREFIX_PATH=/areo/areo-export-service/usd_from_gltf/ufg_build -DCMAKE_POSITION_INDEPENDENT_CODE=1
-- The C compiler identification is GNU 7.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:42 (find_package)

@kowsheek I’m not sure what the problem might be, but it would be helpful if you provide these information: Which OS are you on? Can you post how your usd_from_gltf/process/CMakeLists.txt looks like right now? Also, where did you place your libz.so file?

Thanks for responding @simonseo! My CMakeLists.txt file. I'm on ubuntu:18.04.
Happy to provide further information.

@kowsheek I think CMake tries to set ZLIB_INCLUDE_DIR to where zlib.h is. Maybe you don't have that file? If you haven't, try sudo apt install zlib1g zlib1g-dev

It's the strangest thing, installing zlib1g-dev and changing the order of  "${ZLIB_LIBRARIES}" fixed the ZLIB problem for me.

Hmmm.. This is a bummer that zlib keeps causing issues. From the perspective of CMake, it appears we are doing the right thing, but it's not working out for everyone. Do you have any suggestions on how to improve this?
Thanks!

@C0DED00D thanks for responding! As you mentioned previously, the process could be smoothed over by including it in the installation process.

I hacked around this same problem on windows as follows:

clone and build zlib from https://github.com/madler/zlib to C:/ZLIBINSTALLPATH/zlib

Edit YOURINSTALLPATH\usd_from_gltf\tools\ufginstall\ufginstall.py to add + lines:
if platform.system() == 'Windows':
gen_args.append('-DCMAKE_GENERATOR_PLATFORM=x64')

gen_args.append('-DPNG_BUILD_ZLIB=yesplease')

gen_args.append('-DZLIB_INCLUDE_DIR=C:/ZLIBINSTALLPATH/zlib')

 gen_args.append('-DZLIB_LIBRARY=C:/ZLIBINSTALLPATH/zlib/Release/zlib.lib')
build_args.append('/m')  # Multithreaded build.

Not the cleanest or most elegant but it works.

Thanks for the info. I think we should try to download zlib as part of the python script and link against a local copy since it seems like this is problematic for a lot of folks. We'll add that to our backlog! Thanks for all of the investigations!

Hi all, thanks for investigating this - I believe this commit should fix these problems going into the future. I'll close this as most of you have already solved your issues, but feel free to reopen if I broke the build for anyone or it still hasn't been resolved.


Make javac annotation-processor-related options configurable in CompilerOptions

-processorpath, -processor and -Akey=value processor arguments.
See discussion at https://groups.google.com/d/topic/gradle-dev/w3aQgjY7mQk

This PR is related to #456. One thing that you should have in place here is reasonable integration test coverage. Especially for ensuring we don't introduce any breaking changes.

Hey @tbroyer,
any update on this?

Was working on it. PTAL?
BTW, I'll have a few amendments to make to the design-doc: remove proc (proc:only won't play well with incremental builds as it won't produce anything in destinationDir), and add a generatedSourcesDir to control javac's -s option.
Would you prefer a separate PR for the design doc than for the implementation (not done yet anyway) or is it OK including both in the same PR? (same commit?) And in any case, should I update this PR with generatedSourcesDir (when I implement it) or would you prefer a separate PR?

sorry for the late reply. I'd prefere to keep the design doc separated for now. thanks

See #616 for the design-doc update

@tbroyer Are you planning to make the proposed changes to the pull request soon?

Will revisit ASAP; should I include the changes described in #616 (annotationProcessing, possibly also generatedSourcesDestinationDir) or would you prefer a separate PR? (given #616 hasn't been merged)

Updated. For some reason, :plugins:integTests seem to deadlock (running with --debug, it seems to come from a Java serialization issue talking to the daemon in DaemonJavaCompilerIntegrationTest; I don't know enough about the daemon to debug this, any hint appreciated).

Hi @tbroyer, I'm having a hard time reproducing the deadlock you're reporting running :plugins:integTest in debug mode. If you would provide steps to reproduce, I'm happy to advise.

$ uname -a
Linux M2800-2 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

$ ./gradlew clean :plugins:integTest
…
> Building 99% > :plugins:integTest > 48 tests completed, 6 skipped

If I run with --debug, the log ends up with an error, then fills up with the 4 last lines:
$ ./gradlew clean :plugins:integTest --debug
…
17:56:55.497 [DEBUG] [TestEventLogger]     Starting process 'Gradle Compiler Daemon 1'. Working directory: /mnt/ssd/tbr/Projets/gradle/subprojects/plugins/build/tmp/test files/DaemonJavaCompilerIntegrationTest/can_use_annotation_...essorpath/z5rfy Command: /usr/lib/jvm/java-8-oracle/bin/java -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Dfile.encoding=UTF-8 -Duser.country=FR -Duser.language=fr -Duser.variant -cp /mnt/ssd/tbr/Projets/gradle/intTestHomeDir/worker-1/caches/3.0-snapshot-1/workerMain/gradle-worker.jar worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Compiler Daemon 1'
17:56:55.497 [DEBUG] [TestEventLogger]
17:56:55.498 [DEBUG] [TestEventLogger]     Successfully started process 'Gradle Compiler Daemon 1'
17:56:55.498 [DEBUG] [TestEventLogger]
17:56:55.692 [DEBUG] [TestEventLogger]     Started Gradle compiler daemon (0.236 secs) with fork options DaemonForkOptions{minHeapSize=null, maxHeapSize=null, jvmArgs=[], classpath=[]}.
17:56:55.693 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger] org.gradle.java.compile.daemon.DaemonJavaCompilerIntegrationTest > can use annotation processor in processorpath STANDARD_ERROR
17:56:55.697 [DEBUG] [TestEventLogger]     Unexpected exception thrown.
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     org.gradle.internal.remote.internal.MessageIOException: Could not write message [ChannelMessage channel: org.gradle.process.internal.worker.request.RequestProtocol, payload: [MethodInvocation method: run(execute, [Ljava.lang.Class;@18274eea, [Ljava.lang.Object;@1c18d936)]] to '/0:0:0:0:0:0:0:1:42760'.
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:111)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.MessageHub$ConnectionDispatch.run(MessageHub.java:298)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at java.lang.Thread.run(Thread.java:745)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     Caused by: java.io.NotSerializableException: org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
17:56:55.697 [DEBUG] [TestEventLogger]
17:56:55.697 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.698 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
17:56:55.698 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.serialize.Message.send(Message.java:40)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.JavaSerializationBackedMethodArgsSerializer$ArraySerializer.write(JavaSerializationBackedMethodArgsSerializer.java:59)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.JavaSerializationBackedMethodArgsSerializer$ArraySerializer.write(JavaSerializationBackedMethodArgsSerializer.java:51)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.MethodInvocationSerializer$MethodInvocationWriter.writeArgs(MethodInvocationSerializer.java:75)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.MethodInvocationSerializer$MethodInvocationWriter.write(MethodInvocationSerializer.java:71)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.MethodInvocationSerializer$MethodInvocationWriter.write(MethodInvocationSerializer.java:56)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.serialize.kryo.TypeSafeSerializer$2.write(TypeSafeSerializer.java:43)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.InterHubMessageSerializer$MessageWriter.write(InterHubMessageSerializer.java:102)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.hub.InterHubMessageSerializer$MessageWriter.write(InterHubMessageSerializer.java:87)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	at org.gradle.internal.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:109)
17:56:55.699 [DEBUG] [TestEventLogger]
17:56:55.699 [DEBUG] [TestEventLogger]     	... 6 more
17:56:55.700 [DEBUG] [TestEventLogger]
17:56:55.774 [DEBUG] [TestEventLogger]
17:56:55.774 [DEBUG] [TestEventLogger] org.gradle.java.compile.daemon.DaemonJavaCompilerIntegrationTest > can use annotation processor in processorpath STANDARD_OUT
17:56:55.774 [DEBUG] [TestEventLogger]     Initialized native services in: /mnt/ssd/tbr/Projets/gradle/intTestHomeDir/worker-1/native
17:56:55.775 [DEBUG] [TestEventLogger]
17:56:56.423 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
17:56:56.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
17:56:56.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
17:56:56.424 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
17:57:06.423 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
17:57:06.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
17:57:06.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
17:57:06.424 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
17:57:16.423 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
17:57:16.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
17:57:16.423 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
17:57:16.424 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.

So, maybe not a deadlock per se, but still the process never finishes unless I terminate it.

@eriwen Did you have a chance to follow up based on the information provided by @tbroyer?

Gradle 3.4 introduced annotationProcessorPath, and I'm not so sure anymore -processor and -Akey=value are worth it.


Fix for non-generally-sized-but-generic subclasses of @objc classes

This cherry-picks the fix from master into swift-2.2-branch.

@jckarter Please review for Swift 2.2

@swift-ci Please test

@swift-ci Please test

Looks good.

I fixed the test, thanks @jckarter. Running tests locally now.

@swift-ci Please test


refactor: extract fees logic from task into reusable functions

Making it easier to reuse these functions in the future in the browser environment.

Withdraw fee is already the total fee, so we don't need to manually add to get total.
https://github.com/zeta-chain/protocol-contracts/blob/038b28c5679b0da145e1822f4b16df9aa30dc2bd/contracts/zevm/ZRC20.sol#L268
I am substracting the protocol fee from the withdraw fee to get the gas part for consistency.

I've also removed getFees as it was dispatching one of the two function based on an argument, kind of useless.