Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate custom attributes of enum fields. #28

Conversation

moinessim
Copy link

Avoid linebreak between "|" and attributes.
Add linebreak and two spaces after attributes to keep indentation.

moinessim and others added 6 commits November 24, 2020 03:12
Avoid linebreak between "|" and attributes.
Add linebreak and two spaces after attributes to keep indentation.
Had to reference in fsproj directly because Paket wouldn't copy the dll to the bin folder.
@drvink
Copy link
Collaborator

drvink commented Nov 29, 2020

@moinessim While I doubt this package has many Mono users, I'd prefer to not break it if possible. Would you be able to investigate why the build is failing on the Linux test environment? It does seem to work on OS X, so it might just be an issue with the Mono or F# version used by that version of Ubuntu.

I'm happy to merge this, but if you're not using this package for CodeDom interop or legacy reasons, FCS is a better choice for F# users.

@moinessim
Copy link
Author

Hi @drvink. Thanks for taking a look at this.
Apparently it's related to fsprojects/FAKE#2362.
I tried updating FAKE to the latest version, but I get a scary error from mono.
I am working with CodeDom, generating types (F#) based on XSD.

@@ -1175,7 +1183,7 @@ let getMethodOverloads (membs:CodeTypeMemberCollection) =
/// fields
let generateField (c:CodeMemberField) =
id
+> generateCustomAttrDecls c.CustomAttributes ""
+> generateCustomAttrDeclsForEnumField c.CustomAttributes ""
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this should not change. Confused generateField with generateEnumField

@moinessim moinessim closed this Feb 17, 2021
@drvink
Copy link
Collaborator

drvink commented Feb 17, 2021

@moinessim Sorry for dragging my feet on this--were you able to figure out the FAKE issue?

@moinessim
Copy link
Author

@moinessim Sorry for dragging my feet on this--were you able to figure out the FAKE issue?

Hi @drvink ,
I think to build it with the new version of Fake (recommended fix in issue) would require some changes to the build script, which I'm not familiar with.
Nevertheless, I was able to build the library with Nix.
I can make a PR if you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants