Shutting down removes comments from config.yml

Đang mở
#76 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

The issue identifies Warehouse.saveConfig and the shipped config.yml; start by locating that method and tracing what calls it during startup and shutdown. Check where default stores are set and saved, then verify that starting and stopping the server leaves config.yml unchanged.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Problem

Every clean shutdown rewrites config.yml and removes its comments, including the shipped notes about default stores and custom messages. Warehouse.saveConfig saves the config with a YAML loader that doesn't keep comments.

Confirmed by loading and saving the shipped config.yml: the file had comments before and none after.

Enabling comments in the loader won't keep commented-out example lines, because those aren't attached to any setting.

Scope

  • Only write config.yml when something changed it, such as setting a default store. Better still, move runtime values like default stores into store data, so the plugin never rewrites the admin's file.

Done when

  • Starting and stopping the server leaves config.yml unchanged.
Ngôn ngữ chính
Java
Star
1
Fork
0
Merge trung bình
2 giờ 35 phút
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BrendonButler/Shops

Tất cả issue của BrendonButler/Shops

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.