Trouble building Rust-BBEdit: BBEdit SDK no longer exists as DMG, won't compile after packaging as DMG
WallGeckoPoint opened this issue · comments
The documentation for this reads:
To compile your own version, you’ll need Xcode, Rust, and Cargo. The default schema outputs a .bblm, and comes with a Run build step so you can debug the module while BBEdit is running. You’ll also need the BBEdit SDK. The project assumes it’s mounted under /Volumes/BBEdit SDK.
However, the current BBEdit SDK does not come as a mountable disk image file.
I re-packaged the SDK as a DMG so the compiler would be able to find the header files -- see this BBEdit SDK.dmg.zip.
Unfortunately this is not quite enough to get compilation to work -- at the moment it fails with the error:
In file included from /Users/xxx/Library/Application Support/BBEdit/Packages/Rust.bbpackage/rust.mm:8:
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:818:35: error: use of undeclared identifier 'EXIT'
require_action(nil != callbacks, EXIT, err = paramErr);
^
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:819:37: error: use of undeclared identifier 'EXIT'
require_action(nil != tokenBuffer, EXIT, err = paramErr);
^
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:820:34: error: use of undeclared identifier 'EXIT'
require_action(nil != procList, EXIT, err = paramErr);
^
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:821:30: error: use of undeclared identifier 'EXIT'
require_action(nil != name, EXIT, err = paramErr);
^
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:827:6: error: use of undeclared identifier 'EXIT'
EXIT);
^
/Volumes/BBEdit SDK/Interfaces/Language Modules/BBLMInterface.h:833:6: error: use of undeclared identifier 'EXIT'
EXIT);
^
6 errors generated.
** BUILD FAILED **
I got the build to work by:
-
Commenting out the offending lines of the header file above. Here is the
newly kluged DMG. -
Deleting the Cargo.lock in the
helper-tool
subdirectory -- it was requiring a version of theregex
crate that did not compile:
Compiling regex v0.1.41
error[E0446]: private type `prefix::SingleSearch` in public interface
--> /Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.41/src/prefix.rs:46:12
|
46 | Single(SingleSearch),
| ^^^^^^^^^^^^^ can't leak private type
Please note that this is all a really terrible hack and should be improved upon before any kind of production use.