class not found com.viskan.quartz.elasticsearch.GsonSerializer

Hi!
I am very interested in a elastic search jobstore!! When I use this quartz.properties, I tap into a class not found exception
org.quartz.jobStore.class=com.viskan.quartz.elasticsearch.ElasticsearchJobStore
org.quartz.jobStore.hostName=localhost
org.quartz.jobStore.port=9200
org.quartz.jobStore.indexName=quartz_scheduler
org.quartz.jobStore.serializerClassName=com.viskan.quartz.elasticsearch.GsonSerializer
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.quartz.SchedulerConfigException: Could not create serializer [See nested exception: java.lang.ClassNotFoundException: com.viskan.quartz.elasticsearch.GsonSerializer]
at com.viskan.quartz.elasticsearch.ElasticsearchJobStore.createSerializer(ElasticsearchJobStore.java:235)
at com.viskan.quartz.elasticsearch.ElasticsearchJobStore.initialize(ElasticsearchJobStore.java:208)
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1333)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1519)
at org.quartz.impl.StdSchedulerFactory.getDefaultScheduler(StdSchedulerFactory.java:1535)
at TestStore.main(TestStore.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: com.viskan.quartz.elasticsearch.GsonSerializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)
at com.viskan.quartz.elasticsearch.ElasticsearchJobStore.createSerializer(ElasticsearchJobStore.java:230)
... 10 more

Got it! I have copied the GsonSerializer from test to main. It seems the jobs get stored correctly but they are not loaded and executed on startup. And the #clear() method seems to do nothing in the data store.

Hello kic!
I didn't want to have required dependencies (such as Gson) in the project but I still needed an implementation of ISerializer to perform proper integration tests. If you are fine with having Gson as a dependency in your project, copying GsonSerializer is perfectly fine.
Not all parts are implemented, so depending on what trigger you use, etc, the job store might not work as expected. What type of trigger do you use? You can look at some code in the test package to see how you can get it working. Are you sure your jobs are started?
Which #clear() method are you talking about? Do you mean #clearAllSchedulingData()? As I mentioned, the job store isn't 100% implemented. I haven't been developing it for some time.

No the jobs are not fireing. The thing is I would need an implementation where the Store saves every job after execution if the annontation @PersistJobDataAfterExecution is present. Event the JDBC store (which is me option of last ressort :-) does not do this correctly. I would love to use Elasticsearcfh because of its search functionallity (even search for job parameters) und I am already using es in my project.
This is my sample job which I use today, there you can see which clear method I meant:

import foo.FooJob;
import foo.FooJob2;
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import static org.quartz.JobBuilder.newJob;
import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
import static org.quartz.TriggerBuilder.newTrigger;

/**
 * Created by kic on 22.01.15.
 */
public class TestStore {
    public static void main(String[] args) throws SchedulerException, InterruptedException {
        Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
        scheduler.start();
        scheduler.clear(); // clear everything! ... but just in tests ...

        JobDataMap data = new JobDataMap();
        data.put("foobar", 12);
        // data.put("foobar", "12");

        // define the job and tie it to our HelloJob class
        JobDetail job = newJob(FooJob2.class)
                .withIdentity("job6", "group1")
                .storeDurably()
                .usingJobData(data)
                .build();

        // Trigger the job to run now, and then repeat every 40 seconds
        Trigger trigger = newTrigger()
                .withIdentity("trigger6", "group1")
                .startNow()
                //.usingJobData(data)
                .withSchedule(simpleSchedule()
                        .withIntervalInSeconds(2)
                        .repeatForever())
                .build();

        // Tell quartz to schedule the job using our trigger
        Set triggers = new HashSet<>();
        triggers.add(trigger);
        try {
            scheduler.scheduleJob(job, trigger);
        } catch (SchedulerException se) {
            System.out.println("update job");
            scheduler.addJob(job, true);
        }

        // Thread.sleep(6000);
        // scheduler.shutdown();
    }
}

And the foo job

package foo;

import org.quartz.*;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class FooJob2 implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        int count = (int) jobExecutionContext.getJobDetail().getJobDataMap().get("foobar");
        System.out.println("lala neu 3 " + count);
        jobExecutionContext.getJobDetail().getJobDataMap().put("foobar", count++);

    }
}

I will try to investigate your code when I have time, but I can't promise you anything.
We haven't added support for the #clear() method yet. We need to implement the JobStore#clearAllSchedulingData() method for that.
Also, we do not have support for @PersistJobDataAfterExecution and @DisallowConcurrentExecution yet.
Feel free to contribute to the project, as long as your code meets the coding conventions.


prometheus delete Target some issue

I add target to prmetheus config ，
eg：

prometheus graph ，
1、start my server
2、delete target from prometheus config
eg：

help me ，thank you

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.


Issue 1173 js exception on user preferences modal

It includes

Fix for localStorage + preferences
Refactored components from /ui/src/components/userPreferencesFormto functional component
Implemented a generic component to render tabs
Prevent preferences being updated on a non user interaction (save, reset...)

Closes
#1173

@igoroctaviano can you conduct the initial review on this?

@ladeirarodolfo :star2: very good job refactoring this component.

A have a few points:

[Reset to default not working]:

Open user preferences => hotkeys => update hotkey => save => test => refresh page => test again.
Open user preferences => reset to defaults => open again => same value (nothing changed).

[When using keys combination which is not allowed]:

Go to preferences => hotkeys => set a hotkey using the combination (ctrl + r).
Error message quicky appears but disappears immediately.

@ladeirarodolfo 🌟 very good job refactoring this component.

A have a few points:

[Reset to default not working]:

Open user preferences => hotkeys => update hotkey => save => test => refresh page => test again.
Open user preferences => reset to defaults => open again => same value (nothing changed).

[When using keys combination which is not allowed]:

Go to preferences => hotkeys => set a hotkey using the combination (ctrl + r).
Error message quicky appears but disappears immediately.

@dannyrb Can you share what will be the expected behavior here?
What I have implemented

Reset: it will reset for the latest reload config. I.e user reload page, store preferences on localStorage, apply as many changes as desired, at end if he clicks on reset it will restore what was set initially (on reload) of localStorage

Error message: when to clear it out?

@ladeirarodolfo, you may need to work with @igoroctaviano to resolve these conflicts

@ladeirarodolfo, I can merge this once tests pass. If possible, try to avoid using force: true

@dannyrb I've merged this branch on #1207 because I needed the fixes that was done by @ladeirarodolfo to continue other fixes and improvements related to the User Preferences Modal. I've also fixed the E2E tests there -- all passing. Since we have the entire code of this PR there with improvements and everything working, maybe we can close this branch and keep our eyes there -- #1207.
What do you think?


Test with all PHP Versions

This is based on the work of #24
In order to achieve this, I had to upgrade phpunit to 6.5 and orchestra/testbench to 3.5. Most likely will this will mean that the package will be unsupported on applications based on Laravel 5.4 and lower and on PHP 5.6

Their might be even said something for dropping PHP 7.0 and upcoming PHP 7.1 support. Since PHP 7.0 is unsupported and security support for 7.1 will stop on the 1st of December 2019.

Keeping 7.1 for now. Thanks for your help ont this, looked it a very long time ago but didn't got it to work. The testing & travis ci part is kinda new for me. Thanks for showing me what I was doing wrong!

Keeping 7.1 for now. Thanks for your help ont this, looked at it a very long time ago but didn't got it to work. The testing & travis ci part is kinda new for me. Thanks for showing me what I was doing wrong!

No problem :)


Update spanner library

There was a bug that was fixed in v1.45.0 - https://github.com/googleapis/google-cloud-go/issues/7136
We are constantly getting this error.
Could you please release a new version with fresh spanner library?

Which bug are you referring to? It looks like spanner v1.45.0 doesn't contain the commit for the fix you mentioned.

Oh, I'm sorry, didn't check twice if that was really fixed.
Basically I experience a lot of these errors when inserting more than 100k rows:
ERROR: spanner: code = "Aborted", desc = "Transaction aborted. Database schema probably changed during transaction, retry may succeed."

And there is nothing happening in the database other than spanner-cli inserting rows.
Increasing size of bulk insert (--bulk-size of spanner-dump) increases the chance of this error appearing.

I guess it's a Spanner server side issue, not client side.
Could you confirm if the same issue happens when inserting rows with some Go program using spanner client library or gcloud command? If it happens, it must be a Spanner server side issue.

spanner-cli already use spanner/v1.59.0 so we can close this issue.
https://github.com/cloudspannerecosystem/spanner-cli/blob/a0ff8aeb68275bb97ba25aa3c6461591dd5467ae/go.mod#L7


feature: integration with cicd, codeship

Features

Add default CI/CD setup for Codeship Pro
Reduce deployment times - with this setup 4min (but more improvements are coming => goal 1.5-2min)

Changelog

Add codeship pro files (env variables, .codehip folder, Dockerfile, codeship-services.yml, codeship-steps.yml)
Add encrypt/decrypt scripts to help with the encrypted environment variables
Add some basic documentation for setting up CI/CD
Remove Lighthouse and WebHint from linters temporally, we are going to evaluate another way to do this without blocking deployments
Move all the needed dependencies to run a build and linters to dependencies in the package.json, and keep the only development in devDependencies. (We started using npm ci --only=production)

Not sure if it's been done already, but if we want to improve the build time, we could consider caching the .next/ folder across different builds.


Very useful, thank you for your code

Very useful, thank you for your code

Boss, the API you're using has been called too few times. I found a lot of APIs(https://rapidapi.com/socialscraper/api/twitter283/) and don't know how to modify them. Can you help me modify them


UE 4.15.2 Compile Error

Hey I get the following error when I try to compile this with UE 4.15.2:
error C2504: 'TStructOpsTypeTraitsBase2': base class undefined
TStructOpsTypeTraitsBase2 is not a template
Line 72, RuntimeMeshComponent.h

I'm also getting build errors with 4.15.2. This is the error I'm getting:
[2/8] Compile Module.RuntimeMeshComponentEditor.cpp
In file included from /home/hhyyrylainen/Unreal/Thrive/Plugins/RuntimeMeshComponent/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/RuntimeMeshComponent/PCH.RuntimeMeshComponent.h:113:
In file included from /home/hhyyrylainen/Unreal/Thrive/Plugins/RuntimeMeshComponent/Source/RuntimeMeshComponent/Private/RuntimeMeshComponentPluginPrivatePCH.h:12:
../../../Thrive/Plugins/RuntimeMeshComponent/Source/RuntimeMeshComponent/Public/RuntimeMeshComponent.h:73:83: error:
      base class has incomplete type
  ...: public TStructOpsTypeTraits<FRuntimeMeshComponentPrePhysicsTickFunction>
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../Thrive/Plugins/RuntimeMeshComponent/Source/RuntimeMeshComponent/Public/RuntimeMeshComponent.h:73:8: note:
      definition of 'TStructOpsTypeTraits<FRuntimeMeshComponentPrePhysicsTickFunction>' is not complete
      until the closing '}'
struct TStructOpsTypeTraits<FRuntimeMeshComponentPrePhysicsTickFunction> : public TStructOpsTypeT...
       ^
1 error generated.

I was able to fork and fix this: https://github.com/Revolutionary-Games/UE4RuntimeMeshComponent
I can create a pull request if that is a sufficient fix.

And that's what I get for trying to rush through a 4.16 fix...   That's actually been upgraded for 4.16 but for some reason didn't think to preprocess switch the old version back in for previous engines.

Hopefully that's fixed but don't have 4.15 installed atm so can't verify that.

d:\unrealengine4\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(662): error C2280: 'FRuntimeMeshComponentPrePhysicsTickFunction &FRuntimeMeshComponentPrePhysicsTickFunction::operator =(const FRuntimeMeshComponentPrePhysicsTickFunction &)': attempting to reference a deleted function
2>         D:\Unreal Projects\VoxelWorld\Plugins\RuntimeMeshComponent_V2.0_WithSlicer\Source\RuntimeMeshComponent\Public\RuntimeMeshComponent.h(69): note: compiler has generated 'FRuntimeMeshComponentPrePhysicsTickFunction::operator =' here
2>         d:\unrealengine4\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(997): note: see reference to function template instantiation 'bool CopyOrNot(CPPSTRUCT *,const CPPSTRUCT *,int32)' being compiled
2>                 with
2>                 [
2>                     CPPSTRUCT=FRuntimeMeshComponentPrePhysicsTickFunction
2>                 ]
2>         d:\unrealengine4\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(996): note: while compiling class template member function 'bool UScriptStruct::TCppStructOps::Copy(void *,const void *,int32)'
2>         D:\Unreal Projects\VoxelWorld\Plugins\RuntimeMeshComponent_V2.0_WithSlicer\Intermediate\Build\Win64\UE4Editor\Inc\RuntimeMeshComponent\RuntimeMeshComponent.generated.cpp(115): note: see reference to class template instantiation 'UScriptStruct::TCppStructOps' being compiled

Hello,
All existing issues for RMCv2 are being closed as RMCv2 is no longer being supported.  RMCv3 is in beta here : https://github.com/Koderz/RuntimeMeshComponent/tree/Version3Dev
If you encounter this or any new issues in v3 please feel free to open a new issue!
Thanks!
-Koderz


New Device(s): Add New Zigbee Drivers

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

review-requested : @lelandblue

review-requested : @greens

review-requested : @greens

review-requested : @ctowns


Merge branch 'master'

Docs Build status updates of commit 242cf29:
:warning: Validation status: warnings

File
Status
Preview URL
Details

toc.json
:warning:Warning

Details

bread/toc.json
:warning:Warning

Details

sysinternals/downloads/autoruns.md
:white_check_mark:Succeeded
View

sysinternals/downloads/process-explorer.md
:white_check_mark:Succeeded
View

sysinternals/downloads/rammap.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysinternals-suite.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysmon.md
:white_check_mark:Succeeded
View

toc.json

[Warning] Error happen when converting toc.json to Pdf. Details: Could not find file 'T:\uaae\toc.json'.

bread/toc.json

[Warning] Error happen when converting bread/toc.json to Pdf. Details: Could not find a part of the path 'T:\uaae\bread\toc.json'.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit e2085c9:
:warning: Validation status: warnings

File
Status
Preview URL
Details

toc.json
:warning:Warning

Details

bread/toc.json
:warning:Warning

Details

sysinternals/downloads/autoruns.md
:white_check_mark:Succeeded
View

sysinternals/downloads/process-explorer.md
:white_check_mark:Succeeded
View

sysinternals/downloads/rammap.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysinternals-suite.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysmon.md
:white_check_mark:Succeeded
View

toc.json

[Warning] Error happen when converting toc.json to Pdf. Details: Could not find file 'T:\wwdx\toc.json'.

bread/toc.json

[Warning] Error happen when converting bread/toc.json to Pdf. Details: Could not find a part of the path 'T:\wwdx\bread\toc.json'.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


⚠ Bofrost.es has degraded performance

In b0b35db, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1388 ms

Resolved: Bofrost.es performance has improved in a9a0b5c after 6 minutes.


Hilbert Transform gives incorrect outputs

For signals which have large number of values close to 0, like a Gaussian pulse, the instantaneous phase is incorrect. Comparisons made against scipy.hilbert() and their method of calculating phase and frequency.

The signal for which the issue was identified

The issue as visualised

There was an issue with the fillH() method in Hilbert class.
Now rectified. Closed issue.


[Vehicle] Missing attributes related to Eletrical Vehicle (draft needed)

On spec. of VehicleModel has an electric attribute as a valid value for the attribute fuelType, attributes to indicate battery level or fuel level is necessary, the status if it's at a charging station (another possible data model) or charging status, time since charge, etc.
I found some the attribute http://auto.schema.org/fuelCapacity
that's related to this issue, but for hybrid fuel type, but the electric components represent a separated value from the other fuel.  For this reason, the electric fuel should be represented with exclusive attributes
In addition, each battery (for the engine or for other embed electrical purposes)  could have the proper data model to specify their own data value, such as charge level, time since the last charge, temperature, voltage, current voltage, etc.

@LeonanCarvalho could you provide a contribution? I would be happy to review it


feat!: extended the postgresql module to accept IAM users and services accounts

This PR includes an new example module i.e. postgresql-public-iam and extension to the postgresql module that now allows users to create "iam_users" in the following format:
iam_users = [
{
name          = "cloudsql-pg-sa-01"
description   = "A service account to access postgres databases 01"
is_account_sa = true
},
{
name          =<EMAIL_ADDRESS>description   = null
is_account_sa = false
},
]

Thanks for the PR! 🚀✅ Lint checks have passed.

Need to rebase this PR with master.


About improvements when setting signals on railways.

For train double track rails, only bidirectional signal settings are possible. I want you to be able to set the signal in either direction.

What do you mean by "bidirectional signal settings"?

When setting a signal on a bidirectional double track rail, it means that only bidirectional signals can be set. I want to set only one signal.

I want to set the signal in only one direction.

Do you mean priority signs, or something else? Please upload a screenshot as I'm not understanding what you mean by "signal".

got it. Please wait for a while.

As shown in the image, when setting the signal, you can only set it in both directions. I want it to be set in only one direction.

I want you to be able to do it with double track rails.

Also, I want you to be able to select the track.

That would require per-lane signal, planed but not ETA


fix coverage upload in github actions

Codecov Report

:exclamation: No coverage uploaded for pull request base (prep-release@a2ade4e). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             prep-release      #80   +/-   ##
===============================================
  Coverage                ?   82.09%
===============================================
  Files                   ?       38
  Lines                   ?     1240
  Branches                ?        0
===============================================
  Hits                    ?     1018
  Misses                  ?      222
  Partials                ?        0

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Small Additions

Sorry for not making a PR for every feature, kinda got into the flow and forgot to do branches tbh. Hope that's fine!
I added / fixed:

Fixed Aimbot instantly snapping after X shots when smoothing is enabled.
Improved GUI System
Added Notifications for the Damage-Event so it can be viewed ingame without a 2nd monitor
Toggle for ViewModel FOV

I included the imgui-notify library for the notifications.
I'm not really the best at C++. so it might not be the best code BUT i hope it's okay enough for you.

Error C4703 - a potentially uninitialized local pointer variable "icon" - imgui_notify.h - 283

Hi, thanks for these edits, however I do not have time to review the code so I will do it whenever I can since the changes look major.


MySQL database create script should use innodb instead and bigger blob.

MySQL database create script should use innodb instead and a solution to be able to save more than 65535 bytes / BLOB for results (MEDIUMBLOB).
By using innodb, we can use  ROW_FORMAT=COMPRESSED to compress our results blobs. This is pretty essential for big crawls. Not to say innodb has better insert/update performance over myisam. Using MEDIUMBLOB/LONGBLOB over BLOB with ROW_FORMAT=COMPRESSED barely affect any performance.
And a normal BLOB (65535 bytes) for results column is too limiting.

Could you send a PR, the create script is here: https://github.com/binux/pyspider/blob/master/pyspider/database/mysql/resultdb.py#L38

done, thanks

Oyeah I didnt commit ROW_FORMAT=COMPRESSED, it will break if MySQL isnt setup properly for compressed innodb tables
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;
I can write about this on the wiki when I have time, this is essential for big crawls. Because compression in a crawler/scraper environment actually improves the performance. It reduces memory and harddisk requirements.

We can add a parameter to tell whether ROW_FORMAT=COMPRESSED is enabled. It can been set via connection URI like mysql+resultdb://username:password@host:port/resultdb?compress=true

Not sure for what reasons exactly but I had to change table engine to MyISAM to be able to get project results. I use pyspider for data collection and my result table gets easily over 500k rows. With InnoDB accessing results or saving results became tragic as table grew bigger.  (pyspider v0.3.7)


Increase test coverage to 100%

Add tests using groovy spock framework

Working on it

https://github.com/graph-quilt/graphql-orchestrator-java/pull/129 - Please review @ashpak-shaikh , @bhavinshah7 . This PR increases the code coverage from 93% to 96.5%


Set E-Plannning's vendor id

E-Planning's adapter has 0 as its vendor's id, while it should be 90 (Teroa S.A.).
Additionally:

When there aren't active campaigns, responses contain null lists that have to be gently handled.
If a parameter ct=1 is not present in the adapter's request, a redirection to a URL with the missing parameter happens.
When an ad units lacks name in the bid request, the request is properly generated but the bid extraction fails.

PR #311 merged to master. Closing.


language setting is useless

Expected behaviour
Tell us what should happen.
After adding the zh-CN.js to my file the date form should be in Chinese.
Actual behaviour
Tell us what happens instead.
No change,still in English.
Datepicker version used
ex. 1.6.1.
Example code
Jsfiddle example to reproduce the problem.

This looks like more of a problem with your code. Here's is an example with the included locale file and correct language setting: http://jsfiddle.net/zcvq0yhh/262/
Closing this for now.


The document

Dear @memray , could you please write a document about installation and usage of this repo just like the original one. Thanks.

Sorry about the incomplete instruction. I am working on other projects and will not be maintaining this repo for a while.
Overall the repo is working. Please refer to these scripts, which may offer some clues about how to run the code.


namespace error bug

When I run phpunit , it not working. If remove the package , it working. Maybe some questions in package about namespace. Want package to work , thank.
##info
Fatal error: Cannot declare class p3k\Multipart, because the name is already in use in /opt/project/vendor/p3k/multipart/src/p3k/Multipart.php on line 4
[think\exception\ErrorException]
Cannot declare class p3k\Multipart, because the name is already in use
Exception trace:
() at /opt/project/vendor/p3k/multipart/src/p3k/Multipart.php:4
think\Error::appShutdown() at n/a:n/a

my composer.json
{     "name": "topthink/think",     "description": "the new thinkphp framework",     "type": "project",     "keywords": [         "framework",         "thinkphp",         "ORM"     ],     "homepage": "http://thinkphp.cn/",     "license": "Apache-2.0",     "authors": [         {             "name": "liu21st",             "email"<EMAIL_ADDRESS>       }     ],     "require": {         "php": ">=5.4.0",         "topthink/framework": "5.0",         "topthink/think-captcha": "v1.0.7",         "topthink/think-mongo": "v1.6",         "topthink/think-image": "v1.0.7",         "topthink/think-testing": "v1.0.6",         "topthink/think-sae": "v1.1",         "topthink/think-queue": "v1.1.3",         "topthink/think-migration": "v1.1.1",         "doctrine/orm": "^v2.5.6",         "phpexcel/phpexcel": "v1.7.7",         "php-curl-class/php-curl-class": "^7.2.0",         "p3k/multipart": "0.2.0"     },     "extra": {         "think-path": "thinkphp"     },     "config": {         "preferred-install": "dist"     },     "autoload" :{         "psr-4" :{             "imsdk\\" :"vendor/imsdk/",             "ext\\": "ext/",             "crontab\\": "crontab/",             "Predis\\" : "vendor/predis/",             "Entitys\\": "entitys/",             "tests\\": "tests/"         },         "psr-0": {             "Auto": "src/"         }     } }

If the bug  is't solved , I having to copy the file in my project dir , doing requrie use the package.

I'm having trouble re-creating this error. Installing a new project with the composer.json you provided doesn't work, I get errors about missing classes in the think namespace.


Missing time estimate on thorchain streaming swaps

We lost the time estimates on thorchain streaming swaps, add it back

https://dev.thorchain.org/swap-guide/fees-and-wait-times.html#wait-times
There 5 steps to perform a THORChain swap:
1 - Layer1 Inbound Confirmation - assuming the inboundTx will be confirmed in the next block, it is the source blockchain block time.
2 - Observation Counting - time for 67% THORChain Nodes to observe and agree on the inboundTx.
3 - Confirmation Counting - for non-instant finality blockchains, the amount of time THORChain will wait before processing to protect against double spends and re-org attacks.
4 - Outbound Delay - dependent on size and network traffic. Large outbounds will be delayed.
5 - Layer1 Outbound Confirmation - Outbound blockchain block time.

Historically, the thorchain swaps time has been disabled because we were using the total_swap_seconds attribute of thornode response which represents an estimation of the step 3 and 4.
https://dev.thorchain.org/concepts/delays.html
In order to activate this again, we need:

(step 1) A way to calculate the time for a next block to be validated for the starting chain
(step 2) A way to calculate how much time will 67% of the thorchain nodes take to validate the operation (according to thorchain doc, it takes secondes to minutes, but I couldn't find a proper way to calculate this precisely)
we already have the estimation for the step 3 and 4 (if the estimation is right)
(step 5) Same as step 1 but for the destination chain

PLUS:

(step 6) If it's a swapOut, et might need to estimate the time it will take to swap to the longtail asset

For context - time estimation on streaming swaps has been removed in https://github.com/shapeshift/web/pull/5868/files#diff-7c6ea7dd104063ccb4b2272b34e9cbe84f738c52b106cb3597368d29e79a53d8R116-R120 - @woodenfurniture to bring more context though comment should be pretty straightforward.
We didn't have polling of latest Tx status during execution using Midgard back then, however @woodenfurniture has introduced this since then, so IMO we're fine to simply uncomment said code and have the not-so-accurate time-to-completion now that we have pretty much real-time status updates during execution

For context: https://discord.com/channels/554694662431178782/886041582422356018/1247999569522851840


Spacing problems with Scriban

...
There's still a problem with spacing between each field being wildly inconsistent, not really sure how to go about fixing that.
Originally posted by @firox263 in https://github.com/gircore/gir.core/pull/127#discussion_r549238274
:+1: Those vertical white space problems have s.th. to do with the documentation if it is generated / available or not. It is happening for fields in structs, too (but with one line less in between...).
It's not very nice but probably involves some update to Scriban. I did not take the time to reproduce the exact steps involved in it as the behavior is probably intended but not usefull for our case. So we would need to create some minimal samples and explain why it is bad for us and make some suggestions on how to improve it to the scriban project.

Not relevant anymore.


feat: Add write without content length support for cos

COS supports multipart upload, but OpenDAL doesn't implement it yet.

I'm interested in working on this. Please assign this issue to me.

I'm interested in working on this. Please assign this issue to me.

Have fun!


Segmentation fault      depmod -b "${ROOT_PATH}" -a "${BASEDIR}"

I went to do a full update today.  Did apt-get update ; apt-get upgrade ; reboot
That all finished successfully, then tried rpi-update
root@DNS01:~# rpi-update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
#############################################################
WARNING: This update bumps to rpi-4.19.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=224931
##############################################################
Would you like to proceed? (y/N)
*** Downloading specific firmware revision (this will take a few minutes)
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    542      0 --:--:-- --:--:-- --:--:--   543
100 58.3M  100 58.3M    0     0   785k      0  0:01:16  0:01:16 --:--:-- 1333k
*** Updating firmware
*** Updating kernel modules
*** depmod 4.19.34+
/usr/bin/rpi-update: line 94:   785 Segmentation fault      depmod -b "${ROOT_PATH}" -a "${BASEDIR}"

rpi-update shouldn't be considered part of a "full update", and you ought to be using dist-upgrade rather than upgrade. See https://www.raspberrypi.org/documentation/faqs/#pi-software


Add handler for single-element (int) arrays without brackets on CLI

If a user wants to use an action with an array parameter, and passes a single int to this parameter thusly:
st2 run foopack.fooaction arrayparam=51

the API throws an error because the client renders this as an int, and not an array of length 1.
This was because the transform_array function in actions.py first tries to
load the given value as JSON. In the example above, 51 is a valid int in JSON,
so this results in an error because of a mismatch between what the API expected
(array) and what was actually sent (int).
Note that this isn't a problem if the single element in this array is a string; in that case, the exception causes the function to split on commas, and since there aren't any, it returns a list containing a single string member. However, if it's an int, for some reason, json.loads works fine and this bug appears.
To get around this, the user could run something like:
st2 run foopack.fooaction arrayparam=[51]

However, this is a bit unintuitive. Because of the action metadata, we already know
that this should be a list, so we can force it to be. So, this commit adds a
step to check if the value is an int, and if so, force it to be a Python
list. This allows the user to also use the more intutive former example.
Closes https://github.com/StackStorm/st2/issues/3157

Current coverage is 77.41% (diff: 100%)

Merging #3159 into master will increase coverage by 0.03%

@@             master      #3159   diff @@
==========================================
  Files           431        431
  Lines         22236      22240     +4
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          17207      17216     +9
+ Misses         5029       5024     -5
  Partials          0          0

Diff Coverage
File Path

•••••••••• 100%
st2client/st2client/commands/action.py

Powered by Codecov. Last update 4817949...ee2a245

LGTM :+1:

Due to some CI issues, I am closing this PR and re-opening as a PR from the main repo, instead of my fork: https://github.com/StackStorm/st2/pull/3161


support creating circular references for immutable objects

With an immutable class like
@Getter @Builder public class ImmutableThing {     private final ImmutableThing otherThing; }
we would love to be able to do
ImmutableThing.ImmutableThingBuilder thingBuilder = ImmutableThing.builder(); thingBuilder.otherThing(thingBuilder);
in order to instantiate the class with circular references.
Currently, the builder that lombok generates does not seem to allow passing builders instead of actual instances.

The thingBuilder.otherThing(thingBuilder); is no more than a very contrieved way to make thingBuilder get a reference for what it would call as this, i.e., not a real example. Can you provide a complete example more similar to a real use case of the code that you would like? I didn't get it. I suspect that what you want to do would be easier to be solved with traditionally-coded stuff instead of lombokized-stuff.

Let's talk a bit about a real world example and see how useful this
actually would be, then.
Here's some code lifted from a real project, but anonimized to match the
first example:
--
@Builder
@Data
private class Inner {
    @NonNull
    private Long id;

    @NonNull
    private String name;

    @NonNull
    private Outer outer;
}

@Builder
@Data
private class Outer {

    @NonNull
    private Set<Inner> inners;
}

private final List<Long> outerIndices = LongStream.rangeClosed(0,

3).boxed().collect(Collectors.toList();
private final List innerIndices = LongStream.rangeClosed(0,
5).boxed().collect(Collectors.toList();
private final List<Outer> example = outerIndices.stream()
        .map(outerIndex ->
                Outer.builder()
                        .inners(innerIndices.stream()
                                .map(innerThingIndex -> Inner.builder()
                                        .id(innerThingIndex)
                                        .name(format("inner_%s",

innerThingIndex))
.build())
.collect(Collectors.toSet()))
.build())
// Fix back references inside the outer thing
.peek(o -> o.getInners().forEach(inner -> inner.setOuter(o)))
.collect(Collectors.toList());
In this case we have a classic circular reference: All instances of Inner
refer to a singular instance of Outer, and each Outer refers to a Set of
Inner objects.
Now, with this solution using the classic builder, we run into a problem:
We don't have a reference to the outer when we build the inner objects, so
we have to call setOuter() on them afterwards. This is done in the .peek()
call.
( This is also why neither of these objects uses @Value, by the way - that,
and hibernate. Which I won't talk about further. )
So, I guess that what the OP wants to be able to do, is this:

@Builder
@Value
private class Inner {
    @NonNull
    private Long id;

    @NonNull
    private String name;

    @NonNull
    private Outer outer;
}

@Builder
@Value
private class Outer {

    @NonNull
    private Set<Inner> inners;
}

private final List<Long> outerIndices = LongStream.rangeClosed(0,

3).boxed().collect(Collectors.toList();
private final List innerIndices = LongStream.rangeClosed(0,
5).boxed().collect(Collectors.toList();
private final List<Outer> example = outerIndices.stream()
        .map(outerIndex -> {
            Outer.OuterBuilder outerBuilder = Outer.builder();
            return outerBuilder
                    .innersBuilder(innerIndices.stream()
                            .map(innerThingIndex -> Inner.builder()
                                    .id(innerThingIndex)
                                    .name(format("inner_%s",

innerThingIndex))
.outerBuilder(outerBuilder))
.collect(Collectors.toSet()))
.build();
})
.collect(Collectors.toList());

We have to get a reference to that outer builder here, so we're breaking
the lamda, but now we can call .outerBuilder() on that inner builder and
supply it with a builder instance. We do have to call .innersBuilder() on
the outer builder as well, so both builders need to be aware of the
mutual dependency, and when build() is called on the one it will need to
call .build() on the inner builder, too.
So I suppose this is possible. If complicated. And I'd probably not turn it
on by default - you'd have to put a flag on that Builder annotation to make
this be generated.
On Thu, Mar 22, 2018 at 3:15 PM, Victor Williams Stafusa da Silva <
<EMAIL_ADDRESS>wrote:

The thingBuilder.otherThing(thingBuilder); is no more than a very
contrieved way to make thingBuilder get a reference for what it would
call as this, i.e., not a real example. Can you provide a complete
example more similar to a real use case of the code that you would like? I
didn't get it. I suspect that what you want to do would be easier to be
solved with traditionally-coded stuff instead of lombokized-stuff.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1623#issuecomment-375321493,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRa33vbqagBO8ekCq5D_Wt8I5RUkjks5tg7ISgaJpZM4S27zl
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

I never said it was good idea. Just trying to figure out what the original
poster was trying to do here.
As for the circle .. yeah, that's a hard one. It's not possible with just
constructor calls, that's for sure. Something needs to gets instantiated
first and then accept it doesn't have any instances of the other object yet.
I'm guessing that as a static inner class builders have access to the
fields of the object it's instantiating directly, though, so it could have
a special private constructor without the affected fields, use that to
create a partial instance, then call any remaining builders remaining with
references of that partial object to put in place the rest of the data.
Also, any calls to build() on the original builder object would have to be
basically ignored and return the partial instance that is already being
created, to prevent loops.
Not saying it's pretty, either. But it's definitely possible.
On Fri, Mar 23, 2018 at 2:23 PM, Maaartinus<EMAIL_ADDRESS>wrote:

@randakar https://github.com/randakar

Please enclose your code in ```, so it get formatted properly.
The example looks pretty complicated, and...
I don't think, it's really possible for Lombok.

Why? Forget Lombok, forget builders, consider two classes Aand B
referring to each other.
How would you create the circle without re-setting the fields via
reflection?
AFAIK it is possible with a constructor like
A(BBuilder bb) {
this.b = bb.a(this).build();
}
You need a special constructor taking the builder and passing to it the
not-yet-finished this.
How does it generalize to three classes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1623#issuecomment-375663418,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRWHICp1s40FSY87IksbHPj1drBHGks5thPdvgaJpZM4S27zl
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

@randakar

Something needs to gets instantiated first

Not exactly. Something has to start first and something has to finish last. When the calls overlap, magic arises.

use that to create a partial instance

That's ugly. What's worse: It loses the final field visibility guarantee.

This creates two mutually linked objects:
class A {
    private final B b;

    A(Function<A, B> linkingFunction) {
        this.b = linkingFunction.apply(this);
    }
}

@RequiredArgsConstructor
@Builder
class B {
    private final A a;
}

B.Builder bb = B.builder();
A a = new A(a2 -> bb.a(a2).build());

The magic is just passing the not-yet-fully-created A to the B constructor. There're still problems:

While B uses a builder and can be meaningfully configured, I can't see how to configure A.
I can't see how this generalizes to more objects.

Anyway, I don't think, Lombok should do such funny things itself. But maybe it can support it in some simple and generally useful way.

Neat trick. Didn't think of using lambda's that way. Does it actually work?
I kinda expect something to blow up spectacularly, I highly doubt anyone
tests this kinda corner case ;)
Anyway - there really is no way around it.  Fun to think about implementing, bad idea
to actually do..
Op 24 mrt. 2018 04:02 schreef "Maaartinus"<EMAIL_ADDRESS>@randakar https://github.com/randakar
Something needs to gets instantiated first
Not exactly. Something has to start first and something has to finish
last. When the calls overlap, magic arises.
use that to create a partial instance
That's ugly. What's worse: It loses the final field visibility guarantee.
This creates two mutually linked objects:
class A {
private final B b;
A(Function<A, B> linkingFunction) {
    this.b = linkingFunction.apply(this);
}

}
@RequiredArgsConstructor
@Builder
class B {
private final A a;
}
B.Builder bb = B.builder();
A a = new A(a2 -> bb.a(a2).build());
The magic is just passing the not-yet-fully-created A to the B constructor.
There're still problems:

While B uses a builder and can be meaningfully configured, I can't see
how to configure A.
I can't see how this generalizes to more objects.

Anyway, I don't think, Lombok should do such funny things itself. But maybe
it can support it in some simple and generally useful way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1623#issuecomment-375841956,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRdqFU5pTfUBx_GlUcw0iLPuVzzFVks5thbcygaJpZM4S27zl
.

In my request, I tried to come up with a minimal example. It seems it turned out to be degenerate.
To motivate my request, I think @randakar's example of an object model containing back references does a very good job. There might be more complex cycles (depending on the domain), but if it works for back references it will work for anything else as well.
I would like to work with an object model that is semantically immutable. I don't insist on declaring the member final, since I'm well aware that it cannot work if each element of the reference cycle is declared final (as in my bad example, sorry if that added to the confusion). Immutability imho is sufficiently expressed by not having @Setter.
Passing the referenced object's builder instead of the object itself, one could defer the instantiation of that object. The framework could discover that a cycle is to be created. It could then in a first pass instantiate all objects with as many references in place as possible, and in a second pass set all the missing references by calling private setters. Just my thoughts.

@randakar

Neat trick. Didn't think of using lambda's that way. Does it actually work?

Lambdas do only the trick of allowing linking the objects flexibly.
The cycle trick is the constructor calling another one as in my first comment here.
I haven't tried it, but it must work.
@reisners

Immutability imho is sufficiently expressed by not having @Setter.

But without final, there's no safe publishing and someone might spend days on hunting down the problem in some multithreaded code.
However, with final it gets too complicated. Without it, it's much simpler, but very different from how @Builder currently works.

Passing the referenced object's builder instead of the object itself, one could defer the instantiation of that object.

A the very same object can be reference multiple times, passing the builder doesn't seem to be optimal as calling .build() returns a new instance each time. This could be solved via a IdentityHashMap, extending each builder by a reference to the most recently build object, or maybe passing a Supplier<?> instead.
What would be the usage for three objects building a cycle?
A.Builder aBuilder = A.builder();
B.Builder bBuilder = B.builder();
C.Builder cBuilder = C.builder();

aBuilder.data("A-data").b(bBuilder);
bBuilder.data("B-data").c(cBuilder);
cBuilder.data("C-data").a(aBuilder);

A a = aBuilder.build(); // <- this creates all three objects
B b = bBuilder.get(); // retrieving the already build instance

This is pretty ugly. isn't it?

I think that it is doable even if there are many interrelated circular dependencies, tough it is somewhat complicated.
Let's suppose that this is our lombok-spiced code, using an hypothetical @lombok.Builder.Supplied annotation:
import lombok.*;

@Value
@Builder(incompletePublishing = true)
@AllArgsConstructor
public class A {
    @NonNull
    @Builder.Supplied
    private B b;

    @NonNull
    @Builder.Supplied("suppliedC")
    private C c;
}

import lombok.*;

@Value
@Builder(incompletePublishing = true)
@AllArgsConstructor
public class B {
    @NonNull
    @Builder.Supplied
    private A a;

    @NonNull
    @Builder.Supplied
    private C c;

    // Something else not related to circular dependencies.
    @NonNull
    private String d;
}

import java.util.List;
import lombok.*;

@Value
@Builder(incompletePublishing = true)
@AllArgsConstructor
public class C {
    // Circular dependencies with items of a List.
    @NonNull
    @Singular("a")
    @Builder.Supplied
    private List<A> as;

    @NonNull
    @Builder.Supplied
    private B b1;

    @NonNull
    @Builder.Supplied
    private B b2;
}

Those classes A, B and C would be delomboked into something like this:
public final class A {
    private final B b;

    private final C c;

    private A(
            java.util.function.Consumer<A> $lombokIncompletePublisher,
            java.util.function.Supplier<? extends B> b,
            java.util.function.Supplier<? extends C> c)
    {
        if (b == null) throw new NullPointerException("b");
        if (c == null) throw new NullPointerException("c");
        $lombokIncompletePublisher.accept(this);
        this.b = b.get();
        this.c = c.get();
    }

    public B getB() {
        return b;
    }

    public C getC() {
        return c;
    }

    public static ABuilder builder() {
        return new ABuilder();
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public static final class ABuilder {
        private java.util.function.Supplier<? extends B> b;
        private java.util.function.Supplier<? extends C> c;

        private ABuilder() {
        }

        public ABuilder b(B b) {
            this.b = () -> b;
            return this;
        }

        public ABuilder b(java.util.function.Supplier<? extends B> b) {
            this.b = b;
            return this;
        }

        public ABuilder c(C c) {
            this.c = () -> c;
            return this;
        }

        public ABuilder suppliedC(java.util.function.Supplier<? extends C> c) {
            this.c = c;
            return this;
        }

        public A build() {
            return build($lombokDummy -> {});
        }

        public A build(java.util.function.Consumer<A> $lombokIncompletePublisher) {
            return new A($lombokIncompletePublisher, this.b, this.c);
        }

        // toString() method ommited.
    }
}

public final class B {
    private final A a;

    private final C c;

    private final String d;

    private B(
            java.util.function.Consumer<B> $lombokIncompletePublisher,
            java.util.function.Supplier<? extends A> a,
            java.util.function.Supplier<? extends C> c,
            String d)
    {
        if (a == null) throw new NullPointerException("a");
        if (c == null) throw new NullPointerException("c");
        if (d == null) throw new NullPointerException("d");
        $lombokIncompletePublisher.accept(this);
        this.a = a.get();
        this.c = c.get();
        this.d = d;
    }

    public A getA() {
        return a;
    }

    public C getC() {
        return c;
    }

    public String getD() {
        return d;
    }

    public static BBuilder builder() {
        return new BBuilder();
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public static final class BBuilder {
        private java.util.function.Supplier<? extends A> a;
        private java.util.function.Supplier<? extends C> c;
        private String d;

        private BBuilder() {
        }

        public BBuilder a(A a) {
            this.a = () -> a;
            return this;
        }

        public BBuilder a(java.util.function.Supplier<? extends A> a) {
            this.a = a;
            return this;
        }

        public BBuilder c(C c) {
            this.c = () -> c;
            return this;
        }

        public BBuilder c(java.util.function.Supplier<? extends C> c) {
            this.c = c;
            return this;
        }

        public BBuilder d(String d) {
            this.d = d;
            return this;
        }

        public B build() {
            return build($lombokDummy -> {});
        }

        public B build(java.util.function.Consumer<B> $lombokIncompletePublisher) {
            return new B($lombokIncompletePublisher, this.a, this.c, this.d);
        }

        // toString() method ommited.
    }
}

import java.util.List;

public final class C {
    private final List<A> as;

    private final B b1;

    private final B b2;

    private C(
            java.util.function.Consumer<C> $lombokIncompletePublisher,
            java.util.List<java.util.function.Supplier<? extends A>> as,
            java.util.function.Supplier<? extends B> b1,
            java.util.function.Supplier<? extends B> b2)
    {
        if (as == null) throw new NullPointerException("as");
        if (b1 == null) throw new NullPointerException("b1");
        if (b2 == null) throw new NullPointerException("b2");
        $lombokIncompletePublisher.accept(this);
        this.as = as.stream()
                .map(java.util.function.Supplier::get)
                .collect(java.util.stream.Collectors.toUnmodifiableList());
        this.b1 = b1.get();
        this.b2 = b2.get();
    }

    public List<A> getAs() {
        return as;
    }

    public B getB1() {
        return b1;
    }

    public B getB2() {
        return b2;
    }

    public static CBuilder builder() {
        return new CBuilder();
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public static class CBuilder {
        private final java.util.List<java.util.function.Supplier<? extends A>> as;
        private java.util.function.Supplier<? extends B> b1;
        private java.util.function.Supplier<? extends B> b2;

        private CBuilder() {
            this.as = new java.util.ArrayList<>();
        }

        public CBuilder a(A a) {
            this.as.add(() -> a);
            return this;
        }

        public CBuilder a(java.util.function.Supplier<? extends A> a) {
            this.as.add(a);
            return this;
        }

        public CBuilder as(java.util.Collection<? extends A> as) {
            as.forEach(a -> this.as.add(() -> a));
            return this;
        }

        public CBuilder clearAs() {
            this.as.clear();
            return this;
        }

        public CBuilder b1(B b1) {
            this.b1 = () -> b1;
            return this;
        }

        public CBuilder b1(java.util.function.Supplier<? extends B> b1) {
            this.b1 = b1;
            return this;
        }

        public CBuilder b2(B b2) {
            this.b2 = () -> b2;
            return this;
        }

        public CBuilder b2(java.util.function.Supplier<? extends B> b2) {
            this.b2 = b2;
            return this;
        }

        public C build() {
            return build($lombokDummy -> {});
        }

        public C build(java.util.function.Consumer<C> $lombokIncompletePublisher) {
            return new C($lombokIncompletePublisher, this.as, this.b1, this.b2);
        }

        // toString() method ommited.
    }
}

Now, this should do the magic:
import java.util.function.Supplier;

public class Test {
    public static void main(String[] args) {
        // 1. Declare all the builders.
        A.ABuilder builderA1 = A.builder();
        A.ABuilder builderA2 = A.builder();
        B.BBuilder builderB1 = B.builder();
        B.BBuilder builderB2 = B.builder();
        C.CBuilder builderC = C.builder();

        // 2. Get the cached suppliers.
        Supplier<A> sa1 = Cached.cache(builderA1::build);
        Supplier<A> sa2 = Cached.cache(builderA2::build);
        Supplier<B> sb1 = Cached.cache(builderB1::build);
        Supplier<B> sb2 = Cached.cache(builderB2::build);
        Supplier<C> sc = Cached.cache(builderC::build);

        // 3. Populate all the builders
        builderA1.b(sb1).suppliedC(sc);
        builderA2.b(sb2).suppliedC(sc);
        builderB1.a(sa2).c(sc).d("Cupcake");
        builderB2.a(sa1).c(sc).d("Brownie");
        builderC.a(sa1).a(sa2).b1(sb1).b2(sb2);

        // 4. Produce the objects.
        A a1 = sa1.get();
        A a2 = sa2.get();
        B b1 = sb1.get();
        B b2 = sb2.get();
        C c = sc.get();

        // 5. Assert that the objects are what we wanted.
        if (a1.getB() != b1) throw new AssertionError();
        if (a2.getB() != b2) throw new AssertionError();
        if (b1.getA() != a2) throw new AssertionError();
        if (b2.getA() != a1) throw new AssertionError();
        if (a1.getC() != c) throw new AssertionError();
        if (a2.getC() != c) throw new AssertionError();
        if (b1.getC() != c) throw new AssertionError();
        if (b2.getC() != c) throw new AssertionError();
        if (!"Cupcake".equals(b1.getD())) throw new AssertionError();
        if (!"Brownie".equals(b2.getD())) throw new AssertionError();
        if (c.getB1() != b1) throw new AssertionError();
        if (c.getB2() != b2) throw new AssertionError();
        if (c.getAs().size() != 2) throw new AssertionError();
        if (c.getAs().get(0) != a1) throw new AssertionError();
        if (c.getAs().get(1) != a2) throw new AssertionError();
    }
}

But that magic needs a Cached class in order to work:
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

public final class Cached<X> implements Supplier<X>, Consumer<X> {
    private Function<Consumer<X>, X> wrapped;

    private Cached(Function<Consumer<X>, X> wrapped) {
        this.wrapped = wrapped;
    }

    @Override
    public void accept(X x) {
        wrapped = z -> x;
    }

    @Override
    public X get() {
        return wrapped.apply(this);
    }

    public static <X> Supplier<X> cache(Function<Consumer<X>, X> wrapped) {
        return new Cached<>(wrapped);
    }
}

I tested the program composed of the five classes above and it compiles and run correctly in Java 10.
To be able to generate that, those changes would be needed in lombok's implementation:

A new @Builder.Supplied annotation would be needed. It have a String value() default ""; method.

A new boolean incompletePublishing() default false; method in the @Builder annotation would also be needed.

For every field z typed Y in a class X, whenever z is annotated with @Builder.Supplied, two corresponding methods to populate z into the XBuilder would be generated. One is the method generated by the current implementation that receives a Y as a parameter and has the same name of the z field. The other one receives a java.util.function.Supplier<Y> and, if a different name is not specified in the annotation, also has the same name of the z field. Specifying a different name is useful in the situations where simply overloading the method would cause ambiguities or would be undesirable to the user for some other reason.

When the field incompletePublishing = true is present in the @Builder annotation, a Consumer will be provided as the first constructor parameter to allow the this reference leak, so we will be able to crosslink the objects. This also overloads the build method adding one that receives the Consumer in addition to the traditional one that does not. The traditional build method is then implemented as a call to the new one passing a dummy Consumer as a parameter.

For handling the case of @Singular, I'm relying in Java 10 to provide the Collectors.toUnmodifiableList() method. Also, I'm strongly relying in Suppliers, lambdas, method's references and streams everywhere, which are unavailable for Java <= 7. Of course, those could be replaced by other things down to Java 6, at the cost of having a much more complicated implementation (possibly including the horrible switch that is generated nowadays).

For lists annotated with @Singular, the current implementation do not initializes it, leaving it as null and only instantiates the List when it would be needed.

I changed the constructors' accessibility to private. Currently, lombok generates them with package-private acessibility. Any reason why not use private instead of package-private?

There is also a few remarks in this code:

If @Singular is used, no bulk-adding method for a List of Suppliers is provided, much less for a List that mixes instances of both the target type and its Suppliers.

Note the builders are not thread-safe, so is the Cached class. BTW, on a side note, the @Builder documentation should explicitly state that builders are mutable and not thread-safe.

The usage form (exemplified in the steps 1-4 in the Test) is still significantly complex, requiring the user to handle the cached Suppliers directly. Nonetheless, this proves that it is possible without major changes in lombok. However, I think that it is very desirable if somebody finds a simpler way that do not breaks things nor requires too much changes.

@victorwss This nice thing is that all the fields can be final - my Eclipse added the modifiers and it compiles. It has to compile as the fields don't ever get reassigned. The less nice thing is that I don't really understand how it works. ;)
I see a few big problems there:

P1 The helper class Cached adds a runtime dependency. That's something the Lombok authors systematically avoid.
P2 - Java 8+ dependency.  AFAIK, Currently, Lombok works with Java 5+. The implementation could be changed somehow, but there's no Consumer and no Supplier before Java 8.
P3 - Java 10+  dependency. This is trivially solvable.
P4 - Implementation. Someone has to do it and the changes aren't exactly small. The projects owners should be asked if they'd accept the PR.
P5 - Usability. A possibility to create an immutable cyclic object graph is fantastic, but the supplier stuff is a pain. I guess, most users would ignore this new feature (and it's good that nothing changes for them), but those who'd want to use it would complain.

I guess, it's possible to avoid some problems by using the Builder as both the consumer and producer,
ideally without letting them implement the interface. I guess, something like Builder::getOrBuild() (returning the last created instance, if any; otherwise creating and caching a new one) would do. Maybe changing the semantics of Builder::build would be fine, too (e.g., the caching would only get activated by incompletePublishing = true and the cache would get cleared on any change, so that even such builders remain reusable). Am I right?
Actually, incompletePublishing is misnomer, given that the fields can be final. Maybe caching or supportCycles would do.
P4 is the big problem.

@randakar and @Maaartinus. Let me try again:
public final class A {
    private final B b;

    private final C c;

    private A(ABuilder $lombokTemp0) {
        if ($lombokTemp0.b == null) throw new NullPointerException("b");
        if ($lombokTemp0.c == null) throw new NullPointerException("c");
        $lombokTemp0.$lombokLastInstance = this;
        this.b = $lombokTemp0.b.getOrBuild();
        this.c = $lombokTemp0.c.getOrBuild();
    }

    public B getB() {
        return b;
    }

    public C getC() {
        return c;
    }

    public static ABuilder builder() {
        return new ABuilder();
    }

    public ABuilderFactoryInterface $lombokHold() {
        return new ABuilderFactoryInterface() {
            @Override
            public A getOrBuild() {
                return A.this;
            }
        };
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public static final class ABuilder implements ABuilderFactoryInterface {
        private B.BBuilderFactoryInterface b;
        private C.CBuilderFactoryInterface c;
        private A $lombokLastInstance;

        private ABuilder() {
        }

        public ABuilder b(B b) {
            $lombokLastInstance = null;
            this.b = b.$lombokHold();
            return this;
        }

        public ABuilder b(B.BBuilder b) {
            $lombokLastInstance = null;
            this.b = b;
            return this;
        }

        public ABuilder c(C c) {
            $lombokLastInstance = null;
            this.c = c.$lombokHold();
            return this;
        }

        public ABuilder suppliedC(C.CBuilder c) {
            $lombokLastInstance = null;
            this.c = c;
            return this;
        }

        public A build() {
            $lombokLastInstance = new A(this);
            return $lombokLastInstance;
        }

        @Override
        public A getOrBuild() {
            if ($lombokLastInstance == null) build();
            return $lombokLastInstance;
        }

        // toString() method ommited.
    }

    public static interface ABuilderFactoryInterface {
        public A getOrBuild();
    }
}

public final class B {
    private final A a;

    private final C c;

    private final String d;

    private B(BBuilder $lombokTemp0) {
        if ($lombokTemp0.a == null) throw new NullPointerException("a");
        if ($lombokTemp0.c == null) throw new NullPointerException("c");
        if ($lombokTemp0.d == null) throw new NullPointerException("d");
        $lombokTemp0.$lombokLastInstance = this;
        this.a = $lombokTemp0.a.getOrBuild();
        this.c = $lombokTemp0.c.getOrBuild();
        this.d = $lombokTemp0.d;
    }

    public A getA() {
        return a;
    }

    public C getC() {
        return c;
    }

    public String getD() {
        return d;
    }

    public static BBuilder builder() {
        return new BBuilder();
    }

    public BBuilderFactoryInterface $lombokHold() {
        return new BBuilderFactoryInterface() {
            @Override
            public B getOrBuild() {
                return B.this;
            }
        };
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public static final class BBuilder implements BBuilderFactoryInterface {
        private A.ABuilderFactoryInterface a;
        private C.CBuilderFactoryInterface c;
        private String d;
        private B $lombokLastInstance;

        private BBuilder() {
        }

        public BBuilder a(A a) {
            $lombokLastInstance = null;
            this.a = a.$lombokHold();
            return this;
        }

        public BBuilder a(A.ABuilder a) {
            $lombokLastInstance = null;
            this.a = a;
            return this;
        }

        public BBuilder c(C c) {
            $lombokLastInstance = null;
            this.c = c.$lombokHold();
            return this;
        }

        public BBuilder c(C.CBuilder c) {
            $lombokLastInstance = null;
            this.c = c;
            return this;
        }

        public BBuilder d(String d) {
            $lombokLastInstance = null;
            this.d = d;
            return this;
        }

        public B build() {
            $lombokLastInstance = new B(this);
            return $lombokLastInstance;
        }

        @Override
        public B getOrBuild() {
            if ($lombokLastInstance == null) build();
            return $lombokLastInstance;
        }

        // toString() method ommited.
    }

    public static interface BBuilderFactoryInterface {
        public B getOrBuild();
    }
}

import java.util.List;

public final class C {
    private final List<A> as;

    private final B b1;

    private final B b2;

    private C(CBuilder $lombokTemp0) {
        if ($lombokTemp0.as == null) throw new NullPointerException("as");
        if ($lombokTemp0.b1 == null) throw new NullPointerException("b1");
        if ($lombokTemp0.b2 == null) throw new NullPointerException("b2");
        $lombokTemp0.$lombokLastInstance = this;
        java.util.List<A> $lombokTemp1 = new java.util.ArrayList<A>($lombokTemp0.as.size());
        for (A.ABuilderFactoryInterface $lombokTemp2 : $lombokTemp0.as) {
            $lombokTemp1.add($lombokTemp2.getOrBuild());
        }
        this.as = $lombokCopyList($lombokTemp1);
        this.b1 = $lombokTemp0.b1.getOrBuild();
        this.b2 = $lombokTemp0.b2.getOrBuild();
    }

    public List<A> getAs() {
        return as;
    }

    public B getB1() {
        return b1;
    }

    public B getB2() {
        return b2;
    }

    public static CBuilder builder() {
        return new CBuilder();
    }

    // equals(Object), hashCode() and toString() methods ommited.

    public CBuilderFactoryInterface $lombokHold() {
        return new CBuilderFactoryInterface() {
            @Override
            public C getOrBuild() {
                return C.this;
            }
        };
    }

    private static <X> java.util.List<X> $lombokCopyList(java.util.List<X> list) {
        switch (list.size()) {
            case 0:
                return java.util.Collections.<X>emptyList();
            case 1:
                return java.util.Collections.singletonList(list.get(0));
            default:
                return java.util.Collections.unmodifiableList(list);
        }
    }

    public static class CBuilder implements CBuilderFactoryInterface {
        private final java.util.List<A.ABuilderFactoryInterface> as;
        private B.BBuilderFactoryInterface b1;
        private B.BBuilderFactoryInterface b2;
        private C $lombokLastInstance;

        private CBuilder() {
            this.as = new java.util.ArrayList<A.ABuilderFactoryInterface>();
        }

        public CBuilder a(A a) {
            $lombokLastInstance = null;
            this.as.add(a.$lombokHold());
            return this;
        }

        public CBuilder a(A.ABuilder a) {
            $lombokLastInstance = null;
            this.as.add(a);
            return this;
        }

        public CBuilder as(java.util.Collection<? extends A> as) {
            $lombokLastInstance = null;
            for (A a : as) {
                this.as.add(a.$lombokHold());
            }
            return this;
        }

        public CBuilder clearAs() {
            $lombokLastInstance = null;
            this.as.clear();
            return this;
        }

        public CBuilder b1(B b1) {
            $lombokLastInstance = null;
            this.b1 = b1.$lombokHold();
            return this;
        }

        public CBuilder b1(B.BBuilder b1) {
            $lombokLastInstance = null;
            this.b1 = b1;
            return this;
        }

        public CBuilder b2(B b2) {
            $lombokLastInstance = null;
            this.b2 = b2.$lombokHold();
            return this;
        }

        public CBuilder b2(B.BBuilder b2) {
            $lombokLastInstance = null;
            this.b2 = b2;
            return this;
        }

        public C build() {
            $lombokLastInstance = new C(this);
            return $lombokLastInstance;
        }

        @Override
        public C getOrBuild() {
            if ($lombokLastInstance == null) build();
            return $lombokLastInstance;
        }

        // toString() method ommited.
    }

    public static interface CBuilderFactoryInterface {
        public C getOrBuild();
    }
}

public class Test {
    public static void main(String[] args) {
        // 1. Declare all the builders.
        A.ABuilder builderA1 = A.builder();
        A.ABuilder builderA2 = A.builder();
        B.BBuilder builderB1 = B.builder();
        B.BBuilder builderB2 = B.builder();
        C.CBuilder builderC = C.builder();

        // 2. Populate all the builders.
        builderA1.b(builderB1).suppliedC(builderC);
        builderA2.b(builderB2).suppliedC(builderC);
        builderB1.a(builderA2).c(builderC).d("Cupcake");
        builderB2.a(builderA1).c(builderC).d("Brownie");
        builderC.a(builderA1).a(builderA2).b1(builderB1).b2(builderB2);

        // 3. Produce the objects.
        A a1 = builderA1.getOrBuild();
        A a2 = builderA2.getOrBuild();
        B b1 = builderB1.getOrBuild();
        B b2 = builderB2.getOrBuild();
        C c = builderC.getOrBuild();

        // 4. Assert that the objects are what we wanted.
        if (a1.getB() != b1) throw new AssertionError();
        if (a2.getB() != b2) throw new AssertionError();
        if (b1.getA() != a2) throw new AssertionError();
        if (b2.getA() != a1) throw new AssertionError();
        if (a1.getC() != c) throw new AssertionError();
        if (a2.getC() != c) throw new AssertionError();
        if (b1.getC() != c) throw new AssertionError();
        if (b2.getC() != c) throw new AssertionError();
        if (!"Cupcake".equals(b1.getD())) throw new AssertionError();
        if (!"Brownie".equals(b2.getD())) throw new AssertionError();
        if (c.getB1() != b1) throw new AssertionError();
        if (c.getB2() != b2) throw new AssertionError();
        if (c.getAs().size() != 2) throw new AssertionError();
        if (c.getAs().get(0) != a1) throw new AssertionError();
        if (c.getAs().get(1) != a2) throw new AssertionError();
        try {
            c.getAs().add(a1);
            throw new AssertionError();
        } catch (UnsupportedOperationException expected) {
            // Swallow it.
        }
        try {
            c.getAs().remove(a1);
            throw new AssertionError();
        } catch (UnsupportedOperationException expected) {
            // Swallow it.
        }

        // 4. Assert that the builders have expected side-effects if reused.
        B b3 = builderB1.getOrBuild();
        if (b3 != b1) throw new AssertionError();
        builderB1.d("Strawberry");
        B b4 = builderB1.getOrBuild();
        if (b1 == b4) throw new AssertionError();
        B b5 = builderB1.getOrBuild();
        if (b5 != b4) throw new AssertionError();
        B b6 = builderB1.build();
        if (b6 == b4) throw new AssertionError();
        B b7 = builderB1.build();
        if (b7 == b6) throw new AssertionError();
    }
}

If I didn't commit any mistake, this should compile and run from Java 5 without any change. Further, no need to have the Cached class nor to directly handle Suppliers.
However it has a cost (most because we're lacking lambdas):

The constructor signature changed and now only receives its builder. This should be ok as long as it only happens when incompletePublishing = true (or whatever we call that).

We need that horrible $lombokHold methods. They are there to emulate Suppliers that gives the instances on which they're called.

We need to publicly define some unpleasant interfaces that are no more than fancy specifications of Suppliers.

I don't know if we will need those interfaces and thos @lombokHold methods for every builder (I'm afraid of that) or only for those specified with incompletePublishing = true.

@Builder.Supplied became a misnomer, since now it is for injecting builder intances instead of Suppliers.

This should fix P1, P2 and P3. P5 improved significantly, and I don't think it is really possibly to improve it anymore, so I consider it solved. this "only" leaves P4 open.
About incompletePublishing = true being a misnomer, I somewhat agree. Its purpose is to tell lombok that the this reference should leak out of the constructor back to the builder through a callback (now an assignment) before the constructor finishes, when all its fields are still blank. Hence, the name. However, from the user point of view, this name makes no sense (and ditto for caching).
Normally, leaking the this out the of the constructor before it finishes is considered a very bad programming practice, but I'm confident that our case is one of the very rare ones where it is being used safely (as long as the user don't try to use the generated constructor directly or share builders between different threads).
Although there might be other cool tricks that could be possible with that other than making cyclic data, I couldn't think about any. So, supportCycles seems to be the best name so far. Also, using this in a class that has no field annotated with @Builder.Supplied is pointless (or if none of the ones annotated with that are capable of producing a cycle), so a warning should be generated in such cases.

Well, P4 is basically "how does this translate to lombok code that
generates this stuff???" ;-)
Minor nit: At a glance it seems that both the constructors and the call to
.build() are setting $lombokLastInstance. Do we really need both of them to
do that?
Bigger issue in my mind is "How do the generated constructors collide with
the ones we have to generate based on existing annotations?". How do we
deal with things like builder annotations on constructors, for instance?
Anyway, trying to wrap my head around this, so a bit of thinking out loud:
The trick here seems to be:

Generating constructors on objects that take builders for themselves as
an argument.
Those builders cache previously constructed instances of the object in
question so that other objects can get the actual object reference at
construction time and things are only constructed once.
Doing all of the constructor calls at construction time, using
references to each other's builders to fill in the missing data while you
also have access to a "this" reference.

This is not thread safe in the sense that multiple calls to build() from
multiple threads on the same builder object will quite probably go boom.
I think that that is acceptable though, multiple thread sharing instances
of builder objects sounds like a very weird thing to do.
Overall this subject is pretty hard to wrap my head around. Sounds like
debugging this is going to be 'fun' if it explodes. ;-)
On Tue, Mar 27, 2018 at 8:58 AM, Victor Williams Stafusa da Silva <
<EMAIL_ADDRESS>wrote:

@randakar https://github.com/randakar and @Maaartinus
https://github.com/Maaartinus. Let me try again:
public final class A {
private final B b;
private final C c;

private A(ABuilder $lombokTemp0) {
    if ($lombokTemp0.b == null) throw new NullPointerException("b");
    if ($lombokTemp0.c == null) throw new NullPointerException("c");
    $lombokTemp0.$lombokLastInstance = this;
    this.b = $lombokTemp0.b.getOrBuild();
    this.c = $lombokTemp0.c.getOrBuild();
}

public B getB() {
    return b;
}

public C getC() {
    return c;
}

public static ABuilder builder() {
    return new ABuilder();
}

public ABuilderFactoryInterface $lombokHold() {
    return new ABuilderFactoryInterface() {
        @Override
        public A getOrBuild() {
            return A.this;
        }
    };
}

// equals(Object), hashCode() and toString() methods ommited.

public static final class ABuilder implements ABuilderFactoryInterface {
    private B.BBuilderFactoryInterface b;
    private C.CBuilderFactoryInterface c;
    private A $lombokLastInstance;

    private ABuilder() {
    }

    public ABuilder b(B b) {
        $lombokLastInstance = null;
        this.b = b.$lombokHold();
        return this;
    }

    public ABuilder b(B.BBuilder b) {
        $lombokLastInstance = null;
        this.b = b;
        return this;
    }

    public ABuilder c(C c) {
        $lombokLastInstance = null;
        this.c = c.$lombokHold();
        return this;
    }

    public ABuilder suppliedC(C.CBuilder c) {
        $lombokLastInstance = null;
        this.c = c;
        return this;
    }

    public A build() {
        $lombokLastInstance = new A(this);
        return $lombokLastInstance;
    }

    @Override
    public A getOrBuild() {
        if ($lombokLastInstance == null) build();
        return $lombokLastInstance;
    }

    // toString() method ommited.
}

public static interface ABuilderFactoryInterface {
    public A getOrBuild();
}

}
public final class B {
private final A a;
private final C c;

private final String d;

private B(BBuilder $lombokTemp0) {
    if ($lombokTemp0.a == null) throw new NullPointerException("a");
    if ($lombokTemp0.c == null) throw new NullPointerException("c");
    if ($lombokTemp0.d == null) throw new NullPointerException("d");
    $lombokTemp0.$lombokLastInstance = this;
    this.a = $lombokTemp0.a.getOrBuild();
    this.c = $lombokTemp0.c.getOrBuild();
    this.d = $lombokTemp0.d;
}

public A getA() {
    return a;
}

public C getC() {
    return c;
}

public String getD() {
    return d;
}

public static BBuilder builder() {
    return new BBuilder();
}

public BBuilderFactoryInterface $lombokHold() {
    return new BBuilderFactoryInterface() {
        @Override
        public B getOrBuild() {
            return B.this;
        }
    };
}

// equals(Object), hashCode() and toString() methods ommited.

public static final class BBuilder implements BBuilderFactoryInterface {
    private A.ABuilderFactoryInterface a;
    private C.CBuilderFactoryInterface c;
    private String d;
    private B $lombokLastInstance;

    private BBuilder() {
    }

    public BBuilder a(A a) {
        $lombokLastInstance = null;
        this.a = a.$lombokHold();
        return this;
    }

    public BBuilder a(A.ABuilder a) {
        $lombokLastInstance = null;
        this.a = a;
        return this;
    }

    public BBuilder c(C c) {
        $lombokLastInstance = null;
        this.c = c.$lombokHold();
        return this;
    }

    public BBuilder c(C.CBuilder c) {
        $lombokLastInstance = null;
        this.c = c;
        return this;
    }

    public BBuilder d(String d) {
        $lombokLastInstance = null;
        this.d = d;
        return this;
    }

    public B build() {
        $lombokLastInstance = new B(this);
        return $lombokLastInstance;
    }

    @Override
    public B getOrBuild() {
        if ($lombokLastInstance == null) build();
        return $lombokLastInstance;
    }

    // toString() method ommited.
}

public static interface BBuilderFactoryInterface {
    public B getOrBuild();
}

}
import java.util.List;
public final class C {
private final List as;
private final B b1;

private final B b2;

private C(CBuilder $lombokTemp0) {
    if ($lombokTemp0.as == null) throw new NullPointerException("as");
    if ($lombokTemp0.b1 == null) throw new NullPointerException("b1");
    if ($lombokTemp0.b2 == null) throw new NullPointerException("b2");
    $lombokTemp0.$lombokLastInstance = this;
    java.util.List<A> $lombokTemp1 = new java.util.ArrayList<A>($lombokTemp0.as.size());
    for (A.ABuilderFactoryInterface $lombokTemp2 : $lombokTemp0.as) {
        $lombokTemp1.add($lombokTemp2.getOrBuild());
    }
    this.as = $lombokCopyList($lombokTemp1);
    this.b1 = $lombokTemp0.b1.getOrBuild();
    this.b2 = $lombokTemp0.b2.getOrBuild();
}

public List<A> getAs() {
    return as;
}

public B getB1() {
    return b1;
}

public B getB2() {
    return b2;
}

public static CBuilder builder() {
    return new CBuilder();
}

// equals(Object), hashCode() and toString() methods ommited.

public CBuilderFactoryInterface $lombokHold() {
    return new CBuilderFactoryInterface() {
        @Override
        public C getOrBuild() {
            return C.this;
        }
    };
}

private static <X> java.util.List<X> $lombokCopyList(java.util.List<X> list) {
    switch (list.size()) {
        case 0:
            return java.util.Collections.<X>emptyList();
        case 1:
            return java.util.Collections.singletonList(list.get(0));
        default:
            return java.util.Collections.unmodifiableList(list);
    }
}

public static class CBuilder implements CBuilderFactoryInterface {
    private final java.util.List<A.ABuilderFactoryInterface> as;
    private B.BBuilderFactoryInterface b1;
    private B.BBuilderFactoryInterface b2;
    private C $lombokLastInstance;

    private CBuilder() {
        this.as = new java.util.ArrayList<A.ABuilderFactoryInterface>();
    }

    public CBuilder a(A a) {
        $lombokLastInstance = null;
        this.as.add(a.$lombokHold());
        return this;
    }

    public CBuilder a(A.ABuilder a) {
        $lombokLastInstance = null;
        this.as.add(a);
        return this;
    }

    public CBuilder as(java.util.Collection<? extends A> as) {
        $lombokLastInstance = null;
        for (A a : as) {
            this.as.add(a.$lombokHold());
        }
        return this;
    }

    public CBuilder clearAs() {
        $lombokLastInstance = null;
        this.as.clear();
        return this;
    }

    public CBuilder b1(B b1) {
        $lombokLastInstance = null;
        this.b1 = b1.$lombokHold();
        return this;
    }

    public CBuilder b1(B.BBuilder b1) {
        $lombokLastInstance = null;
        this.b1 = b1;
        return this;
    }

    public CBuilder b2(B b2) {
        $lombokLastInstance = null;
        this.b2 = b2.$lombokHold();
        return this;
    }

    public CBuilder b2(B.BBuilder b2) {
        $lombokLastInstance = null;
        this.b2 = b2;
        return this;
    }

    public C build() {
        $lombokLastInstance = new C(this);
        return $lombokLastInstance;
    }

    @Override
    public C getOrBuild() {
        if ($lombokLastInstance == null) build();
        return $lombokLastInstance;
    }

    // toString() method ommited.
}

public static interface CBuilderFactoryInterface {
    public C getOrBuild();
}

}
public class Test {
public static void main(String[] args) {
// 1. Declare all the builders.
A.ABuilder builderA1 = A.builder();
A.ABuilder builderA2 = A.builder();
B.BBuilder builderB1 = B.builder();
B.BBuilder builderB2 = B.builder();
C.CBuilder builderC = C.builder();
    // 2. Populate all the builders.
    builderA1.b(builderB1).suppliedC(builderC);
    builderA2.b(builderB2).suppliedC(builderC);
    builderB1.a(builderA2).c(builderC).d("Cupcake");
    builderB2.a(builderA1).c(builderC).d("Brownie");
    builderC.a(builderA1).a(builderA2).b1(builderB1).b2(builderB2);

    // 3. Produce the objects.
    A a1 = builderA1.getOrBuild();
    A a2 = builderA2.getOrBuild();
    B b1 = builderB1.getOrBuild();
    B b2 = builderB2.getOrBuild();
    C c = builderC.getOrBuild();

    // 4. Assert that the objects are what we wanted.
    if (a1.getB() != b1) throw new AssertionError();
    if (a2.getB() != b2) throw new AssertionError();
    if (b1.getA() != a2) throw new AssertionError();
    if (b2.getA() != a1) throw new AssertionError();
    if (a1.getC() != c) throw new AssertionError();
    if (a2.getC() != c) throw new AssertionError();
    if (b1.getC() != c) throw new AssertionError();
    if (b2.getC() != c) throw new AssertionError();
    if (!"Cupcake".equals(b1.getD())) throw new AssertionError();
    if (!"Brownie".equals(b2.getD())) throw new AssertionError();
    if (c.getB1() != b1) throw new AssertionError();
    if (c.getB2() != b2) throw new AssertionError();
    if (c.getAs().size() != 2) throw new AssertionError();
    if (c.getAs().get(0) != a1) throw new AssertionError();
    if (c.getAs().get(1) != a2) throw new AssertionError();
    try {
        c.getAs().add(a1);
        throw new AssertionError();
    } catch (UnsupportedOperationException expected) {
        // Swallow it.
    }
    try {
        c.getAs().remove(a1);
        throw new AssertionError();
    } catch (UnsupportedOperationException expected) {
        // Swallow it.
    }

    // 4. Assert that the builders have expected side-effects if reused.
    B b3 = builderB1.getOrBuild();
    if (b3 != b1) throw new AssertionError();
    builderB1.d("Strawberry");
    B b4 = builderB1.getOrBuild();
    if (b1 == b4) throw new AssertionError();
    B b5 = builderB1.getOrBuild();
    if (b5 != b4) throw new AssertionError();
    B b6 = builderB1.build();
    if (b6 == b4) throw new AssertionError();
    B b7 = builderB1.build();
    if (b7 == b6) throw new AssertionError();
}

}
If I didn't commit any mistake, this should compile and run from Java 5
without any change. Further, no need to have the Cached class nor to
directly handle Suppliers.
However it has a cost (most because we're lacking lambdas):

The constructor signature changed and now only receives its builder.
This should be ok as long as it only happens when incompletePublishing
= true (or whatever we call that).
2.
We need that horrible $lombokHold methods. They are there to emulate
Suppliers that gives the instances on which they're called.
3.
We need to publicly define some unpleasant interfaces that are no more
than fancy specifications of Suppliers.
4.
I don't know if we will need those interfaces and thos @lombokHold
methods for every builder (I'm afraid of that) or only for those specified
with incompletePublishing = true.
5.
@Builder.Supplied became a misnomer, since now it is for injecting
builder intances instead of Suppliers.
This should fix P1, P2 and P3. P5 improved significantly, and I don't
think it is really possibly to improve it anymore, so I consider it solved.
this "only" leaves P4 open.
About incompletePublishing = true being a misnomer, I somewhat agree. Its
purpose is to tell lombok that the this reference should leak out of the
constructor back to the builder through a callback (now an assignment)
before the constructor finishes, when all its fields are still blank.
Hence, the name. However, from the user point of view, this name makes no
sense (and ditto for caching).
Normally, leaking the this out the of the constructor before it finishes
is considered a very bad programming practice, but I'm confident that our
case is one of the very rare ones where it is being used safely (as long as
the user don't try to use the generated constructor directly or share
builders between different threads).
Although there might be other cool tricks that could be possible with that
other than making cyclic data, I couldn't think about any. So,
supportCycles seems to be the best name so far. Also, using this in a
class that has no field annotated with @Builder.Supplied is pointless (or
if none of the ones annotated with that are capable of producing a cycle),
so a warning should be generated in such cases.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1623#issuecomment-376417982,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRQVdSNHtOdXMLOz-sdkg0M1M_uCCks5tieL6gaJpZM4S27zl
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

And then the equals, hashcode and toString have an infinite loop or stackoverflow?

The thing is, objects with circular references have this problem regardless
of how you look at it. And in some cases the circles can't really be
avoided.
There is a case to be made that in such a case the two objects really
cannot have their identity defined by their link to the other object type.
They shouldn't have.
If you have a basket of apples, the identity of the apples is not defined
by the basket it's in, nor is the identity of the basket defined to the
precise set of apples contained within it.
So it should be up to the developer to manually break them. Lombok can't do
that for you. Nor should it - lombok is a boilerplate reduction tool, not a
solve-the-world fix everything artificial intelligence that understands
what you mean before you even start writing code ;-)
On Tue, Apr 10, 2018 at 8:22 AM, Maaartinus<EMAIL_ADDRESS>wrote:

@randakar https://github.com/randakar But depending on what fields you
exclude, you'll get different results.
Moreover, even for a trivial cycle a <-> b, no matter how you break the
cycle, you'll get one hashCode fully ignoring the other object. That's
not nice. The same for equals.
Anyway, when Lombok creates such a beast, it has to be able to handle it,
too. Automatically. And that in an easy to follow way. I guess, a depth
first search avoiding repetitions using an IdentityHashSet is the obvious
choice. Moreover, it doesn't ignore any member of the object graph.
Compared to the crazy @Builder, it's rather trivial. It should be
switched on by the presence of the crazy builder.
The other thing it that such a graph will still drive crazy about every
tool (JSON, XML, ...).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rzwitserloot/lombok/issues/1623#issuecomment-379987442,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKCRa6Wpb3gG9b6FTQl0arZh12xmbZ3ks5tnE-ggaJpZM4S27zl
.

--
"Don't only practice your art, but force your way into it's secrets, for it
and knowledge can raise men to the divine."
-- Ludwig von Beethoven

+1000
This is really an important issue. BUG really.
Would cause StackOverflow!!!
Jackson has Forward/Backward reference annotation, or something. Please, implement it the same way to indicate Equals/ToString should work unidirectionally.


Fix rendering in Firefox

I just enabled depth. I hope you like it. Cheers :)

Thanks a lot! I had no idea that this was the cause of the problem.


make fails due to "/mnt/richtercloud/sources/FreeRDP/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:135:43: error: ‘AV_CPU_FLAG_MMX2’ undeclared (first use in this function)"

cmake . && make fails with
/mnt/richtercloud/sources/FreeRDP/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c: In function ‘tsmf_ffmpeg_init_audio_stream’:
/mnt/richtercloud/sources/FreeRDP/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:135:43: error: ‘AV_CPU_FLAG_MMX2’ undeclared (first use in this function)
  av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2);
                                           ^
/mnt/richtercloud/sources/FreeRDP/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:135:43: note: each undeclared identifier is reported only once for each function it appears in
channels/tsmf/client/ffmpeg/CMakeFiles/tsmf-client-ffmpeg-decoder.dir/build.make:54: recipe for target 'channels/tsmf/client/ffmpeg/CMakeFiles/tsmf-client-ffmpeg-decoder.dir/tsmf_ffmpeg.c.o' failed

experienced with 1.2.0-beta1+android9-1998-g9520017 on Ubuntu 15.10

@krichter722 1.0.0 is really old. This problem should already be fixed in a more recent version.
If you compile yourself try the latest master from github.
You can also use one of our pre-built packages (https://ci.freerdp.com/job/freerdp-nightly-binaries/)

1.0.0-7730-g9520017 is the output of git describe of the current master, but 1.2.0-beta1+android9-1998-g9520017 of git describe --tags is more useful. Yet, they both refer to the current HEAD of master (see man git describe for an explanation).

@krichter722 it wasn't obvious that you are referring to a git commit - distributions versions often look rather similar. The git commit id itself would have been good as well ;).
What version of ffmpeg/libav you are linking against? The nightly builds on 15.10 we are doing don't show this problem.

1.0.0-9362-g9d4811ee0 works fine out-of-the-box on Ubuntu 16.10.


Oauth: is it possible to pre-fill client-id and client-secret programatically?

I serve the RapiDoc interface and the client-id and client-secret is known in advance for the oauth flows. Is it possible to somehow pre-fill the corresponding form fields of the UI ?

no you cant provide client-id or client-secret programmatically.
I will see what best we can do to provide this feature.

@mrin9 Thanks for the fast response. A click would be excellent, the need is to pre-fill (because the server knows the client-id and secret.
I am in control of the served OpenApi document, I can add the secret in the spec there, this would be excellent!
Kudos to for this very nice project!

check out this example for usage and supported vendor extension
To use an unreleased build, find it at dist/rapidoc-min.js

Thanks @mrin9, this is perfect, and wow was it fast! I'll give it. spin later today.
Thank you again!

Works as expected, thank you for the exceptional turnaround. Thanks @mrin9 !