commure / sourcegen

🐠Like procedural macro, but generates sources! 🐡
Apache License 2.0
30 stars 4 forks source link

🐞Remove attributes which generators are not allowed to modify #5

Closed idubrov closed 5 years ago

idubrov commented 5 years ago

Currently we would give the generator all of the attributes (including the #[sourcegen::sourcegen] attribute itself).

Since we don't allow modifying attributes in front of the #[sourcegen] attribute and the #[sourcegen] attribute itself, we should not provide them to the generator (with the assumption that generator can spit attrs back without doing any adjustments).

We still need to provide the #[sourcegen] attribute itself, as it might contain extra configuration for the generator, so maybe it should go into another parameter.

idubrov commented 5 years ago

Should be fixed now.