Page MenuHome

Tools: new tool dnacheck which gives useful feedback on DNA padding issues.
AbandonedPublic

Authored by Ray Molenkamp (LazyDodo) on Nov 5 2020, 3:00 AM.

Details

Reviewers
None
Summary

This adds a small tool to report/test on DNA alignment issues in a format most ide's will be able to understand.

this tool will not run automatically, in the IDE you need to manually right click either RUN_DNA_CHECK or RUN_DNA_FIX

running dna_fix

dna_check_results in the IDE

fix it hints in the build output

Due to makesdna having a bug currently and does not report certain alignment issues 32 bit checking is currently disabled since it makes A LOT of changes...

This diff is not quite ready for review yet, but it's good enough for some (windows only currently) developers to take it for a spin.

on linux we ship the clang headers, but none of the libraries, so while it builds on linux, it does not have a super good time linking.

Diff Detail

Repository
rB Blender
Branch
tmp_dna_check (branched from master)
Build Status
Buildable 11134
Build 11134: arc lint + arc unit

Event Timeline

Ray Molenkamp (LazyDodo) requested review of this revision.Nov 5 2020, 3:00 AM
Ray Molenkamp (LazyDodo) planned changes to this revision.Nov 5 2020, 3:01 AM

Not quite ready for review yet but put it out for people to play with.

Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)Nov 5 2020, 3:04 AM
Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)Nov 5 2020, 3:07 AM
Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)
  • fix error message
Ray Molenkamp (LazyDodo) retitled this revision from Tools: new tool dnacheck which gives usefull feedback on dna padding issues. to Tools: new tool dnacheck which gives useful feedback on DNA padding issues..Nov 5 2020, 3:39 AM
Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)
Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)Nov 5 2020, 6:03 PM

This is great. I was also looking into using libtooling to write some checks, but did not get very far yet.

It would be nice to get the necessary infrastructure in Blender.
This produces a standalone binary, that is independent of Blender, right?

I wonder if this code should be in source/blender or maybe better in source/tools or some other folder.

This is great. I was also looking into using libtooling to write some checks, but did not get very far yet.
It would be nice to get the necessary infrastructure in Blender.

On windows it's easy all the parts are there, linux/mac are a little trickier since we build the required libs but do not have them in SVN yet, i'm working on a separate patch to address that

This produces a standalone binary, that is independent of Blender, right?

Correct, it needs some of the clang headers (stdint + friends) to be present in a rather specific relative location though, when you add a tool to the clang tree that'll be the case, for us we'll need to place them somewhere in the ./lib folder in the build dir. but beyond that yes, standalone.

I wonder if this code should be in source/blender or maybe better in source/tools or some other folder.

Yeahh not gonna lie, I struggled to make a patch that crossed submodule boundaries and went 'screwit, source/blender it shall be!`

Ray Molenkamp (LazyDodo) planned changes to this revision.Jul 7 2021, 3:51 AM

On hold till all platforms have the required headers in svn (currently missing stdint.h and friends on mac/lin)

Update to master
Add linux support

Ray Molenkamp (LazyDodo) planned changes to this revision.Aug 5 2021, 4:13 AM

Still plenty rough edges to deal with, but should be good enough to play with on both windows and linux now

Ray Molenkamp (LazyDodo) edited the summary of this revision. (Show Details)Aug 5 2021, 4:15 AM

this is unlikely to ever make it in.