Comments (13)
@dianaoigo I already gave all the generic information I could in #404 (comment) and #404 (comment), in order to help you more I would need a more detailed question. For instance, I need to know what is clear and what is unclear to you, to answer the right thing. There is a nice blog post about asking good questions here that explains that very well!
from ppxlib.
@panglesd i would like to work on this issue
from ppxlib.
Yes, sure!
Do not hesitate to ask for clarification if something in the issue is obscure!
from ppxlib.
@panglesd i have forked and cloned the project . looking at the project, would it be a good idea to make the suggested changes in the src/ast_pattern.ml file? I am still learning and understanding more about the ocaml ecosystem.
from ppxlib.
Attributes are part of the OCaml syntax, as in:
type t = {
a : int [@foo "an attribute named foo whose payload is a string"]
}
Ast_pattern
is a module to build "pattern-matches of the AST". It is used in several places in ppxlib, mostly to extract payloads in extension nodes and attributes. The documentation on Ast_pattern is available here.
ppxlib
allows "specifying" attributes and their payloads, from a name, a context and an ast pattern. This is the declare
function. From a declared attribute, one can then extract the value in the payload, using the ast-pattern: this is get
.
Here, the issue is about adding support for a common case, where the attributes have no payload, the only thing we are interested in is whether they are present or not. For this, I propose to add the declare_flag
and has_flag
function. According to you, in which module in the API should they belong?
from ppxlib.
@panglesd i don't know why i haven't been able to see till i restarted my machine today. At some point i thought you were ignoring me. I was actually caught between the ast_pattern and attrribute model i just wasn't sure which. for now i believe attribute module would be the best way since it's where declaration and retrieval of attributes is done.
from ppxlib.
@panglesd since i restarted my machine i am having serious problems. now when i run _dune build _ i get the error
File "dune-project", line 6, characters 1-5:
6 | (cram enable)
^^^^
Error: Unknown field cram
and when i try reinstalling the dependencies using _opam install --deps-only --with-test .
_ i get the error
[ERROR] Package conflict!
- Missing dependency:
- ppxlib < 0.1.0
no matching version
- ppxlib < 0.1.0
No solution found, exiting
i am using ubuntu
from ppxlib.
@pitag-ha i am having some problems. i restarted my machine after almost a week and it must have corrupted everything. now i can't even build or test as shown in the comment above
from ppxlib.
Hello @dianaoigo !
First, if you ever feel that I am ignoring you, please ping me. It could happen that I miss one gh notification.
This was not the case here: I thought you were busy working on this or some other project since you did not reply to my clarifications.
The error message when running dune build
seems to indicate that dune
has a too low version. Reinstalling the dependencies was a good move, but the error you get is strange (I think I already had it once, I think it is due to ppxlib-bench.opam
).
You could try:
- Rerunning your install command, after having removed
ppxlib-bench.opam
(or only this line: https://github.com/ocaml-ppx/ppxlib/blob/main/ppxlib-bench.opam#L17) - Install dependencies by hand, see the list of them https://github.com/ocaml-ppx/ppxlib/blob/main/ppxlib.opam#L22..L35
Let me know if that unblocks the situation!
from ppxlib.
Also, it is strange that this happened after a machine reboot... Maybe you changed the opam switch, or your environment is not up to date with the switch you have chosen? (eval $(opam env)
)
from ppxlib.
I uninstalled everything dune, opam ocaml, reinstalled and updated. somehow that solved the issue. also learnt that any dune version below 2.7 will throw some crazy errors. I have been working on a different ocaml project maybe that was the cause. Could you offer a little more insight on how to proceed?
from ppxlib.
This should be closed by #408 I think.
from ppxlib.
Indeed, thanks!
from ppxlib.
Related Issues (20)
- ppxlib#trunk-support on 5.1.0~alpha1 breaks `let f: type a.` syntax HOT 4
- ppxlib 5.2 trunk-support needs value_constraint support HOT 6
- trunk-support does't build with ocaml-trunk HOT 5
- Fix 5.1 migrations for generative functor applications HOT 10
- `Ast_builder.Default.pexp_tuple` on empty list HOT 1
- Performance analysis
- Server mode
- Reduce the number of AST traversals
- Reserving an attribute namespace with a dot has unexpected semantics
- Ppxlib’s behaviour in case of raised exception. HOT 2
- trunk-support does't build with ocaml-trunk HOT 10
- Fixpoint and monadic combinators for `Ast_pattern` HOT 1
- Attributes in `Ast_builder.Default` and `Ast_pattern` HOT 3
- The tests fail when using OCaml 5.1.1 HOT 7
- Add a driver mode with no output if there is no rewriting to do HOT 4
- Binary mode when writing to stdout on Windows HOT 7
- Unused-type declaration warning and bisect_ppx coverage points HOT 19
- ocaml.ppx.context's local_path format changes in OCaml 5.2 HOT 1
- Compiler error with OCaml 5.2.0 and an identity ppx HOT 3
- Remove Ppxlib's label exposed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppxlib.