{"action":"created","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/510","repository_url":"https://api.github.com/repos/mapstruct/mapstruct","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/510/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/510/events","html_url":"https://github.com/mapstruct/mapstruct/issues/510","id":63170095,"number":510,"title":"fail if Project Lombok is used (projectlombok.org)","user":{"login":"bosyak","id":1235603,"avatar_url":"https://avatars.githubusercontent.com/u/1235603?v=3","gravatar_id":"","url":"https://api.github.com/users/bosyak","html_url":"https://github.com/bosyak","followers_url":"https://api.github.com/users/bosyak/followers","following_url":"https://api.github.com/users/bosyak/following{/other_user}","gists_url":"https://api.github.com/users/bosyak/gists{/gist_id}","starred_url":"https://api.github.com/users/bosyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosyak/subscriptions","organizations_url":"https://api.github.com/users/bosyak/orgs","repos_url":"https://api.github.com/users/bosyak/repos","events_url":"https://api.github.com/users/bosyak/events{/privacy}","received_events_url":"https://api.github.com/users/bosyak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":42,"created_at":"2015-03-20T05:57:07Z","updated_at":"2016-12-08T21:42:48Z","closed_at":null,"body":"Hi.\nI'm using Project Lombok and unable generate mappers with maven.\nI use @Data annotation (lombok) if it make sense.\n"},"comment":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/comments/265864270","html_url":"https://github.com/mapstruct/mapstruct/issues/510#issuecomment-265864270","issue_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/510","id":265864270,"user":{"login":"gunnarmorling","id":28612,"avatar_url":"https://avatars.githubusercontent.com/u/28612?v=3","gravatar_id":"","url":"https://api.github.com/users/gunnarmorling","html_url":"https://github.com/gunnarmorling","followers_url":"https://api.github.com/users/gunnarmorling/followers","following_url":"https://api.github.com/users/gunnarmorling/following{/other_user}","gists_url":"https://api.github.com/users/gunnarmorling/gists{/gist_id}","starred_url":"https://api.github.com/users/gunnarmorling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunnarmorling/subscriptions","organizations_url":"https://api.github.com/users/gunnarmorling/orgs","repos_url":"https://api.github.com/users/gunnarmorling/repos","events_url":"https://api.github.com/users/gunnarmorling/events{/privacy}","received_events_url":"https://api.github.com/users/gunnarmorling/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T21:42:48Z","updated_at":"2016-12-08T21:42:48Z","body":"Hey @rzwitserloot, thanks for stopping by!\r\n\r\nI don't think there should any assumption be made on the order of processor execution. Even if you manage to get it to work for Maven, there are other build tools and also execution within IDEs. It seems like opening a can of worms.\r\n\r\nBy now, MapStruct can deal with types whose hierarchy gets expanded by other processors. While JSR 269 does not allow to modify a type itself, processors can generate super-types of the compiled classes. In such a case one will see type mirrors of `Kind.ERROR` (because the super-class to be generated does not exist yet when visiting the sub-type from which it gets generated in the first round). MapStruct will then defer processing of the affected mappers to the next round (or defer it again if yet another super-type is generated from that intermediate super-type). I.e. MapStruct will wait with processing of mappers until the hierarchies of the types under compilation have stabilized (or, if a referenced super-type never gets generated, this is a regular compile error in which case we don't need to care about generating mappers).\r\n\r\nIt's my understanding that this is how conforming JSR 269 processors are supposed to behave.\r\n\r\nSo if Lombok somehow managed to let types which it hasn't amended yet have type kind `ERROR`, MapStruct should be able to do the right thing (we'll fetch new type mirrors for types deferred to later rounds, so we'll see their latest state). But I guess that brings us back to the initial question of ordering, you probably cannot do this when Lombok runs after other processors such as MapStruct. Essentially it all boils down to the fact that Lombok is doing things - altering types - that simply have not been foreseen by the JSR 269 infrastructure.\r\n\r\nI'd be happy to be proven wrong of course!"}}
{"actor":{"display_login":"gunnarmorling"}}