Git Product home page Git Product logo

Comments (13)

panglesd avatar panglesd commented on June 30, 2024 1

@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.

dianaoigo avatar dianaoigo commented on June 30, 2024

@panglesd i would like to work on this issue

from ppxlib.

panglesd avatar panglesd commented on June 30, 2024

Yes, sure!

Do not hesitate to ask for clarification if something in the issue is obscure!

from ppxlib.

dianaoigo avatar dianaoigo commented on June 30, 2024

@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.

panglesd avatar panglesd commented on June 30, 2024

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.

dianaoigo avatar dianaoigo commented on June 30, 2024

@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.

dianaoigo avatar dianaoigo commented on June 30, 2024

@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

No solution found, exiting
i am using ubuntu

from ppxlib.

dianaoigo avatar dianaoigo commented on June 30, 2024

@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.

panglesd avatar panglesd commented on June 30, 2024

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:

Let me know if that unblocks the situation!

from ppxlib.

panglesd avatar panglesd commented on June 30, 2024

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.

dianaoigo avatar dianaoigo commented on June 30, 2024

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.

sim642 avatar sim642 commented on June 30, 2024

This should be closed by #408 I think.

from ppxlib.

panglesd avatar panglesd commented on June 30, 2024

Indeed, thanks!

from ppxlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.