-
Notifications
You must be signed in to change notification settings - Fork 131
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
Go modules in conflict with wuffRoot #21
Comments
Yeah, it needs fixing at some point, so that we don't hard-code the wuffs root. But it hasn't been a high priority so far. Still, I'm not sure that "packaging the required resources" in the executable would work. What resources did you have in mind? Note that |
By "the current source code", do you mean the If it's the If it's the
|
One more point: the envisaged workflow, when working on the Wuffs standard library, is:
Note that, nowhere in that workflow is "rebuild the |
The vfs could be used only of the wuffRoot is not set. The development workflow is important, but to gain users I think the user workflow should also be as smooth as possible. In my eyes the user workflow should be prioritized over the development workflow, but this is irrelevant here, since they're not in conflict. |
How does this alleviate " I still don't know if, by "bundling resources", you mean |
A user is expecting the wuffs binary to simply work on his code, you can choose to have an obsession process like go does, that puts wuff source and binary in a known path, and infers the source path. Or bundle out as I suggested. Or maybe other solution. I must reflect to you, that as someone trying to promote wuff in the organization, the current state of affair is not helping me convincing others that wuff is a stable product ready to consume. It might be OK for you, as wuff might be for internal use only, and you might not care, but I'm just reflecting my experience to you. |
Wuff gen should accept a path, or work on the current directory, like `go
build ` does.
I meant packaging the wuff source required. So that wuff gen `my-file-just
using-wuff.wuff` would just work.
…On Thu, Jun 13, 2019, 08:37 Nigel Tao ***@***.***> wrote:
The vfs could be used only of the wuffRoot is not set.
How does this alleviate "wuffs gen has to write the output somewhere"?
You can't *write* to the VFS bundled into the binary.
I still don't know if, by "bundling resources", you mean *.go files,
*.wuffs files, or something else.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21?email_source=notifications&email_token=AJ5HAWFYDUGKLFHV7XB52BTP2HMIPA5CNFSM4HSCELZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSSDBI#issuecomment-501555589>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ5HAWGXVBSG7ECZUMW5PBLP2HMIPANCNFSM4HSCELZA>
.
|
If you aren't already aware, you should be able to do something like:
That might solve what your actual problem is. Note that it's |
Well, I already said that:
It just hasn't been the highest priority feature on the long list of things to work on so far. |
I'm not aware of that, that should be fine.
Still I'm not sure what wuff is useful for, is it only for the development
of wuff?
As I said, I expected `wuff gen` to just work in a directory with wuff
files, like go always did.
At any rate, if wuff-c is what a user who do not intend to hack on wuff, is
expected to use, I suggest to document out clearly in the beginning of the
README file.
…On Thu, Jun 13, 2019, 08:44 Nigel Tao ***@***.***> wrote:
If you aren't already aware, you should be able to do something like:
wuffs-c gen -package_name foo foo/*.wuffs > foo.c
That might solve what your actual problem is. Note that it's wuffs-c, not
wuffs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21?email_source=notifications&email_token=AJ5HAWHMTWWVPIPZL5ZNA5DP2HNCNA5CNFSM4HSCELZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSSNCY#issuecomment-501556875>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ5HAWAQEYNVU4LPDUGGBG3P2HNCNANCNFSM4HSCELZA>
.
|
Bottom line, would you accept patch checking for wuffs path in the current
dir of the binary by default, and a clear explanation that users are
expected to develop their wuff file in tree for the time being?
…On Thu, Jun 13, 2019, 08:48 Nigel Tao ***@***.***> wrote:
Wuff gen should accept a path, or work on the current directory, like go
build does.
Well, I already said that:
The long term plan is for wuffs gen
your/wuffs/code/outside/of/the/standard/library to work, the same way
that go build foo/bar works.
It just hasn't been the highest priority feature on the long list of
things to work on so far.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21?email_source=notifications&email_token=AJ5HAWFWSQB4KMKEMSRLUETP2HNRLA5CNFSM4HSCELZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSSTUA#issuecomment-501557712>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ5HAWEJCGNYGWENAQII273P2HNRLANCNFSM4HSCELZA>
.
|
"Wuffs" is an overloaded term:
Other C/C++ projects can use Wuffs (the standard library), without caring at all about Wuffs (the command line tool) or Wuffs (the programming language). For example, Skia (a C/C++ project) uses Wuffs (the standard library), without requiring Wuffs (the command line tool) or in fact any Go code in this repository: https://github.com/google/skia/blob/master/third_party/wuffs/BUILD.gn When you ask what wuffs is useful for, which wuffs are you referring to? The initial focus (remember that we have still not hit a version 0.2 release) is to develop a useful standard library. The priority for Wuffs (the command line tool) is to support developing a useful standard library. As I said, long term, we'd like to have Wuffs (the command line tool) work with third party Wuffs (the programming language) code, but as I again said, it hasn't been the highest priority feature.
I'm open to having Wuffs (the command line tool) work better for third party In any case, it might not be as trivial as it first seems, if you have multiple third party Wuffs (the programming language) packages, some of which depend on others, or depend on standard library packages. |
BTW, the overloaded term is "wuffs" with an "s", not "wuff". |
To set expectations: it is not a stable product, certainly for third party Even after v0.2 is released, the language and the tools will undoubtedly change, in backwards incompatible ways. I have users, but they are using the standard library (in its "generated C code" edition). They are not writing their own OTOH, longer term, I'd like to support third party |
My understanding of the project, since it was called Do you mean by "standard library" "wuffs code compiled into C from the standard library"? What wuffs offers now is the set of safer parsers already exist in the standard library? I didn't understand that from the README, but I think I now have a better understanding of how do you expect Non-backwards compatibility is not a problem for me, but ease of usage is. If one want to write a safe binary parser in |
A product is the programming language, but another product is a C library, with better safety guarantees than almost all C libraries, which can be used in existing C/C++ projects without requiring their build systems to incorporate the Wuffs and Go toolchains. People can use the second product without the first, and vice versa. So far, I have more users for the second product than the first product. That's not to say that the first product isn't useful or kept in mind, just that the second product, being where my users have been, has been the higher priority.
The standard library is the It is also available in its "generated C code" edition, in the
The standard library is one of the products on offer: the second product mentioned above. The first product is still there, but hasn't received as much attention as the second one. I'll admit that the README could be clearer about this.
I wouldn't say "meant to", just that that's where the customers (so far) have been. Bottom line, from what I know so far of your project, I think you'd be better off invoking |
Recently, go module was introduced, which sounds like the way to go (pardon the pun) with golang.
However this is in conflict with wuff's design, which assumes some source artifacts are available through
$GOPATH/src/github.com/wuffs
.For example,
wuffs gen
is hardcoded to consume files from wuffs source root.A more reasonable design would be not to depend on the wuffs source dir in the modules era, but to package required resources in the executable, and accept path for the sources to generate.
Even if
wuffsRoot
is still deemed necessary, I think we should explicitly copy the required resources to$GOPATH/src
inbuild-all.sh
, in order to have a clean copy of clonedwuffs
simply work.The text was updated successfully, but these errors were encountered: