Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Mac OS. Help wanted 馃檹馃崕 #178

Open
3 of 6 tasks
kantord opened this issue Sep 7, 2023 · 7 comments
Open
3 of 6 tasks

Support Mac OS. Help wanted 馃檹馃崕 #178

kantord opened this issue Sep 7, 2023 · 7 comments
Labels
help wanted Extra attention is needed up for grabs

Comments

@kantord
Copy link
Owner

kantord commented Sep 7, 2023

At all steps, SeaGOAT is developed with guaranteeing Mac OS support. That being said, as I don't have a Mac OS device and I don't have expertise regarding Mac OS development workflows, I have not been able to verify that it works properly.

Help wanted!

Here is a rough checklist of the current status of Mac OS support:

  • Enable CI checks for Mac OS
  • Make sure that all CI tests pass for Mac
  • Manually test SeaGOAT on Mac
  • Document installation steps on Mac
  • Make sure that any required Mac-specific features are implemented
  • Make sure that it's easy to install on Mac using common tools (homebrew?)

Currently the main problem is that I have not been able to try and run SeaGOAT manually on OSX.

Also I have discovered that some of the tests are failing, so I created a CI file specifically for OSX that only checks some of the tests are are passing without issue:

- name: Run pytest
run: |
poetry run pytest tests/test_repository.py -vvs --timeout=60

For comparison the Linux tests look like this:

- name: Run pytest
run: |
poetry run pytest . -vvs --timeout=60

@kantord kantord added help wanted Extra attention is needed up for grabs labels Sep 7, 2023
@kantord
Copy link
Owner Author

kantord commented Sep 12, 2023

update, now all the tests pass on Mac OS in the pipeline 鉁旓笍 馃殌 still hasn't been able to confirm by manually testing, but now everything should work well in Mac

@YussufSassi
Copy link

YussufSassi commented Sep 20, 2023

Can confirm it's working on OSX

Here's what I tested it on:
Device: MacBook Pro 2023, M2 Max, 32GB RAM
MacOS Version: Ventura 13.5.2 (22G91)

Mac-specific installation steps:

brew install pipx
brew install ripgrep

After that I followed the installation steps in the docs (including bat, which I installed via brew)

Tested on a small project, ran quickly and there were no issues

On a large project with about 160,000 tasks in the indexing process it doesn't seem to use the full power of the cpu (not sure if that's intentional). It's sitting at around 40-43% usage while indexing the project.

@forest-d
Copy link

forest-d commented Sep 20, 2023

馃憤 can also confirm it's working on OSX.

Device: MacBook Pro 2020, M1, 8GB RAM
MacOS: Ventura 13.5.1

Here's what I did:

  1. Created a new conda env conda create -n seagoat python=3.11
  2. Installed dependencies conda install ripgrep && brew install bat && pip install seagoat
  3. Ran seagoat server start . on one of my repos
  4. Ran gt "my query" and observed the expected bat output

@kantord
Copy link
Owner Author

kantord commented Sep 20, 2023

Can confirm it's working on OSX

Here's what I tested it on: Device: MacBook Pro 2023, M2 Max, 32GB RAM MacOS Version: Ventura 13.5.2 (22G91)

Mac-specific installation steps:

brew install pipx
brew install ripgrep

After that I followed the installation steps in the docs (including bat, which I installed via brew)

Tested on a small project, ran quickly and there were no issues

On a large project with about 160,000 tasks in the indexing process it doesn't seem to use the full power of the cpu (not sure if that's intentional). It's sitting at around 40-43% usage while indexing the project.

Thank you for the feedback, I'm glad to hear that it's working!

Regarding the CPU use that is intentional, since the process can take a long time for a large project, I designed it in such a way that it avoids blocking your computer while processing to avoid any disruption

@kantord
Copy link
Owner Author

kantord commented Sep 20, 2023

馃憤 can also confirm it's working on OSX.

Device: MacBook Pro 2020, M1, 8GB RAM MacOS: Ventura 13.5.1

Here's what I did:

  1. Created a new conda env conda create -n seagoat python=3.11
  2. Installed dependencies conda install ripgrep && brew install bat && pip install seagoat
  3. Ran seagoat server start . on one of my repos
  4. Ran gt "my query" and observed the expected bat output

Thanks! Glad to hear it works both on M1 and M2

@monopoly-db
Copy link

I have a Intel Mac and I get this from seagoat-server on my C++ git repo:

2023-09-20 16:40:46,448 Creating server...
2023-09-20 16:40:46,449 Starting worker thread...
2023-09-20 16:40:46,456 Serving on http://0.0.0.0:52647
2023-09-20 16:40:47,972 Checking repository for new changes
2023-09-20 16:41:00,631 Task queue depth is 1
warning: exhaustive rename detection was skipped due to too many files.
warning: you may want to set your diff.renameLimit variable to at least 33109 and retry the command.
Analyzing source code: 0it [00:00, ?it/s]
2023-09-20 16:41:33,563 Analyzed the minimum number of chunks needed to operate. 
2023-09-20 16:41:33,563 Analyzed all chunks!
2023-09-20 16:41:33,564 Handling task: query
Exception in thread Thread-1 (_worker_function):
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/site-packages/seagoat/queue/base_queue.py", line 79, in _worker_function
    self._handle_task(context, task)
  File "/usr/local/lib/python3.11/site-packages/seagoat/queue/base_queue.py", line 66, in _handle_task
    result = handler(context, *task.args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/seagoat/queue/task_queue.py", line 83, in handle_query
    results = context["seagoat_engine"].get_results(kwargs["limit_clue"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/seagoat/engine.py", line 208, in get_results
    sorted(
  File "/usr/local/lib/python3.11/site-packages/seagoat/engine.py", line 212, in <lambda>
    + 0.3 * normalize_file_position(top_files[x.path])
                                    ~~~~~~~~~^^^^^^^^
KeyError: 'ver/version.cc'

Hardware:

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro16,1
  Processor Name:	8-Core Intel Core i9
  Processor Speed:	2.3 GHz
  Number of Processors:	1
  Total Number of Cores:	8
  L2 Cache (per Core):	256 KB
  L3 Cache:	16 MB
  Hyper-Threading Technology:	Enabled
  Memory:	16 GB
  System Firmware Version:	1968.140.7.0.0 (iBridge: 20.16.6072.0.0,0)
  OS Loader Version:	540.120.3~22

Running MacOS Monterey version 12.6.9

@kantord
Copy link
Owner Author

kantord commented Sep 25, 2023

Is this a Mac specific issue? Did any of you face something similar? #243 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed up for grabs
Projects
None yet
Development

No branches or pull requests

4 participants