On 24 May 2021, at 14:57, Roberto Avanzi wrote:

I cannot find where the system makes --flatten default to NO, but I
modified method transform in class CompileXib as follows

This could simply be Apple that changed the default behavior for latest Xcode (I am still building on macOS 10.15).

and now, instead of failing on several of these .nib
files/directories, it fails only on two of them: GrammarProperties.nib
and FileDropProperties.nib.
As a result I cannot open the Bundle Editor.

As a result files
/Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib
and
/Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib
are in fact packages and not files, and they both contain two files
inside, called keyedobjects-110000.nib and keyedobjects,.nib

Try to delete these files (folders) and re-run the build. It could be, that they were created before you added the --flatten YES option.

If it then works, I will make --flatten YES default.

Also, I didn’t know about /opt/homebrew, presumably this was also a change made for macOS 11, I can probably improve ./configure to pick this up.