ganler commented on PR #12197:
URL: https://github.com/apache/tvm/pull/12197#issuecomment-1197338540

   Thanks @areusch for the suggestions!
   
   I agree that we want to avoid dependencies if possible. As you said, one way 
is to implement the functionality from scratch.
   
   > I wonder if it would be possible to instead modify the TVMScript printer?
   
   It is possible with some effort to build a highlighting functionality from 
scratch: 1) lexer; 2) highlighting terminals by generating ansi escape code; 
and 3) make things configurable. 
   
   > in general it'd be good to avoid adding dependencies to the TVM core 
unless they're clearly beneficial to a large set of code paths.
   
   Agreed. I think we should not put this under "core". Meanwhile, "Pygments" 
is actually a very fundamental and reliable library in Python community that 
has been actively developed for years. For example, latest pypi can use `rich` 
(which depends on "Pygments") to display the progress bars.
   
   Summing up the bits above, I suggest that we still use Pygments to 
hightlight TVM script but we don't put it as a required dependency. Instead we 
can put some log to suggest users to install "Pygments" if they have not done 
it so far or simply put it in `extras_require`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to